
25
CHAPTER 3 CPU FUNCTIONS
3.1 Register Configuration
3.1.1 General-purpose registers (AW, BW, CW, DW)
There are four 16-bit registers. These can be not only used as 16-bit registers, but also accessed as 8-bit
registers (AH, AL, BH, BL, CH, CL, DH, DL) by dividing each register into the higher 8 bits and the lower 8 bits.
Therefore, these registers are used as 8-bit registers or 16-bit registers for a wide range of instructions such as
transfer instruction, arithmetic operation instruction, logical operation instruction.
Furthermore, the following registers are used as the default registers for specific instruction processing.
AW
AL
AH
BW
CW : Loop control branch, repeat, and prefix
CL
: Shift instruction, rotation instruction
DW : Word multiplication/division, indirect addressing input/output
: Word multiplication/division, word input/output, data conversion
: Byte multiplication/division, byte input/output, BCD rotate, data conversion
: Byte multiplication/division
: Data conversion (table reference)
3.1.2 Segment registers (PS, SS, DS0, DS1)
The V30MZ can divide the memory space into logical segments in 64 K-byte units and control up to 4 segments
simultaneously (segment system). The start address of each segment is specified by the following 4 segment
registers.
Program segment register (PS) : Specifies the base address of the segment that stores instructions.
Stack segment register (SS)
: Specifies the base address of the segment that performs stack operations.
Data segment 0 register (DS0) : Specifies the base address of the segment that stores data.
Data segment 1 register (DS1) : Specifies the base address of the segment that is used as a data destination
by data transfer instructions.
For details of the segment system and segment registers, refer to
Section
3.4 Logical Address and Physical
Address
.
3.1.3 Pointer (SP, BP)
The pointer consists of two 16-bit registers (stack pointer (SP) and base pointer (BP)).
Each register is used as a pointer to specify a memory address and can be referenced in an instruction and is also
used as an index register during a memory data reference.
The SP indicates the address in the stack segment at which the latest data is stored and is used as the default
register during stack operation.
The BP is used to fetch the data stored on the stack.