> For me the first is the first declared in C. First as in 1st.
> This is wrong taking all this assumptions.

there is no guarantee in C that variables outside structs
are allocated in order of declaration, and indeed, storage
might not be allocated at all if entirely contained in a register.
for instance, in the plan 9 implementation, external values are
allocated out of order by several ?l, allocating bigger things last,
to give smaller offsets from SB for other values (when SB is a real
register).  automatic variables might or might not be allocated a register.

asm.ms describes things from the point of view of the loader, or
object code, not a compiler, but what it doesn't say (i think) is what
the negative offsets mean (they index from the other end of the space
used for automatic variables, allowing for pushes and pops where those exist,
and a few other peculiar constructions).

Reply via email to