-
Notifications
You must be signed in to change notification settings - Fork 16
/
t_adc_bcd_01.65s
99 lines (93 loc) · 1.22 KB
/
t_adc_bcd_01.65s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
; ADC, test decimal mode.
;
; NV-BDIZC
; ??1110??
;
; The results I got on Rockwell 6502 AP
;
; 00 + 00 and C=0 gives 00 and N=0 V=0 Z=1 C=0 (3A)
; 79 + 00 and C=1 gives 80 and N=1 V=1 Z=0 C=0 (F8)
; 24 + 56 and C=0 gives 80 and N=1 V=1 Z=0 C=0 (F8)
; 93 + 82 and C=0 gives 75 and N=0 V=1 Z=0 C=1 (79)
; 89 + 76 and C=0 gives 65 and N=0 V=0 Z=0 C=1 (39)
; 89 + 76 and C=1 gives 66 and N=0 V=0 Z=0 C=1 (39)
; 80 + f0 and C=0 gives d0 and N=1 V=1 Z=0 C=1 (F9)
; 80 + fa and C=0 gives e0 and N=1 V=0 Z=0 C=1 (B9)
; 2f + 4f and C=0 gives 74 and N=0 V=0 Z=0 C=0 (38)
; 6f + 00 and C=1 gives 76 and N=0 V=0 Z=0 C=0 (38)
RES=$0300
*=$0200
SED
CLC
LDA #$00
ADC #$00
STA RES
PHP
PLA
STA RES+1
SEC
LDA #$79
ADC #$00
STA RES+2
PHP
PLA
STA RES+3
CLC
LDA #$24
ADC #$56
STA RES+4
PHP
PLA
STA RES+5
CLC
LDA #$93
ADC #$82
STA RES+6
PHP
PLA
STA RES+7
CLC
LDA #$89
ADC #$76
STA RES+8
PHP
PLA
STA RES+9
SEC
LDA #$89
ADC #$76
STA RES+10
PHP
PLA
STA RES+11
CLC
LDA #$80
ADC #$F0
STA RES+12
PHP
PLA
STA RES+13
CLC
LDA #$80
ADC #$FA
STA RES+14
PHP
PLA
STA RES+15
CLC
LDA #$2F
ADC #$4F
STA RES+16
PHP
PLA
STA RES+17
SEC
LDA #$6F
ADC #$00
STA RES+18
PHP
PLA
STA RES+19
BRK
*=$0300
.DS 20