Topic : C-Language Documentation Author : John Kormylo Version : C.HYP 1.0 Subject : Documentation/C-Language Nodes : 233 Index Size : 6362 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : en @default : @help : Help @options : +g -i -s +x +z -t4 @width : 75 View Ref-File[ the stack ] PCSTART reserves a section of RAM and sets register A7 (the stack pointer) to point to the top of it. Data is pushed onto the stack by pre-decrementing the stack pointer by the appropriate amount and writing to that address. Data is popped off the stack by reading from that address then incrementing the stack pointer again. All function calls store the return address on the stack. Some function arguments are passed on the stack. Local variables are allocated from the stack (except when Pure_C implements them as register variables). Registers are often saved to the stack. Unless you request stack checking (Compiler Options -T), the stack can easily overflow into your global data area (BSS segment). See also SP.