diff options
-rw-r--r-- | subx/011run.cc | 5 | ||||
-rw-r--r-- | subx/034compute_segment_address.cc | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/subx/011run.cc b/subx/011run.cc index 9e8dc15e..c4bf9fe8 100644 --- a/subx/011run.cc +++ b/subx/011run.cc @@ -156,10 +156,7 @@ void parse(istream& fin, program& out) { trace(99, "parse") << "new segment from 0x" << HEXWORD << s.start << end(); out.segments.push_back(s); } - else { - trace(99, "parse") << "new segment " << segment_title << end(); - out.segments.push_back(segment()); - } + // End Segment Parsing Special-cases(segment_title) // todo: segment segment metadata break; // skip rest of line } diff --git a/subx/034compute_segment_address.cc b/subx/034compute_segment_address.cc index 71a18452..b877faae 100644 --- a/subx/034compute_segment_address.cc +++ b/subx/034compute_segment_address.cc @@ -14,6 +14,16 @@ +run: add imm32 0x0d0c0b0a to reg EAX +run: storing 0x0d0c0b0a +//: update the parser to handle non-numeric segment name + +:(before "End Segment Parsing Special-cases(segment_title)") +if (!starts_with(segment_title, "0x")) { + trace(99, "parse") << "new segment " << segment_title << end(); + out.segments.push_back(segment()); +} + +//: compute segment address + :(before "End Level-2 Transforms") Transform.push_back(compute_segment_starts); |