3 jump instructions, 4 pset with jump instructions, 5 call instructions – Epson S1C6200 User Manual
Page 11
S1C6200/6200A CORE CPU MANUAL
EPSON
5
2 MEMORY AND OPERATIONS
2.1.3 Jump instructions
A jump can be made using the instructions in Table 2.1.3.1.
Table 2.1.3.1 Jump instructions
Unconditional
Conditional
Subroutine call
Return
Page set
Indirect
Type of jump
Instruction
JP
JP C, JP NC, JP Z, JP NZ
CALL, CALZ
RET, RETS, RETD
PSET
JPBA
The differences between jumps within the same page and jumps from one page to another is as follows.
• Jumps within the same page
A jump can be made within the same page using any of the following instructions:
JP, JP C, JP Z, JP NZ, JPBA or CALL
The destination address is specified by the 8-bit operand. A label can be used to specify a destination
address with the S1C62 Family cross assembler.
• Jumps from one page to another
The destination bank and page should be set using PSET before executing a JP instruction.
2.1.4 PSET with jump instructions
PSET loads the four low-order bits (page part) of its 5-bit operand to NPP (new page pointer) and loads the
high-order bit (bank part) to NBP (new bank pointer). Executing a JP instruction immediately after PSET
causes a jump to the bank specified by NBP, the page specified by NPP and the step specified by the JP
instruction operand. See Figure 2.1.4.1.
Page 15
Bank 0
Page 14
PSET
JUMP
Bank 0
Step 0
Step 1
Step 254
Step 255
Page 3
Bank 0
Page 2
Bank 0
Page 1
Bank 0
Page 0
Bank 0
Step 0
Step 1
Step 254
Step 255
Page 15
Bank 1
Bank 1
Step 0
Step 1
Step 254
Step 255
Page 3
Bank 1
Page 2
Bank 1
Bank 0
Bank 1
Jump with PSET can go anywhere
within the program memory
Jump can go between banks
Jump without PSET
can go anywhere
within one page
Page 1
Bank 1
Page 0
Bank 1
Step 0
Step 1
Step 254
Step 255
Page 14
JUMP
Fig. 2.1.4.1 The PSET and jump instructions
2.1.5 Call instructions
As only the page data specified by NPP is loaded to PCP when a call instruction is executed, subroutine
calls between banks are not possible. Jumps between banks can only be made using JP instructions.