13.07.2015 Views

apple-pascal-1.3-manual

apple-pascal-1.3-manual

apple-pascal-1.3-manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 3-2 is a diagram of the Apple Pascal program stack and heap withfour active procedures.Figure 3-2. The Program Stack and Heap With Four Active Procedureshigh memory addressesSYSCOMcode segment (64K only)PASCALSYSTEMactivation recordr--------------------~ -markstackcode segment (64K only)MAINPROGactivation recordr--------------------~markstackcode segment (64K only)UNITPROCactivation recordr---------------------markstackcode segment (64K only)BASE registerALPHAPROCDREactivation recordr---------------------markstack.-- MP and KP registersfree memoryHEAPlow memory addresses- NP registerSYSCOMThe operating system and the P-machine exchange information via thesystem communications area (also called SYSCOM) at the bottom (highaddresses) of the stack. SYSCOM is accessible to both assembly-languageprocedures in the Interpreter and system procedures coded in Pascal (as if itThe Program Stack and the HeapIV-49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!