12.07.2015 Views

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

80C186 INSTRUCTION SET ADDITIONS AND EXTENSIONSMain Program (Lexical Level 1)Procedure A (Lexical Level 2)Procedure B (Lexical Level 3)Procedure C (Lexical Level 3)Procedure D (Lexical Level 4)A1001-0AFigure A-2. Variable Access in Nested ProceduresThe first ENTER, executed in the Main Program, allocates dynamic storage space for Main, butno pointers are copied. The only word in the display points to itself because no previous valueexists to return to after LEAVE is executed (see Figure A-3).BPSP15 0Old BPBPM*BPM = BP Value for MAINDisplay MainDynamicStorageMaina1002 0a pcFigure A-3. Stack Frame for Main at Level 1A1002-0AAfter Main calls Procedure A, ENTER creates a new display for Procedure A. The first wordpoints to the previous value of BP (BPM). The second word points to the current value of BP(BPA). BPM contains the base for dynamic storage in Main. All dynamic variables for Main willbe at a fixed offset from this value (see Figure A-4).A-4

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

Saved successfully!

Ooh no, something went wrong!