diff --git a/src/video_mode/vga_320x200.s b/src/video_mode/vga_320x200.s index e052defb..17d4a743 100644 --- a/src/video_mode/vga_320x200.s +++ b/src/video_mode/vga_320x200.s @@ -19,7 +19,7 @@ vga_map_frame_buffer_loop: mov [_p1 + ecx * 8], eax add eax, 4096 - cmp eax, 0xa0000 + 320 * 200 + cmp eax, 0xc0000 jl vga_map_frame_buffer_loop ret diff --git a/src/video_mode/vga_text_80x25.s b/src/video_mode/vga_text_80x25.s index 07208768..0ddb0d6f 100644 --- a/src/video_mode/vga_text_80x25.s +++ b/src/video_mode/vga_text_80x25.s @@ -11,11 +11,17 @@ config_video_mode: .code32 vga_map_frame_buffer: - mov eax, 0xb8000 + mov eax, 0xa0000 or eax, (1 | 2) - mov ecx, 0xb8000 +vga_map_frame_buffer_loop: + mov ecx, eax shr ecx, 12 mov [_p1 + ecx * 8], eax + + add eax, 4096 + cmp eax, 0xc0000 + jl vga_map_frame_buffer_loop + ret # print a string and a newline