Texas Instruments MSP50C6xx Calculator User Manual


 
System Registers
4-5Assembly Language Instructions
During accumulator read operations, both An and offset An~ are fetched.
Depending on the instruction, either or both registers may be used. In addition,
some write operations allow either register to be selected.
The accumulator block can also be used in string operations. The selected
accumulator (An or An~) is the least significant word (LSW) of the string and
is restored at the end of the operation. String instructions are described in
detail in section 4.8.
4.2.9 Accumulator Pointers (AP0AP3)
The accumulator pointer (AP) registers are 5-bit registers which point to one
of the 32 available accumulators. The APs contain the index of accumulators.
Many instructions allow preincrement or predecrement accumulator pointers.
Such instructions have a suffix of ++A for preincrement or ––A for
predecrement. Accumulator pointers can be stored or loaded from memory
using various addressing modes. Limited arithmetic operations can be
performed on accumulator pointers.
Bit Bits 16 5 4 3 2 1 0
AP0AP3 Not used Points to An
n = val (b0b4)
4.2.10 Indirect Register (R0R7)
Indirect registers, R0R7, are 16-bit registers that are used in various
addressing modes or as general-purpose registers. R0, R1, R2 and R3 can
be usedsolely as general-purpose registers. These registers can also be used
as indirect registers with relative addressing.
The R4 or LOOP register is used with instructions BEGLOOP and ENDLOOP
to define a hardware controlled loop. If R4 is loaded with a value, n (0 n
32767), the BEGLOOP and ENDLOOP block will be executed n+2 times. The
loop stops when R4 becomes negative.
The R5 or INDEX register is used with indirect addressing and relative addres-
sing modes of certain instructions.
The R6 or PAGE register is used with page relative addressing and relative flag
addressing.
The R7 or STACK register holds the pointer to the stack. It can be used as a
general-purpose register as long as no CALL/RET instructions are used
before restoring it with its old value. However, this register can only be used
as a general-purpose register when maskable interrupts are disabled. The old