about summary refs log tree commit diff stats
path: root/subx/ex1.2.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-26 22:32:57 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-26 22:32:57 -0700
commit365f762f8ffe2596b538aa9da711b36806126899 (patch)
tree2059f4499e4abbbad6b9309a5c9b9ba037b84979 /subx/ex1.2.subx
parentb7655c98122d8ca99815dc1a0725756d3e678c95 (diff)
downloadmu-365f762f8ffe2596b538aa9da711b36806126899.tar.gz
4431 - operate exclusively in hex
Was confusing having numbers without an explicit base sometimes be hex
and sometimes not, based on their metadata.

By convention I don't bother with the '0x' for instructions, or for
single-digit numbers that are equal to their decimal representation. But
I could and it would still work.
Diffstat (limited to 'subx/ex1.2.subx')
-rw-r--r--subx/ex1.2.subx4
1 files changed, 2 insertions, 2 deletions
diff --git a/subx/ex1.2.subx b/subx/ex1.2.subx
index 1dac17e5..a3eee2d9 100644
--- a/subx/ex1.2.subx
+++ b/subx/ex1.2.subx
@@ -9,9 +9,9 @@
 # instruction                     effective address                                           operand     displacement    immediate
 # op          subop               mod             rm32          base      index     scale     r32
 # 1-3 bytes   3 bits              2 bits          3 bits        3 bits    3 bits    2 bits    2 bits      0/1/2/4 bytes   0/1/2/4 bytes
-  bb                                                                                                                      42/imm32          # copy 0x2a (42) to EBX
+  bb                                                                                                                      2a/imm32          # copy 42 to EBX
   # exit(EBX)
   b8                                                                                                                      1/imm32           # copy 1 to EAX
-  cd                                                                                                                      128/imm8          # int 80h
+  cd                                                                                                                      0x80/imm8         # int 80h
 
 # vim:ft=subx