-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathcode13
149 lines (149 loc) · 1.62 KB
/
code13
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 'CODE13'
LDY CURTOL
BEQ DECCUR
ZERITA DEY
STA (ARYPNT)Y
BNE ZERITA
DECCUR DEC ARYPNT+1
DEC CURTOL+1
BNE ZERITA
INC ARYPNT+1
SEC
LDA STREND
SBC LOWTR
LDY #2
STA (LOWTR)Y
LDA STREND+1
INY
SBC LOWTR+1
STA (LOWTR)Y
LDA DIMFLG
BNE DIMRTS
INY
GETDEF LDA (LOWTR)Y
STA COUNT
LDA #0
STA CURTOL
INLPNM STA CURTOL+1
INY
PLA
TAX
STA INDICE
PLA
STA INDICE+1
CMP (LOWTR)Y
BCC INLPN2
BNE BSERR7
INY
TXA
CMP (LOWTR)Y
BCC INLPN1
BSERR7 JMP BSERR
OMERR1 JMP OMERR
INLPN2 INY
INLPN1 LDA CURTOL+1
ORA CURTOL
CLC
BEQ ADDIND
JSR UMULT
TXA
ADC INDICE
TAX
TYA
LDY INDEX1
ADDIND ADC INDICE+1
STX CURTOL
DEC COUNT
BNE INLPNM
LDX #5
LDA VARNAM
BPL NOTFL1
DEX
NOTFL1 LDA VARNAM+1
BPL STOML1
DEX
DEX
STOML1 STX ADDEND
LDA #0
JSR UMULTD
TXA
ADC ARYPNT
STA VARPNT
TYA
ADC ARYPNT+1
STA VARPNT+1
TAY
LDA VARPNT
DIMRTS RTS
UMULT STY INDEX
LDA (LOWTR)Y
STA ADDEND
DEY
LDA (LOWTR)Y
UMULTD STA ADDEND+1
LDA #16
STA DECCNT
LDX #0
LDY #0
UMULTC TXA
ASL A
TAX
TYA
ROL A
TAY
BCS OMERR1
ASL CURTOL
ROL CURTOL+1
BCC UMLCNT
CLC
TXA
ADC ADDEND
TAX
TYA
ADC ADDEND+1
TAY
BCS OMERR1
UMLCNT DEC DECCNT
BNE UMULTC
UMLRTS RTS
FRE LDA VALTYP
BEQ NOFREF
JSR FREFAC
NOFREF JSR GARBA2
SEC
LDA FRETOP
SBC STREND
TAY
LDA FRETOP+1
SBC STREND+1
GIVAYF LDX #0
STX VALTYP
STA FACHO
STY FACHO+1
LDX #144
JMP FLOATS
POS LDY TRMPOS
SNGFLT LDA #0
BEQ GIVAYF
ERRDIR LDX CURLIN+1
INX
BNE DIMRTS
LDX #ERRID
ERRGO1 JMP ERROR
DEF JSR GETFNM
JSR ERRDIR
JSR CHKOPN
LDA #128
STA SUBFLG
JSR PTRGET
JSR CHKNUM
JSR CHKCLS
LDA #$B2
JSR SYNCHR
PHA
LDA VARPNT+1
PHA
LDA VARPNT
PHA
LDA TXTPTR+1
.FIL CODE14