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-10-01 08:47:15 -0700
committerKartik Agaram <vc@akkartik.com>2018-10-01 08:47:15 -0700
commit73aa4d14a69f9e9608e48e01759700311337ff02 (patch)
tree33c44c60245813663ca777f231e2abc29bae3831 /subx/034compute_segment_address.cc
parent2540fceca5bd4fb620b4a7c3f885a2db90e37203 (diff)
downloadmu-73aa4d14a69f9e9608e48e01759700311337ff02.tar.gz
4631
Diffstat (limited to 'subx/034compute_segment_address.cc')
-rw-r--r--subx/034compute_segment_address.cc10
1 files changed, 10 insertions, 0 deletions
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);