Instruction Set
29
CBNE
( Compare and branch if not equal )
Function
: ( A )
( M ) ,
if (Z)
0 , then ( PC )
( PC ) + rel
Description : Compare the accumulator and the contents of memory and then if the result is not zero, then
branch to specified address. The accumulator and the contents of memory are not changed.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
CBNE dp,rel
FD
3
5/7
CBNE dp+X,rel
8D
3
6/8
Example
:
144 E0A6 C4A4
LDA
#0A4H
145 E0A8 FD440B
CBNE
INFM,TIN
; TEST INFM = #0A4H
CLR1
( Clear bit )
Function
: ( dp.bit )
“ 0 ”
Description : Clear the specified bit of memory.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
CLR1 dp.bit
y1
2
4
* y means that the bit4 of op code is “1”
Example :
220 E100 5143
CLR1
43H.2
221 E102 2F02
BRA
LPE3
222 E104 4143
SET1
43H.2
223 E106 FF
LPE3:
NOP