flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid
first of all: you can't name procedure just "c"
![]() but this may be also problem in macro |
|||
![]() |
|
Goplat
ChrisLeslie: The name of a variable has nothing to do with where it's located. Putting a . before its name makes it local, but this is just a matter of scope (where you can access it from). In both your second and third examples the variable is statically allocated.
|
|||
![]() |
|
MCD
Goplat wrote: Putting a . before its name makes it local, but this is just a matter of scope (where you can access it from). In both your second and third examples the variable is statically allocated. |
|||
![]() |
|
ChrisLeslie
Subsequent testing shows that "proc b' and "proc c" do infact retain the old values in "blah" upon reentry to the procedure. Therefore "blah" is static for both, but static and local for "proc c".
vid - The name "proc c" is just hypothetical for the discussion. ![]() Chris |
|||
![]() |
|
vid
chrisleslie: starting label name with "." only makes NAME local (to last non-local name), not content addressed by that label.
Code: proc a .x: ;this defines label a.x endp proc b .x: ;this defines label b.x endp this is all that "." does. |
|||
![]() |
|
vid
Chris: if you are C coder, you may think of it this way:
- label not starting with "." defines namespace - label starting with "." is local symbol in namespace. It's name is appended to namespace, so ".x" in namespace "AAA" becomes "AAA.x". |
|||
![]() |
|
MCD
And if you need some local variables on the stack, you must use some esp/rsp modifying code either by yourself or use a macro or that
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.