|
|
@ -3,13 +3,15 @@ |
|
|
|
; VGA base address: 0xb8000 |
|
|
|
; VGA base address: 0xb8000 |
|
|
|
; Charpos = 0xb8000 + 2(row*80 + col) |
|
|
|
; Charpos = 0xb8000 + 2(row*80 + col) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vga_color_buf: db 0x0f ; Buffer to be changed so that we can choose colors! |
|
|
|
|
|
|
|
|
|
|
|
vga_print: |
|
|
|
vga_print: |
|
|
|
pusha |
|
|
|
pusha |
|
|
|
mov edx, VIDEO_MEM |
|
|
|
mov edx, VIDEO_MEM |
|
|
|
|
|
|
|
|
|
|
|
vga_print_loop: |
|
|
|
vga_print_loop: |
|
|
|
mov al, [ebx] ; Pointer to char |
|
|
|
mov al, [ebx] ; Pointer to char |
|
|
|
mov ah, 0x8f ; Color code |
|
|
|
mov ah, [vga_color_buf] ; Color code |
|
|
|
|
|
|
|
|
|
|
|
cmp al, ASCII_END ; Check if end of string |
|
|
|
cmp al, ASCII_END ; Check if end of string |
|
|
|
je vga_print_return ; If end then return |
|
|
|
je vga_print_return ; If end then return |
|
|
|