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
#asm/#endasm cannot be used in a macro #1804
Comments
I think this hint will work for your needs: Line 270 in ae3a727
|
sdcc uses a bit of nasty "hack" to get __asm/__endasm to work in macros: #1268 Thankfully as Stefano pointed out there's an alternative which is using the |
Thank you, guys. Yes, it will really help me. Why is the \t symbol so widely used inside? Can there be a space? (this will be more visual). |
P.S. zcc doesn't compile this:
suborb, you wrote here (#1268 (comment)) that it must works for -compiler=sccz80 Where am I wrong? Or do I just need to update the z88dk? |
Please, answer: can I declare an aligned array in zcc?
|
sccz80 is a bit picky about the order it seems, try moving the
|
Thank you very much for the useable hint, suborb. |
Dear z88dk developers,
When working on zcc, I came across its difference from SDCC. In particular, zcc has constructs #asm/#endasm, whereas in SDCC they are designated __asm/__endasm
There is nothing wrong with this difference, but let's say I need to develop a macro that will implement a single machine command (for example, HALT). In SDCC I can wrote:
#define WAITSYNC __asm halt __endasm
And it will work.
Whereas, a similar macro containing a service symbol # will not work in zcc:
#define WAITSYNC #asm halt #endasm
Maybe I certainly do not understand something or have not studied the documentation well. In that case, correct me. However, if I am right, I would like to request such possibility. The simplest thing is to make the __asm/__endasm directives available in zcc as synonyms of #asm/#endasm.
Thank you.
The text was updated successfully, but these errors were encountered: