diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-08-03 23:46:23 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-08-03 23:46:23 -0700 |
commit | 0d11acaa7213caf2cad3568ca4d80b193245d52b (patch) | |
tree | dadc49895ae28ce68ecaf1627a6cc50bbdb0326c | |
parent | a066ad7ed7a64ff204d9381d701cc94e83d42f79 (diff) | |
download | mu-0d11acaa7213caf2cad3568ca4d80b193245d52b.tar.gz |
4470
-rw-r--r-- | subx/030check_operands.cc (renamed from subx/030check_instruction.cc) | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/subx/030check_instruction.cc b/subx/030check_operands.cc index 97dc8140..2b253ab6 100644 --- a/subx/030check_instruction.cc +++ b/subx/030check_operands.cc @@ -15,11 +15,12 @@ //: //: --- //: -//: While we're here, we'll also improve a couple of other things: +//: While we're here, we'll also improve a couple of other things in level 2: //: //: a) Machine code often packs logically separate operands into bitfields of -//: a single byte. We'll start writing out each operand separately, and the -//: translator will construct the right bytes out of operands. +//: a single byte. In a later layer (pack_operands) we'll start writing out +//: each operand separately, and the translator will construct the right bytes +//: out of operands. //: //: SubX now gets still more verbose. What used to be a single byte, say 'c3', //: can now expand to '3/mod 0/subop 3/rm32'. @@ -27,13 +28,9 @@ //: b) Since each operand is tagged, we can loosen ordering restrictions and //: allow writing out the operands in any order, like keyword arguments. //: -//: c) Operand values can be expressed in either decimal or hex (when prefixed -//: with '0x'. Raw 2-character hex bytes without the '0x' are only valid when -//: tagged without any operand metadata. (This may be a bad idea.) -//: -//: Coda: the actual opcodes (1-3 bytes) will continue to be at the start of -//: each line, in hex, and untagged. The x86 instruction set is a mess, and -//: instructions don't admit good names. +//: The actual opcodes (first 1-3 bytes of each instruction) will continue to +//: be at the start of each line. The x86 instruction set is a mess, and +//: opcodes often don't admit good names. :(before "End Help Texts") put(Help, "instructions", |