HYUNDAI MicroElectonics
34
COM
( 1's complement )
Function
: ( M )
~ ( M )
Description : 1’s complement of the contents of memory.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
COM dp
2C
2
4
Example
:
539 C251 C504
LDA
DPH
540 C253 2C04
COM
DPH
541 C255 CC04
LDX
DPH
542 C257 ECC0
STX
R0
; R0 Output ~(DPH)
DAA
( Decimal adjust for addition )
Function
:
Before
After
C
H
A
7
~A
4
(hex)
A
3
~A
0
(hex)
ADDED
C
0
0
0 ~ 9
0 ~ 9
00
0
0
0
0 ~ 8
A ~ F
06
0
0
1
0 ~ 9
0 ~ 3
06
0
0
0
A ~ F
0 ~ 9
60
1
0
0
9 ~ F
A ~ F
66
1
0
1
A ~ F
0 ~ 3
66
1
1
0
0 ~ 2
0 ~ 9
60
1
1
0
0 ~ 2
A ~ F
66
1
1
1
0 ~ 3
0 ~ 3
66
1
Description : After addition, convert the hex. data of accumulator to decimal data.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
DAA
DF
1
3
Example
:
;**** DECIMAL COUNT FROM 0 TO 999999
;
427 F882 1E02
LDX
#2
428 F884 A0
SETC
429 F885 C400
CONTINUE: LDA
#0
430 F887 0633
ADC
X
431 F889 DF
DAA
432 F88A E633
STA
X
433 F88C AF
DEC
X
434 F88D 10F6
BPL
CONTINUE
Содержание GMS800
Страница 1: ...NOV 1996 Rev 1 0 8 BIT SINGLE CHIP MICROCOMPUTERS GMS800 Series Instruction Manual ...
Страница 4: ......
Страница 20: ...HYUNDAI MicroElectonics 16 ...
Страница 68: ...HYUNDAI MicroElectonics 64 ...