SN8P2604A
8-Bit Micro-Controller
¾
Example: “@JMP_A” application in SONIX macro file called “MACRO3.H”.
B0MOV
@JMP_A
JMP
JMP
JMP
A, BUF0
5
; “BUF0” is from 0 to 4.
; The number of the jump table listing is five.
; ACC = 0, jump to A0POINT
; ACC = 1, jump to A1POINT
; ACC = 2, jump to A2POINT
; ACC = 3, jump to A3POINT
; ACC = 4, jump to A4POINT
A0POINT
A1POINT
A2POINT
A3POINT
A4POINT
JMP
JMP
If the jump table position is across a ROM boundary (0x00FF~0x0100), the “@JMP_A” macro will adjust the jump table
routine begin from next RAM boundary (0x0100).
¾
Example: “@JMP_A” operation.
; Before compiling program.
ROM address
B0MOV
A, BUF0
5
; “BUF0” is from 0 to 4.
@JMP_A
; The number of the jump table listing is five.
; ACC = 0, jump to A0POINT
; ACC = 1, jump to A1POINT
; ACC = 2, jump to A2POINT
; ACC = 3, jump to A3POINT
; ACC = 4, jump to A4POINT
0X00FD
0X00FE
0X00FF
0X0100
0X0101
JMP
JMP
JMP
JMP
JMP
A0POINT
A1POINT
A2POINT
A3POINT
A4POINT
; After compiling program.
ROM address
B0MOV
A, BUF0
5
; “BUF0” is from 0 to 4.
@JMP_A
; The number of the jump table listing is five.
; ACC = 0, jump to A0POINT
; ACC = 1, jump to A1POINT
; ACC = 2, jump to A2POINT
; ACC = 3, jump to A3POINT
; ACC = 4, jump to A4POINT
0X0100
0X0101
0X0102
0X0103
0X0104
JMP
JMP
JMP
JMP
JMP
A0POINT
A1POINT
A2POINT
A3POINT
A4POINT
SONiX TECHNOLOGY CO., LTD
Page 20
Version 0.3