flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Define label to somewhere else, inside of macro |
Author |
|
Azu 01 Apr 2009, 08:53
Wow that was fast. Thanks again.
Last edited by Azu on 01 Apr 2009, 09:53; edited 1 time in total |
|||
01 Apr 2009, 08:53 |
|
Madis731 01 Apr 2009, 10:20
It this one of these preprocessor vs. macro again? Because I would, once again, use another approach here
equ will finally end up with "something equ 0+4+4+4" but using "="-sign, it will calculate and won't be unmanageably long. EDIT: Just tested, the binaries will be the same. |
|||
01 Apr 2009, 10:20 |
|
Azu 07 Apr 2009, 08:37
I'm really sorry to keep bugging you guys, but I've got another problem I can't figure out.
Code: label foo dword at ebp+something Code: label foo dword at ebp+something label foo.bx dword at ebx+something I'm certain that I didn't define it anywhere else. Please help.. Also, what is wrong with this? Code: macro stdcall b,[arg]{ if arg reverse bla <arg> end if common call b} macro bla a{push a} It keeps saying "invalid value" with the IFs there? But if I remove the IFs it says "invalid operand" on functions with no args.. (also tried with "if [arg]", "if <arg>", and "macro bla a{if a push a endif}") P.S. why can't I just do "reverse push <arg>"??? |
|||
07 Apr 2009, 08:37 |
|
Madis731 07 Apr 2009, 09:17
Code: nop something db 5 label foo dword at ebp+something label foo.bx dword at ebx+something nop mov [foo],6 nop mov [foo.bx],7 nop ;Result= ; 90 05 90 67 66 C7 45 01 ; 06 00 00 00 90 67 66 C7 ; 43 01 07 00 00 00 90 Nope, its not defined in this code, so there should be an error in your code... |
|||
07 Apr 2009, 09:17 |
|
Azu 07 Apr 2009, 09:27
But when I take the .bx one out of my macro it compiles fine.. x_x
|
|||
07 Apr 2009, 09:27 |
|
revolution 07 Apr 2009, 09:48
It is not defined in Madis731's code so it must be a bug in your code. If you need us to help you then you will have to post all the code. We can't fix what we can't see.
|
|||
07 Apr 2009, 09:48 |
|
revolution 07 Apr 2009, 09:55
Azu wrote:
Code: macro stdcall b,[arg]{ forward if arg reverse bla <arg> end if common call b} macro bla a{push a} Code: stdcall xyz,arg1,arg2,arg3 ... ;the forward section if <arg1> if <arg2> if <arg3> ;the reverse section bla <arg3> end if bla <arg2> end if bla <arg1> end if ;the common section call xyz |
|||
07 Apr 2009, 09:55 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.