SN8P1829
8-Bit MCU build-in 12-bit ADC + PGIA + Charge-pump Reg 128 dots LCD driver
SONiX TECHNOLOGY CO., LTD
Page 32
Version 1.0
ONE ADDRESS SKIPPING
There are 9 instructions (CMPRS, INCS, INCMS, DECS, DECMS, BTS0, BTS1, B0BTS0, B0BTS1) with one address
skipping function. If the result of these instructions is matched, the PC will add 2 steps to skip next instruction.
If the condition of bit test instruction is matched, the PC will add 2 steps to skip next instruction.
B0BTS1
FC
; Skip next instruction, if Carry flag = 1
JMP
C0STEP ; Else jump to C0STEP.
.
C0STEP: NOP
B0MOV A, BUF0 ; Move BUF0 value to ACC.
B0BTS0
FZ
; Skip next instruction, if Zero flag = 0.
JMP
C1STEP ; Else jump to C1STEP.
.
C1STEP: NOP
If the ACC is equal to the immediate data or memory, then PC will add 2 steps to skip next instruction.
CMPRS
A, #12H ; Skip next instruction, if ACC = 12H.
JMP
C0STEP ; Else jump to C0STEP.
.
C0STEP: NOP
If the result after increasing 1 or decreasing 1 is 0xffh (for DECS and DECMS) or 0x00h (for INCS and INCMS) ,
the PC will add 2 steps to skip next instruction.
INCS instruction:
INCS
BUF0
; Skip next instruction, if BUF0 = 0X00H.
JMP C0STEP ; Else jump to C0STEP.
.
C0STEP: NOP
INCMS instruction:
INCMS
BUF0
; Skip next instruction, if BUF0 = 0X00H.
JMP
C0STEP ; Else jump to C0STEP.
.
C0STEP: NOP
DECS instruction:
DECS
BUF0
; Skip next instruction, if BUF0 = 0XFFH.
JMP C0STEP ; Else jump to C0STEP.
.
C0STEP: NOP
DECMS instruction:
DECMS
BUF0
; Skip next instruction, if BUF0 = 0XFFH.
JMP
C0STEP ; Else jump to C0STEP.
.
C0STEP: NOP