HYUNDAI MicroElectonics
22
BBC
( Branch if bit clear )
Function
: if (bit) = 0, then ( PC )
( PC ) + rel
Description : Branches if the specified bit of the accumulator or of the memory is “0”.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
BBC A.bit,rel
y2
2
4/6
BBC dp.bit,rel
y3
3
5/7
* y means that the bit4 of op code is “1”.
Example
:
72
F_NEW
EQU
1,23H
73 ;
74 ;
75 F04E 332303
BBC
F_NEW,QUIT
; IF F_NEW = 0, QUIT
76 F051 E40B34
LDM
34H,#0BH
; = 1, SKIP
77
;
78
;
79 F054 6F
QUIT:
RET
BBS
( Branch if bit set )
Function
: if (bit) = 1, then ( PC )
( PC ) + rel
Description : Branches if the specified bit of the accumulator or memory is “1”.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
BBS A.bit,rel
x2
2
4/6
BBS dp.bit,rel
x3
3
5/7
* x means that the bit4 of op code is “0”.
Example
:
72
F_NEW
EQU
1,23H
73
;
74
;
75 F04C 232303
BBS
F_NEW,QUIT
; IF F_NEW =1, QUIT
76 F04F E40B34
LDM
34H,#0BH
77 F052 6F
QUIT:
RET