Open stefandrissen opened 3 years ago
It shouldn't be too difficult to add overall but I can imagine some awkward cases like ld a,':' : ld b,1
or ld a,1 : defb ":"
due to the way pyz80 processes each line. There is some support for tracking inside/outside quotes, which may help avoid unwanted matching against a :
in a string, but I can't remember if that understands single quotes too.
I actually found the code in that screenshot to be really hard to read. I don't know if it was the multi-level indentation or the over-use of multi-instruction lines, or a mix of both. I can see the appeal of multi-instruction lines for unrolled loops where there are patterns of a few instructions per processed byte, where it makes the code easier to scan. Though a pyz80 FOR
loop might be simpler still, and closer to a macro approach.
I'll probably hold off adding this until solutions are found for the problem cases above.
I'm not sure how feasible this is, but I found the look of this as implemented in sjasmplus (see https://spectrumcomputing.co.uk/forums/viewtopic.php?p=78268#p78268) rather pleasant.