HD404618 Series
14
V Register (V):
Used for RAM address expansion and selecting the bank of RAM addresses $100–$2CF
(464 digits). Thus, when accessing locations $100–$2CF, specify the value of the V register (V = $0 for
bank 0, V = $1 for bank 1). Locations $000–$0FF and $3C0–$3FF can be accessed independent of the V
register. The V register is located at RAM address $03F.
W Register (W), X Register (X), Y Register (Y):
Two-bit (W) and four-bit (X and Y) registers used for
indirect RAM addressing. The Y register is also used for D-port addressing.
SPX Register (SPX), SPY Register (SPY):
Four-bit registers used to supplement the X and Y registers.
Carry Flag (CA):
One-bit flag that stores any ALU overflow generated by an arithmetic operation. CA is
affected by the SEC, REC, ROTL, and ROTR instructions. During an interrupt, a carry is pushed onto the
stack and popped from the stack by the RTNI instruction–but not by the RTN instruction.
Status Flag (ST):
One-bit flag that latches any overflow generated by an arithmetic or compare
instruction, not-zero decision from the ALU, or result of a bit test. ST is used as a branch condition of the
BR, BRL, CAL, or CALL instruction. The contents of ST remain unchanged until the next arithmetic,
compare, or bit test instruction is executed, but become 1 after the BR, BRL, CAL, or CALL instruction is
read, regardless of whether the instruction is executed or skipped. During an interrupt, the contents of ST
are pushed onto the stack and popped from the stack by the RTNI instruction, but not by the RTN
instruction.
Program Counter (PC):
A 14-bit counter that points to the ROM address of the instruction being
executed.
Stack Pointer (SP):
Ten-bit pointer that contains the address of the stack area to be used next. The SP is
initialized to $3FF by MCU reset, is decremented by 4 when data is pushed onto the stack, and is
incremented by 4 when data is popped from the stack. Since the top four bits of the SP are fixed at 1111, a
stack of up to 16 levels can be used.
The SP can also be initialized to $3FF in another way: by resetting the RSP bit with the REM or REMD
instruction.