1 transfer instructions, Mov a, #n4, Mov reg1, #n4 – NEC PD754144 User Manual
Page 255: Mov xa, #n8, Mov hl, #n8, Mov rp2, #n8
CHAPTER 11 INSTRUCTION SET
255
User’s Manual U10676EJ3V0UM
11.4.1 Transfer instructions
MOV A, #n4
Function: A
←
n4 n4 = I
3-0
: 0-FH
Transfers 4-bit immediate data n4 to the A register (4-bit accumulator). This instruction has a string effect (group
A), and if MOV A, #n4 or MOV XA, #n8 follows this instruction, the string-effect instruction following the instruction
executed is processed as NOP.
Application example
(1) To set 0BH to the accumulator
MOV A, #0BH
(2) To select data output to port 3 from 0 to 2
A0: MOV A, #0
A1: MOV A, #1
A2: MOV A, #2
OUT PORT3, A
MOV reg1, #n4
Function: reg1
←
n4 n4 = I
3-0
0 to FH
Transfers 4-bit immediate data n4 to A register reg1 (X, H, L, D, E, B, or C).
MOV XA, #n8
Function: XA
←
n8 n8 = I
7-0
: 00H to FFH
Transfers 8-bit immediate data n8 to register pair XA. This instruction has a string effect, and if the same instruction
or an MOV A, #n4 instruction follows this instruction, the string-effect instruction following the instruction executed
is processed as NOP.
MOV HL, #n8
Function: HL
←
n8 n8 = I
7-0
: 00H-FFH
Transfers 8-bit immediate data n8 to register pair HL. This instruction has a string effect, and if the same
instruction follows this instruction, the string-effect instructions following the instruction executed is processed as
NOP.
MOV rp2, #n8
Function: rp2
←
n8 n8 = I
7-0
: 00H to FFH
Transfers 8-bit immediate data n8 to register pair rp2 (BC, DE).