Chapter 2. Function Description
2.1.1 A register
- 8bit Accumulator.
- In the case of 16-bit operation, compose the lower 8-bit of A, upper 8bit in Y (16-bit
Accumulator)
- In the case of multiplication instruction, execute as a multiplier register. After
¡ æ
multiplication operation, the lower 8-bit of the result enters. (Y*A
YA)
- In the case of division instruction, execute as the lower 8-bit of dividend. After
division operation, quotient enters.
2.1.2 X register
- General-purpose 8-bit register
- In the case of index addressing mode within direct page(RAM area), execute as
index register.
- In the case of division instruction, execute as register.
2.1.3 Y register
- General-purpose 8-bit register
- In the case of index addressing mode, execute as index register
- In the case of 16-bit operation instruction, execute as the upper 8-bit of YA (16-bit
accumulator).
- In the case of multiplication instruction, execute as a multiplicand register. After
multiplication operation, the upper 8-bit of the result enters.
- In the case of division instruction, execute as the upper 8-bit of dividend. After
division operation, remains enters.
- Can be used as loop counter of conditional branch command. (e.g.DBNE Y, rel)
2.1.4 Stack Pointer
- In the cases of subroutine call, Interrupt and PUSH, POP, RETI, RET instruction,
stack data on RAM or in the case of returning, assign the storage location having
stacked data.
- Stack area is constrained within 1-page (00H-FFH). The SP is post-decremented
when a subroutine call or a push instruction is executed, or when an interrupt is
accepted; and the SP is pre-incremented when a return or a pop instruction is
executed.
- SP should be initialized as follows
¡ æ
¡ æ
ex) LDX #0FEH
TXSP
: 0FEH
: X reg.
X reg.
SP
- The behaviors of stack pointer according to each instruction are the following.
2 - 2