diff options
author | Kartik Agaram <vc@akkartik.com> | 2021-01-27 21:52:44 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2021-01-27 21:52:44 -0800 |
commit | 49badfb697fb06c5fa09aced3d05706f93b55938 (patch) | |
tree | 2abff187da680cbb8ac5089bff42a5ab04e0e7ca /baremetal/102keyboard.subx | |
parent | ca5ac5154e7a2fddb978ba14e83818498bdfb377 (diff) | |
download | mu-49badfb697fb06c5fa09aced3d05706f93b55938.tar.gz |
7672
Diffstat (limited to 'baremetal/102keyboard.subx')
-rw-r--r-- | baremetal/102keyboard.subx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/baremetal/102keyboard.subx b/baremetal/102keyboard.subx index 8faa71e3..df74c8e7 100644 --- a/baremetal/102keyboard.subx +++ b/baremetal/102keyboard.subx @@ -20,9 +20,9 @@ read-key: # kbd: (addr keyboard) -> result/eax: byte { 75/jump-if-!= break/disp8 # var read/ecx: byte = keyboard buffer's read index - 8b/-> *0x7ee4 1/r32/CL # keyboard-buffer-read + 8b/-> *0x802c 1/r32/CL # keyboard-buffer-read # var next-key/eax: byte = *(keyboard buffer + ecx) - 8a/byte-> *(ecx+0x7ee8) 0/r32/AL # keyboard-buffer-data + 8a/byte-> *(ecx+0x8030) 0/r32/AL # keyboard-buffer-data # if (next-key != 0) lock and remove from keyboard buffer 81 7/subop/compare %eax 0/imm32 { @@ -30,9 +30,9 @@ read-key: # kbd: (addr keyboard) -> result/eax: byte # TODO: add some instructions in this block to SubX if we ever want to # use bootstrap on baremetal programs fa/disable-interrupts - c6 0/subop/copy-byte *(ecx+0x7ee8) 0/imm8 # keyboard-buffer-data - ff 0/subop/increment *0x7ee4 # keyboard-buffer-read - 81 4/subop/and *0x7ee4 0xf/imm32 # keyboard-buffer-read + c6 0/subop/copy-byte *(ecx+0x8030) 0/imm8 # keyboard-buffer-data + ff 0/subop/increment *0x802c # keyboard-buffer-read + 81 4/subop/and *0x802c 0xf/imm32 # keyboard-buffer-read fb/enable-interrupts } # return |