Edilbert / BSA

Bit Shifter's Cross Assembler for 6502, 65C02 and 45GS02 CPU
The Unlicense
29 stars 7 forks source link

Repair MACRO #9

Closed dansanderson closed 1 year ago

dansanderson commented 1 year ago

MACRO has a bug where RecordMacro reads to the end of the file in the final pass when attempting to read the definition into the lst file (because the macro definition has already been skipped in the previous loop), preventing code generation after the first macro definition. This repair combines the "skip definition" and "print definition to lst" loops of the routine that execute during the final pass, so it only scans the macro definition once and leaves the file position in the correct place.

This PR includes a couple of clean-up changes in a separate commit. Let me know if you don't want these, I can remove them. :)