forked from mist64/cbmsrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
code11
171 lines (171 loc) · 1.91 KB
/
code11
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
.PAG 'CODE11'
CMP (DSCTMP+1)Y
BEQ NXTCMP
LDX #$FF
BCS DOCMP
LDX #1
DOCMP INX
TXA
ROL A
AND DOMASK
BEQ GOFLOT
LDA #$FF
GOFLOT JMP FLOAT
DIM3 JSR CHKCOM
DIM TAX
JSR PTRGT1
JSR CHRGOT
BNE DIM3
RTS
PTRGET LDX #0
JSR CHRGOT
PTRGT1 STX DIMFLG
PTRGT2 STA VARNAM
JSR CHRGOT
JSR ISLETC
BCS PTRGT3
INTERR JMP SNERR
PTRGT3 LDX #0
STX VALTYP
STX INTFLG
JSR CHRGET
BCC ISSEC
JSR ISLETC
BCC NOSEC
ISSEC TAX
EATEM JSR CHRGET
BCC EATEM
JSR ISLETC
BCS EATEM
NOSEC CMP #'$
BNE NOTSTR
LDA #$FF
STA VALTYP
BNE TURNON
NOTSTR CMP #'%
BNE STRNAM
LDA SUBFLG
BNE INTERR
LDA #128
STA INTFLG
ORA VARNAM
STA VARNAM
TURNON TXA
ORA #128
TAX
JSR CHRGET
STRNAM STX VARNAM+1
SEC
ORA SUBFLG
SBC #40
BNE *+5
JMP ISARY
LDY #0
STY SUBFLG
LDA VARTAB
LDX VARTAB+1
STXFND STX LOWTR+1
LOPFND STA LOWTR
CPX ARYTAB+1
BNE LOPFN
CMP ARYTAB
BEQ NOTFNS
LOPFN LDA VARNAM
CMP (LOWTR)Y
BNE NOTIT
LDA VARNAM+1
INY
CMP (LOWTR)Y
BEQ FINPTR
DEY
NOTIT CLC
LDA LOWTR
ADC #6+ADDPRC
BCC LOPFND
INX
BNE STXFND
ISLETC CMP #'A
BCC ISLRTS
SBC #$5B
SEC
SBC #@245
ISLRTS RTS
NOTFNS PLA
PHA
ZZ6=ISVRET-1
CMP #<ZZ6
BNE NOTEVL
LDZR LDA #<ZERO
LDY #>ZERO
RTS
NOTEVL LDA VARNAM
LDY VARNAM+1
CMP #'T
BNE QSTAVR
CPY #@311
BEQ LDZR
CPY #@111
BNE QSTAVR
GOBADV JMP SNERR
QSTAVR
CMP #'S
BNE VAROK
CPY #'T
BEQ GOBADV
VAROK LDA ARYTAB
LDY ARYTAB+1
STA LOWTR
STY LOWTR+1
LDA STREND
LDY STREND+1
STA HIGHTR
STY HIGHTR+1
CLC
ADC #6+ADDPRC
BCC NOTEVE
INY
NOTEVE STA HIGHDS
STY HIGHDS+1
JSR BLTU
LDA HIGHDS
LDY HIGHDS+1
INY
STA ARYTAB
STY ARYTAB+1
LDY #0
LDA VARNAM
STA (LOWTR)Y
INY
LDA VARNAM+1
STA (LOWTR)Y
LDA #0
INY
STA (LOWTR)Y
INY
STA (LOWTR)Y
INY
STA (LOWTR)Y
INY
STA (LOWTR)Y
INY
STA (LOWTR)Y
FINPTR LDA LOWTR
CLC
ADC #2
LDY LOWTR+1
BCC FINNOW
INY
FINNOW STA VARPNT
STY VARPNT+1
RTS
FMAPTR LDA COUNT
ASL A
ADC #5
ADC LOWTR
LDY LOWTR+1
BCC JSRGM
INY
JSRGM STA ARYPNT
STY ARYPNT+1
RTS
.END