NY6 User Manual
Ver 1.3 2019/03/28
77
4.2.4 Other Instructions
CALL a
Function :
Call subroutine by direct address
Operation: STK ← PC+2
PC ← {BANK, a}
Operand : a: 16-bit program address to call, 0x0000
to 0xFFFF
Words :
2
Cycles :
2
Operative Flags: None
Flags Affected: None
Example :
CALL
a1
Before Instruction
PC=a0
After Instruction
PC={BANK, a1}, STK =a0+2
Note: PC[21:20] will not be changed.
JMP a
Function :
Unconditional jump by direct address
Operation: PC ← {BANK, a}
Operand : a: 16-bit program address to jump,
0x0000 to 0xFFFF
Words :
2
Cycles :
2
Operative Flags: None
Flags Affected: None
Example :
JMP
a1
Before Instruction
PC=a0
After Instruction
PC={BANK, a1}
Note: PC[21:20] will not be changed.
BANK
Function :Set 3-bit value to Bank Register
Operati
on: BANK ← 3’bxxx
Operand :
None
Words :
1
Cycles :
1
Example : BANK 0x2
After Instruction
BANK ← 0x2
MPG
Function :
Set 3-bit value to SRAM page.
Operation:
Operand :
None
Words :
1
Cycles :
1
Operative Flags: None
Flags Affected: None
Example :
MPG 0x3
Before Instruction
PAGE = 0x1
After Instruction
PAGE = 0x3