![background image](http://html.mh-extra.com/html/hyundai/gms800/gms800_instruction-manual_2196205023.webp)
Instruction Set
19
ADC
( Add with carry )
Function
: A
( A ) + ( M ) + C or A
( A ) + #imm + C
Description : Add the contents of memory or immediate data to accumulator with carry.
The result is left in the accumulator.
Flag
:
Mnemonic
Op Code
Bytes
Cycles
ADC #imm
04
2
2
ADC dp
05
2
3
ADC dp + X
06
2
4
ADC !abs
07
3
4
ADC !abs + Y
15
3
5
ADC [ dp + X ]
16
2
6
ADC [ dp ] + Y
17
2
6
ADC { X }
14
1
3
Example
:
10 F00D A0
SETC
11 F00E 0535
ADC
35H
; A+(35H)+C
12 F010 DF
DAA
13
;
14 F011 A0
SETC
15 F012 0410
ADC
#10H
; A+10H+C
16 F014 DF
DAA
17
;
18 F015 0635
ADC
35H+X
19
;
20 F017 151AF0
ADC
!DATA+Y
21
;
22
23 F01A 14
DATA
DB 14H,16H,47H
24 F01B 16
25 F01C 47
ADDW
(Add word without carry - 16bit)
Function
: YA
( YA )
( dp+1 ) ( dp )
Description : Add the contents of memory pair(dp+1)(dp) to 16-bit accumulator (YA) without carry.
The result is left in the 16-bit accumulator(YA).
Flag
:
Mnemonic
OP Code
Bytes
Cycles
ADDW dp
1D
2
5
Example
:
83 F057 C957
LDY
57H
84 F059 C556
LDA
56H
85 F05B 1D46
ADDW
46H
; M(47H)M(46H) + YA -> YA