Ticket #5341: esc2.patch

File esc2.patch, 852 bytes (added by Grey, 12 years ago)

Replying to andreasf: Try new patch, please. It's optimized patch.

  • src/system/boot/platform/bios_ia32/bios.S

     
    237237
    238238/** uint32  search_keyboard_buffer()
    239239 *  Search in keyboard buffer keycodes for F8, F12 or Space
    240  *  if not found - search ESC keycode.
     240 *  if not found - search ESC keycode at the end of this buffer (2 positions)
    241241 */
    242242
    243243FUNCTION(search_keyboard_buffer)
     
    266266    cmp $0x440, %si
    267267    jnz search_cycle1
    268268
    269     movw    $0x41E, %si // BIOS kbd buffer
    270 search_cycle2:
    271     lodsw
     269    addw    0x41C, %si
     270    movw    -0x42(%si), %ax
    272271    cmp $0x011B, %ax    // test ESC key
    273272    jz  to_ret
    274     cmp $0x440, %si
    275     jnz search_cycle2
     273    movw    -0x44(%si), %ax
     274    cmp $0x011B, %ax    // test ESC key
    276275to_ret:
    277276    pop %ds
    278277