-
Notifications
You must be signed in to change notification settings - Fork 11
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
conditional IF/ENDIF bug? #92
Comments
This might be explained somewhat better in the docs. The intention has always been to select a block to assemble, depending on the value of the if statement.
creates a different localvar label, depending on the block that it is in. In pre 1.10 versions, this wasn't working correctly. |
Grief. By trying to provide an example in the docs, I'm running up to something that doesn't work correctly in an ELSE block. Considering how I wasn't planning to include if/else/endif originally, but included a PR that in retrospect wasn't nearly complete, I'm learning something about including other people's work from a PR. |
I only stumbled on it by chance, doesn't affect my code as I know how to get round, but mentioned it FYI... remove the feature if it's a pain! |
Don't get me wrong, it's good that you mention it. The behavior has indeed changed, so if you were relying on the previous behavior, it understandable that this is now different than before and other people may run into this. |
Actually, this was the first time I had tried using conditional assembly with IF/ENDIF In fact, at first when I looked at the .LST file trying to work out what was going on, I thought that ez80asm had included all the conditional code in the final binary... until I realised that the target address had not changed for that code! I almost filed a bug report on that... doh... |
Fixing a couple of (hopefully) last issues in the conditional assembly section now. ASCIZ was always outputting a zero, regardless of selection and a isolated label without any code didn't work when used in both if/else blocks. After I upload a new release in the next week or so, I'll update the docs with a good example using conditional assembly |
Fabulous. I can confidently build Mac versions now, so I am happy. |
Released as v1.11 |
Not a major issue, but noting for future or for docs...
I have a section of code which is only needed if debugging, as it only gets called if debugging. No point in including extra bytes if not needed in the binary.
eg.
debugging: equ 0
...
if debugging
...routine here
...do this code, etc
localVariableUsed: .db 0
endif
If debugging is 1, then the routine gets assembled correctly.
If debugging is 0, then I get an error that 'localVariableUsed' is an unknown label, even though it is only ever called from within this routine.
If I put 'debugging: equ 0' outside the if/endif section, then it assembles without error.
The text was updated successfully, but these errors were encountered: