diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-07-26 22:32:57 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-07-26 22:32:57 -0700 |
commit | 365f762f8ffe2596b538aa9da711b36806126899 (patch) | |
tree | 2059f4499e4abbbad6b9309a5c9b9ba037b84979 /subx/024pack_instructions.cc | |
parent | b7655c98122d8ca99815dc1a0725756d3e678c95 (diff) | |
download | mu-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/024pack_instructions.cc')
-rw-r--r-- | subx/024pack_instructions.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subx/024pack_instructions.cc b/subx/024pack_instructions.cc index 0ff5050d..44d06eb7 100644 --- a/subx/024pack_instructions.cc +++ b/subx/024pack_instructions.cc @@ -6,8 +6,8 @@ # 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 42 to EBX -+translate: packing instruction 'bb 42/imm32' + bb 0x2a/imm32 # copy 42 to EBX ++translate: packing instruction 'bb 0x2a/imm32' +translate: instruction after packing: 'bb 2a 00 00 00' +run: copy imm32 0x0000002a to EBX |