-
Notifications
You must be signed in to change notification settings - Fork 46
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
Optimizer optimizes and breaks hand-written assembly code #880
Comments
Try adding ;keep to the end of the lines you don't want trse to optimise away... Lda var;keep Tay;keep Etc |
@AndyHOvine I just tried to put ";keep", but unfortunately it still changes the instruction to LDY. I'm keeping NOP for now. |
Try it with, or without a space. I can't remember which. |
I've had time to test it, hope this helps :)
produces:
Whereas,
produces:
tax has not been removed and lda is preserved. |
When writing this function, I came to a weird bug where optimizer changes my ASM code and makes something that does not work.
I have added two NOPs to stop optimizer from messing up the code. If NOPs are removed, previous LDA instructions are changed to LDY and code does not work as intended anymore.
The text was updated successfully, but these errors were encountered: