diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-10-01 08:47:15 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-10-01 08:47:15 -0700 |
commit | 73aa4d14a69f9e9608e48e01759700311337ff02 (patch) | |
tree | 33c44c60245813663ca777f231e2abc29bae3831 /subx | |
parent | 2540fceca5bd4fb620b4a7c3f885a2db90e37203 (diff) | |
download | mu-73aa4d14a69f9e9608e48e01759700311337ff02.tar.gz |
4631
Diffstat (limited to 'subx')
-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); |