flat assembler
Message board for the users of flat assembler.
![]() |
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.
|
|||
![]() |
|
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 |
|||
![]() |
|
madmatt 05 Dec 2004, 21:29
Hmmm, all right, thanks guys. Looks like I'll have to find a work-around.
Matt (MadMatt) |
|||
![]() |
|
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.
|
|||
![]() |
|
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) |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.