Program-Address Generation
5-3
Program Control
Table 5–1. Program-Address Generation Summary
ÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁ
Operation
ÁÁ
ÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
Program-Address Source
ÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁ
Sequential operation
ÁÁ
ÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
PC (contains program a1)
ÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁ
Dummy cycle
ÁÁ
ÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
PAR (contains program address)
ÁÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁÁ
Return from subroutine
ÁÁ
ÁÁ
ÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁÁÁ
Top of the stack (TOS)
ÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁ
Return from table move or block move
ÁÁ
ÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
Micro stack (MSTACK)
ÁÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁÁ
Branch or call to address specified in
instruction
ÁÁ
ÁÁ
ÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁÁÁ
Branch or call instruction by way of the
program read bus (PRDB)
ÁÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁÁ
Branch or call to address specified in
lower half of the accumulator
ÁÁ
ÁÁ
ÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁÁÁ
Low accumulator by way of the data
read bus (DRDB)
ÁÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁÁ
Branch to interrupt service routine
ÁÁ
ÁÁ
ÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁÁÁ
Interrupt vector location by way of the
program read bus (PRDB)
The ’C2xx program-address generation logic uses the following hardware:
-
Program counter (PC). The ’C2xx has a 16-bit program counter (PC) that
addresses internal and external program memory when fetching instruc-
tions.
-
Program address register (PAR). The PAR drives the program address
bus (PAB). The PAB is a 16-bit bus that provides program addresses for
both reads and writes.
-
Stack. The program-address generation logic includes a 16-bit-wide, 8-
level hardware stack for storing up to eight return addresses. In addition,
you can use the stack for temporary storage.
-
Micro stack (MSTACK). Occasionally, the program-address generation
logic uses the 16-bit-wide, 1-level MSTACK to store one return address.
-
Repeat counter (RPTC). The 16-bit RPTC is used with the repeat (RPT)
instruction to determine how many times the instruction following RPT is
repeated.
5.1.1
Program Counter (PC)
The program-address generation logic uses the 16-bit program counter (PC)
to address internal and external program memory. The PC holds the address
of the next instruction to be executed. Through the program address bus
(PAB), an instruction is fetched from that address in program memory and
loaded into the instruction register. When the instruction register is loaded, the
PC holds the next address.