diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-12-23 23:06:54 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-12-23 23:06:54 -0800 |
commit | 32fc6c2ddfc353ff88f3ceca8e4eb7e8607f5edf (patch) | |
tree | eaadfecbbe9c6f1f51854f06c860d3ebf95057d9 | |
parent | 169adc36d3d90302a9837b9b1dc1b94de43e2350 (diff) | |
download | mu-32fc6c2ddfc353ff88f3ceca8e4eb7e8607f5edf.tar.gz |
7395 - boot.hex: recognize '1' press on keyboard
https://stackoverflow.com/questions/37618111/keyboard-irq-within-an-x86-kernel is right, no need to mess with the status port at the start.
-rw-r--r-- | apps/boot.hex | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/boot.hex b/apps/boot.hex index 181fdcd4..e49dd2d8 100644 --- a/apps/boot.hex +++ b/apps/boot.hex @@ -225,12 +225,16 @@ e9 fb ff ff ff # loop forever b0 20 # al <- 0x20 e6 20 # port 0x20 <- al # read keyboard status (TODO: why bit 0? Doesn't line up with https://web.archive.org/web/20040604041507/http://panda.cs.ndsu.nodak.edu/~achapwes/PICmicro/keyboard/atkeyboard.html) - e4 64 # al <- port 0x64 - a8 01 # set zf if bit 0 (least significant) is not set - 74 00 # if bit 0 is not set, skip to epilogue HERE +#? e4 64 # al <- port 0x64 +#? a8 01 # set zf if bit 0 (least significant) is not set +#? 74 11 # if bit 0 is not set, skip to epilogue # read keycode into eax 31 c0 # eax <- xor eax; 11/direct 000/r32/eax 000/rm32/eax e4 60 # al <- port 0x60 + # map key '1' to ascii; if eax == 2, eax = 0x31 + 3d 02 00 00 00 # compare eax with 0x02 + 75 0b # if not equal, goto epilogue + b8 31 0f 00 00 # eax <- 0x0f31 # print eax to top-left of screen (*0xb8000) 89 # copy r32 to rm32 05 # 00/mod/indirect 000/r32/eax 101/rm32/use-disp32 @@ -242,8 +246,8 @@ e9 fb ff ff ff # loop forever cf # iret # padding -# 149 - 00 00 00 00 00 00 00 +# 14f + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |