SN8P2604
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 97
Version 1.1
11.5.2 INSTRUCTION CYCLE
Instruction cycles of some instructions are different between SN8P2604 and EV chip. These differences makes ICE
instruction timing isn’t consistent with SN8P2604. SN8IDE assembler provides some macros to solve instruction cycle
difference as following. Users just only use built-in instruction macro to replace corresponding instruction. In
“ICE_MODE EQU 1” ICE emulation mode, assembler maybe insert some extra code to synchronize instruction timing
between ICE and real chip. Therefore, the maximum available ROM size is larger than real chip. In “ICE_MODE EQU
0” the ROM size is same as real chip.
SN8P2604
S8KD-2 EV CHIP
Field Mnemonic Cycle
Field
Mnemonic Cycle
INSTRUCTION
MACRO
DESCRIPTION
MOV
A,M
1
MOV
A,M
1
-
M
MOV
M,A
1
M
MOV
M,A
1
-
O
B0MOV A,M 1 O
B0MOV A,M 1
-
V
B0MOV M,A 1 V
B0MOV M,A 1
-
E
MOV
A,I
1
E
MOV
A,I
1
-
B0MOV
M,I
1
B0MOV
M,I
1
-
XCH
A,M
1+N
XCH
A,M
1
@XCH A,M
B0XCH
A,M
1+N
B0XCH
A,M
1
@B0XCH A,M
MOVC
2
MOVC
2
-
ADC
A,M
1
ADC
A,M
1
-
A
ADC
M,A
1+A
A
ADC
M,A
1
@ADC M,A
R
ADD
A,M
1
R
ADD
A,M
1
-
I
ADD
M,A
1+N
I
ADD
M,A
1
@ADD M,A
T
B0ADD
M,A
1+N
T
B0ADD
M,A
1
@B0ADD M,A
H
ADD
A,I
1
H
ADD
A,I
1
-
M
SBC
A,M
1
M
SBC
A,M
1
-
E
SBC
M,A
1+N
E
SBC
M,A
1
@SBC M,A
T
SUB
A,M
1
T
SUB
A,M
1
-
I
SUB
M,A
1+N
I
SUB
M,A
1
@SUB M,A
C
SUB
A,I
1
C
SUB
A,I
1
-
AND
A,M
1
AND
A,M
1
-
L
AND
M,A
1+N
L
AND
M,A
1
@AND M,A
O
AND
A,I
1
O
AND
A,I
1
-
G
OR
A,M
1
G
OR
A,M
1
-
I
OR
M,A
1+N
I
OR
M,A
1
@OR M,A
C
OR
A,I
1
C
OR
A,I
1
-
XOR
A,M
1
XOR
A,M
1
-
XOR
M,A
1+N
XOR
M,A
1
@XOR M,A
XOR
A,I
1
XOR
A,I
1
-
SWAP
M
1
SWAP
M
1
-
P
SWAPM
M
1+N
P
SWAPM
M
1
@SWAPM M
R
RRC
M
1
R
RRC
M
1
-
O
RRCM
M
1+N
O
RRCM
M
1
@RRCM M
C
RLC
M
1
C
RLC
M
1
-
E
RLCM
M
1+N
E
RLCM
M
1
@RLCM M
S
CLR
M
1
S
CLR
M
1
-
S
BCLR
M.b
1+N
S
BCLR
M.b
1
@BSET M.b
BSET
M.b
1+N
BSET
M.b
1
@BCLR M.b
B0BCLR
M.b
1+N
B0BCLR
M.b
1
@B0BSET M.b
B0BSET
M.b
1+N
B0BSET
M.b
1
@B0BCLR M.b
CMPRS
A,I
1 + S
CMPRS
A,I
1 + S
-
B
CMPRS
A,M
1 + S
B
CMPRS
A,M
1 + S
-
R
INCS
M
1 + S
R
INCS
M
1 + S
-
A
INCMS
M
1+N+S
A
INCMS
M
1 + S
@INCMS M
N
DECS
M
1 + S
N
DECS
M
1 + S
-
C
DECMS
M
1+N+S
C
DECMS
M
1 + S
@DECMS M
H
BTS0
M.b
1 + S
H
BTS0
M.b
1 + S
-
BTS1
M.b
1 + S
BTS1
M.b
1 + S
-
B0BTS0
M.b
1 + S
B0BTS0
M.b
1 + S
-
B0BTS1
M.b
1 + S
B0BTS1
M.b
1 + S
-
M
JMP
d
2
M
JMP
d
2
-
I
CALL
d
2
I
CALL
d
2
-
S
RET
2
S
RET
2
-
C
RETI
2
C
RETI
2
-
NOP
1
NOP
1
-
1.
M = RAM, N = 0.
M = system
register, N = 1.
2.
S8KD-2 ICE
:
Read OSCM = 1
cycle
Write OSCM = 2
cycle
SN8P2604
:
Read OSCM = 1
cycle
Write OSCM = 1
cycle
3.
PUSH,POP
instructions are
different between
SN8P2604 and
S8KD-2 ICE.
PUSH
1
PUSH
1
POP
1
POP
1