Program-Address Generation
5-6
Figure 5–3. A Pop Operation
Before Instruction After Instruction
Accumulator Accumulator
or memory 82h or memory 45h
location location
45h 16h
16h 7h
Stack 7h Stack 33h
33h 42h
42h 56h
56h 37h
37h 61h
61h 61h
5.1.3 Micro Stack (MSTACK)
The program-address generation logic uses the 16-bit-wide, 1-level-deep
MSTACK to store a return address before executing certain instructions.
These instructions use the program-address generation logic to provide a se-
cond address in a two-operand instruction. These instructions are: BLDD,
BLPD, MAC, MACD, TBLR, and TBLW. When repeated, these instructions
use the PC to increment the first operand address and can use the auxiliary
register arithmetic unit (ARAU) to generate the second operand address.
When these instructions are used, the return address (the address of the next
instruction to be fetched) is pushed onto the MSTACK. Upon completion of the
repeated instruction, the MSTACK value is popped back into the program-ad-
dress generation logic. The MSTACK operations are not visible to you. Unlike
the stack, the MSTACK can be used only by the program-address generation
logic; there are no instructions that allow you to use the MSTACK for storage.