about summary refs log tree commit diff stats
path: root/subx/ex3.subx
diff options
context:
space:
mode:
Diffstat (limited to 'subx/ex3.subx')
-rw-r--r--subx/ex3.subx24
1 files changed, 12 insertions, 12 deletions
diff --git a/subx/ex3.subx b/subx/ex3.subx
index 8560167d..9b5391a8 100644
--- a/subx/ex3.subx
+++ b/subx/ex3.subx
@@ -8,29 +8,29 @@
 #   55
 
 == 0x08048054  # code segment, after leaving room for ELF header
-# opcode        ModR/M                    SIB                   displacement    immediate
-# instruction   mod, reg, Reg/Mem bits    scale, index, base
-# 1-3 bytes     0/1 byte                  0/1 byte              0/1/2/4 bytes   0/1/2/4 bytes
+# instruction                     effective address                                         operand     displacement    immediate
+# op          subop               mod           rm32          base      index     scale     r32
+# 1-3 bytes                                                                                             0/1/2/4 bytes   0/1/2/4 bytes
   # result: EBX = 0
 # 0: e_entry = 0x08048054
-  bb                                                                            0/imm32       # copy 0 to EBX
+  bb                                                                                                                    0/imm32       # copy 0 to EBX
   # counter: ECX = 1
-  b9                                                                            1/imm32       # copy 1 to ECX
+  b9                                                                                                                    1/imm32       # copy 1 to ECX
 
 # 10: loop: 0x0804805e
   # while (ECX <= 10)
-  81            f9                                                              10/imm32      # compare ECX, 10/imm
-  7f                                                            0a                            # jump-if-greater exit (+10)
+  81            7/subop/compare   3/mod/direct  1/rm32/ecx                                                              10/imm32      # compare ECX, 10/imm
+  7f                                                                                                    10/disp8                      # jump-if-greater exit
   # EBX += ECX
-  01            cb                                                                            # add ECX to EBX
+  01                              3/mod/direct  3/rm32/ebx                                  1/r32/ecx                                 # add ECX to EBX
   # ECX++
-  81            c1                                                              1/imm32       # add 1 to ECX
+  81            0/subop/add       3/mod/direct  1/rm32/ecx                                                              1/imm32       # add 1 to ECX
   # loop
-  eb                                                            ee                            # jump loop (-18; -00010010; 11101110)
+  eb                                                                                                    -18/disp8                     # jump loop
 
 # 28: exit: 0x08048070
   # exit(EBX)
-  b8                                                                            1/imm32       # copy 1 to EAX
-  cd                                                                            128/imm8      # int 80h
+  b8                                                                                                                    1/imm32       # copy 1 to EAX
+  cd                                                                                                                    0x80/imm8     # int 80h
 
 # vim:ft=subx:nowrap