mirror of
https://github.com/reactos/reactos.git
synced 2025-01-10 16:18:16 +00:00
- Change "pollchar" to also empty the keyboard buffer after polling the character and rename it to "pollchar_and_empty" accordingly.
This fixes a bug revealed by silverblade's FOSDEM CD: If you boot FreeLoader with a boot menu from CD and press a key after that "Press any key to boot from CD" message, that keypress was forwarded to FreeLoader as well. - Remove the already unused and now unsynchronized "pollchar" from the regression testing boot sector. svn path=/trunk/; revision=39387
This commit is contained in:
parent
0a8a745e77
commit
b419715eb2
2 changed files with 17 additions and 22 deletions
|
@ -132,12 +132,7 @@ relocate:
|
|||
|
||||
; Make sure the keyboard buffer is empty
|
||||
%ifdef WAIT_FOR_KEY
|
||||
.kbd_buffer_test:
|
||||
call pollchar
|
||||
jz .kbd_buffer_empty
|
||||
call getchar
|
||||
jmp .kbd_buffer_test
|
||||
.kbd_buffer_empty:
|
||||
call pollchar_and_empty
|
||||
|
||||
; Check for MBR on harddisk
|
||||
pusha
|
||||
|
@ -166,7 +161,7 @@ relocate:
|
|||
add eax, 19 ;
|
||||
|
||||
.poll_again:
|
||||
call pollchar
|
||||
call pollchar_and_empty
|
||||
jnz .boot_cdrom
|
||||
|
||||
mov ebx, [BIOS_timer]
|
||||
|
@ -921,12 +916,24 @@ getchar:
|
|||
|
||||
|
||||
;
|
||||
; pollchar: check if we have an input character pending (ZF = 0)
|
||||
; pollchar_and_empty: check if we have an input character pending (ZF = 0) and empty the input buffer afterwards
|
||||
;
|
||||
pollchar:
|
||||
pollchar_and_empty:
|
||||
pushad
|
||||
mov ah,1 ; Poll keyboard
|
||||
mov ah, 1 ; Poll keyboard
|
||||
int 16h
|
||||
jz .end
|
||||
.empty_buffer:
|
||||
mov ah, 0 ; Read from keyboard
|
||||
int 16h
|
||||
|
||||
mov ah, 1 ; Poll keyboard again
|
||||
int 16h
|
||||
jz .buffer_emptied
|
||||
jmp .empty_buffer
|
||||
.buffer_emptied:
|
||||
and ax, ax ; ZF = 0
|
||||
.end:
|
||||
popad
|
||||
ret
|
||||
|
||||
|
|
|
@ -887,18 +887,6 @@ getchar:
|
|||
ret
|
||||
|
||||
|
||||
;
|
||||
; pollchar: check if we have an input character pending (ZF = 0)
|
||||
;
|
||||
pollchar:
|
||||
pushad
|
||||
mov ah,1 ; Poll keyboard
|
||||
int 16h
|
||||
popad
|
||||
ret
|
||||
|
||||
|
||||
|
||||
isolinux_banner db CR, LF, 'Loading IsoBoot...', CR, LF, 0
|
||||
copyright_str db ' Copyright (C) 1994-2002 H. Peter Anvin', CR, LF, 0
|
||||
presskey_msg db 'Press any key to boot from CD', 0
|
||||
|
|
Loading…
Reference in a new issue