about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-01-09 10:15:33 -0800
committerKartik Agaram <vc@akkartik.com>2021-01-09 10:15:33 -0800
commit8be561f59977a375af2af7cf300273d3548da2e0 (patch)
tree183219c54824f2672d5489629eb8b476ac3abcc4
parentadf7fba7fea6940f4330d8d8e25d0f0bbca9d737 (diff)
downloadmu-8be561f59977a375af2af7cf300273d3548da2e0.tar.gz
7485
-rw-r--r--baremetal/boot.hex18
-rw-r--r--baremetal/ex3.hex6
2 files changed, 13 insertions, 11 deletions
diff --git a/baremetal/boot.hex b/baremetal/boot.hex
index f57ae364..f6ded4aa 100644
--- a/baremetal/boot.hex
+++ b/baremetal/boot.hex
@@ -240,7 +240,7 @@ e9 fb ff  # loop forever
   # . var index/ecx: byte
   8a  # copy m8 at r32 to r8
     0d  # 00/mod/indirect 001/r8/cl 101/rm32/use-disp32
-    ce 7d 00 00  # disp32 [label]
+    c8 7d 00 00  # disp32 [label]
   # . al = *(keyboard buffer + index)
   8a  # copy m8 at r32 to r8
     81  # 10/mod/*+disp32 000/r8/al 001/rm32/ecx
@@ -270,11 +270,11 @@ e9 fb ff  # loop forever
   # increment index
   fe  # increment byte
     05  # 00/mod/indirect 000/subop/increment 101/rm32/use-disp32
-    ce 7d 00 00  # disp32 [label]
+    c8 7d 00 00  # disp32 [label]
   # clear top nibble of index (keyboard buffer is circular)
   80  # and byte
     25  # 00/mod/indirect 100/subop/and 101/rm32/use-disp32
-    ce 7d 00 00  # disp32 [label]
+    c8 7d 00 00  # disp32 [label]
     0f  # imm8
 # 155:
   # epilogue
@@ -291,15 +291,17 @@ e9 fb ff  # loop forever
 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 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00
 
-# 1ce:
+# 1c8:
 # var keyboard circular buffer
 # write index: nibble
-  00
-# 1cf:
+# still take up 4 bytes so SubX can handle it
+  00 00 00 00
+# 1cc:
 # read index: nibble
-  00
+# still take up 4 bytes so SubX can handle it
+  00 00 00 00
 # 1d0:
 # circular buffer: byte[16]
   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
diff --git a/baremetal/ex3.hex b/baremetal/ex3.hex
index 3ec95d10..92664a23 100644
--- a/baremetal/ex3.hex
+++ b/baremetal/ex3.hex
@@ -25,7 +25,7 @@
   # CL = *read index
   8a  # copy m8 at r32 to r8
     0d  # 00/mod/indirect 001/r8/cl 101/rm32/use-disp32
-    cf 7d 00 00  # disp32 [label]
+    cc 7d 00 00  # disp32 [label]
   # CL = *(keyboard buffer + ecx)
   8a  # copy m8 at r32 to r8
     89  # 10/mod/*+disp32 001/r8/cl 001/rm32/ecx
@@ -39,11 +39,11 @@
   # otherwise increment read index
   fe  # increment byte
     05  # 00/mod/indirect 000/subop/increment 101/rm32/use-disp32
-    cf 7d 00 00  # disp32 [label]
+    cc 7d 00 00  # disp32 [label]
   # clear top nibble of index (keyboard buffer is circular)
   80  # and byte
     25  # 00/mod/indirect 100/subop/and 101/rm32/use-disp32
-    cf 7d 00 00  # disp32 [label]
+    cc 7d 00 00  # disp32 [label]
     0f  # imm8
   # print a pixel in fluorescent green
   c6  # copy imm8 to m8 at rm32