-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathcode2
160 lines (160 loc) · 1.89 KB
/
code2
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
.PAG 'CODE2'
BUFOFS =@1000
CRUNCH JMP (ICRNCH)
NCRNCH LDX TXTPTR
LDY #4
STY DORES
KLOOP LDA BUFOFS,X
BPL CMPSPC
CMP #PI
BEQ STUFFH
INX
BNE KLOOP
CMPSPC CMP #'
BEQ STUFFH
STA ENDCHR
CMP #34
BEQ STRNG
BIT DORES
BVS STUFFH
CMP #'?
BNE KLOOP1
LDA #PRINTK
BNE STUFFH
KLOOP1 CMP #'0
BCC MUSTCR
CMP #60
BCC STUFFH
MUSTCR STY BUFPTR
LDY #0
STY COUNT
DEY
STX TXTPTR
DEX
RESER INY
INX
RESCON LDA BUFOFS,X
SEC
SBC RESLST,Y
BEQ RESER
CMP #128
BNE NTHIS
ORA COUNT
GETBPT LDY BUFPTR
STUFFH INX
INY
STA BUF-5,Y
LDA BUF-5,Y
BEQ CRDONE
SEC
SBC #':
BEQ COLIS
CMP #DATATK-$3A
BNE NODATT
COLIS STA DORES
NODATT SEC
SBC #REMTK-$3A
BNE KLOOP
STA ENDCHR
STR1 LDA BUFOFS,X
BEQ STUFFH
CMP ENDCHR
BEQ STUFFH
STRNG INY
STA BUF-5,Y
INX
BNE STR1
NTHIS LDX TXTPTR
INC COUNT
NTHIS1 INY
LDA RESLST-1,Y
BPL NTHIS1
LDA RESLST,Y
BNE RESCON
LDA BUFOFS,X
BPL GETBPT
CRDONE STA BUF-3,Y
DEC TXTPTR+1
ZZ1 =BUF-1
LDA #<ZZ1
STA TXTPTR
RTS
FNDLIN LDA TXTTAB
LDX TXTTAB+1
FNDLNC LDY #1
STA LOWTR
STX LOWTR+1
LDA (LOWTR)Y
BEQ FLINRT
INY
INY
LDA LINNUM+1
CMP (LOWTR)Y
BCC FLNRTS
BEQ FNDLO1
DEY
BNE AFFRTS
FNDLO1 LDA LINNUM
DEY
CMP (LOWTR)Y
BCC FLNRTS
BEQ FLNRTS
AFFRTS DEY
LDA (LOWTR)Y
TAX
DEY
LDA (LOWTR)Y
BCS FNDLNC
FLINRT CLC
FLNRTS RTS
SCRATH BNE FLNRTS
SCRTCH LDA #0
TAY
STA (TXTTAB)Y
INY
STA (TXTTAB)Y
LDA TXTTAB
CLC
ADC #2
STA VARTAB
LDA TXTTAB+1
ADC #0
STA VARTAB+1
RUNC JSR STXTPT
LDA #0
CLEAR BNE STKRTS
CLEARC JSR CCALL ;MOVED FOR V2 ORIG FOR RS-232
CLEART LDA MEMSIZ ;ENTRY FOR OPEN & CLOSE MEMSIZ CHANGES
LDY MEMSIZ+1
STA FRETOP
STY FRETOP+1
LDA VARTAB
LDY VARTAB+1
STA ARYTAB
STY ARYTAB+1
STA STREND
STY STREND+1
FLOAD JSR RESTOR
STKINI LDX #TEMPST
STX TEMPPT
PLA
TAY
PLA
LDX #STKEND-257
TXS
PHA
TYA
PHA
LDA #0
STA OLDTXT+1
STA SUBFLG
STKRTS RTS
STXTPT CLC
LDA TXTTAB
ADC #255
STA TXTPTR
LDA TXTTAB+1
ADC #255
STA TXTPTR+1
RTS
.END