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

Unknown symbol error could be smarter when missing operand #552

Open
jeffythedragonslayer opened this issue Jan 30, 2023 · 5 comments
Open

Comments

@jeffythedragonslayer
Copy link
Contributor

jeffythedragonslayer commented Jan 30, 2023

Here's an enhancement I think would make 65816 easier to learn. I used this tutorial to recreate this:

https://en.wikibooks.org/wiki/Super_NES_Programming/Initialization_Tutorial

Simply add a line like "sep" without any operand. WLA emits this error:

greenspace.asm:18: ERROR: Unknown symbol "sep".

Huh? This is valid mnemonic - WLA does actually understand this symbol - but there is no implied addressing mode for SEP. I think this would be more accurate:

greenspace.asm:18: ERROR: Illegal addressing mode for "sep".

@vhelin
Copy link
Owner

vhelin commented Jan 30, 2023

As a quick 1st stage fix perhaps

greenspace.asm:18: ERROR: Unknown symbol "sep".

could be

greenspace.asm:18: ERROR: Cannot parse "sep". Syntax error?

instead?

@jeffythedragonslayer
Copy link
Contributor Author

jeffythedragonslayer commented Jan 30, 2023

Sure, though nitpick I think the fact that WLA would know there is a newline after it means that it succeeded in parsing the illegal instruction.

@vhelin
Copy link
Owner

vhelin commented Jan 31, 2023

Adding support for more intelligent error report in that case would require additional code to every instruction parser in WLA DX. It wouldn't be difficult to do, but require quite a lot of work. So not a very high priority issue. :)

@jeffythedragonslayer
Copy link
Contributor Author

I can't just start with the 65816?

@vhelin
Copy link
Owner

vhelin commented Jan 31, 2023

Sure you can, but for the sake of being consistent, in the end all WLA's assmeblers should behave the same way. Anyway, after one assembler supports this then copypasting it to the others shouldn't be a big deal.

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