flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid 18 Feb 2007, 21:57
first of all: you can't name procedure just "c"
![]() but this may be also problem in macro |
|||
![]() |
|
Goplat 18 Feb 2007, 22:12
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 19 Feb 2007, 22:18
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 20 Feb 2007, 22:13
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 20 Feb 2007, 23:12
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 20 Feb 2007, 23:14
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 21 Feb 2007, 01:49
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-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.