SN8P1602B
8-Bit Micro-Controller
ONE ADDRESS SKIPPING
There are nine instructions (CMPRS, INCS, INCMS, DECS, DECMS, BTS0, BTS1, B0BTS0, B0BTS1) with one
address skipping function. If the result of these instructions is true, the PC will add 2 steps to skip next instruction.
If the condition of bit test instruction is true, the PC will add 2 steps to skip next instruction.
B0BTS1
JMP
.
FC
C0STEP
; To skip, if Carry_flag = 1
; Else jump to C0STEP.
C0STEP:
NOP
B0MOV
B0BTS0
JMP
A, BUF0
FZ
C1STEP
; Move BUF0 value to ACC.
; To skip, if Zero flag = 0.
; Else jump to C1STEP.
.
C1STEP:
NOP
If the ACC is equal to the immediate data or memory, the PC will add 2 steps to skip next instruction.
CMPRS
JMP
.
A, #12H
C0STEP
; To skip, if ACC = 12H.
; Else jump to C0STEP.
C0STEP:
NOP
If the destination increased by 1, which results overflow of 0xFF to 0x00, the PC will add 2 steps to skip next
instruction.
INCS instruction:
INCS
JMP
…
BUF0
C0STEP
; Jump to C0STEP if ACC is not zero.
C0STEP:
NOP
INCMS instruction:
INCMS
JMP
…
BUF0
C0STEP
; Jump to C0STEP if BUF0 is not zero.
C0STEP:
NOP
If the destination decreased by 1, which results underflow of 0x00 to 0xFF, the PC will add 2 steps to skip next
instruction.
DECS instruction:
DECS
JMP
…
BUF0
C0STEP
; Jump to C0STEP if ACC is not zero.
C0STEP:
NOP
DECMS instruction:
DECMS
JMP
…
BUF0
C0STEP
; Jump to C0STEP if BUF0 is not zero.
C0STEP:
NOP
SONiX TECHNOLOGY CO., LTD
Page 30
Version 1.2