NEC PD75P402 Manuale Utente
![NEC](https://files.manualsbrain.com/attachments/44abc27a7ab3d3ebaea5604c1237604964b3b528/common/fit/150/50/0a4ba346278cf7fed7416c8056bd03af105e868674aa2dfa47e23e007d42/brand_logo.png)
159
CHAPTER 9. INSTRUCTION SET
9.4
INSTRUCTION FUNCTIONS AND APPLICATION
9.4.1
Move Instructions
MOV A, #n4
Function: A
←
n4; n4 = I
3
to I
0
: 0 to FH
Moves 4-bit immediate data n4 to the A register (4-bit accumulator).
This instruction has a stacking effect (group A). When placed after a MOV A, #n4 or MOV XA, #n8 instruction,
stack instructions following the executed instruction are processed as NOP.
Application examples:
➀
Set 0BH into accumulator.
MOV A, #0BH
➁
Select the data to be output at Port 3 from 0 to 2.
A0:
MOV A, #0
A1:
MOV A, #1
A2:
MOV A, #2
OUT PORT 3, A
MOV rp, #n8
Function: rp
←
n8; n8 = I
7
to I
0
: 00H to FFH
Moves 8-bit immediate data n8 to register pair rp (XA, HL).
This instruction has a stacking effect. There are two stacking effects: Group A (MOV A, #n4 instruction and
MOV XA, #n8 instruction), and group B (MOV HL, #n8 instruction). When instructions of the same group are
placed consecutively, the stack instructions after the executed instruction are processed as NOP.
Application example:
Set 5FH into register pair HL.
MOV HL, #5FH
MOV A, @HL
Function: A
←
(HL)
Moves the data memory contents addressed by the contents of register pair HL to the A register.
Application example:
Move the data of address 3EH to the A register.
MOV HL, #3EH
MOV A, @HL