Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple opcodes on a line #23

Open
stefandrissen opened this issue Nov 9, 2021 · 1 comment
Open

Multiple opcodes on a line #23

stefandrissen opened this issue Nov 9, 2021 · 1 comment

Comments

@stefandrissen
Copy link
Contributor

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.

@simonowen
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants