Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identity-map complete vga region (0xa0000 to 0xc0000) #104

Merged
merged 2 commits into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/video_mode/vga_320x200.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions src/video_mode/vga_text_80x25.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down