about summary refs log tree commit diff stats
path: root/subx/034compute_segment_address.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-09-20 13:42:57 -0700
committerKartik Agaram <vc@akkartik.com>2018-09-20 13:42:57 -0700
commit87d5bdb96193be044cc95f562904fc6da60e0bf0 (patch)
treebd8669e7f77ce53e66f72dfdc405b24dd92d1f1b /subx/034compute_segment_address.cc
parent220575dc4a70228438ed6f4a10324f5669277044 (diff)
downloadmu-87d5bdb96193be044cc95f562904fc6da60e0bf0.tar.gz
4550
Diffstat (limited to 'subx/034compute_segment_address.cc')
-rw-r--r--subx/034compute_segment_address.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/subx/034compute_segment_address.cc b/subx/034compute_segment_address.cc
index c4645fac..0c569c65 100644
--- a/subx/034compute_segment_address.cc
+++ b/subx/034compute_segment_address.cc
@@ -27,7 +27,7 @@ void compute_segment_starts(program& p) {
     segment& curr = p.segments.at(i);
     if (curr.start == 0) {
       curr.start = CODE_START + i*SEGMENT_SIZE + p_offset;
-      trace(99, "transform") << "segment " << i << " begins at address " << curr.start << end();
+      trace(99, "transform") << "segment " << i << " begins at address 0x" << HEXWORD << curr.start << end();
     }
     p_offset += size_of(curr);
     assert(p_offset < SEGMENT_SIZE);  // for now we get less and less available space in each successive segment
@@ -48,6 +48,7 @@ uint32_t num_bytes(const line& inst) {
     const word& curr = inst.words.at(i);
     if (has_operand_metadata(curr, "disp32") || has_operand_metadata(curr, "imm32"))  // only multi-byte operands
       sum += 4;
+    // End num_bytes(curr) Special-cases
     else
       sum++;
   }