Toppcstack Restrictions - Analog Devices adsp-2100 Manual

Adsp-2100 family programmable single-chip microprocessors
Table of Contents

Advertisement

3.7.1

TOPPCSTACK Restrictions

There are several restrictions on the use of the special TOPPCSTACK
instructions, as described below.
1.) The pop and read TOPPCSTACK instruction may not be placed
directly before an RTI instruction (return from interrupt). A NOP
must be inserted in between:
reg = TOPPCSTACK;
NOP;
RTI;
2.) The pop and read TOPPCSTACK instruction may not be the last or
next-to-last instruction in a Do Until loop. Neither instruction 1 nor
instruction 2 may be the pop/read TOPPCSTACK instruction in the
following code:
DO loop UNTIL CE;
AX0=DM(I5,M5);
...
instruction 2;
loop:
instruction 1;
3.) There must be an equal number of pushes and pops within any Do
Until loop, including any normal POP PC instructions as well as the
special TOPPCSTACK pop/read and push/write instructions.
4.) Several restrictions exist in relation to the RTS (return from
subroutine), RTI (return from interrupt routine), and POP PC
instructions. If instruction 3 in the following sequence is an RTS, RTI,
or POP PC,
instruction 1;
instruction 2;
Program Control
{allow pop to occur correctly}
{another pop happens automatically}
3
3 – 27

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents