HYUNDAI MicroElectonics
52
SBC
( Subtract with carry )
Function
: A
( A )
( M )
~( C )
Description : subtract the contents of memory and the complement of carry flag from accumulator.
The result is left in the accumulator.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
SBC #imm
24
2
2
SBC dp
25
2
3
SBC dp + X
26
2
4
SBC !abs
27
3
4
SBC !abs + Y
35
3
5
SBC [ dp + X ]
36
2
6
SBC [ dp ] + Y
37
2
6
SBC { X }
34
1
3
Example
:
244 E117 A0
SETC
245 E118 C56E
LDA
DATA1
246 E11A 245F
SBC
#5FH
; DATA1 - #5FH -> DATA0
247 E11C E5A6
STA
DATA0
SET1
( Set bit )
Function
: ( dp.bit )
“1 ”
Description : Set the specified bit of memory to 1.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
SET1 dp.bit
x1
2
4
* X means that the bit4 of op code is “0”
Example
:
61 E03E C11F
SET1
1FH.6
62 E040 2F02
BRA
LPE7
63 E042 D11F
CLR1
1FH.6
64 E044 FF
LPE7:
NOP