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

Excess spaces before macro parameters cause parameters to be ignored #70

Open
tari opened this issue Aug 30, 2023 · 1 comment
Open

Comments

@tari
Copy link
Contributor

tari commented Aug 30, 2023

When a space is inserted between the name of a macro and its parameter list, the parameter list is silently ignored. Minified example:

#define bcall(xxxx) rst 28h \ .dw xxxx
    bcall ($1234) ; Note the space here

The resultant listing drops the .dw completely, and no error is reported:

1 00:0000 - - - - #define bcall(xxxx) rst 28h \ .dw xxxx
2 00:0000 EF - - - bcall ($1234)

This should instead assemble to EF3412, as seen if we remove the extra space:

1 00:0000 - - - - #define bcall(xxxx) rst 28h \ .dw xxxx
2 00:0000 EF 34 12 - bcall($1234)

This was reported by a user in https://www.cemetech.net/forum/viewtopic.php?t=19221

@tari tari changed the title Excess spaces in macro invocations are silently ignored Excess spaces before macro parameters cause parameters to be ignored Aug 30, 2023
@bxparks
Copy link

bxparks commented Jun 20, 2024

I have hit this problem about 5 times now, even after figuring it out the first time. Every time I hit it, I spend hours searching for this little typo in my code.

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

No branches or pull requests

2 participants