Skip to content

Commit 936e8c0

Browse files
authoredMar 16, 2020
Merge pull request #104 from RKennedy9064/vga-mappings
Identity-map complete vga region (0xa0000 to 0xc0000)
2 parents 5783d11 + 1eaedc1 commit 936e8c0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed
 

‎src/video_mode/vga_320x200.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ vga_map_frame_buffer_loop:
1919
mov [_p1 + ecx * 8], eax
2020

2121
add eax, 4096
22-
cmp eax, 0xa0000 + 320 * 200
22+
cmp eax, 0xc0000
2323
jl vga_map_frame_buffer_loop
2424

2525
ret

‎src/video_mode/vga_text_80x25.s

+8-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@ config_video_mode:
1111
.code32
1212

1313
vga_map_frame_buffer:
14-
mov eax, 0xb8000
14+
mov eax, 0xa0000
1515
or eax, (1 | 2)
16-
mov ecx, 0xb8000
16+
vga_map_frame_buffer_loop:
17+
mov ecx, eax
1718
shr ecx, 12
1819
mov [_p1 + ecx * 8], eax
20+
21+
add eax, 4096
22+
cmp eax, 0xc0000
23+
jl vga_map_frame_buffer_loop
24+
1925
ret
2026

2127
# print a string and a newline

0 commit comments

Comments
 (0)
Please sign in to comment.