Why are variables stored on the stack?

B

Barry Schwarz

#if offtopic = further and further


Do you really mean doubly-linked? It would make no sense to link both
directions (logically 'up' and 'down'). Some _other_ languages with
nested routines (notably PL/I) require both dynamic (call) and static
('lexical') links, but that's not what I normally call doubly-linked.

Yes it is doubly linked. The first 72 bytes of the area pointed to by
R13 are reserved for saving and restoring registers. In both 24 and
31 bit addressing modes, bytes 4 through 7 contain the address of the
area that belongs to the function that called the current function. In
that area, bytes 8 through 11 point to the area that belongs to this
function. Things are a bit more complicated in 64 bit addressing
mode.

And it does make sense, for reasons which are even more off topic.


Remove del for email
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top