-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathcode16
166 lines (166 loc) · 1.81 KB
/
code16
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
.PAG 'CODE16'
LDA (STRNG1)Y
TAX
INY
LDA (STRNG1)Y
TAY
PLA
MOVSTR STX INDEX
STY INDEX+1
MOVDO TAY
BEQ MVDONE
PHA
MOVLP DEY
LDA (INDEX)Y
STA (FRESPC)Y
TYA
BNE MOVLP
PLA
MVDONE CLC
ADC FRESPC
STA FRESPC
BCC MVSTRT
INC FRESPC+1
MVSTRT RTS
FRESTR JSR CHKSTR
FREFAC LDA FACMO
LDY FACMO+1
FRETMP STA INDEX
STY INDEX+1
JSR FRETMS
PHP
LDY #0
LDA (INDEX),Y
PHA
INY
LDA (INDEX),Y
TAX
INY
LDA (INDEX),Y
TAY
PLA
PLP
BNE FRETRT
CPY FRETOP+1
BNE FRETRT
CPX FRETOP
BNE FRETRT
;
;STRING WAS LAST INTO STRING SFACE
;SAVE GARBAGE COLLECTION SOME TIME
;BY FREEING UP. (LENGTH + 2)
;
PHA ;SAVE LENGTH ON STACK
CLC
ADC FRETOP
STA FRETOP
BCC FREPLA
INC FRETOP+1
FREPLA PLA ;PULL LENGTH OFF STACK
FRETRT STX INDEX
STY INDEX+1
RTS
FRETMS CPY LASTPT+1
BNE FRERTS
CMP LASTPT
BNE FRERTS
STA TEMPPT
SBC #STRSIZ
STA LASTPT
LDY #0
FRERTS RTS
CHRD JSR CONINT
TXA
PHA
LDA #1
JSR STRSPA
PLA
LDY #0
STA (DSCTMP+1)Y
PLA
PLA
JMP PUTNEW
LEFTD JSR PREAM
CMP (DSCPNT)Y
TYA
RLEFT BCC RLEFT1
LDA (DSCPNT)Y
TAX
TYA
RLEFT1 PHA
RLEFT2 TXA
RLEFT3 PHA
JSR STRSPA
LDA DSCPNT
LDY DSCPNT+1
JSR FRETMP
PLA
TAY
PLA
CLC
ADC INDEX
STA INDEX
BCC PULMOR
INC INDEX+1
PULMOR TYA
JSR MOVDO
JMP PUTNEW
RIGHTD JSR PREAM
CLC
SBC (DSCPNT)Y
EOR #255
JMP RLEFT
MIDD LDA #255
STA FACLO
JSR CHRGOT
CMP #41
BEQ MID2
JSR CHKCOM
JSR GETBYT
MID2 JSR PREAM
DEX
TXA
PHA
CLC
LDX #0
SBC (DSCPNT)Y
BCS RLEFT2
EOR #255
CMP FACLO
BCC RLEFT3
LDA FACLO
BCS RLEFT3
PREAM JSR CHKCLS
PLA
STA JMPER+1
PLA
STA JMPER+2
PLA
PLA
PLA
TAX
PLA
STA DSCPNT
PLA
STA DSCPNT+1
LDY #0
TXA
BEQ GOFUC
INC JMPER+1
JMP (JMPER+1)
LEN JSR LEN1
LD657 JMP SNGFLT
LEN1 JSR FRESTR
LDX #0
STX VALTYP
TAY
RTS
ASC JSR LEN1
BEQ GOFUC
LDY #0
LDA (INDEX1)Y
TAY
JMP LD657
GOFUC JMP FCERR
GTBYTC JSR CHRGET
.FIL CODE17