-
Notifications
You must be signed in to change notification settings - Fork 85
/
code12
151 lines (151 loc) · 1.62 KB
/
code12
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
;*****CODE12*****
N32768 .BYT 144,128,0,0
INTIDX JSR CHRGET
JSR FRMEVL
POSINT JSR CHKNUM
LDA FACSGN
BMI NONONO
AYINT LDA FACEXP
CMP #144
BCC QINTGO
LDA #<N32768
LDY #>N32768
JSR FCOMP
NONONO BNE FCERR
QINTGO JMP QINT
ISARY LDA DIMFLG
ORA INTFLG
PHA
LDA VALTYP
PHA
LDY #0
INDLOP TYA
PHA
LDA VARNAM+1
PHA
LDA VARNAM
PHA
JSR INTIDX
PLA
STA VARNAM
PLA
STA VARNAM+1
PLA
TAY
TSX
LDA 258,X
PHA
LDA 257,X
PHA
LDA INDICE
STA 258,X
LDA INDICE+1
STA 257,X
INY
JSR CHRGOT
CMP #44
BEQ INDLOP
STY COUNT
JSR CHKCLS
PLA
STA VALTYP
PLA
STA INTFLG
AND #127
STA DIMFLG
LDX ARYTAB
LDA ARYTAB+1
LOPFDA STX LOWTR
STA LOWTR+1
CMP STREND+1
BNE LOPFDV
CPX STREND
BEQ NOTFDD
LOPFDV LDY #0
LDA (LOWTR)Y
INY
CMP VARNAM
BNE NMARY1
LDA VARNAM+1
CMP (LOWTR)Y
BEQ GOTARY
NMARY1 INY
LDA (LOWTR)Y
CLC
ADC LOWTR
TAX
INY
LDA (LOWTR)Y
ADC LOWTR+1
BCC LOPFDA
BSERR LDX #ERRBS
.BYT $2C
FCERR LDX #ERRFC
ERRGO3 JMP ERROR
GOTARY LDX #ERRDD
LDA DIMFLG
BNE ERRGO3
JSR FMAPTR
LDA COUNT
LDY #4
CMP (LOWTR)Y
BNE BSERR
JMP GETDEF
NOTFDD JSR FMAPTR
JSR REASON
LDA #0
TAY
STA CURTOL+1
LDX #5
LDA VARNAM
STA (LOWTR)Y
BPL NOTFLT
DEX
NOTFLT INY
LDA VARNAM+1
STA (LOWTR)Y
BPL STOMLT
DEX
DEX
STOMLT STX CURTOL
LDA COUNT
INY
INY
INY
STA (LOWTR)Y
LOPPTA LDX #11
LDA #0
BIT DIMFLG
BVC NOTDIM
PLA
CLC
ADC #1
TAX
PLA
ADC #0
NOTDIM INY
STA (LOWTR)Y
INY
TXA
STA (LOWTR)Y
JSR UMULT
STX CURTOL
STA CURTOL+1
LDY INDEX
DEC COUNT
BNE LOPPTA
ADC ARYPNT+1
BCS OMERR1
STA ARYPNT+1
TAY
TXA
ADC ARYPNT
BCC GREASE
INY
BEQ OMERR1
GREASE JSR REASON
STA STREND
STY STREND+1
LDA #0
INC CURTOL+1
.FIL CODE13