SN8P2977
8-Bit Micro-Controller with Regulator, PGIA, 24-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 35
V1.7
2.1.9
MULTI-ADDRESS JUMPING
Users can jump around the multi-address by either JMP instruction or ADD M, A instruction (M = PCL) to activate
multi-address jumping function. Program counter can
’t carry to PCH when PCL overflow automatically after executing
addition instructions. Users have to take care program counter result and adjust PCH value by program. For jump table
or others applications, users have to calculate PC value to avoid PCL overflow making PC error and program executing
error.
Note: Program counter can
’t carry to PCH when PCL overflow automatically after executing addition
instructions. Users have to take care program counter result and adjust PCH value by program.
Example: If PC = 0323H (PCH = 03H, PCL = 23H)
; PC = 0323H
MOV
A, #28H
B0MOV
PCL, A
; Jump to address 0328H
…
; PC = 0328H
MOV
A, #00H
B0MOV
PCL, A
; Jump to address 0300H
…
Example: If PC = 0323H (PCH = 03H, PCL = 23H)
; PC = 0323H
B0ADD
PCL, A
; PCL = PCL + ACC, the PCH cannot be changed.
JMP
A0POINT
; If ACC = 0, jump to A0POINT
JMP
A1POINT
; ACC = 1, jump to A1POINT
JMP
A2POINT
; ACC = 2, jump to A2POINT
JMP
A3POINT
; ACC = 3, jump to A3POINT
…
…