ref: 5dc153880b2ee5448597cb0d80e99467fd3ae14b
parent: 0e439e5e088b53ebc4f1bd2e66432db3b5828599
author: Bryan Bishop <[email protected]>
date: Thu Apr 26 11:28:28 EDT 2012
improve PointerLabelAfterBank handling in preprocessor
--- a/textpre.py
+++ b/textpre.py
@@ -454,6 +454,7 @@
assert len(params) == allowed_length, \
"mismatched number of parameters on this line: " + \
original_line
+
# --- end of ridiculously long sanity check ---
index = 0
@@ -482,9 +483,9 @@
index += 2
elif size == 3 and issubclass(param_klass, PointerLabelAfterBank):
# write the pointer first
- sys.stdout.write("dw " + params[index+1] + "\n")
+ sys.stdout.write("dw " + params[index] + "\n")
# write the bank second
- sys.stdout.write("db " + params[index] + "\n")
+ sys.stdout.write("db " + params[index+1] + "\n")
index += 2
else:
raise Exception, "dunno what to do with this macro " + \