-
Notifications
You must be signed in to change notification settings - Fork 99
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
Possibility for a strict instruction mode? #367
Comments
The place to implement this feature might be in decode_*.c files, I think, as there source code is turned into WLA's internal symbols. Enhancement idea: Currently decode_*.c files are difficult to edit, so perhaps encapsulating the code inside to a function would make life easier? |
Is there a proposed syntax/compiler flag for this feature? |
No, but if you implement this then you are free to choose the flag as long as it is of the same format as the other flags :) |
Ok. @jwrayth can we get an example code snippet of the kind of code you want to be able to write as well as the way WLA-DX forces you to do it right now? |
Sure thing! So in my 65816 project I'm not using directives like For example, instead of
I would use
I was looking for a mode to disable any inferred sizing, and force the user to explicitly declare the size of the instruction/operand (when applicable). This is so that I can receive errors when the operand sizing has been omitted. |
Just a sidenote (mainly for @jeffythedragonslayer): Instead of giving lda.w #$80 which is a bit nasty if you think it from the point of a MC68000 programmer, you can also give lda #$80.w |
I'm targeting the 65816 and I have continually had issues were WLADX infers the wrong sizing for an instruction/operand. From reading past issues, I understand that this is a difficult problem to solve based on the current implementation between the assembler and the linker.
What I would like to suggest is; Would it be feasible to introduce a "strict sizing" mode that requires the programmer to always explicitly declare the size suffix for the instruction/operand and disable all inference? Personally, I would find this much more useful than trying to decorate my code with sizing hint directives.
I'm not sure where to start looking at a feature like this in the codebase, so I wanted to raise it as an issue first to get some expert opinion.
The text was updated successfully, but these errors were encountered: