-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathcode8
146 lines (146 loc) · 1.83 KB
/
code8
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
.PAG 'CODE8'
DATBK1 JSR CHRGET
BIT VALTYP
BPL NUMINS
BIT INPFLG
BVC SETQUT
INX
STX TXTPTR
LDA #0
STA CHARAC
BEQ RESETC
SETQUT STA CHARAC
CMP #34
BEQ NOWGET
LDA #':
STA CHARAC
LDA #44
RESETC CLC
NOWGET STA ENDCHR
LDA TXTPTR
LDY TXTPTR+1
ADC #0
BCC NOWGE1
INY
NOWGE1 JSR STRLT2
JSR ST2TXT
JSR INPCOM
JMP STRDN2
NUMINS JSR FIN
LDA INTFLG
JSR QINTGR
STRDN2 JSR CHRGOT
BEQ TRMOK
CMP #44
BEQ *+5
JMP TRMNOK
TRMOK LDA TXTPTR
LDY TXTPTR+1
STA INPPTR
STY INPPTR+1
LDA VARTXT
LDY VARTXT+1
STA TXTPTR
STY TXTPTR+1
JSR CHRGOT
BEQ VAREND
JSR CHKCOM
JMP INLOOP
DATLOP JSR DATAN
INY
TAX
BNE NOWLIN
LDX #ERROD
INY
LDA (TXTPTR)Y
BEQ ERRGO5
INY
LDA (TXTPTR)Y
STA DATLIN
INY
LDA (TXTPTR)Y
INY
STA DATLIN+1
NOWLIN JSR ADDON ;TXTPTR+.Y
JSR CHRGOT ;SPAN BLANKS
TAX ;USED LATER
CPX #DATATK
BNE DATLOP
JMP DATBK1
VAREND LDA INPPTR
LDY INPPTR+1
LDX INPFLG
BPL VARY0
JMP RESFIN
VARY0 LDY #0
LDA (INPPTR)Y
BEQ INPRTS
LDA CHANNL
BNE INPRTS
LDA #<EXIGNT
LDY #>EXIGNT
JMP STROUT
INPRTS RTS
EXIGNT .BYT '?EXTRA IGNORED'
.BYT $D
.BYT 0
TRYAGN .BYT '?REDO FROM START'
.BYT $D
.BYT 0
NEXT BNE GETFOR
LDY #0
BEQ STXFOR
GETFOR JSR PTRGET
STXFOR STA FORPNT
STY FORPNT+1
JSR FNDFOR
BEQ HAVFOR
LDX #ERRNF
ERRGO5 JMP ERROR ;CHANGE
HAVFOR TXS
TXA
CLC
ADC #4
PHA
ADC #5+ADDPRC
STA INDEX2
PLA
LDY #1
JSR MOVFM
TSX
LDA ADDPRC+264,X
STA FACSGN
LDA FORPNT
LDY FORPNT+1
JSR FADD
JSR MOVVF
LDY #1
JSR FCOMPN
TSX
SEC
SBC ADDPRC+264,X
BEQ LOOPDN
LDA 269+ADDPRC+ADDPRC,X
STA CURLIN
LDA 270+ADDPRC+ADDPRC,X
STA CURLIN+1
LDA 272+ADDPRC+ADDPRC,X
STA TXTPTR
LDA 271+ADDPRC+ADDPRC,X
STA TXTPTR+1
NEWSGO JMP NEWSTT
LOOPDN TXA
ADC #15+ADDPRC+ADDPRC
TAX
TXS
JSR CHRGOT
CMP #44
BNE NEWSGO
JSR CHRGET
JSR GETFOR
FRMNUM JSR FRMEVL
CHKNUM CLC
.BYT $24
CHKSTR SEC
CHKVAL BIT VALTYP
.END