about summary refs log tree commit diff stats
path: root/subx/015immediate_addressing.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-10-01 11:09:07 -0700
committerKartik Agaram <vc@akkartik.com>2018-10-01 11:09:07 -0700
commitca00f6b97c52262b39c28cccb76b52e059553f13 (patch)
tree3c6e1ea3e36c849a344eac03a468b3e853241bb3 /subx/015immediate_addressing.cc
parent75e30d2faa3480ae8810856d6527089ba88346a5 (diff)
downloadmu-ca00f6b97c52262b39c28cccb76b52e059553f13.tar.gz
4634
Diffstat (limited to 'subx/015immediate_addressing.cc')
-rw-r--r--subx/015immediate_addressing.cc48
1 files changed, 24 insertions, 24 deletions
diff --git a/subx/015immediate_addressing.cc b/subx/015immediate_addressing.cc
index 1444e173..1be27ec4 100644
--- a/subx/015immediate_addressing.cc
+++ b/subx/015immediate_addressing.cc
@@ -39,15 +39,15 @@ case 0x81: {  // combine imm32 with r/m32
 //:
 
 :(scenario add_imm32_to_mem_at_r32)
-% Reg[EBX].i = 0x60;
+% Reg[EBX].i = 0x2000;
 == 0x01  # code segment
 # op  ModR/M  SIB   displacement  immediate
   81  03                          0a 0b 0c 0d  # add 0x0d0c0b0a to *EBX
 # ModR/M in binary: 00 (indirect mode) 000 (add imm32) 011 (dest EBX)
-== 0x60  # data segment
+== 0x2000  # data segment
 01 00 00 00  # 1
 +run: combine imm32 with r/m32
-+run: effective address is 0x60 (EBX)
++run: effective address is 0x2000 (EBX)
 +run: imm32 is 0x0d0c0b0a
 +run: subop add
 +run: storing 0x0d0c0b0b
@@ -76,15 +76,15 @@ case 0x2d: {  // subtract imm32 from EAX
 //:
 
 :(scenario subtract_imm32_from_mem_at_r32)
-% Reg[EBX].i = 0x60;
+% Reg[EBX].i = 0x2000;
 == 0x01  # code segment
 # op  ModR/M  SIB   displacement  immediate
   81  2b                          01 00 00 00  # subtract 1 from *EBX
 # ModR/M in binary: 00 (indirect mode) 101 (subtract imm32) 011 (dest EBX)
-== 0x60  # data segment
+== 0x2000  # data segment
 0a 00 00 00  # 10
 +run: combine imm32 with r/m32
-+run: effective address is 0x60 (EBX)
++run: effective address is 0x2000 (EBX)
 +run: imm32 is 0x00000001
 +run: subop subtract
 +run: storing 0x00000009
@@ -134,15 +134,15 @@ case 0x25: {  // and imm32 with EAX
 //:
 
 :(scenario and_imm32_with_mem_at_r32)
-% Reg[EBX].i = 0x60;
+% Reg[EBX].i = 0x2000;
 == 0x01  # code segment
 # op  ModR/M  SIB   displacement  immediate
   81  23                          0a 0b 0c 0d  # and 0x0d0c0b0a with *EBX
 # ModR/M in binary: 00 (indirect mode) 100 (and imm32) 011 (dest EBX)
-== 0x60  # data segment
+== 0x2000  # data segment
 ff 00 00 00  # 0xff
 +run: combine imm32 with r/m32
-+run: effective address is 0x60 (EBX)
++run: effective address is 0x2000 (EBX)
 +run: imm32 is 0x0d0c0b0a
 +run: subop and
 +run: storing 0x0000000a
@@ -192,15 +192,15 @@ case 0x0d: {  // or imm32 with EAX
 //:
 
 :(scenario or_imm32_with_mem_at_r32)
-% Reg[EBX].i = 0x60;
+% Reg[EBX].i = 0x2000;
 == 0x01  # code segment
 # op  ModR/M  SIB   displacement  immediate
   81  0b                          0a 0b 0c 0d  # or 0x0d0c0b0a with *EBX
 # ModR/M in binary: 00 (indirect mode) 001 (or imm32) 011 (dest EBX)
-== 0x60  # data segment
+== 0x2000  # data segment
 a0 b0 c0 d0  # 0xd0c0b0a0
 +run: combine imm32 with r/m32
-+run: effective address is 0x60 (EBX)
++run: effective address is 0x2000 (EBX)
 +run: imm32 is 0x0d0c0b0a
 +run: subop or
 +run: storing 0xddccbbaa
@@ -248,15 +248,15 @@ case 0x35: {  // xor imm32 with EAX
 //:
 
 :(scenario xor_imm32_with_mem_at_r32)
-% Reg[EBX].i = 0x60;
+% Reg[EBX].i = 0x2000;
 == 0x01  # code segment
 # op  ModR/M  SIB   displacement  immediate
   81  33                          0a 0b 0c 0d  # xor 0x0d0c0b0a with *EBX
 # ModR/M in binary: 00 (indirect mode) 110 (xor imm32) 011 (dest EBX)
-== 0x60  # data segment
+== 0x2000  # data segment
 a0 b0 c0 d0  # 0xd0c0b0a0
 +run: combine imm32 with r/m32
-+run: effective address is 0x60 (EBX)
++run: effective address is 0x2000 (EBX)
 +run: imm32 is 0x0d0c0b0a
 +run: subop xor
 +run: storing 0xddccbbaa
@@ -371,42 +371,42 @@ case 7: {
 +run: SF=0; ZF=1; OF=0
 
 :(scenario compare_imm32_with_mem_at_r32_greater)
-% Reg[EBX].i = 0x60;
+% Reg[EBX].i = 0x2000;
 == 0x01  # code segment
 # op  ModR/M  SIB   displacement  immediate
   81  3b                          07 0b 0c 0d  # compare 0x0d0c0b07 with *EBX
 # ModR/M in binary: 00 (indirect mode) 111 (compare imm32) 011 (dest EBX)
-== 0x60  # data segment
+== 0x2000  # data segment
 0a 0b 0c 0d  # 0x0d0c0b0a
 +run: combine imm32 with r/m32
-+run: effective address is 0x60 (EBX)
++run: effective address is 0x2000 (EBX)
 +run: imm32 is 0x0d0c0b07
 +run: SF=0; ZF=0; OF=0
 
 :(scenario compare_imm32_with_mem_at_r32_lesser)
-% Reg[EBX].i = 0x60;
+% Reg[EBX].i = 0x2000;
 == 0x01  # code segment
 # op  ModR/M  SIB   displacement  immediate
   81  3b                          0a 0b 0c 0d  # compare 0x0d0c0b0a with *EBX
 # ModR/M in binary: 00 (indirect mode) 111 (compare imm32) 011 (dest EBX)
-== 0x60  # data segment
+== 0x2000  # data segment
 07 0b 0c 0d  # 0x0d0c0b07
 +run: combine imm32 with r/m32
-+run: effective address is 0x60 (EBX)
++run: effective address is 0x2000 (EBX)
 +run: imm32 is 0x0d0c0b0a
 +run: SF=1; ZF=0; OF=0
 
 :(scenario compare_imm32_with_mem_at_r32_equal)
 % Reg[EBX].i = 0x0d0c0b0a;
-% Reg[EBX].i = 0x60;
+% Reg[EBX].i = 0x2000;
 == 0x01  # code segment
 # op  ModR/M  SIB   displacement  immediate
   81  3b                          0a 0b 0c 0d  # compare 0x0d0c0b0a with *EBX
 # ModR/M in binary: 00 (indirect mode) 111 (compare imm32) 011 (dest EBX)
-== 0x60  # data segment
+== 0x2000  # data segment
 0a 0b 0c 0d  # 0x0d0c0b0a
 +run: combine imm32 with r/m32
-+run: effective address is 0x60 (EBX)
++run: effective address is 0x2000 (EBX)
 +run: imm32 is 0x0d0c0b0a
 +run: SF=0; ZF=1; OF=0