flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Problem with fasmw proc macro. |
Author |
|
decard 05 Dec 2004, 11:49
.num is a local variable, and you can't define such variable statically. Only thing that you can do here is to add "mov [.num],116" just after the enter macro.
|
|||
05 Dec 2004, 11:49 |
|
JohnFound 05 Dec 2004, 14:17
The procedure local variables doesn't exists in the compiled binary file. These variables are dinamically allocated in the stack on the entering procedure and they are also deallocated on exit. So, you must initialize them in the code.
Regards |
|||
05 Dec 2004, 14:17 |
|
madmatt 05 Dec 2004, 21:29
Hmmm, all right, thanks guys. Looks like I'll have to find a work-around.
Matt (MadMatt) |
|||
05 Dec 2004, 21:29 |
|
rea 05 Dec 2004, 22:16
you can do this: declare numbers or strings in the data section, and then load the values when you enter to a function, in fact that is what do the compilers, they cant like asm cant in fact initialize the stack directly.
|
|||
05 Dec 2004, 22:16 |
|
madmatt 06 Dec 2004, 09:45
Well I know that you can do that, but for large projects I needed the variables close at hand so I wouldn't have to scroll very far if I forgot a variable, or if I needed to add more constants/variables. Anyhow, I found a solution, so no more troubles.
Matt (MadMatt) |
|||
06 Dec 2004, 09:45 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.