-
Notifications
You must be signed in to change notification settings - Fork 85
/
code5
149 lines (149 loc) · 1.7 KB
/
code5
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
.PAG 'CODE5'
STA TXTPTR
LDA LOWTR+1
SBC #0
STA TXTPTR+1
GORTS RTS
RETURN BNE GORTS
LDA #255
STA FORPNT+1
JSR FNDFOR
TXS
CMP #GOSUTK
BEQ RETU1
LDX #ERRRG
.BYT $2C
USERR LDX #ERRUS
JMP ERROR
SNERR2 JMP SNERR
RETU1 PLA
PLA
STA CURLIN
PLA
STA CURLIN+1
PLA
STA TXTPTR
PLA
STA TXTPTR+1
DATA JSR DATAN
ADDON TYA
CLC
ADC TXTPTR
STA TXTPTR
BCC REMRTS
INC TXTPTR+1
REMRTS RTS
DATAN LDX #':
.BYT $2C
REMN LDX #0
STX CHARAC
LDY #0
STY ENDCHR
EXCHQT LDA ENDCHR
LDX CHARAC
STA CHARAC
STX ENDCHR
REMER LDA (TXTPTR)Y
BEQ REMRTS
CMP ENDCHR
BEQ REMRTS
INY
CMP #34
BNE REMER
BEQ EXCHQT
IF JSR FRMEVL
JSR CHRGOT
CMP #GOTOTK
BEQ OKGOTO
LDA #THENTK
JSR SYNCHR
OKGOTO LDA FACEXP
BNE DOCOND
REM JSR REMN
BEQ ADDON
DOCOND JSR CHRGOT
BCS DOCO
JMP GOTO
DOCO JMP GONE3
ONGOTO JSR GETBYT
PHA
CMP #GOSUTK
BEQ ONGLOP
SNERR3 CMP #GOTOTK
BNE SNERR2
ONGLOP DEC FACLO
BNE ONGLP1
PLA
JMP GONE2
ONGLP1 JSR CHRGET
JSR LINGET
CMP #44
BEQ ONGLOP
PLA
ONGRTS RTS
LINGET LDX #0
STX LINNUM
STX LINNUM+1
MORLIN BCS ONGRTS
SBC #$2F
STA CHARAC
LDA LINNUM+1
STA INDEX
CMP #25
BCS SNERR3
LDA LINNUM
ASL A
ROL INDEX
ASL A
ROL INDEX
ADC LINNUM
STA LINNUM
LDA INDEX
ADC LINNUM+1
STA LINNUM+1
ASL LINNUM
ROL LINNUM+1
LDA LINNUM
ADC CHARAC
STA LINNUM
BCC NXTLGC
INC LINNUM+1
NXTLGC JSR CHRGET
JMP MORLIN
LET JSR PTRGET
STA FORPNT
STY FORPNT+1
LDA #$B2
JSR SYNCHR
LDA INTFLG
PHA
LDA VALTYP
PHA
JSR FRMEVL
PLA
ROL A
JSR CHKVAL
BNE COPSTR
PLA
QINTGR BPL COPFLT
JSR ROUND
JSR AYINT
LDY #0
LDA FACMO
STA (FORPNT)Y
INY
LDA FACLO
STA (FORPNT)Y
RTS
COPFLT JMP MOVVF
COPSTR PLA
INPCOM LDY FORPNT+1
CPY #>ZERO
BNE GETSPT
JSR FREFAC
CMP #6
BNE FCERR2
LDY #0
STY FACEXP
STY FACSGN
.FIL CODE6