diff options
Diffstat (limited to 'boot/vesa_setup_16.asm')
| -rw-r--r-- | boot/vesa_setup_16.asm | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/boot/vesa_setup_16.asm b/boot/vesa_setup_16.asm index 62d8d46..25eba22 100644 --- a/boot/vesa_setup_16.asm +++ b/boot/vesa_setup_16.asm @@ -51,17 +51,30 @@ VesaSetup: ; call print_nextline ;preempt keyboard buffer -; next_key: -; -; mov al,0 -; mov ah,1 ; block waiting for keyboard scancode -; -; int 0x16 -; cmp ax,0 -; jne next_key -; -; mov ah,0 ; block waiting for keyboard scancode -; int 0x16 + + next_key: + + mov ah,0x1 ;get scnacode from kb (non-blocking) + int 0x16 + jnz get_key ; nothing to preempt + + jmp wait_key + + get_key: + mov ah,0 ;get key from buffer + int 0x16 + +; mov al,ah +; call print_hex_byte +; call print_nextline + + jmp next_key + + ;;;;;;;;;;;;;;;;; + wait_key: + mov ah,0 ; block waiting for keyboard scancode + int 0x16 + ;VESA: finally switch to the mode of choice! mov ax,0x4f02 ;vesa function: Set Mode |
