PROGRAMMING MODEL
MOTOROLA
PROGRAM CONTROL UNIT
5 - 15
SSL, each 16 bits wide. The SSH stores the PC contents, and the SSL stores the SR con-
tents for subroutine calls, long interrupts, and program looping. The SS will also store the
LA and LC registers. The SS is in stack memory space; its address is always inherent and
implied by the current instruction.
The contents of the PC and SR are pushed on the top location of the SS when a subrou-
tine call or long interrupt occurs. When a return from subroutine (RTS) occurs, the
contents of the top location in the SS are pulled and put in the PC; the SR is not affected.
When an RTI occurs, the contents of the top location in the SS are pulled to both the PC
and SR.
The SS is also used to implement no-overhead nested hardware DO loops. When the DO
instruction is executed, the LA:LC are pushed on the SS, then the PC:SR are pushed on
the SS. Since each SS location can be addressed as separate 16-bit registers (SSH and
SSL), software stacks can be created for unlimited nesting.
The SS can accommodate up to 15 long interrupts, seven DO loops, 15 JSRs, or combi-
nations thereof. When the SS limit is exceeded, a nonmaskable stack error interrupt
occurs, and the PC is pushed to SS location zero, which is not implemented in hardware.
The PC will be lost, and there will be no SP from the stack interrupt routine to the program
that was executing when the error occurred.
5.4.5 Stack Pointer Register
The 6-bit SP register indicates the location of the top of the SS and the status of the SS
(underflow, empty, full, and overflow). The SP register is referenced implicitly by some in-
structions (DO, REP, JSR, RTI, etc.) or directly by the MOVEC instruction. The SP
register format is shown in Figure 5-7. The SP register works as a 6-bit counter that ad-
dresses (selects) a 15-location stack with its four LSBs. The possible SP values are
shown in Figure 5-8 and described in the following paragraphs.
5.4.5.1
Stack Pointer (Bits 0–3)
The SP points to the last location used on the SS. Immediately after hardware reset,
Figure 5-7 Stack Pointer Register Format
5
4
3
2
1
0
STACK POINTER
STACK ERROR FLAG
UNDERFLOW FLAG
UF
SE
P3
P2
P1
P0
Summary of Contents for DSP56K
Page 12: ...xii LIST of TABLES MOTOROLA List of Tables Continued Table Page Number Title Number ...
Page 13: ...MOTOROLA DSP56K FAMILY INTRODUCTION 1 1 SECTION 1 DSP56K FAMILY INTRODUCTION ...
Page 31: ...MOTOROLA DATA ARITHMETIC LOGIC UNIT 3 1 SECTION 3 DATA ARITHMETIC LOGIC UNIT ...
Page 50: ...DATA ALU SUMMARY 3 20 DATA ARITHMETIC LOGIC UNIT MOTOROLA ...
Page 51: ...MOTOROLA ADDRESS GENERATION UNIT 4 1 SECTION 4 ADDRESS GENERATION UNIT ...
Page 77: ...MOTOROLA PROGRAM CONTROL UNIT 5 1 SECTION 5 PROGRAM CONTROL UNIT ...
Page 124: ...INSTRUCTION GROUPS 6 30 INSTRUCTION SET INTRODUCTION MOTOROLA ...
Page 125: ...MOTOROLA PROCESSING STATES 7 1 SECTION 7 PROCESSING STATES STOP WAIT EXCEPTION NORMAL RESET ...
Page 167: ...STOP PROCESSING STATE MOTOROLA PROCESSING STATES 7 43 ...
Page 168: ...STOP PROCESSING STATE 7 44 PROCESSING STATES MOTOROLA ...
Page 169: ...MOTOROLA PORT A 8 1 SECTION 8 PORT A ...
Page 176: ...PORT A INTERFACE 8 8 PORT A MOTOROLA ...
Page 177: ...MOTOROLA PLL CLOCK OSCILLATOR 9 1 SECTION 9 PLL CLOCK OSCILLATOR x x d Φ VCO ...
Page 191: ...10 2 ON CHIP EMULATION OnCE MOTOROLA SECTION 10 ON CHIP EMULATION OnCE ...
Page 218: ...USING THE OnCE MOTOROLA ON CHIP EMULATION OnCE 10 29 ...
Page 604: ...INSTRUCTION ENCODING A 338 INSTRUCTION SET DETAILS MOTOROLA ...
Page 605: ...MOTOROLA BENCHMARK PROGRAMS B 1 APPENDIX B BENCHMARK PROGRAMS T T T T T P1 P3 P2 P4 T T T ...
Page 609: ...BENCHMARK PROGRAMS MOTOROLA BENCHMARK PROGRAMS B 5 ...
Page 611: ...BENCHMARK PROGRAMS MOTOROLA BENCHMARK PROGRAMS B 7 ...
Page 613: ...BENCHMARK PROGRAMS MOTOROLA BENCHMARK PROGRAMS B 9 ...
Page 615: ...BENCHMARK PROGRAMS MOTOROLA BENCHMARK PROGRAMS B 11 ...