OpenCores
URL https://opencores.org/ocsvn/System09/System09/trunk

Subversion Repositories System09

[/] [System09/] [branches/] [mkfiles_rev1/] [src/] [flex9/] [flex9cf8.lst] - Blame information for rev 184

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 22 dilbert57
Assembler release DWC_2.0 version 2.11
2
May 6, 2004 (c) Motorola (free ware)
3
0001                          NAM FLEX9 SOURCE
4
0000                          INCLUDE "f9-moneq.txt"
5
 
6
 
7
f9-moneq.txt                                                                      page   2
8
0002                         *
9
0003                         ***************************************************
10
0004                         *   MEMORY MAP EQUATES                            *
11
0005                         ***************************************************
12
0006 E000                    MONIO   EQU  $E000  I/O SPACE
13
0007 DFC0                    MONRAM  EQU  $DFC0  STACK SPACE
14
0008 F800                    MONROM  EQU  $F800  START OF ROM
15
0009 F000                    MONEXT  EQU  $F000  EXTENDED COMMANDS
16
0010                         *MONEXT  EQU  $1000  EXTENDED COMMANDS
17
0011                         *
18
0012                         ***************************************************
19
0013                         *   SYS09BUG VARIABLE SPACE
20
0014                         ***************************************************
21
0015                         *
22
0016 DFC0                    STACK   EQU  MONRAM+0  TOP OF INTERNAL STACK / USER VECTOR
23
0017 DFC2                    SWI3    EQU  MONRAM+2  SOFTWARE INTERRUPT VECTOR #3
24
0018 DFC4                    SWI2    EQU  MONRAM+4  SOFTWARE INTERRUPT VECTOR #2
25
0019 DFC6                    FIRQ    EQU  MONRAM+6  FAST INTERRUPT VECTOR
26
0020 DFC8                    IRQ     EQU  MONRAM+8  INTERRUPT VECTOR
27
0021 DFCA                    SWI     EQU  MONRAM+10 SOFTWARE INTERRUPT VECTOR
28
0022 DFCC                    SVCVO   EQU  MONRAM+12 SUPERVISOR CALL VECTOR ORGIN
29
0023 DFCE                    SVCVL   EQU  MONRAM+14 SUPERVISOR CALL VECTOR LIMIT
30
0024 DFD0                    LRARAM  EQU  MONRAM+16 LRA ADDRESSES
31
0025 DFE0                    CPORT   EQU  MONRAM+32 RE-VECTORABLE CONTROL PORT
32
0026 DFE2                    ECHO    EQU  MONRAM+34 ECHO FLAG
33
0027 DFE3                    BPTBL   EQU  MONRAM+35 BREAKPOINT TABLE BASE ADDR
34
0028                         **************************************************
35
0029                         *   VDU BYTES                                    *
36
0030                         **************************************************
37
0031                         *
38
0032                         **** ALWAYS KEEP COLADX AND ROWADX TOGETHER ******
39
0033 DFFB                    COLADX  EQU  MONRAM+59 CURSOR COLUMN
40
0034 DFFC                    ROWADX  EQU  MONRAM+60 CURSOR ROW
41
0035                         **************************************************
42
0036                         *
43
0037 DFFD                    NEWROW  EQU  MONRAM+61 NEW ROW TEMP FOR ESCAPE
44
0038 DFFE                    ESCFLG  EQU  MONRAM+62 ESCAPE SEQUENCE ACTIVE
45
0039                         *
46
0040                         ***************************************************
47
0041                         *   SERIAL PORT                                   *
48
0042                         ***************************************************
49
0043                         *
50
0044 E000                    ACIAS   EQU  MONIO+$00   CONTROL PORT
51
0045                         *
52
0046                         ***************************************************
53
0047                         *   PS/2 KEYBOARD PORT                            *
54
0048                         ***************************************************
55
0049                         *
56
0050 E020                    PS2KBD  EQU  MONIO+$20   PS/2 KEYBOARD PORT
57
0051                         *
58
0052                         ***************************************************
59
0053                         *   ADM3A DISPLAY DRIVER VARIABLES                *
60
0054                         ***************************************************
61
0055                         *
62
0056                         ** VIDEO DISPLAY DEFINITIONS
63
0057                         *
64
0058 E030                    VDU     EQU  MONIO+$30
65
0059 0000                    VDUCHR  EQU  0        CHARACTER REGISTER
66
0060 0001                    VDUATT  EQU  1        ATTRIBUTE REGISTER
67
0061 0002                    VDUCOL  EQU  2        CURSOR COLUMN
68
0062 0003                    VDUROW  EQU  3        CURSOR ROW
69
0063 0004                    VDUOFF  EQU  4        ROW OFFSET
70
0064                         *
71
0065 0050                    LINLEN  EQU  80       LENGTH OF A LINE
72
0066 0019                    NUMLIN  EQU  25       NUMBER OF LINES
73
0067                         *
74
0068                         ***************************************************
75
0069                         * Serial PROM register
76
0070                         ***************************************************
77
0071                         *
78
0072                         ** CONFIGURATION PROM DEFINITIONS
79
0073                         *
80
0074 E0C0                    PROMREG EQU MONIO+$C0
81
0075 0001                    PCLKHI  EQU $01     Toggle PROM Clock High
82
0076 0000                    PCLKLO  EQU $00     Toggle PROM Clock Low
83
0077 0002                    PRSTHI  EQU $02     Toggle PROM Reset High
84
0078 0000                    PRSTLO  EQU $00     Toggle PROM Reset Low
85
0079 AA55                    SYNCHI  EQU $AA55   Synch Pattern High Word
86
0080 FF00                    SYNCLO  EQU $FF00   Synch Pattern Low Word
87
0081                         *
88
0082                         *
89
0083                         ***************************************************
90
0084                         * Dynamic Address Translation Registers
91
0085                         ***************************************************
92
0086                         *
93
0087                         ** DAT Table
94
0088                         *
95
0089 FFF0                    IC11    EQU  $FFF0  DAT RAM CHIP
96
0090                         *
97
0091                         ***************************************************
98
0092                         *   START OF ROM                                  *
99
0093                         ***************************************************
100
0094                         *
101
0095 F800                    MONITV EQU MONROM+0  FDB MONITOR
102
0096 F802                    NXTCMV EQU MONROM+2  FDB NEXTCMD
103
0097 F804                    INCHV  EQU MONROM+4  FDB INCH
104
0098 F806                    INCHEV EQU MONROM+6  FDB INCHE
105
0099 F808                    INCHKV EQU MONROM+8  FDB INCHEK
106
0100 F80A                    OUTCHV EQU MONROM+10 FDB OUTCH
107
0101 F80C                    PDATAV EQU MONROM+12 FDB PDATA
108
0102 F80E                    PCRLFV EQU MONROM+14 FDB PCRLF
109
0103 F810                    PSTRGV EQU MONROM+16 FDB PSTRNG
110
0104 F812                    LRAV   EQU MONROM+18 FDB LRA
111
0002                                END
112
0000                          INCLUDE "f9-equ.txt"
113
0001 0000                    Z0000 EQU $0000
114
0002 0005                    Z0005 EQU $0005
115
0003 0044                    Z0044 EQU $0044
116
0004 00A0                    Z00A0 EQU $00A0
117
0005 C07F                    ZC07F EQU $C07F
118
0006 C080                    LINBUF EQU $C080
119
0007 C0FF                    ZC0FF EQU $C0FF
120
0003                          END
121
0000                          INCLUDE "f9-spool.txt"
122
0001                         *
123
0002                         ** PRINTER SPOOLING
124
0003                         *
125
0004 C700                     ORG $C700
126
0005 C700 7E C7 21           PRSPL1 JMP ZC721
127
0006 C703 7E C7 03           PRSPL2 JMP *
128
0007 C706 7E C7 47           PRSPL3 JMP ZC747
129
0008 C709 7E C7 85           PRSPL4 JMP ZC785
130
0009 C70C 7E C7 95           PRSPL5 JMP ZC795
131
0010 C70F 7E C7 1F           PRSPL6 JMP ZC71F
132
0011                         *
133
0012                         ** SPOOLER SCRATCH AREA
134
0013                         *
135
0014 C712 0C 00 00 00 00 C8  ZC712 FCB $0C,$00,$00,$00,$00,$C8,$10
136
          10
137
0015 C719 C8 10              ZC719 FCB $C8,$10
138
0016 C71B 00                 QCNT FCB $00
139
0017 C71C 00                 ZC71C FCB $00
140
0018 C71D 00                 ZC71D FCB $00
141
0019 C71E 00                 ZC71E FCB $00
142
0020                         *
143
0021 C71F 3B                 ZC71F RTI
144
0022 C720 12                  NOP
145
0023                         *
146
0024 C721 1A 10              ZC721 ORCC #$10
147
0025 C723 BE CC 31            LDX ZCC31
148
0026 C726 10 EF 02            STS 2,X
149
0027 C729 7D CC 34            TST ZCC34
150
0028 C72C 26 11               BNE ZC73F
151
0029 C72E 8E CC FC            LDX #ZCCFC
152
0030 C731 7C CC 34            INC ZCC34
153
0031 C734 6D 84               TST ,X
154
0032 C736 27 07               BEQ ZC73F
155
0033 C738 BF CC 31           ZC738 STX ZCC31
156
0034 C73B 10 EE 02            LDS $02,X
157
0035 C73E 3B                  RTI
158
0036                         *
159
0037 C73F 8E CC F8           ZC73F LDX #ZCCF8
160
0038 C742 7F CC 34            CLR ZCC34
161
0039 C745 20 F1               BRA ZC738
162
0040                         *
163
0041 C747 1A 10              ZC747 ORCC #$10
164
0042 C749 7D C7 1B            TST QCNT
165
0043 C74C 27 29               BEQ ZC777
166
0044 C74E BE C7 19            LDX ZC719
167
0045 C751 A6 84               LDA ,X
168
0046 C753 34 02               PSHS A
169
0047 C755 EC 01               LDD $01,X
170
0048 C757 8E CA C0            LDX #ZCAC0
171
0049 C75A ED 88 40            STD $40,X
172
0050 C75D 35 02               PULS A
173
0051 C75F A7 03               STA $03,X
174
0052 C761 6F 84               CLR ,X
175
0053 C763 86 01               LDA #$01
176
0054 C765 A7 02               STA $02,X
177
0055 C767 6F 88 22            CLR $22,X
178
0056 C76A 6F 88 3B            CLR $3B,X
179
0057 C76D 7D C7 1E           ZC76D TST ZC71E
180
0058 C770 27 29               BEQ ZC79B
181
0059 C772 11 3F               SWI3
182
0060 C774 12                  NOP
183
0061 C775 20 F6               BRA ZC76D
184
0062                         *
185
0063 C777 1C EF              ZC777 ANDCC #$EF
186
0064 C779 AD 9F D3 ED        ZC779 JSR [TOFVEC]
187
0065 C77D 7F CC FC            CLR ZCCFC
188
0066 C780 11 3F               SWI3
189
0067 C782 12                  NOP
190
0068 C783 20 F4               BRA ZC779
191
0069                         *
192
0070 C785 1A 10              ZC785 ORCC #$10
193
0071 C787 7D CC 30            TST ZCC30
194
0072 C78A 27 05               BEQ ZC791
195
0073 C78C 11 3F               SWI3
196
0074 C78E 12                  NOP
197
0075 C78F 20 F4               BRA ZC785
198
0076                         *
199
0077 C791 7C CC 30           ZC791 INC ZCC30
200
0078 C794 39                  RTS
201
0079                         *
202
0080 C795 7F CC 30           ZC795 CLR ZCC30
203
0081 C798 1C EF               ANDCC #$EF
204
0082 C79A 39                  RTS
205
0083                         *
206
0084 C79B 7D C7 1D           ZC79B TST ZC71D
207
0085 C79E 26 27               BNE ZC7C7
208
0086 C7A0 8E CA C0            LDX #ZCAC0
209
0087 C7A3 BD D4 06            JSR FMS
210
0088 C7A6 26 1F               BNE ZC7C7
211
0089 C7A8 7D C7 1C            TST ZC71C
212
0090 C7AB 27 0F               BEQ ZC7BC
213
0091 C7AD 7F C7 1C            CLR ZC71C
214
0092 C7B0 81 0A               CMPA #$0A
215
0093 C7B2 27 0F               BEQ ZC7C3
216
0094 C7B4 34 02               PSHS A
217
0095 C7B6 86 0A               LDA #$0A
218
0096 C7B8 8D 3C               BSR ZC7F6
219
0097 C7BA 35 02               PULS A
220
0098 C7BC 81 0D              ZC7BC CMPA #$0D
221
0099 C7BE 26 03               BNE ZC7C3
222
0100 C7C0 B7 C7 1C            STA ZC71C
223
0101 C7C3 8D 31              ZC7C3 BSR ZC7F6
224
0102 C7C5 20 D4               BRA ZC79B
225
0103                         *
226
0104 C7C7 86 0D              ZC7C7 LDA #$0D
227
0105 C7C9 8D 2B               BSR ZC7F6
228
0106 C7CB 86 0A               LDA #$0A
229
0107 C7CD 8D 27               BSR ZC7F6
230
0108 C7CF B6 C7 12            LDA ZC712
231
0109 C7D2 8D 22               BSR ZC7F6
232
0110 C7D4 7F C7 1D            CLR ZC71D
233
0111 C7D7 BE C7 19            LDX ZC719
234
0112 C7DA 6D 03               TST $03,X
235
0113 C7DC 27 05               BEQ ZC7E3
236
0114 C7DE 6A 03               DEC $03,X
237
0115 C7E0 7E C7 47            JMP ZC747
238
0116                         *
239
0117 C7E3 30 04              ZC7E3 LEAX $04,X
240
0118 C7E5 8C C8 40            CMPX #FCB
241
0119 C7E8 26 03               BNE ZC7ED
242
0120 C7EA 8E C8 10            LDX #ZC810
243
0121 C7ED BF C7 19           ZC7ED STX ZC719
244
0122 C7F0 7A C7 1B            DEC QCNT
245
0123 C7F3 7E C7 47            JMP ZC747
246
0124                         *
247
0125 C7F6 BD CC D8           ZC7F6 JSR PCHK
248
0126 C7F9 2B 05               BMI ZC800
249
0127 C7FB 11 3F               SWI3
250
0128 C7FD 12                  NOP
251
0129 C7FE 20 F6               BRA ZC7F6
252
0130                         *
253
0131 C800 7E CC E4           ZC800 JMP POUT
254
0132 C810                    ZC810 EQU $C810
255
0133 C838                    ZC838 EQU $C838
256
0004                          END
257
0000                          INCLUDE "f9-sfcb.txt"
258
0001                         *
259
0002                         ** SYSTEM FILE CONTROL BLOCK
260
0003                         *
261
0004 C840                     ORG $C840
262
0005 C840 FF                 FCB FCB $FF
263
0006 C841 00                  FCB $00
264
0007 C842 00                  FCB $00
265
0008 C843 00                  FCB $00
266
0009 C844 53 54 41 52 54 55  ZC844 FCC "STARTUP"
267
          50
268
0010 C84B 00                  FCB $00
269
0011 C84C 54 58 54            FCC "TXT"
270
0012 C84F 00                  FCB $00
271
0005                          END
272
0000                          INCLUDE "f9-init.txt"
273
0001                         *
274
0002                         ** FLEX INITIATION
275
0003                         *
276
0004 CA00                     ORG $CA00
277
0005 CA00 20 06              ZCA00 BRA ZCA08
278
0006 CA02 BD CA AC           ZCA02 JSR >ZCAAC
279
0007 CA05 39                  RTS
280
0008 CA06 C0 A0              ZCA06 SUBB #$A0
281
0009 CA08 86 39              ZCA08 LDA #$39
282
0010 CA0A B7 D3 FD            STA >ZD3FD
283
0011 CA0D BE CC 2B            LDX >MEMEND
284
0012 CA10 30 89 00 A1         LEAX $00A1,X
285
0013 CA14 BF CA 06            STX >ZCA06
286
0014 CA17 AD 9F D3 F1         JSR [TINVEC]
287
0015 CA1B BE D3 FB            LDX >INVEC
288
0016 CA1E BF CD 0A            STX >INCH+1
289
0017 CA21 BF CD 0D            STX >INCH2+1
290
0018 CA24 BE D3 F9            LDX >OUTVEC
291
0019 CA27 BF CD 10            STX >OUTCH+1
292
0020 CA2A BF CD 13            STX >OUTCH2+1
293
0021 CA2D BE D3 F7            LDX >STAVEC
294
0022 CA30 BF CD 4F            STX >ZCD4E+1
295
0023 CA33 8E 00 A0            LDX #Z00A0
296
0024 CA36 C6 B9               LDB #$B9
297
0025 CA38 A6 84              ZCA38 LDA ,X
298
0026 CA3A E7 84               STB ,X
299
0027 CA3C 12                  NOP
300
0028 CA3D E1 84               CMPB ,X
301
0029 CA3F 26 0B               BNE ZCA4C
302
0030 CA41 A7 84               STA ,X
303
0031 CA43 30 89 04 00         LEAX $0400,X
304
0032 CA47 BC CA 06            CMPX >ZCA06
305
0033 CA4A 26 EC               BNE ZCA38
306
0034 CA4C 30 89 FF 5F        ZCA4C LEAX $FF5F,X
307
0035 CA50 BF CC 2B            STX >MEMEND
308
0036 CA53 8E CD 03            LDX #WARMS
309
0037 CA56 BF CC 16            STX >ESCVEC
310
0038 CA59 8E CA DC            LDX #TTLSTR
311
0039 CA5C BD CE 81            JSR >PSTRG1
312
0040 CA5F BD CE B5            JSR >PCRLF1
313
0041 CA62 8D 9E               BSR ZCA02
314
0042 CA64 BD CE B5            JSR >PCRLF1
315
0043 CA67 8E C8 40            LDX #FCB
316
0044 CA6A 86 01               LDA #$01
317
0045 CA6C A7 84               STA ,X
318
0046 CA6E BD D4 06            JSR >FMS
319
0047 CA71 27 08               BEQ ZCA7B
320
0048 CA73 A6 01               LDA $01,X
321
0049 CA75 BD D2 00            JSR >ZD200
322
0050 CA78 7E CD 67            JMP >WARM1
323
0051
324
0052 CA7B 8E C0 80           ZCA7B LDX #LINBUF
325
0053 CA7E BF CC 14           ZCA7E STX >LINPTR
326
0054 CA81 8E C8 40            LDX #FCB
327
0055 CA84 BD D4 06            JSR >FMS
328
0056 CA87 27 05               BEQ ZCA8E
329
0057 CA89 34 30               PSHS Y,X
330
0058 CA8B 7E D2 D7            JMP >ZD2D7
331
0059
332
0060 CA8E BE CC 14           ZCA8E LDX >LINPTR
333
0061 CA91 A7 80               STA ,X+
334
0062 CA93 81 0D               CMPA #$0D
335
0063 CA95 26 E7               BNE ZCA7E
336
0064 CA97 8E C8 40            LDX #FCB
337
0065 CA9A BD D1 F4            JSR >ZD1F4
338
0066 CA9D 8E C0 80            LDX #LINBUF
339
0067 CAA0 BF CC 14            STX >LINPTR
340
0068 CAA3 8E CD 67            LDX #WARM1
341
0069 CAA6 BF CC 43            STX >ZCC43
342
0070 CAA9 7E D3 2E            JMP >ZD32E
343
0071
344
0072 CAAC 8E CA EC           ZCAAC LDX #DATSTR
345
0073 CAAF BD CE 81            JSR >PSTRG1
346
0074 CAB2 BD CE 2B            JSR >INBUF1
347
0075 CAB5 8D 14               BSR ZCACB
348
0076 CAB7 25 F3               BCS ZCAAC
349
0077 CAB9 B7 CC 0E            STA >MONTH
350
0078 CABC 8D 0D               BSR ZCACB
351
0079 CABE 25 EC               BCS ZCAAC
352
0080 CAC0 B7 CC 0F           ZCAC0 STA >DAY
353
0081 CAC3 8D 06               BSR ZCACB
354
0082 CAC5 25 E5               BCS ZCAAC
355
0083 CAC7 B7 CC 10            STA >YEAR
356
0084 CACA 39                  RTS
357
0085
358
0086 CACB BD D1 75           ZCACB JSR >INDEC1
359
0087 CACE 25 0B               BCS ZCADB
360
0088 CAD0 B6 CC 1C            LDA >LODOFF+1
361
0089 CAD3 5D                  TSTB
362
0090 CAD4 27 03               BEQ ZCAD9
363
0091 CAD6 1C FE               ANDCC #$FE
364
0092 CAD8 39                  RTS
365
0093
366
0094 CAD9 1A 01              ZCAD9 ORCC #$01
367
0095 CADB 39                 ZCADB RTS
368
0096
369
0097 CADC 36 38 30 39 20 46  TTLSTR FCC "6809 FLEX V3.01"
370
          4C 45 58 20 56 33
371
          2E 30 31
372
0098 CAEB 04                  FCB $04
373
0099 CAEC 44 41 54 45 20 28  DATSTR FCC "DATE (MM,DD,YY)? "
374
          4D 4D 2C 44 44 2C
375
          59 59 29 3F 20
376
0100 CAFD 04                  FCB $04
377
0006                          END
378
0000                          INCLUDE "f9-var.txt"
379
0001                         *
380
0002                         ** TTYSET PARAMETERS
381
0003                         *
382
0004 CC00                     ORG $CC00
383
0005 CC00 08                 BSPCHR FCB $08
384
0006 CC01 18                 DELCHR FCB $18
385
0007 CC02 3A                 EOLCHR FCB $3A
386
0008 CC03 19                 DEPCNT FCB 25
387
0009 CC04 00                 WIDCNT FCB $00
388
0010 CC05 04                 NULCNT FCB $04
389
0011 CC06 40                 TABCHR FCB '@
390
0012 CC07 00                 BSECHR FCB $00
391
0013 CC08 00                 EJTCNT FCB $00
392
0014 CC09 FF                 PAUSE FCB $FF
393
0015 CC0A 1B                 ESCCHR FCB $1B
394
0016 CC0B 00                 SYSDRV FCB 0
395
0017 CC0C 01                 WRKDRV FCB 1
396
0018 CC0D 00                 ZCC0D FCB $00
397
0019 CC0E                    DATERG EQU *
398
0020 CC0E 00                 MONTH FCB $00
399
0021 CC0F 00                 DAY FCB $00
400
0022 CC10 00                 YEAR FCB $00
401
0023 CC11 00                 LASTRM FCB $00
402
0024 CC12 00 00              UCTVEC FDB $0000
403
0025 CC14 00 00              LINPTR FDB $0000
404
0026 CC16 00 00              ESCVEC FDB $0000
405
0027 CC18 00                 CURCHR FCB $00
406
0028 CC19 00                 PRVCHR FCB $00
407
0029 CC1A 00                 CURLIN FCB $00
408
0030 CC1B 00 00              LODOFF FDB $0000
409
0031 CC1D 00                 TRNFLG FCB $00
410
0032 CC1E 00 00              TRNVEC FDB $0000
411
0033 CC20 00                 ERRTYP FCB $00
412
0034 CC21 00                 SIOFLG FCB $00
413
0035 CC22 00                 OUTSWT FCB $00
414
0036 CC23 00                 INPSWT FCB $00
415
0037 CC24 00 00              FOPADR FDB $0000
416
0038 CC26 00 00              FIPADR FDB $0000
417
0039 CC28 00                 CMDFLG FCB $00
418
0040 CC29 00                 CURCOL FCB $00
419
0041 CC2A 00                  FCB $00
420
0042 CC2B BF FF              MEMEND FDB $BFFF
421
0043 CC2D 00 00              ERRVEC FDB $0000
422
0044 CC2F 01                 FIEFLG FCB $01
423
0045 CC30 00                 ZCC30 FCB $00
424
0046 CC31 00 00 00           ZCC31 FCB $00,$00,$00
425
0047 CC34 00 00 00 00 00 00  ZCC34 FCB $00,$00,$00,$00,$00,$00,$00
426
          00
427
0048 CC3D                    ZCC3D EQU $CC3D
428
0049 CC3F                    ZCC3F EQU $CC3F
429
0050 CC43                    ZCC43 EQU $CC43
430
0051 CC45                    ZCC45 EQU $CC45
431
0052 CC47                    ZCC47 EQU $CC47
432
0053 CC49                     ORG $CC49
433
0054 CC49 60                 MAPUP FCB $60 MAP LOWER TO UPPERCASE
434
0055 CC4A                    ZCC4A EQU $CC4A
435
0056 CC4B                    ZCC4B EQU $CC4B
436
0057 CC4C                    ZCC4C EQU $CC4C
437
0058 CC4D                    ZCC4D EQU $CC4D
438
0007                          END
439
0000                          INCLUDE "f9-data.txt"
440
0001                         *
441
0002                         ** STRINGS AND MESSAGES
442
0003                         *
443
0004 CC4E                     ORG $CC4E
444
0005 CC4E 2B 2B 2B           PMTSTR FCC "+++"
445
0006 CC51 04                  FCB $04
446
0007 CC52 3F 3F 3F           QRYSTR FCC "???"
447
0008 CC55 04                  FCB $04
448
0009 CC56 57 48 41 54 3F     WOTMSG FCC "WHAT?"
449
0010 CC5B 04                  FCB $04
450
0011 CC5C 43 41 4E 27 54 20  NTRMSG FCC "CAN'T TRANSFER"
451
          54 52 41 4E 53 46
452
          45 52
453
0012 CC6A 04                  FCB $04
454
0013 CC6B 4E 4F 54 20 46 4F  NFDMSG FCC "NOT FOUND"
455
          55 4E 44
456
0014 CC74 04                  FCB $04
457
0015 CC75 44 49 53 4B 20 45  DERMSG FCC "DISK ERROR #"
458
          52 52 4F 52 20 23
459
0016 CC81 04                  FCB $04
460
0017 CC82 44 52 49 56 45 53  DNRMSG FCC "DRIVES NOT READY"
461
          20 4E 4F 54 20 52
462
          45 41 44 59
463
0018 CC92 04                  FCB $04
464
0019                         *
465
0020                         ** MEMORY RESIDENT COMMANDS
466
0021                         *
467
0022 CC93 47 45 54           CMDTBL FCC "GET"
468
0023 CC96 00                  FCB $00
469
0024 CC97 D2 0F               FDB GETCMD
470
0025 CC99 4D 4F 4E            FCC "MON"
471
0026 CC9C 00                  FCB $00
472
0027 CC9D D3 4B               FDB ZD34B
473
0028 CC9F 00                  FCB $00
474
0029                         *
475
0030                         ** DECIMAL CONVERSION TABLE
476
0031                         *
477
0032 CCA0 27 10              DECTBL FDB 10000
478
0033 CCA2 03 E8               FDB 1000
479
0034 CCA4 00 64               FDB 100
480
0035 CCA6 00 0A               FDB 10
481
0008                          END
482
0000                          INCLUDE "f9-cli.txt"
483
0001                         *********************************************
484
0002                         *
485
0003                         * FLEX COMMAND LINE INTERPRETER & SUBROUTINES
486
0004                         *
487
0005                         *********************************************
488
0006 CD00                     ORG $CD00
489
0007                         *
490
0008                         ** FLEX JUMPS
491
0009                         *
492
0010 CD00 7E CD 57           COLDS JMP >COLD1
493
0011 CD03 7E CD 67           WARMS JMP >WARM1
494
0012 CD06 7E CD B1           RENTER JMP >RENT1
495
0013 CD09 7E CD 09           INCH JMP >INCH
496
0014 CD0C 7E CD 0C           INCH2 JMP >INCH2
497
0015 CD0F 7E CD 0F           OUTCH JMP >OUTCH
498
0016 CD12 7E CD 12           OUTCH2 JMP >OUTCH2
499
0017 CD15 7E CE FB           GETCHR JMP >GETCH1
500
0018 CD18 7E CF 41           PUTCHR JMP >PUTCH1
501
0019 CD1B 7E CE 2B           INBUFF JMP >INBUF1
502
0020 CD1E 7E CE 81           PSTRNG JMP >PSTRG1
503
0021 CD21 7E CF ED           CLASS JMP >CLASS1
504
0022 CD24 7E CE B5           PCRLF JMP >PCRLF1
505
0023 CD27 7E D0 0E           NXTCH JMP >NXTCH1
506
0024 CD2A 7E CD EA           RSTRIO JMP >RSTIO1
507
0025 CD2D 7E D0 36           GETFIL JMP >GETFL1
508
0026 CD30 7E D1 A2           LOAD JMP >LOAD1
509
0027 CD33 7E D0 EB           SETEXT JMP >SETEX1
510
0028 CD36 7E D3 49           ADDBX JMP >ADDBX1
511
0029 CD39 7E CF 86           OUTDEC JMP >OUTDC1
512
0030 CD3C 7E CF D4           OUTHEX JMP >OUTHX1
513
0031 CD3F 7E D2 7F           RPTERR JMP >RPTER1
514
0032 CD42 7E D1 2F           GETHEX JMP >GETHX1
515
0033 CD45 7E CF D0           OUTADR JMP >OUTAD1
516
0034 CD48 7E D1 75           INDEC JMP >INDEC1
517
0035 CD4B 7E D3 29           DOCMND JMP >DOCMD1
518
0036 CD4E 7E CD 4E           ZCD4E JMP >ZCD4E
519
0037 CD51 7E CE 05            JMP >ZCE05
520
0038 CD54 7E CE 05            JMP >ZCE05
521
0039                         *
522
0040                         ** COLD START ENTRY
523
0041                         *
524
0042 CD57 10 CE C0 7F        COLD1 LDS #ZC07F
525
0043 CD5B 7F CC 11           ZCD5B CLR >LASTRM
526
0044 CD5E BD D4 00            JSR >ZD400
527
0045 CD61 7F CC 28            CLR >CMDFLG
528
0046 CD64 BD D3 FD            JSR >ZD3FD
529
0047                         *
530
0048                         ** WARM START ENTRY
531
0049                         *
532
0050 CD67 10 CE C0 7F        WARM1 LDS #ZC07F
533
0051 CD6B BD DE 18            JSR >WARMDR
534
0052 CD6E 8E CD 03            LDX #WARMS
535
0053 CD71 BF CC 16            STX >ESCVEC
536
0054 CD74 8E C7 00            LDX #PRSPL1
537
0055 CD77 AF 9F D3 E9         STX [SWIVVC]
538
0056 CD7B BE D3 E7            LDX >IHNDVC
539
0057 CD7E AF 9F D3 EB         STX [IRQVVC]
540
0058 CD82 8E CC F8            LDX #ZCCF8
541
0059 CD85 BF CC 31            STX >ZCC31
542
0060 CD88 7F CC 34            CLR >ZCC34
543
0061 CD8B 7F CC 4C            CLR >ZCC4C
544
0062 CD8E 8D 5A               BSR RSTIO1
545
0063 CD90 B6 CC 11            LDA >LASTRM
546
0064 CD93 B1 CC 02            CMPA >EOLCHR
547
0065 CD96 26 05               BNE ZCD9D
548
0066 CD98 7C CC 15            INC >LINPTR+1
549
0067 CD9B 20 14               BRA RENT1
550
0068
551
0069 CD9D 7D CC 28           ZCD9D TST >CMDFLG
552
0070 CDA0 10 26 05 97         LBNE ZD33B
553
0071 CDA4 BD D4 03            JSR >FMSCLS
554
0072 CDA7 26 B2               BNE ZCD5B
555
0073 CDA9 8E CC 4E            LDX #PMTSTR
556
0074 CDAC BD CE 81            JSR >PSTRG1
557
0075 CDAF 8D 7A               BSR INBUF1
558
0076                         *
559
0077                         ** MAIN CONTROL LOOP
560
0078                         *
561
0079 CDB1 BD D0 D4           RENT1 JSR >ZD0D4
562
0080 CDB4 81 0D               CMPA #$0D
563
0081 CDB6 27 E5               BEQ ZCD9D
564
0082 CDB8 8E C8 40           ZCDB8 LDX #FCB
565
0083 CDBB 7C CC 0D            INC >ZCC0D
566
0084 CDBE BD D0 36            JSR >GETFL1
567
0085 CDC1 25 16               BCS ZCDD9
568
0086 CDC3 8E CC 93            LDX #CMDTBL
569
0087 CDC6 8D 3E               BSR ZCE06
570
0088 CDC8 27 09               BEQ ZCDD3
571
0089 CDCA BE CC 12            LDX >UCTVEC
572
0090 CDCD 27 07               BEQ ZCDD6
573
0091 CDCF 8D 35               BSR ZCE06
574
0092 CDD1 26 03               BNE ZCDD6
575
0093 CDD3 6E 98 01           ZCDD3 JMP [$01,X]
576
0094
577
0095 CDD6 BD D2 2E           ZCDD6 JSR >ZD22E
578
0096 CDD9 8E CC 56           ZCDD9 LDX #WOTMSG
579
0097 CDDC 86 15               LDA #$15
580
0098 CDDE B7 CC 20           ZCDDE STA >ERRTYP
581
0099 CDE1 BD CE 81           ZCDE1 JSR >PSTRG1
582
0100 CDE4 7F CC 11           ZCDE4 CLR >LASTRM
583
0101 CDE7 7E CD 67            JMP >WARM1
584
0102                         *
585
0103                         ** RESTORE IO VECTORS
586
0104                         *
587
0105 CDEA BE CD 13           RSTIO1 LDX >OUTCH2+1
588
0106 CDED BF CD 10            STX >OUTCH+1
589
0107 CDF0 BE CD 0D            LDX >INCH2+1
590
0108 CDF3 BF CD 0A            STX >INCH+1
591
0109 CDF6 7F CC 23            CLR >INPSWT
592
0110 CDF9 7F CC 22            CLR >OUTSWT
593
0111 CDFC 7F CC 21            CLR >SIOFLG
594
0112 CDFF 7F CC 26            CLR >FIPADR
595
0113 CE02 7F CC 24            CLR >FOPADR
596
0114 CE05 39                 ZCE05 RTS
597
0115
598
0116 CE06 10 8E C8 44        ZCE06 LDY #ZC844
599
0117 CE0A A6 A0              ZCE0A LDA ,Y+
600
0118 CE0C 81 5F               CMPA #$5F
601
0119 CE0E 23 02               BLS ZCE12
602
0120 CE10 80 20               SUBA #$20
603
0121 CE12 A1 80              ZCE12 CMPA ,X+
604
0122 CE14 26 08               BNE ZCE1E
605
0123 CE16 6D 84               TST ,X
606
0124 CE18 26 F0               BNE ZCE0A
607
0125 CE1A 6D A4               TST ,Y
608
0126 CE1C 27 0C               BEQ ZCE2A
609
0127 CE1E 6D 80              ZCE1E TST ,X+
610
0128 CE20 26 FC               BNE ZCE1E
611
0129 CE22 30 02               LEAX $02,X
612
0130 CE24 6D 84               TST ,X
613
0131 CE26 26 DE               BNE ZCE06
614
0132 CE28 1C FB               ANDCC #$FB
615
0133 CE2A 39                 ZCE2A RTS
616
0134                         *
617
0135                         ** GET USER COMMAND LINE
618
0136                         *
619
0137 CE2B 8E C0 80           INBUF1 LDX #LINBUF
620
0138 CE2E BF CC 14            STX >LINPTR
621
0139 CE31 BD CE FB           ZCE31 JSR >GETCH1
622
0140 CE34 B1 CC 01            CMPA >DELCHR
623
0141 CE37 27 1D               BEQ ZCE56
624
0142 CE39 B1 CC 00            CMPA >BSPCHR
625
0143 CE3C 27 1F               BEQ ZCE5D
626
0144 CE3E 81 0D               CMPA #$0D
627
0145 CE40 27 0D               BEQ ZCE4F
628
0146 CE42 81 0A               CMPA #$0A
629
0147 CE44 27 32               BEQ ZCE78
630
0148 CE46 81 1F               CMPA #$1F
631
0149 CE48 23 E7               BLS ZCE31
632
0150 CE4A 8C C0 FF           ZCE4A CMPX #ZC0FF
633
0151 CE4D 27 E2               BEQ ZCE31
634
0152 CE4F A7 80              ZCE4F STA ,X+
635
0153 CE51 81 0D               CMPA #$0D
636
0154 CE53 26 DC               BNE ZCE31
637
0155 CE55 39                  RTS
638
0156
639
0157 CE56 8E CC 52           ZCE56 LDX #QRYSTR
640
0158 CE59 8D 26               BSR PSTRG1
641
0159 CE5B 20 CE               BRA INBUF1
642
0160
643
0161 CE5D 8C C0 80           ZCE5D CMPX #LINBUF
644
0162 CE60 27 F4               BEQ ZCE56
645
0163 CE62 30 1F               LEAX -$01,X
646
0164 CE64 B6 CC 07            LDA >BSECHR
647
0165 CE67 81 08               CMPA #$08
648
0166 CE69 26 08               BNE ZCE73
649
0167 CE6B 86 20               LDA #$20
650
0168 CE6D BD CF 66            JSR >ZCF66
651
0169 CE70 B6 CC 07            LDA >BSECHR
652
0170 CE73 BD CF 66           ZCE73 JSR >ZCF66
653
0171 CE76 20 B9               BRA ZCE31
654
0172
655
0173 CE78 86 0D              ZCE78 LDA #$0D
656
0174 CE7A BD CF 41            JSR >PUTCH1
657
0175 CE7D 86 20               LDA #$20
658
0176 CE7F 20 C9               BRA ZCE4A
659
0177
660
0178 CE81 8D 32              PSTRG1 BSR PCRLF1
661
0179 CE83 A6 84              ZCE83 LDA ,X
662
0180 CE85 81 04               CMPA #$04
663
0181 CE87 27 6F               BEQ ZCEF8
664
0182 CE89 BD CF 41            JSR >PUTCH1
665
0183 CE8C 30 01               LEAX $01,X
666
0184 CE8E 20 F3               BRA ZCE83
667
0185
668
0186 CE90 BD CD 4E           ZCE90 JSR >ZCD4E
669
0187 CE93 27 65               BEQ ZCEFA
670
0188 CE95 AD 9F D3 E5         JSR [ZD3E5]
671
0189 CE99 B1 CC 0A            CMPA >ESCCHR
672
0190 CE9C 26 5C               BNE ZCEFA
673
0191 CE9E 7F CC 1A           ZCE9E CLR >CURLIN
674
0192 CEA1 AD 9F D3 E5        ZCEA1 JSR [ZD3E5]
675
0193 CEA5 B1 CC 0A            CMPA >ESCCHR
676
0194 CEA8 27 50               BEQ ZCEFA
677
0195 CEAA 81 03               CMPA #$03 CTRL C
678
0196 CEAC 26 F3               BNE ZCEA1
679
0197 CEAE 7F CC 11            CLR >LASTRM
680
0198 CEB1 6E 9F CC 16         JMP [ESCVEC]
681
0199                         *
682
0200                         ** PRINT CR, LINEFEED
683
0201                         *
684
0202 CEB5 7D CC 21           PCRLF1 TST >SIOFLG
685
0203 CEB8 26 27               BNE ZCEE1
686
0204 CEBA 8D D4               BSR ZCE90
687
0205 CEBC B6 CC 03            LDA >DEPCNT
688
0206 CEBF 27 20               BEQ ZCEE1
689
0207 CEC1 B1 CC 1A            CMPA >CURLIN
690
0208 CEC4 22 18               BHI ZCEDE
691
0209 CEC6 7F CC 1A            CLR >CURLIN
692
0210 CEC9 7D CC 09            TST >PAUSE
693
0211 CECC 27 02               BEQ ZCED0
694
0212 CECE 8D CE               BSR ZCE9E
695
0213 CED0 34 04              ZCED0 PSHS B
696
0214 CED2 F6 CC 08            LDB >EJTCNT
697
0215 CED5 27 05               BEQ ZCEDC
698
0216 CED7 8D 08              ZCED7 BSR ZCEE1
699
0217 CED9 5A                  DECB
700
0218 CEDA 26 FB               BNE ZCED7
701
0219 CEDC 35 04              ZCEDC PULS B
702
0220 CEDE 7C CC 1A           ZCEDE INC >CURLIN
703
0221 CEE1 86 0D              ZCEE1 LDA #$0D
704
0222 CEE3 8D 5C               BSR PUTCH1
705
0223 CEE5 86 0A               LDA #$0A
706
0224 CEE7 8D 58               BSR PUTCH1
707
0225 CEE9 34 04               PSHS B
708
0226 CEEB F6 CC 05            LDB >NULCNT
709
0227 CEEE 27 06               BEQ ZCEF6
710
0228 CEF0 4F                 ZCEF0 CLRA
711
0229 CEF1 8D 4E               BSR PUTCH1
712
0230 CEF3 5A                  DECB
713
0231 CEF4 26 FA               BNE ZCEF0
714
0232 CEF6 35 04              ZCEF6 PULS B
715
0233 CEF8 1C FE              ZCEF8 ANDCC #$FE
716
0234 CEFA 39                 ZCEFA RTS
717
0235                         *
718
0236                         ** GET A CHARACTER HONOURING TTYSET
719
0237                         *
720
0238 CEFB 7D CC 23           GETCH1 TST >INPSWT
721
0239 CEFE 26 1A               BNE ZCF1A
722
0240 CF00 7D CC 26            TST >FIPADR
723
0241 CF03 27 10               BEQ ZCF15
724
0242 CF05 8D 1A               BSR ZCF21
725
0243 CF07 7D CC 2F            TST >FIEFLG
726
0244 CF0A 27 11               BEQ ZCF1D
727
0245 CF0C 7D CC 24            TST >FOPADR
728
0246 CF0F 27 0C               BEQ ZCF1D
729
0247 CF11 8D 53               BSR ZCF66
730
0248 CF13 20 08               BRA ZCF1D
731
0249 CF15 BD CD 09           ZCF15 JSR >INCH
732
0250 CF18 20 03               BRA ZCF1D
733
0251
734
0252 CF1A BD CD 0C           ZCF1A JSR >INCH2
735
0253 CF1D 7F CC 1A           ZCF1D CLR >CURLIN
736
0254 CF20 39                  RTS
737
0255
738
0256 CF21 BF CC 47           ZCF21 STX >ZCC47
739
0257 CF24 BE CC 26            LDX >FIPADR
740
0258 CF27 20 06               BRA ZCF2F
741
0259
742
0260 CF29 BF CC 47           ZCF29 STX >ZCC47
743
0261 CF2C BE CC 24            LDX >FOPADR
744
0262 CF2F BD D4 06           ZCF2F JSR >FMS
745
0263 CF32 26 04               BNE ZCF38
746
0264 CF34 BE CC 47            LDX >ZCC47
747
0265 CF37 39                  RTS
748
0266
749
0267 CF38 7F CC 24           ZCF38 CLR >FOPADR
750
0268 CF3B BD D2 7F            JSR >RPTER1
751
0269 CF3E 7E CD 03            JMP >WARMS
752
0270                         *
753
0271                         ** OUTPUT CHARACTER HONOURING TTYSET
754
0272                         *
755
0273 CF41 7D CC 21           PUTCH1 TST >SIOFLG
756
0274 CF44 26 20               BNE ZCF66
757
0275 CF46 81 1F               CMPA #$1F
758
0276 CF48 22 05               BHI ZCF4F
759
0277 CF4A 7F CC 29            CLR >CURCOL
760
0278 CF4D 20 17               BRA ZCF66
761
0279
762
0280 CF4F 7C CC 29           ZCF4F INC >CURCOL
763
0281 CF52 34 02               PSHS A
764
0282 CF54 B6 CC 04            LDA >WIDCNT
765
0283 CF57 27 0B               BEQ ZCF64
766
0284 CF59 B1 CC 29            CMPA >CURCOL
767
0285 CF5C 24 06               BCC ZCF64
768
0286 CF5E BD CE B5            JSR >PCRLF1
769
0287 CF61 7C CC 29            INC >CURCOL
770
0288 CF64 35 02              ZCF64 PULS A
771
0289 CF66 34 02              ZCF66 PSHS A
772
0290 CF68 7D CC 22            TST >OUTSWT
773
0291 CF6B 26 13               BNE ZCF80
774
0292 CF6D 7D CC 24            TST >FOPADR
775
0293 CF70 27 04               BEQ ZCF76
776
0294 CF72 8D B5               BSR ZCF29
777
0295 CF74 20 0D               BRA ZCF83
778
0296
779
0297 CF76 7D CC 26           ZCF76 TST >FIPADR
780
0298 CF79 26 08               BNE ZCF83
781
0299 CF7B BD CD 0F            JSR >OUTCH
782
0300 CF7E 20 03               BRA ZCF83
783
0301 CF80 BD CD 12           ZCF80 JSR >OUTCH2
784
0302 CF83 35 02              ZCF83 PULS A
785
0303 CF85 39                  RTS
786
0304
787
0305 CF86 7F CC 4A           OUTDC1 CLR >ZCC4A
788
0306 CF89 F7 CC 1D            STB >TRNFLG
789
0307 CF8C 86 04               LDA #$04
790
0308 CF8E B7 CC 4D            STA >ZCC4D
791
0309 CF91 EC 84               LDD ,X
792
0310 CF93 8E CC A0            LDX #DECTBL
793
0311 CF96 8D 0B              ZCF96 BSR ZCFA3
794
0312 CF98 30 02               LEAX $02,X
795
0313 CF9A 7A CC 4D            DEC >ZCC4D
796
0314 CF9D 26 F7               BNE ZCF96
797
0315 CF9F 1F 98               TFR B,A
798
0316 CFA1 20 3D               BRA OUTHXR
799
0317
800
0318 CFA3 7F CC 4B           ZCFA3 CLR >ZCC4B
801
0319 CFA6 10 A3 84           ZCFA6 CMPD ,X
802
0320 CFA9 25 07               BCS ZCFB2
803
0321 CFAB A3 84               SUBD ,X
804
0322 CFAD 7C CC 4B            INC >ZCC4B
805
0323 CFB0 20 F4               BRA ZCFA6
806
0324
807
0325 CFB2 34 02              ZCFB2 PSHS A
808
0326 CFB4 B6 CC 4B            LDA >ZCC4B
809
0327 CFB7 26 10               BNE ZCFC9
810
0328 CFB9 7D CC 4A            TST >ZCC4A
811
0329 CFBC 26 0B               BNE ZCFC9
812
0330 CFBE 7D CC 1D            TST >TRNFLG
813
0331 CFC1 27 0B               BEQ ZCFCE
814
0332 CFC3 86 20               LDA #$20
815
0333 CFC5 8D 23               BSR ZCFEA
816
0334 CFC7 20 05               BRA ZCFCE
817
0335
818
0336 CFC9 7C CC 4A           ZCFC9 INC >ZCC4A
819
0337 CFCC 8D 12               BSR OUTHXR
820
0338 CFCE 35 82              ZCFCE PULS PC,A
821
0339                         *
822
0340                         ** DISPLAY HEX ADDRESS
823
0341                         *
824
0342 CFD0 8D 02              OUTAD1 BSR OUTHX1
825
0343 CFD2 30 01               LEAX $01,X
826
0344                         *
827
0345                         ** OUPUT HEX BYTE
828
0346                         *
829
0347 CFD4 A6 84              OUTHX1 LDA ,X
830
0348 CFD6 8D 04               BSR OUTHXL
831
0349 CFD8 A6 84               LDA ,X
832
0350 CFDA 20 04               BRA OUTHXR
833
0351
834
0352 CFDC 44                 OUTHXL LSRA
835
0353 CFDD 44                  LSRA
836
0354 CFDE 44                  LSRA
837
0355 CFDF 44                  LSRA
838
0356 CFE0 84 0F              OUTHXR ANDA #$0F
839
0357 CFE2 8B 30               ADDA #$30
840
0358 CFE4 81 39               CMPA #$39
841
0359 CFE6 23 02               BLS ZCFEA
842
0360 CFE8 8B 07               ADDA #$07
843
0361 CFEA 7E CF 41           ZCFEA JMP >PUTCH1
844
0362                         *
845
0363                         ** CLASSIFY CHARACTER ALHA/NUMERIC
846
0364                         *
847
0365 CFED 81 30              CLASS1 CMPA #'0
848
0366 CFEF 25 14               BCS ZD005
849
0367 CFF1 81 39               CMPA #'9
850
0368 CFF3 23 16               BLS ZD00B
851
0369 CFF5 81 41               CMPA #'A
852
0370 CFF7 25 0C               BCS ZD005
853
0371 CFF9 81 5A               CMPA #'Z
854
0372 CFFB 23 0E               BLS ZD00B
855
0373 CFFD 81 61               CMPA #'a $61
856
0374 CFFF 25 04               BCS ZD005
857
0375 D001 81 7A               CMPA #'z $7A
858
0376 D003 23 06               BLS ZD00B
859
0377 D005 1A 01              ZD005 ORCC #$01
860
0378 D007 B7 CC 11            STA >LASTRM
861
0379 D00A 39                  RTS
862
0380 D00B 1C FE              ZD00B ANDCC #$FE
863
0381 D00D 39                  RTS
864
0382                         *
865
0383                         ** GET NEXT CHARACTER FROM FILE
866
0384                         *
867
0385 D00E 34 10              NXTCH1 PSHS X
868
0386 D010 BE CC 14            LDX >LINPTR
869
0387 D013 B6 CC 18            LDA >CURCHR
870
0388 D016 B7 CC 19            STA >PRVCHR
871
0389 D019 A6 80              ZD019 LDA ,X+
872
0390 D01B B7 CC 18            STA >CURCHR
873
0391 D01E 81 0D               CMPA #$0D
874
0392 D020 27 10               BEQ ZD032
875
0393 D022 B1 CC 02            CMPA >EOLCHR
876
0394 D025 27 0B               BEQ ZD032
877
0395 D027 BF CC 14            STX >LINPTR
878
0396 D02A 81 20               CMPA #$20
879
0397 D02C 26 04               BNE ZD032
880
0398 D02E A1 84               CMPA ,X
881
0399 D030 27 E7               BEQ ZD019
882
0400 D032 8D B9              ZD032 BSR CLASS1
883
0401 D034 35 90               PULS PC,X
884
0402                         *
885
0403                         ** PARSE FILE SPEC. IN LINE BUFFER
886
0404                         *
887
0405 D036 86 15              GETFL1 LDA #$15
888
0406 D038 A7 01               STA $01,X
889
0407 D03A 86 FF               LDA #$FF
890
0408 D03C A7 03               STA $03,X
891
0409 D03E 6F 04               CLR $04,X
892
0410 D040 6F 0C               CLR $0C,X
893
0411 D042 BD D0 D4            JSR >ZD0D4
894
0412 D045 86 08               LDA #$08
895
0413 D047 B7 CC 4B            STA >ZCC4B
896
0414 D04A 8D 34               BSR ZD080
897
0415 D04C 25 2E               BCS ZD07C
898
0416 D04E 26 0F               BNE ZD05F
899
0417 D050 8D 2E               BSR ZD080
900
0418 D052 25 28               BCS ZD07C
901
0419 D054 26 09               BNE ZD05F
902
0420 D056 BC CC 3F            CMPX >ZCC3F
903
0421 D059 27 6C               BEQ ZD0C7
904
0422 D05B 8D 23               BSR ZD080
905
0423 D05D 23 68               BLS ZD0C7
906
0424 D05F BE CC 3F           ZD05F LDX >ZCC3F
907
0425 D062 6D 04               TST $04,X
908
0426 D064 27 61               BEQ ZD0C7
909
0427 D066 6D 03               TST $03,X
910
0428 D068 2A 0F               BPL ZD079
911
0429 D06A 7D CC 0D            TST >ZCC0D
912
0430 D06D 27 05               BEQ ZD074
913
0431 D06F B6 CC 0B            LDA >SYSDRV
914
0432 D072 20 03               BRA ZD077
915
0433
916
0434 D074 B6 CC 0C           ZD074 LDA >WRKDRV
917
0435 D077 A7 03              ZD077 STA $03,X
918
0436 D079 7F CC 0D           ZD079 CLR >ZCC0D
919
0437 D07C BE CC 3F           ZD07C LDX >ZCC3F
920
0438 D07F 39                  RTS
921
0439
922
0440 D080 8D 8C              ZD080 BSR NXTCH1
923
0441 D082 25 43               BCS ZD0C7
924
0442 D084 81 39               CMPA #$39
925
0443 D086 22 15               BHI ZD09D
926
0444 D088 BE CC 3F            LDX >ZCC3F
927
0445 D08B 6D 03               TST $03,X
928
0446 D08D 2A 38               BPL ZD0C7
929
0447 D08F 84 03               ANDA #$03
930
0448 D091 A7 03               STA $03,X
931
0449 D093 BD D0 0E            JSR >NXTCH1
932
0450 D096 24 2F               BCC ZD0C7
933
0451 D098 81 2E              ZD098 CMPA #$2E
934
0452 D09A 1C FE               ANDCC #$FE
935
0453 D09C 39                  RTS
936
0454
937
0455 D09D F6 CC 4B           ZD09D LDB >ZCC4B
938
0456 D0A0 2B 25               BMI ZD0C7
939
0457 D0A2 34 04               PSHS B
940
0458 D0A4 C0 05               SUBB #$05
941
0459 D0A6 F7 CC 4B            STB >ZCC4B
942
0460 D0A9 35 04               PULS B
943
0461 D0AB B1 CC 49           ZD0AB CMPA >MAPUP
944
0462 D0AE 25 02               BCS ZD0B2
945
0463 D0B0 80 20               SUBA #$20
946
0464 D0B2 A7 04              ZD0B2 STA $04,X
947
0465 D0B4 30 01               LEAX $01,X
948
0466 D0B6 5A                  DECB
949
0467 D0B7 BD D0 0E            JSR >NXTCH1
950
0468 D0BA 24 08               BCC ZD0C4
951
0469 D0BC 81 2D               CMPA #$2D
952
0470 D0BE 27 04               BEQ ZD0C4
953
0471 D0C0 81 5F               CMPA #$5F
954
0472 D0C2 26 06               BNE ZD0CA
955
0473 D0C4 5D                 ZD0C4 TSTB
956
0474 D0C5 26 E4               BNE ZD0AB
957
0475 D0C7 1A 01              ZD0C7 ORCC #$01
958
0476 D0C9 39                  RTS
959
0477
960
0478 D0CA 5D                 ZD0CA TSTB
961
0479 D0CB 27 CB               BEQ ZD098
962
0480 D0CD 6F 04               CLR $04,X
963
0481 D0CF 30 01               LEAX $01,X
964
0482 D0D1 5A                  DECB
965
0483 D0D2 20 F6               BRA ZD0CA
966
0484
967
0485 D0D4 BF CC 3F           ZD0D4 STX >ZCC3F
968
0486 D0D7 BE CC 14            LDX >LINPTR
969
0487 D0DA A6 84              ZD0DA LDA ,X
970
0488 D0DC 81 20               CMPA #$20
971
0489 D0DE 26 04               BNE ZD0E4
972
0490 D0E0 30 01               LEAX $01,X
973
0491 D0E2 20 F6               BRA ZD0DA
974
0492 D0E4 BF CC 14           ZD0E4 STX >LINPTR
975
0493 D0E7 BE CC 3F            LDX >ZCC3F
976
0494 D0EA 39                  RTS
977
0495                         *
978
0496                         ** DEFAULT FILE EXTENSION
979
0497                         *
980
0498 D0EB 34 30              SETEX1 PSHS Y,X
981
0499 D0ED E6 0C               LDB $0C,X
982
0500 D0EF 26 18               BNE ZD109
983
0501 D0F1 10 8E D1 0B         LDY #EXTTBL
984
0502 D0F5 81 0B               CMPA #$0B
985
0503 D0F7 22 10               BHI ZD109
986
0504 D0F9 C6 03               LDB #$03
987
0505 D0FB 3D                  MUL
988
0506 D0FC 31 A5               LEAY B,Y
989
0507 D0FE C6 03               LDB #$03
990
0508 D100 A6 A0              ZD100 LDA ,Y+
991
0509 D102 A7 0C               STA $0C,X
992
0510 D104 30 01               LEAX $01,X
993
0511 D106 5A                  DECB
994
0512 D107 26 F7               BNE ZD100
995
0513 D109 35 B0              ZD109 PULS PC,Y,X
996
0514                         *
997
0515                         ** STANDARD FILE NAME EXTTENSIONS
998
0516                         *
999
0517 D10B 42 49 4E           EXTTBL FCC "BIN"
1000
0518 D10E 54 58 54            FCC "TXT"
1001
0519 D111 43 4D 44            FCC "CMD"
1002
0520 D114 42 41 53            FCC "BAS"
1003
0521 D117 53 59 53            FCC "SYS"
1004
0522 D11A 42 41 4B            FCC "BAK"
1005
0523 D11D 53 43 52            FCC "SCR"
1006
0524 D120 44 41 54            FCC "DAT"
1007
0525 D123 42 41 43            FCC "BAC"
1008
0526 D126 44 49 52            FCC "DIR"
1009
0527 D129 50 52 54            FCC "PRT"
1010
0528 D12C 4F 55 54            FCC "OUT"
1011
0529                         *
1012
0530                         ** READ A HEX ADDRESS FROM THE LINE BUFFER
1013
0531                         *
1014
0532 D12F BD D2 1E           GETHX1 JSR >ZD21E
1015
0533 D132 BD D0 0E           ZD132 JSR >NXTCH1
1016
0534 D135 25 22               BCS ZD159
1017
0535 D137 8D 26               BSR ZD15F
1018
0536 D139 25 18               BCS ZD153
1019
0537 D13B 34 04               PSHS B
1020
0538 D13D C6 04               LDB #$04
1021
0539 D13F 78 CC 1C           ZD13F ASL >LODOFF+1
1022
0540 D142 79 CC 1B            ROL >LODOFF
1023
0541 D145 5A                  DECB
1024
0542 D146 26 F7               BNE ZD13F
1025
0543 D148 35 04               PULS B
1026
0544 D14A BB CC 1C            ADDA >LODOFF+1
1027
0545 D14D B7 CC 1C            STA >LODOFF+1
1028
0546 D150 5C                  INCB
1029
0547 D151 20 DF               BRA ZD132
1030
0548
1031
0549 D153 BD D0 0E           ZD153 JSR >NXTCH1
1032
0550 D156 24 FB               BCC ZD153
1033
0551 D158 39                  RTS
1034
0552
1035
0553 D159 BE CC 1B           ZD159 LDX >LODOFF
1036
0554 D15C 1C FE               ANDCC #$FE
1037
0555 D15E 39                  RTS
1038
0556
1039
0557 D15F 80 47              ZD15F SUBA #$47
1040
0558 D161 2A 0F               BPL ZD172
1041
0559 D163 8B 06               ADDA #$06
1042
0560 D165 2A 04               BPL ZD16B
1043
0561 D167 8B 07               ADDA #$07
1044
0562 D169 2A 07               BPL ZD172
1045
0563 D16B 8B 0A              ZD16B ADDA #$0A
1046
0564 D16D 2B 03               BMI ZD172
1047
0565 D16F 1C FE               ANDCC #$FE
1048
0566 D171 39                  RTS
1049
0567
1050
0568 D172 1A 01              ZD172 ORCC #$01
1051
0569 D174 39                  RTS
1052
0570
1053
0571 D175 BD D2 1E           INDEC1 JSR >ZD21E
1054
0572 D178 BD D0 0E           ZD178 JSR >NXTCH1
1055
0573 D17B 25 DC               BCS ZD159
1056
0574 D17D 81 39               CMPA #$39
1057
0575 D17F 22 D2               BHI ZD153
1058
0576 D181 84 0F               ANDA #$0F
1059
0577 D183 34 04               PSHS B
1060
0578 D185 34 02               PSHS A
1061
0579 D187 FC CC 1B            LDD >LODOFF
1062
0580 D18A 58                  ASLB
1063
0581 D18B 49                  ROLA
1064
0582 D18C 58                  ASLB
1065
0583 D18D 49                  ROLA
1066
0584 D18E 58                  ASLB
1067
0585 D18F 49                  ROLA
1068
0586 D190 F3 CC 1B            ADDD >LODOFF
1069
0587 D193 F3 CC 1B            ADDD >LODOFF
1070
0588 D196 EB E0               ADDB ,S+
1071
0589 D198 89 00               ADCA #$00
1072
0590 D19A FD CC 1B            STD >LODOFF
1073
0591 D19D 35 04               PULS B
1074
0592 D19F 5C                  INCB
1075
0593 D1A0 20 D6               BRA ZD178
1076
0594                         *
1077
0595                         ** LOAD BINARY FILE
1078
0596                         *
1079
0597 D1A2 7F CC 1D           LOAD1 CLR >TRNFLG
1080
0598 D1A5 8D 3D              ZD1A5 BSR ZD1E4
1081
0599 D1A7 81 02               CMPA #$02
1082
0600 D1A9 27 15               BEQ ZD1C0
1083
0601 D1AB 81 16               CMPA #$16
1084
0602 D1AD 26 F6               BNE ZD1A5
1085
0603 D1AF 8D 33               BSR ZD1E4
1086
0604 D1B1 B7 CC 1E            STA >TRNVEC
1087
0605 D1B4 8D 2E               BSR ZD1E4
1088
0606 D1B6 B7 CC 1F            STA >TRNVEC+1
1089
0607 D1B9 86 01               LDA #$01
1090
0608 D1BB B7 CC 1D            STA >TRNFLG
1091
0609 D1BE 20 E5               BRA ZD1A5
1092
0610
1093
0611 D1C0 8D 22              ZD1C0 BSR ZD1E4
1094
0612 D1C2 1F 89               TFR A,B
1095
0613 D1C4 8D 1E               BSR ZD1E4
1096
0614 D1C6 1E 89               EXG A,B
1097
0615 D1C8 F3 CC 1B            ADDD >LODOFF
1098
0616 D1CB FD CC 3D            STD >ZCC3D
1099
0617 D1CE 8D 14               BSR ZD1E4
1100
0618 D1D0 1F 89               TFR A,B
1101
0619 D1D2 4D                  TSTA
1102
0620 D1D3 27 D0               BEQ ZD1A5
1103
0621 D1D5 8D 0D              ZD1D5 BSR ZD1E4
1104
0622 D1D7 BE CC 3D            LDX >ZCC3D
1105
0623 D1DA A7 80               STA ,X+
1106
0624 D1DC BF CC 3D            STX >ZCC3D
1107
0625 D1DF 5A                  DECB
1108
0626 D1E0 26 F3               BNE ZD1D5
1109
0627 D1E2 20 C1               BRA ZD1A5
1110
0628
1111
0629 D1E4 8E C8 40           ZD1E4 LDX #FCB
1112
0630 D1E7 BD D4 06            JSR >FMS
1113
0631 D1EA 27 11               BEQ ZD1FD
1114
0632 D1EC A6 01               LDA $01,X
1115
0633 D1EE 81 08               CMPA #$08
1116
0634 D1F0 26 0E               BNE ZD200
1117
0635 D1F2 32 62               LEAS $02,S
1118
0636 D1F4 86 04              ZD1F4 LDA #$04
1119
0637 D1F6 A7 84               STA ,X
1120
0638 D1F8 BD D4 06            JSR >FMS
1121
0639 D1FB 26 0D               BNE ZD20A
1122
0640 D1FD 1C FE              ZD1FD ANDCC #$FE
1123
0641 D1FF 39                  RTS
1124
0642
1125
0643 D200 B7 CC 20           ZD200 STA >ERRTYP
1126
0644 D203 81 04               CMPA #$04
1127
0645 D205 26 03               BNE ZD20A
1128
0646 D207 1A 01               ORCC #$01
1129
0647 D209 39                  RTS
1130
0648
1131
0649 D20A 8D 73              ZD20A BSR RPTER1
1132
0650 D20C 7E CD E4            JMP >ZCDE4
1133
0651                         *
1134
0652                         ** 'GET' - LOAD BINARY FILE
1135
0653                         *
1136
0654 D20F 86 00              GETCMD LDA #$00
1137
0655 D211 8D 35               BSR ZD248
1138
0656 D213 25 0F               BCS ZD224
1139
0657 D215 8D 07               BSR ZD21E
1140
0658 D217 7C CC 4C            INC >ZCC4C
1141
0659 D21A 8D 86               BSR LOAD1
1142
0660 D21C 20 F1               BRA GETCMD
1143
0661
1144
0662 D21E 4F                 ZD21E CLRA
1145
0663 D21F 5F                  CLRB
1146
0664 D220 FD CC 1B            STD >LODOFF
1147
0665 D223 39                  RTS
1148
0666
1149
0667 D224 F6 CC 4C           ZD224 LDB >ZCC4C
1150
0668 D227 10 27 FB AE         LBEQ ZCDD9
1151
0669 D22B 7E CD 03            JMP >WARMS
1152
0670
1153
0671 D22E 86 02              ZD22E LDA #$02
1154
0672 D230 8D 22               BSR ZD254
1155
0673 D232 8D EA               BSR ZD21E
1156
0674 D234 BD D1 A2            JSR >LOAD1
1157
0675 D237 F6 CC 1D            LDB >TRNFLG
1158
0676 D23A 27 04               BEQ ZD240
1159
0677 D23C 6E 9F CC 1E         JMP [TRNVEC]
1160
0678
1161
0679 D240 8E CC 5C           ZD240 LDX #NTRMSG
1162
0680 D243 86 81               LDA #$81
1163
0681 D245 7E CD DE            JMP >ZCDDE
1164
0682
1165
0683 D248 34 02              ZD248 PSHS A
1166
0684 D24A 8E C8 40            LDX #FCB
1167
0685 D24D BD D0 36            JSR >GETFL1
1168
0686 D250 35 02               PULS A
1169
0687 D252 25 1A               BCS ZD26E
1170
0688 D254 8E C8 40           ZD254 LDX #FCB
1171
0689 D257 BD D0 EB            JSR >SETEX1
1172
0690 D25A 8E C8 40            LDX #FCB
1173
0691 D25D 86 01               LDA #$01
1174
0692 D25F A7 84               STA ,X
1175
0693 D261 BD D1 E4            JSR >ZD1E4
1176
0694 D264 10 25 00 BB         LBCS ZD323
1177
0695 D268 86 FF               LDA #$FF
1178
0696 D26A A7 88 3B            STA $3B,X
1179
0697 D26D 39                  RTS
1180
0698
1181
0699 D26E B6 CC 11           ZD26E LDA >LASTRM
1182
0700 D271 81 0D               CMPA #$0D
1183
0701 D273 27 07               BEQ ZD27C
1184
0702 D275 B1 CC 02            CMPA >EOLCHR
1185
0703 D278 10 26 FB 5D         LBNE ZCDD9
1186
0704 D27C 1A 01              ZD27C ORCC #$01
1187
0705 D27E 39                  RTS
1188
0706
1189
0707 D27F 34 30              RPTER1 PSHS Y,X
1190
0708 D281 A6 01               LDA $01,X
1191
0709 D283 B7 CC 20            STA >ERRTYP
1192
0710 D286 27 63               BEQ ZD2EB
1193
0711 D288 BD CD EA            JSR >RSTIO1
1194
0712 D28B 10 BE CC 2D         LDY >ERRVEC
1195
0713 D28F 26 08               BNE ZD299
1196
0714 D291 81 10               CMPA #$10
1197
0715 D293 27 58               BEQ ZD2ED
1198
0716 D295 10 8E D3 61         LDY #ZD361
1199
0717 D299 8E C8 40           ZD299 LDX #FCB
1200
0718 D29C 6D 02               TST $02,X
1201
0719 D29E 27 09               BEQ ZD2A9
1202
0720 D2A0 86 04               LDA #$04
1203
0721 D2A2 A7 84               STA ,X
1204
0722 D2A4 BD D4 06            JSR >FMS
1205
0723 D2A7 26 2E               BNE ZD2D7
1206
0724 D2A9 8E C8 38           ZD2A9 LDX #ZC838
1207
0725 D2AC C6 0B               LDB #$0B
1208
0726 D2AE 8D 6E               BSR ZD31E
1209
0727 D2B0 8E C8 40            LDX #FCB
1210
0728 D2B3 B6 CC 0B            LDA >SYSDRV
1211
0729 D2B6 A7 03               STA $03,X
1212
0730 D2B8 86 01               LDA #$01
1213
0731 D2BA A7 84               STA ,X
1214
0732 D2BC BD D4 06            JSR >FMS
1215
0733 D2BF 26 16               BNE ZD2D7
1216
0734 D2C1 B6 CC 20            LDA >ERRTYP
1217
0735 D2C4 4A                  DECA
1218
0736 D2C5 47                  ASRA
1219
0737 D2C6 47                  ASRA
1220
0738 D2C7 4C                  INCA
1221
0739 D2C8 6F 88 20            CLR $20,X
1222
0740 D2CB A7 88 21            STA $21,X
1223
0741 D2CE 86 15               LDA #$15
1224
0742 D2D0 A7 84               STA ,X
1225
0743 D2D2 BD D4 06            JSR >FMS
1226
0744 D2D5 27 1E               BEQ ZD2F5
1227
0745 D2D7 8E CC 75           ZD2D7 LDX #DERMSG
1228
0746 D2DA BD CE 81            JSR >PSTRG1
1229
0747 D2DD BE CC 3F            LDX >ZCC3F
1230
0748 D2E0 B6 CC 20            LDA >ERRTYP
1231
0749 D2E3 A7 01               STA $01,X
1232
0750 D2E5 6F 84               CLR ,X
1233
0751 D2E7 5F                  CLRB
1234
0752 D2E8 BD CF 86            JSR >OUTDC1
1235
0753 D2EB 35 B0              ZD2EB PULS PC,Y,X
1236
0754
1237
0755 D2ED 8E CC 82           ZD2ED LDX #DNRMSG
1238
0756 D2F0 BD CE 81            JSR >PSTRG1
1239
0757 D2F3 20 F6               BRA ZD2EB
1240
0758
1241
0759 D2F5 BD CE B5           ZD2F5 JSR >PCRLF1
1242
0760 D2F8 8E C8 40            LDX #FCB
1243
0761 D2FB B6 CC 20            LDA >ERRTYP
1244
0762 D2FE 4A                  DECA
1245
0763 D2FF 84 03               ANDA #$03
1246
0764 D301 C6 3F               LDB #$3F
1247
0765 D303 3D                  MUL
1248
0766 D304 CB 04               ADDB #$04
1249
0767 D306 E7 88 22            STB $22,X
1250
0768 D309 BD D4 06           ZD309 JSR >FMS
1251
0769 D30C 26 C9               BNE ZD2D7
1252
0770 D30E BD CF 41            JSR >PUTCH1
1253
0771 D311 81 0D               CMPA #$0D
1254
0772 D313 26 F4               BNE ZD309
1255
0773 D315 86 04               LDA #$04
1256
0774 D317 A7 84               STA ,X
1257
0775 D319 BD D4 06            JSR >FMS
1258
0776 D31C 20 CD               BRA ZD2EB
1259
0777 D31E 34 30              ZD31E PSHS Y,X
1260
0778 D320 7E D1 00            JMP >ZD100
1261
0779
1262
0780 D323 8E CC 6B           ZD323 LDX #NFDMSG NOT FOUND
1263
0781 D326 7E CD E1            JMP >ZCDE1
1264
0782                         *
1265
0783                         ** CALL FLEX AS A SUBROUTINE
1266
0784                         *
1267
0785 D329 35 06              DOCMD1 PULS B,A
1268
0786 D32B FD CC 43            STD >ZCC43
1269
0787 D32E 10 FF CC 45        ZD32E STS >ZCC45
1270
0788 D332 7F CC 20            CLR >ERRTYP
1271
0789 D335 7C CC 28            INC >CMDFLG
1272
0790 D338 7E CD B8            JMP >ZCDB8
1273
0791 D33B 7F CC 28           ZD33B CLR >CMDFLG
1274
0792 D33E 10 FE CC 45         LDS >ZCC45
1275
0793 D342 F6 CC 20            LDB >ERRTYP
1276
0794 D345 6E 9F CC 43         JMP [ZCC43]
1277
0795                         *
1278
0796                         ** ADD ACCB TO IX
1279
0797                         *
1280
0798 D349 3A                 ADDBX1 ABX
1281
0799 D34A 39                  RTS
1282
0800
1283
0801 D34B 7D CC FC           ZD34B TST >ZCCFC
1284
0802 D34E 26 04               BNE ZD354
1285
0803 D350 6E 9F D3 F3         JMP [MONVEC]
1286
0804
1287
0805 D354 8E C8 40           ZD354 LDX #FCB
1288
0806 D357 86 1B               LDA #$1B
1289
0807 D359 A7 01               STA $01,X
1290
0808 D35B BD D2 7F            JSR >RPTER1
1291
0809 D35E 7E CD 67            JMP >WARM1
1292
0810
1293
0811 D361 45 52 52 4F 52 53  ZD361 FCC /ERRORS/
1294
0812 D367 00 00               FCB $00,$00
1295
0813 D369 53 59 53            FCC /SYS/
1296
0009                          END
1297
0000                          INCLUDE "f9-monio.txt"
1298
0001                         *
1299
0002                         ** TERMINAL AND PRINTER DRIVERS
1300
0003                         ** SYS09BUG - Spartan 3 Starter Board
1301
0004                         *
1302
0005                         ** FLEX DRIVER MEMORY MAP:
1303
0006                         ** C700 - C83F  PRINTER SPOOLER
1304
0007                         ** CCC0 - CCF7  PRINTER DRIVERS
1305
0008                         ** D370 - D3FF  CONSOLE DRIVERS
1306
0009                         ** DE00 - DFAF  DISK DRIVERS
1307
0010                         *
1308
0011                         *
1309
0012                         ** INTERRUPT VECTORS
1310
0013                         *
1311
0014 DFC8                    IRQVEC EQU   MONRAM+$08
1312
0015 DFC2                    SWIVEC EQU   MONRAM+$02     SWI3 VECTOR
1313
0016                         *
1314
0017                         ** PRINTER DRIVERS
1315
0018                         *
1316
0019 CCC0                     ORG $CCC0
1317
0020 CCC0 7E D3 70           PINIT JMP DUMRTS INITIATE PRINTER
1318
0021 CCD8                     ORG $CCD8
1319
0022 CCD8 7E D3 70           PCHK JMP DUMRTS CHECK IF PRINTER READY
1320
0023 CCE4                     ORG $CCE4
1321
0024 CCE4 7E D3 70           POUT JMP DUMRTS OUTPUT CHR. TO PRINTER
1322
0025 CCF8                     ORG $CCF8
1323
0026 CCF8 01 00 00 00        ZCCF8 FCB $01,$00,$00,$00
1324
0027 CCFC 00 00 00 00        ZCCFC FCB $00,$00,$00,$00
1325
0028                         *
1326
0029                         ** CONSOLE DRIVER PATCHES:
1327
0030                         *
1328
0031 D370                           ORG $D370
1329
0032 D370                    IHND   EQU   *         INTERRUPT HANDLER
1330
0033 D370                    TMON   EQU   *         TIMER ON
1331
0034 D370                    TMOFF  EQU   *         TIMER OFF
1332
0035 D370                    TMINT  EQU   *         TIMER INITIALIZATION
1333
0036 D370                    DUMRTS EQU   *
1334
0037 D370 39                        RTS
1335
0038                         *
1336
0039                         ** SBUG MONITOR I/O CALLS
1337
0040                         *
1338
0041 D371 7E D3 70           TERINZ JMP DUMRTS   INITIATE ACIA
1339
0042 D374 6E 9F F8 04        INCHNE JMP [MONROM+$04] INPUT WITHOUT ECHO
1340
0043 D378 6E 9F F8 00        MONITR JMP [MONROM+$00]
1341
0044 D37C 6E 9F F8 08        INCHEK JMP [MONROM+$08] CHECK FOR TERMINAL ENTRY
1342
0045 D380 6E 9F F8 0A        OUTEEE JMP [MONROM+$0A] OUPUT CHARACTER
1343
0046 D384 6E 9F F8 06        INEEE  JMP [MONROM+$06] INPUT WITH ECHO
1344
0047
1345
0048                         *
1346
0049                         ** AUTO BLOCK FDBS
1347
0050                         *
1348
0051 D3E5                           ORG   $D3E5
1349
0052 D3E5 D3 74              ZD3E5  FDB   INCHNE    INPUT - NO ECHO
1350
0053 D3E7 D3 70              IHNDVC FDB   IHND      IRQ INTERRUPT HANDLER
1351
0054 D3E9 DF C2              SWIVVC FDB   SWIVEC    SWI3 VECTOR LOCATION
1352
0055 D3EB DF C8              IRQVVC FDB   IRQVEC    IRQ VECTOR LOCATION
1353
0056 D3ED D3 70              TOFVEC FDB   TMOFF     TIMER OFF ROUTINE
1354
0057 D3EF D3 70              TONVEC FDB   TMON      TIMER ON ROUTINE
1355
0058 D3F1 D3 70              TINVEC FDB   TMINT     TIMER INITIALIZE ROUTINE
1356
0059 D3F3 D3 78              MONVEC FDB   MONITR    MONITOR RETURN ADDRESS
1357
0060 D3F5 D3 71              TERVEC FDB   TERINZ    TERMINAL INITIATION
1358
0061 D3F7 D3 7C              STAVEC FDB   INCHEK    CHECK TERMINAL STATUS
1359
0062 D3F9 D3 80              OUTVEC FDB   OUTEEE    TERMINAL CHAR OUTPUT
1360
0063 D3FB D3 84              INVEC  FDB   INEEE     TERMINAL INPUT CHARACTER
1361
0064 D3FD 7E CA 00           ZD3FD  JMP   ZCA00
1362
0010                                END
1363
0000                          INCLUDE "f9-fms.txt"
1364
0001                         *
1365
0002                         ** FILE MANAGEMENT SYSTEM
1366
0003                         *
1367
0004 D400 7E D4 36           ZD400 JMP >ZD436
1368
0005 D403 7E D4 59           FMSCLS JMP >ZD459
1369
0006 D406 7E D4 7B           FMS JMP >FMS1
1370
0007 D409 20 44 49 53 4B 20  CPYMSG FCC / DISK OPERATING SYSTEM/
1371
          4F 50 45 52 41 54
1372
          49 4E 47 20 53 59
1373
          53 54 45 4D
1374
0008 D41F 20 43 4F 50 59 52   FCC / COPYRIGHT (C) 1980 BY/
1375
          49 47 48 54 20 28
1376
          43 29 20 31 39 38
1377
          30 20 42 59
1378
0009 D435 20 54 45 43 48 4E   FCC / TECHNICAL SYSTEMS CONSULTANTS/
1379
          49 43 41 4C 20 53
1380
          59 53 54 45 4D 53
1381
          20 43 4F 4E 53 55
1382
          4C 54 41 4E 54 53
1383
0010 D409                     ORG CPYMSG
1384
0011 D409                    FCBPTR RMB 2
1385
0012 D40B                    CURFCB RMB 4
1386
0013 D40F                    ZD40F RMB 2
1387
0014 D411                    ZD411 RMB 1
1388
0015 D412                    ZD412 RMB 1
1389
0016 D413                    ZD413 RMB 1
1390
0017 D414                    ZD414 RMB 1
1391
0018 D415                    ZD415 RMB 2
1392
0019 D417                    ZD417 RMB 1
1393
0020 D418                    ZD418 RMB 2
1394
0021 D41A                    ZD41A RMB 1
1395
0022 D41B                    ZD41B RMB 2
1396
0023 D41D                    ZD41D RMB 24
1397
0024 D435 FF                 VERFLG FCB $FF
1398
0025                         *
1399
0026                         **
1400
0027                         *
1401
0028 D436 BD DE 15           ZD436 JSR >COLDDR
1402
0029 D439 8E D4 09            LDX #FCBPTR
1403
0030 D43C C6 0A               LDB #$0A
1404
0031 D43E 8D 11               BSR ZD451
1405
0032 D440 8E 00 05            LDX #Z0005
1406
0033 D443 BF D4 13            STX >ZD413
1407
0034 D446 BF D4 15            STX >ZD415
1408
0035 D449 7F D4 1A            CLR >ZD41A
1409
0036 D44C 8E D4 1B           ZD44C LDX #ZD41B
1410
0037 D44F C6 1A               LDB #$1A
1411
0038 D451 6F 80              ZD451 CLR ,X+
1412
0039 D453 5A                  DECB
1413
0040 D454 26 FB               BNE ZD451
1414
0041 D456 7E C7 0C            JMP >PRSPL5
1415
0042
1416
0043 D459 BD C7 09           ZD459 JSR >PRSPL4
1417
0044 D45C BE D4 09           ZD45C LDX >FCBPTR
1418
0045 D45F 27 EB               BEQ ZD44C
1419
0046 D461 30 88 E4            LEAX -$1C,X
1420
0047 D464 BF D4 0B            STX >CURFCB
1421
0048 D467 34 20               PSHS Y
1422
0049 D469 BD DA C3            JSR >CLOSE
1423
0050 D46C 35 20               PULS Y
1424
0051 D46E 24 EC               BCC ZD45C
1425
0052 D470 BE D4 0B            LDX >CURFCB
1426
0053 D473 6F 02               CLR $02,X
1427
0054 D475 BD C7 0C            JSR >PRSPL5
1428
0055 D478 C6 FF               LDB #$FF
1429
0056 D47A 39                  RTS
1430
0057
1431
0058                         *
1432
0059                         ** FMS CALL, PROCESSING
1433
0060                         *
1434
0061 D47B 7D CC FC           FMS1 TST >ZCCFC
1435
0062 D47E 27 03               BEQ ZD483
1436
0063 D480 BD C7 09            JSR >PRSPL4
1437
0064 D483 34 24              ZD483 PSHS Y,B
1438
0065 D485 BF D4 0B            STX >CURFCB
1439
0066 D488 6F 01               CLR $01,X
1440
0067 D48A E6 84               LDB ,X
1441
0068 D48C 26 22               BNE DOFUNC
1442
0069                         *
1443
0070                         ** READ/WRITE CHAR/BYTE
1444
0071                         *
1445
0072 D48E E6 02               LDB $02,X
1446
0073 D490 27 1A               BEQ ZD4AC
1447
0074 D492 C1 02               CMPB #$02
1448
0075 D494 27 11               BEQ ZD4A7
1449
0076 D496 BD D5 B4            JSR >ZD5B4
1450
0077 D499 BE D4 0B           ZD499 LDX >CURFCB
1451
0078 D49C 25 26               BCS ZD4C4
1452
0079 D49E 7D CC FC            TST >ZCCFC
1453
0080 D4A1 26 23               BNE ZD4C6
1454
0081 D4A3 5F                  CLRB
1455
0082 D4A4 35 24               PULS Y,B
1456
0083 D4A6 39                  RTS
1457
0084
1458
0085 D4A7 BD D6 CF           ZD4A7 JSR >ZD6CF
1459
0086 D4AA 20 ED               BRA ZD499
1460
0087 D4AC C6 12              ZD4AC LDB #$12
1461
0088 D4AE 20 14               BRA ZD4C4
1462
0089
1463
0090 D4B0 C1 16              DOFUNC CMPB #$16
1464
0091 D4B2 23 04               BLS DOFUN1
1465
0092 D4B4 C6 01               LDB #$01
1466
0093 D4B6 20 0C               BRA ZD4C4
1467
0094 D4B8 5A                 DOFUN1 DECB
1468
0095 D4B9 58                  ASLB
1469
0096 D4BA 8E D4 CE            LDX #FMSTBL
1470
0097 D4BD AD 95               JSR [B,X]
1471
0098 D4BF BE D4 0B            LDX >CURFCB
1472
0099 D4C2 24 02               BCC ZD4C6
1473
0100 D4C4 E7 01              ZD4C4 STB $01,X
1474
0101 D4C6 BD C7 0C           ZD4C6 JSR >PRSPL5
1475
0102 D4C9 6D 01               TST $01,X
1476
0103 D4CB 35 24               PULS Y,B
1477
0104 D4CD 39                  RTS
1478
0105                         *
1479
0106                         ** FMS COMMAND VECTOR TABLE
1480
0107                         *
1481
0108 D4CE D9 86              FMSTBL FDB OPENRD FC 1
1482
0109 D4D0 D9 D9               FDB OPENWR FC 2
1483
0110 D4D2 DA F9               FDB OPENUD FC 3
1484
0111 D4D4 DA C3               FDB CLOSE FC 4
1485
0112 D4D6 D5 E2               FDB REWIND FC 5
1486
0113 D4D8 D8 1D               FDB OPNDIR FC 6
1487
0114 D4DA D8 38               FDB GETREC FC 7
1488
0115 D4DC D8 76               FDB PUTREC FC 8
1489
0116 D4DE D6 41               FDB RDSECT FC 9
1490
0117 D4E0 D6 9F               FDB WRSECT FC 10
1491
0118 D4E2 D9 69               FDB RESV1 FC 11
1492
0119 D4E4 DB D6               FDB DELETE FC 12
1493
0120 D4E6 DB 2C               FDB RENAME FC 13
1494
0121 D4E8 D6 99               FDB RESV2 FC 14
1495
0122 D4EA DA 87               FDB NXTSEC FC 15
1496
0123 D4EC D8 10               FDB OPNREC FC 16
1497
0124 D4EE D5 6F               FDB GETBYT FC 17
1498
0125 D4F0 D5 90               FDB PUTBYT FC 18
1499
0126 D4F2 DB 07               FDB RESV3 FC 19
1500
0127 D4F4 DD BD               FDB NXTDRV FC 20
1501
0128 D4F6 DC FB               FDB POSREC FC 21
1502
0129 D4F8 DC E5               FDB BAKREC FC 22
1503
0130                         *
1504
0131                         **
1505
0132                         *
1506
0133 D4FA 8D 20              ZD4FA BSR ZD51C
1507
0134 D4FC 26 05               BNE ZD503
1508
0135 D4FE C6 02               LDB #$02
1509
0136 D500 1A 01               ORCC #$01
1510
0137 D502 39                  RTS
1511
0138
1512
0139 D503 ED 84              ZD503 STD ,X
1513
0140 D505 AE 84               LDX ,X
1514
0141 D507 6F 84               CLR ,X
1515
0142 D509 6F 01               CLR $01,X
1516
0143 D50B 39                  RTS
1517
0144
1518
0145 D50C 8D 0E              ZD50C BSR ZD51C
1519
0146 D50E 27 05               BEQ ZD515
1520
0147 D510 C6 0D               LDB #$0D
1521
0148 D512 1A 01               ORCC #$01
1522
0149 D514 39                  RTS
1523
0150
1524
0151 D515 EC 94              ZD515 LDD [,X]
1525
0152 D517 ED 84               STD ,X
1526
0153 D519 1C FE               ANDCC #$FE
1527
0154 D51B 39                  RTS
1528
0155
1529
0156 D51C FC D4 0B           ZD51C LDD >CURFCB
1530
0157 D51F C3 00 1C            ADDD #$001C
1531
0158 D522 8E D4 09            LDX #FCBPTR
1532
0159 D525 10 AE 84           ZD525 LDY ,X
1533
0160 D528 26 03               BNE ZD52D
1534
0161 D52A 1C FB               ANDCC #$FB
1535
0162 D52C 39                  RTS
1536
0163
1537
0164 D52D 10 A3 84           ZD52D CMPD ,X
1538
0165 D530 26 01               BNE ZD533
1539
0166 D532 39                  RTS
1540
0167 D533 AE 84              ZD533 LDX ,X
1541
0168 D535 20 EE               BRA ZD525
1542
0169
1543
0170 D537 BE D4 0B           ZD537 LDX >CURFCB
1544
0171 D53A 4F                  CLRA
1545
0172 D53B 5F                  CLRB
1546
0173 D53C 8D 02               BSR ZD540
1547
0174 D53E C6 2F               LDB #$2F
1548
0175 D540 A7 88 11           ZD540 STA $11,X
1549
0176 D543 30 01               LEAX $01,X
1550
0177 D545 5A                  DECB
1551
0178 D546 26 F8               BNE ZD540
1552
0179 D548 39                  RTS
1553
0180
1554
0181 D549 BE D4 0B           ZD549 LDX >CURFCB
1555
0182 D54C C6 0B               LDB #$0B
1556
0183 D54E A6 04              ZD54E LDA $04,X
1557
0184 D550 A7 88 24            STA $24,X
1558
0185 D553 30 01               LEAX $01,X
1559
0186 D555 5A                  DECB
1560
0187 D556 26 F6               BNE ZD54E
1561
0188 D558 39                  RTS
1562
0189
1563
0190 D559 BE D4 0B           ZD559 LDX >CURFCB
1564
0191 D55C C6 0B               LDB #$0B
1565
0192 D55E A6 04              ZD55E LDA $04,X
1566
0193 D560 34 02               PSHS A
1567
0194 D562 A6 88 24            LDA $24,X
1568
0195 D565 A1 E0               CMPA ,S+
1569
0196 D567 26 05               BNE ZD56E
1570
0197 D569 30 01               LEAX $01,X
1571
0198 D56B 5A                  DECB
1572
0199 D56C 26 F0               BNE ZD55E
1573
0200 D56E 39                 ZD56E RTS
1574
0201                         *
1575
0202                         ** GET RANDOM BYTE FROM SECTOR
1576
0203                         *
1577
0204 D56F BE D4 0B           GETBYT LDX >CURFCB
1578
0205 D572 E6 02               LDB $02,X
1579
0206 D574 54                  LSRB
1580
0207 D575 24 79               BCC ZD5F0
1581
0208 D577 E6 88 23            LDB $23,X
1582
0209 D57A 7E D6 00            JMP >ZD600
1583
0210
1584
0211 D57D BE D4 0B           ZD57D LDX >CURFCB
1585
0212 D580 E6 88 22            LDB $22,X
1586
0213 D583 6C 88 22            INC $22,X
1587
0214 D586 3A                  ABX
1588
0215 D587 A7 88 40            STA $40,X
1589
0216 D58A 5C                  INCB
1590
0217 D58B 26 1F               BNE ZD5AC
1591
0218 D58D 1A 01               ORCC #$01
1592
0219 D58F 39                  RTS
1593
0220                         *
1594
0221                         ** PUT RANDOM BYTE IN SECTOR
1595
0222                         *
1596
0223 D590 BE D4 0B           PUTBYT LDX >CURFCB
1597
0224 D593 E6 02               LDB $02,X
1598
0225 D595 C4 03               ANDB #$03
1599
0226 D597 C1 03               CMPB #$03
1600
0227 D599 26 55               BNE ZD5F0
1601
0228 D59B CA 80               ORB #$80
1602
0229 D59D E7 02               STB $02,X
1603
0230 D59F E6 0F               LDB $0F,X
1604
0231 D5A1 C5 80               BITB #$80
1605
0232 D5A3 26 0A               BNE ZD5AF
1606
0233 D5A5 E6 88 23            LDB $23,X
1607
0234 D5A8 3A                  ABX
1608
0235 D5A9 A7 88 40            STA $40,X
1609
0236 D5AC 1C FE              ZD5AC ANDCC #$FE
1610
0237 D5AE 39                  RTS
1611
0238
1612
0239 D5AF C6 0B              ZD5AF LDB #$0B
1613
0240 D5B1 1A 01               ORCC #$01
1614
0241 D5B3 39                  RTS
1615
0242
1616
0243 D5B4 A6 88 3B           ZD5B4 LDA $3B,X
1617
0244 D5B7 2B 3C               BMI ZD5F5
1618
0245 D5B9 27 07               BEQ ZD5C2
1619
0246 D5BB 6A 88 3B            DEC $3B,X
1620
0247 D5BE 86 20               LDA #$20
1621
0248 D5C0 20 1D               BRA ZD5DF
1622
0249
1623
0250 D5C2 8D 31              ZD5C2 BSR ZD5F5
1624
0251 D5C4 25 1B               BCS ZD5E1
1625
0252 D5C6 81 18               CMPA #$18
1626
0253 D5C8 22 15               BHI ZD5DF
1627
0254 D5CA 27 F6               BEQ ZD5C2
1628
0255 D5CC 81 09               CMPA #$09
1629
0256 D5CE 26 0C               BNE ZD5DC
1630
0257 D5D0 8D 23               BSR ZD5F5
1631
0258 D5D2 25 0D               BCS ZD5E1
1632
0259 D5D4 BE D4 0B            LDX >CURFCB
1633
0260 D5D7 A7 88 3B            STA $3B,X
1634
0261 D5DA 20 D8               BRA ZD5B4
1635
0262
1636
0263 D5DC 4D                 ZD5DC TSTA
1637
0264 D5DD 27 E3               BEQ ZD5C2
1638
0265 D5DF 1C FE              ZD5DF ANDCC #$FE
1639
0266 D5E1 39                 ZD5E1 RTS
1640
0267                         *
1641
0268                         ** REWIND FILE
1642
0269                         *
1643
0270 D5E2 BD DA B1           REWIND JSR >ZDAB1
1644
0271 D5E5 25 09               BCS ZD5F0
1645
0272 D5E7 85 01               BITA #$01
1646
0273 D5E9 27 05               BEQ ZD5F0
1647
0274 D5EB A7 84               STA ,X
1648
0275 D5ED 7E D9 A0            JMP >ZD9A0
1649
0276
1650
0277 D5F0 C6 12              ZD5F0 LDB #$12
1651
0278 D5F2 1A 01               ORCC #$01
1652
0279 D5F4 39                  RTS
1653
0280
1654
0281 D5F5 BE D4 0B           ZD5F5 LDX >CURFCB
1655
0282 D5F8 E6 88 22            LDB $22,X
1656
0283 D5FB 27 0A               BEQ ZD607
1657
0284 D5FD 6C 88 22            INC $22,X
1658
0285 D600 3A                 ZD600 ABX
1659
0286 D601 A6 88 40            LDA $40,X
1660
0287 D604 1C FE               ANDCC #$FE
1661
0288 D606 39                  RTS
1662
0289
1663
0290 D607 8D 03              ZD607 BSR ZD60C
1664
0291 D609 24 EA               BCC ZD5F5
1665
0292 D60B 39                  RTS
1666
0293
1667
0294 D60C BE D4 0B           ZD60C LDX >CURFCB
1668
0295 D60F EC 88 40            LDD $40,X
1669
0296 D612 6C 88 21            INC $21,X
1670
0297 D615 26 03               BNE ZD61A
1671
0298 D617 6C 88 20            INC $20,X
1672
0299 D61A 10 83 00 00        ZD61A CMPD #$0000
1673
0300 D61E 27 1C               BEQ ZD63C
1674
0301 D620 ED 88 1E           ZD620 STD $1E,X
1675
0302 D623 34 02               PSHS A
1676
0303 D625 86 04               LDA #$04
1677
0304 D627 A7 88 22            STA $22,X
1678
0305 D62A 35 02               PULS A
1679
0306 D62C 8D 13               BSR RDSECT
1680
0307 D62E 24 10               BCC ZD640
1681
0308 D630 C5 80               BITB #$80
1682
0309 D632 27 04               BEQ ZD638
1683
0310 D634 C6 10               LDB #$10
1684
0311 D636 20 06               BRA ZD63E
1685
0312
1686
0313 D638 C6 09              ZD638 LDB #$09
1687
0314 D63A 20 02               BRA ZD63E
1688
0315
1689
0316 D63C C6 08              ZD63C LDB #$08
1690
0317 D63E 1A 01              ZD63E ORCC #$01
1691
0318 D640 39                 ZD640 RTS
1692
0319                         *
1693
0320                         ** READ SINGLE SECTOR
1694
0321                         *
1695
0322 D641 8D 25              RDSECT BSR ZD668
1696
0323 D643 BE D4 0B            LDX >CURFCB
1697
0324 D646 BD DE 0C            JSR >DRIVE
1698
0325 D649 25 12               BCS ZD65D
1699
0326 D64B 8D 11              ZD64B BSR ZD65E
1700
0327 D64D BD DE 00            JSR >READ
1701
0328 D650 26 03               BNE ZD655
1702
0329 D652 1C FE               ANDCC #$FE
1703
0330 D654 39                  RTS
1704
0331
1705
0332 D655 34 04              ZD655 PSHS B
1706
0333 D657 8D 17               BSR ZD670
1707
0334 D659 35 04               PULS B
1708
0335 D65B 24 EE               BCC ZD64B
1709
0336 D65D 39                 ZD65D RTS
1710
0337
1711
0338 D65E BE D4 0B           ZD65E LDX >CURFCB
1712
0339 D661 EC 88 1E            LDD $1E,X
1713
0340 D664 30 88 40            LEAX $40,X
1714
0341 D667 39                  RTS
1715
0342
1716
0343 D668 4F                 ZD668 CLRA
1717
0344 D669 B7 D4 11            STA >ZD411
1718
0345 D66C B7 D4 12            STA >ZD412
1719
0346 D66F 39                  RTS
1720
0347
1721
0348 D670 C5 10              ZD670 BITB #$10
1722
0349 D672 26 11               BNE ZD685
1723
0350 D674 C5 80               BITB #$80
1724
0351 D676 26 24               BNE ZD69C
1725
0352 D678 F6 D4 11            LDB >ZD411
1726
0353 D67B 5C                  INCB
1727
0354 D67C C1 07               CMPB #$07
1728
0355 D67E 27 05               BEQ ZD685
1729
0356 D680 F7 D4 11            STB >ZD411
1730
0357 D683 20 14               BRA RESV2
1731
0358
1732
0359 D685 7F D4 11           ZD685 CLR >ZD411
1733
0360 D688 F6 D4 12            LDB >ZD412
1734
0361 D68B 5C                  INCB
1735
0362 D68C C1 04               CMPB #$04
1736
0363 D68E 27 0C               BEQ ZD69C
1737
0364 D690 F7 D4 12            STB >ZD412
1738
0365 D693 BE D4 0B            LDX >CURFCB
1739
0366 D696 BD DE 09            JSR >RESTOR
1740
0367                         *
1741
0368                         ** RESERVED
1742
0369                         *
1743
0370 D699 1C FE              RESV2 ANDCC #$FE
1744
0371 D69B 39                  RTS
1745
0372 D69C 1A 01              ZD69C ORCC #$01
1746
0373 D69E 39                  RTS
1747
0374                         *
1748
0375                         ** WRITE SINGLE SECTOR
1749
0376                         *
1750
0377 D69F 8D C7              WRSECT BSR ZD668
1751
0378 D6A1 BE D4 0B            LDX >CURFCB
1752
0379 D6A4 BD DE 0C            JSR >DRIVE
1753
0380 D6A7 25 20               BCS ZD6C9
1754
0381 D6A9 BE D4 0B           ZD6A9 LDX >CURFCB
1755
0382 D6AC 8D B0               BSR ZD65E
1756
0383 D6AE BD DE 03            JSR >WRITE
1757
0384 D6B1 26 0A               BNE ZD6BD
1758
0385 D6B3 B6 D4 35            LDA >VERFLG
1759
0386 D6B6 27 37               BEQ ZD6EF
1760
0387 D6B8 BD DE 06            JSR >VERIFY
1761
0388 D6BB 27 32               BEQ ZD6EF
1762
0389 D6BD C5 40              ZD6BD BITB #$40
1763
0390 D6BF 26 0B               BNE ZD6CC
1764
0391 D6C1 34 04               PSHS B
1765
0392 D6C3 8D AB               BSR ZD670
1766
0393 D6C5 35 04               PULS B
1767
0394 D6C7 24 E0               BCC ZD6A9
1768
0395 D6C9 39                 ZD6C9 RTS
1769
0396
1770
0397 D6CA C6 20               LDB #$20
1771
0398 D6CC 1A 01              ZD6CC ORCC #$01
1772
0399 D6CE 39                  RTS
1773
0400
1774
0401 D6CF BE D4 0B           ZD6CF LDX >CURFCB
1775
0402 D6D2 E6 88 3B            LDB $3B,X
1776
0403 D6D5 2B 3D               BMI ZD714
1777
0404 D6D7 81 20               CMPA #$20
1778
0405 D6D9 26 0F               BNE ZD6EA
1779
0406 D6DB 5C                  INCB
1780
0407 D6DC E7 88 3B            STB $3B,X
1781
0408 D6DF C1 7F               CMPB #$7F
1782
0409 D6E1 26 0C               BNE ZD6EF
1783
0410 D6E3 20 0D               BRA ZD6F2
1784
0411
1785
0412 D6E5 8D 0B              ZD6E5 BSR ZD6F2
1786
0413 D6E7 24 E6               BCC ZD6CF
1787
0414 D6E9 39                  RTS
1788
0415
1789
0416 D6EA 5D                 ZD6EA TSTB
1790
0417 D6EB 27 27               BEQ ZD714
1791
0418 D6ED 20 F6               BRA ZD6E5
1792
0419
1793
0420 D6EF 1C FE              ZD6EF ANDCC #$FE
1794
0421 D6F1 39                  RTS
1795
0422
1796
0423 D6F2 34 02              ZD6F2 PSHS A
1797
0424 D6F4 C1 01               CMPB #$01
1798
0425 D6F6 26 04               BNE ZD6FC
1799
0426 D6F8 86 20               LDA #$20
1800
0427 D6FA 20 10               BRA ZD70C
1801
0428
1802
0429 D6FC 86 09              ZD6FC LDA #$09
1803
0430 D6FE 8D 14               BSR ZD714
1804
0431 D700 35 02               PULS A
1805
0432 D702 25 0F               BCS ZD713
1806
0433 D704 34 02               PSHS A
1807
0434 D706 BE D4 0B            LDX >CURFCB
1808
0435 D709 A6 88 3B            LDA $3B,X
1809
0436 D70C 6F 88 3B           ZD70C CLR $3B,X
1810
0437 D70F 8D 03               BSR ZD714
1811
0438 D711 35 02               PULS A
1812
0439 D713 39                 ZD713 RTS
1813
0440
1814
0441 D714 BE D4 0B           ZD714 LDX >CURFCB
1815
0442 D717 E6 02               LDB $02,X
1816
0443 D719 C1 02               CMPB #$02
1817
0444 D71B 10 26 FE D1         LBNE ZD5F0
1818
0445 D71F E6 88 22            LDB $22,X
1819
0446 D722 C1 04               CMPB #$04
1820
0447 D724 26 08               BNE ZD72E
1821
0448 D726 34 02               PSHS A
1822
0449 D728 8D 21               BSR ZD74B
1823
0450 D72A 35 02               PULS A
1824
0451 D72C 25 0F               BCS ZD73D
1825
0452 D72E BD D5 7D           ZD72E JSR >ZD57D
1826
0453 D731 24 0A               BCC ZD73D
1827
0454 D733 C6 04               LDB #$04
1828
0455 D735 BE D4 0B            LDX >CURFCB
1829
0456 D738 E7 88 22            STB $22,X
1830
0457 D73B 1C FE               ANDCC #$FE
1831
0458 D73D 39                 ZD73D RTS
1832
0459
1833
0460 D73E BE D4 0B           ZD73E LDX >CURFCB
1834
0461 D741 4F                  CLRA
1835
0462 D742 5F                  CLRB
1836
0463 D743 ED 88 20            STD $20,X
1837
0464 D746 ED 88 42            STD $42,X
1838
0465 D749 20 27               BRA ZD772
1839
0466
1840
0467 D74B E6 88 12           ZD74B LDB $12,X
1841
0468 D74E 26 22               BNE ZD772
1842
0469 D750 E6 88 17            LDB $17,X
1843
0470 D753 27 44               BEQ ZD799
1844
0471 D755 6F 88 17            CLR $17,X
1845
0472 D758 8D 3F               BSR ZD799
1846
0473 D75A 25 2A               BCS ZD786
1847
0474 D75C 8D E0               BSR ZD73E
1848
0475 D75E 25 26               BCS ZD786
1849
0476 D760 8D DC               BSR ZD73E
1850
0477 D762 25 22               BCS ZD786
1851
0478 D764 BE D4 0B            LDX >CURFCB
1852
0479 D767 C6 02               LDB #$02
1853
0480 D769 E7 88 17            STB $17,X
1854
0481 D76C EC 88 11            LDD $11,X
1855
0482 D76F 7E DC 82            JMP >ZDC82
1856
0483
1857
0484 D772 8D 0E              ZD772 BSR ZD782
1858
0485 D774 BE D4 0B            LDX >CURFCB
1859
0486 D777 ED 88 40            STD $40,X
1860
0487 D77A BD D6 9F            JSR >WRSECT
1861
0488 D77D 24 1A               BCC ZD799
1862
0489 D77F 7E DB C1            JMP >ZDBC1
1863
0490
1864
0491 D782 8D 03              ZD782 BSR ZD787
1865
0492 D784 EC 84               LDD ,X
1866
0493 D786 39                 ZD786 RTS
1867
0494
1868
0495 D787 BE D4 0B           ZD787 LDX >CURFCB
1869
0496 D78A E6 03               LDB $03,X
1870
0497 D78C 86 06               LDA #$06
1871
0498 D78E 3D                  MUL
1872
0499 D78F 8E D4 1D            LDX #ZD41D
1873
0500 D792 3A                  ABX
1874
0501 D793 BF D4 1B            STX >ZD41B
1875
0502 D796 6D 84               TST ,X
1876
0503 D798 39                  RTS
1877
0504
1878
0505 D799 8D E7              ZD799 BSR ZD782
1879
0506 D79B 26 05               BNE ZD7A2
1880
0507 D79D C6 07               LDB #$07
1881
0508 D79F 1A 01              ZD79F ORCC #$01
1882
0509 D7A1 39                  RTS
1883
0510
1884
0511 D7A2 BE D4 0B           ZD7A2 LDX >CURFCB
1885
0512 D7A5 ED 88 13            STD $13,X
1886
0513 D7A8 6D 88 12            TST $12,X
1887
0514 D7AB 26 03               BNE ZD7B0
1888
0515 D7AD ED 88 11            STD $11,X
1889
0516 D7B0 6C 88 16           ZD7B0 INC $16,X
1890
0517 D7B3 26 03               BNE ZD7B8
1891
0518 D7B5 6C 88 15            INC $15,X
1892
0519 D7B8 6D 88 17           ZD7B8 TST $17,X
1893
0520 D7BB 27 0B               BEQ ZD7C8
1894
0521 D7BD BD DC 43            JSR >ZDC43
1895
0522 D7C0 25 DD               BCS ZD79F
1896
0523 D7C2 BE D4 0B            LDX >CURFCB
1897
0524 D7C5 EC 88 13            LDD $13,X
1898
0525 D7C8 BD D6 20           ZD7C8 JSR >ZD620
1899
0526 D7CB 25 D2               BCS ZD79F
1900
0527 D7CD BE D4 0B            LDX >CURFCB
1901
0528 D7D0 EC 88 40            LDD $40,X
1902
0529 D7D3 34 06               PSHS B,A
1903
0530 D7D5 8D B0               BSR ZD787
1904
0531 D7D7 35 06               PULS B,A
1905
0532 D7D9 ED 84               STD ,X
1906
0533 D7DB 26 0A               BNE ZD7E7
1907
0534 D7DD 6F 02               CLR $02,X
1908
0535 D7DF 6F 03               CLR $03,X
1909
0536 D7E1 6F 04               CLR $04,X
1910
0537 D7E3 6F 05               CLR $05,X
1911
0538 D7E5 20 08               BRA ZD7EF
1912
0539
1913
0540 D7E7 10 AE 04           ZD7E7 LDY $04,X
1914
0541 D7EA 31 3F               LEAY -$01,Y
1915
0542 D7EC 10 AF 04            STY $04,X
1916
0543 D7EF 4F                 ZD7EF CLRA
1917
0544 D7F0 BE D4 0B            LDX >CURFCB
1918
0545 D7F3 6C 88 21            INC $21,X
1919
0546 D7F6 26 03               BNE ZD7FB
1920
0547 D7F8 6C 88 20            INC $20,X
1921
0548 D7FB 5F                 ZD7FB CLRB
1922
0549 D7FC A7 88 40           ZD7FC STA $40,X
1923
0550 D7FF 30 01               LEAX $01,X
1924
0551 D801 5A                  DECB
1925
0552 D802 26 F8               BNE ZD7FC
1926
0553 D804 BE D4 0B            LDX >CURFCB
1927
0554 D807 EC 88 20            LDD $20,X
1928
0555 D80A ED 88 42            STD $42,X
1929
0556 D80D 1C FE               ANDCC #$FE
1930
0557 D80F 39                  RTS
1931
0558                         *
1932
0559                         ** OPEN SYSTEM INFO. RECORD
1933
0560                         *
1934
0561 D810 5F                 OPNREC CLRB
1935
0562 D811 34 04               PSHS B
1936
0563 D813 C6 03               LDB #$03
1937
0564 D815 20 0E               BRA ZD825
1938
0565 D817 BE D4 15            LDX >ZD415
1939
0566 D81A BF D4 13            STX >ZD413
1940
0567 D81D F6 D4 13           OPNDIR LDB >ZD413
1941
0568 D820 34 04               PSHS B
1942
0569 D822 F6 D4 14            LDB >ZD414
1943
0570 D825 BE D4 0B           ZD825 LDX >CURFCB
1944
0571 D828 E7 88 41            STB $41,X
1945
0572 D82B 35 04               PULS B
1946
0573 D82D E7 88 40            STB $40,X
1947
0574 D830 7F D4 18            CLR >ZD418
1948
0575 D833 5F                  CLRB
1949
0576 D834 E7 88 22            STB $22,X
1950
0577 D837 39                  RTS
1951
0578                         *
1952
0579                         ** GET INFO RECORD
1953
0580                         *
1954
0581 D838 BE D4 0B           GETREC LDX >CURFCB
1955
0582 D83B E6 88 22            LDB $22,X
1956
0583 D83E 26 1D               BNE ZD85D
1957
0584 D840 BD D6 0C            JSR >ZD60C
1958
0585 D843 25 30               BCS ZD875
1959
0586 D845 BE D4 0B            LDX >CURFCB
1960
0587 D848 7D D4 18            TST >ZD418
1961
0588 D84B 26 05               BNE ZD852
1962
0589 D84D DC 44               LDD 
1963
0590 D84F FD D4 18            STD >ZD418
1964
0591 D852 86 10              ZD852 LDA #$10
1965
0592 D854 A7 88 22            STA $22,X
1966
0593 D857 EC 88 1E            LDD $1E,X
1967
0594 D85A ED 88 2F            STD $2F,X
1968
0595 D85D A6 88 22           ZD85D LDA $22,X
1969
0596 D860 A7 88 31            STA $31,X
1970
0597 D863 C6 18               LDB #$18
1971
0598 D865 34 14              ZD865 PSHS X,B
1972
0599 D867 BD D5 F5            JSR >ZD5F5
1973
0600 D86A 35 14               PULS X,B
1974
0601 D86C A7 04               STA $04,X
1975
0602 D86E 30 01               LEAX $01,X
1976
0603 D870 5A                  DECB
1977
0604 D871 26 F2               BNE ZD865
1978
0605 D873 1C FE               ANDCC #$FE
1979
0606 D875 39                 ZD875 RTS
1980
0607                         *
1981
0608                         ** PUT INFORMATION RECORD
1982
0609                         *
1983
0610 D876 BE D4 0B           PUTREC LDX >CURFCB
1984
0611 D879 A6 88 31            LDA $31,X
1985
0612 D87C A7 88 22            STA $22,X
1986
0613 D87F C6 18               LDB #$18
1987
0614 D881 34 14              ZD881 PSHS X,B
1988
0615 D883 A6 04               LDA $04,X
1989
0616 D885 BD D7 14            JSR >ZD714
1990
0617 D888 35 14               PULS X,B
1991
0618 D88A 30 01               LEAX $01,X
1992
0619 D88C 5A                  DECB
1993
0620 D88D 26 F2               BNE ZD881
1994
0621 D88F 7E D6 9F            JMP >WRSECT
1995
0622
1996
0623 D892 BE D4 0B           ZD892 LDX >CURFCB
1997
0624 D895 A6 03               LDA $03,X
1998
0625 D897 A7 88 23            STA $23,X
1999
0626 D89A B6 D4 17            LDA >ZD417
2000
0627 D89D 7D D4 1A            TST >ZD41A
2001
0628 D8A0 26 31               BNE ZD8D3
2002
0629 D8A2 A7 03               STA $03,X
2003
0630 D8A4 BE D4 15            LDX >ZD415
2004
0631 D8A7 BF D4 13            STX >ZD413
2005
0632 D8AA 8C 00 05           ZD8AA CMPX #Z0005
2006
0633 D8AD 27 0C               BEQ ZD8BB
2007
0634 D8AF 8D 22               BSR ZD8D3
2008
0635 D8B1 23 37               BLS ZD8EA
2009
0636 D8B3 BE D4 18            LDX >ZD418
2010
0637 D8B6 BF D4 13            STX >ZD413
2011
0638 D8B9 20 EF               BRA ZD8AA
2012
0639
2013
0640 D8BB BE D4 0B           ZD8BB LDX >CURFCB
2014
0641 D8BE A6 88 23            LDA $23,X
2015
0642 D8C1 A7 03               STA $03,X
2016
0643 D8C3 2A 0E               BPL ZD8D3
2017
0644 D8C5 BD DD BD           ZD8C5 JSR >NXTDRV
2018
0645 D8C8 25 36               BCS ZD900
2019
0646 D8CA 8D 07               BSR ZD8D3
2020
0647 D8CC 23 1C               BLS ZD8EA
2021
0648 D8CE BD DD AD            JSR >ZDDAD
2022
0649 D8D1 20 F2               BRA ZD8C5
2023
0650
2024
0651 D8D3 BE D4 0B           ZD8D3 LDX >CURFCB
2025
0652 D8D6 7F D4 1A            CLR >ZD41A
2026
0653 D8D9 BD D5 49            JSR >ZD549
2027
0654 D8DC BD D8 1D            JSR >OPNDIR
2028
0655 D8DF BD D8 38           ZD8DF JSR >GETREC
2029
0656 D8E2 24 07               BCC ZD8EB
2030
0657 D8E4 C1 08               CMPB #$08
2031
0658 D8E6 27 18               BEQ ZD900
2032
0659 D8E8 1A 01               ORCC #$01
2033
0660 D8EA 39                 ZD8EA RTS
2034
0661
2035
0662 D8EB BE D4 0B           ZD8EB LDX >CURFCB
2036
0663 D8EE A6 04               LDA $04,X
2037
0664 D8F0 27 0C               BEQ ZD8FE
2038
0665 D8F2 2A 02               BPL ZD8F6
2039
0666 D8F4 8D 0F               BSR ZD905
2040
0667 D8F6 BD D5 59           ZD8F6 JSR >ZD559
2041
0668 D8F9 26 E4               BNE ZD8DF
2042
0669 D8FB 1C FE               ANDCC #$FE
2043
0670 D8FD 39                  RTS
2044
0671
2045
0672 D8FE 8D 05              ZD8FE BSR ZD905
2046
0673 D900 1C FB              ZD900 ANDCC #$FB
2047
0674 D902 1C FE               ANDCC #$FE
2048
0675 D904 39                  RTS
2049
0676
2050
0677 D905 A6 88 33           ZD905 LDA $33,X
2051
0678 D908 26 0C               BNE ZD916
2052
0679 D90A EC 88 2F            LDD $2F,X
2053
0680 D90D ED 88 32            STD $32,X
2054
0681 D910 A6 88 31            LDA $31,X
2055
0682 D913 A7 88 34            STA $34,X
2056
0683 D916 39                 ZD916 RTS
2057
0684
2058
0685 D917 BD D7 87           ZD917 JSR >ZD787
2059
0686 D91A 26 17               BNE ZD933
2060
0687 D91C 8D 18               BSR ZD936
2061
0688 D91E 25 15               BCS ZD935
2062
0689 D920 C6 06               LDB #$06
2063
0690 D922 10 BE D4 0B         LDY >CURFCB
2064
0691 D926 BE D4 1B            LDX >ZD41B
2065
0692 D929 A6 A8 5D           ZD929 LDA $5D,Y
2066
0693 D92C 31 21               LEAY $01,Y
2067
0694 D92E A7 80               STA ,X+
2068
0695 D930 5A                  DECB
2069
0696 D931 26 F6               BNE ZD929
2070
0697 D933 1C FE              ZD933 ANDCC #$FE
2071
0698 D935 39                 ZD935 RTS
2072
0699
2073
0700 D936 BD D8 10           ZD936 JSR >OPNREC
2074
0701 D939 BD D6 0C            JSR >ZD60C
2075
0702 D93C 25 08               BCS ZD946
2076
0703 D93E BE D4 0B            LDX >CURFCB
2077
0704 D941 C6 10               LDB #$10
2078
0705 D943 E7 88 22            STB $22,X
2079
0706 D946 39                 ZD946 RTS
2080
0707
2081
0708 D947 BD D7 87           ZD947 JSR >ZD787
2082
0709 D94A 8D EA               BSR ZD936
2083
0710 D94C 25 F8               BCS ZD946
2084
0711 D94E C6 06               LDB #$06
2085
0712 D950 10 BE D4 0B         LDY >CURFCB
2086
0713 D954 BE D4 1B            LDX >ZD41B
2087
0714 D957 A6 80              ZD957 LDA ,X+
2088
0715 D959 A7 A8 5D            STA $5D,Y
2089
0716 D95C 31 21               LEAY $01,Y
2090
0717 D95E 5A                  DECB
2091
0718 D95F 26 F6               BNE ZD957
2092
0719 D961 BD D6 9F            JSR >WRSECT
2093
0720 D964 24 E0               BCC ZD946
2094
0721 D966 7E DB C1            JMP >ZDBC1
2095
0722                         *
2096
0723                         **
2097
0724                         *
2098
0725 D969 BE D4 0B           RESV1 LDX >CURFCB
2099
0726 D96C 86 02               LDA #$02
2100
0727 D96E A7 02               STA $02,X
2101
0728 D970 EC 88 2F            LDD $2F,X
2102
0729 D973 ED 88 1E            STD $1E,X
2103
0730 D976 BD D6 41            JSR >RDSECT
2104
0731 D979 25 08               BCS ZD983
2105
0732 D97B BD D8 76            JSR >PUTREC
2106
0733 D97E 24 05               BCC ZD985
2107
0734 D980 7E DB C1            JMP >ZDBC1
2108
0735
2109
0736 D983 C6 0A              ZD983 LDB #$0A
2110
0737 D985 39                 ZD985 RTS
2111
0738                         *
2112
0739                         ** OPEN FOR READ
2113
0740                         *
2114
0741 D986 BD D4 FA           OPENRD JSR >ZD4FA
2115
0742 D989 25 3D               BCS ZD9C8
2116
0743 D98B BD D8 92            JSR >ZD892
2117
0744 D98E 25 38               BCS ZD9C8
2118
0745 D990 26 3B               BNE ZD9CD
2119
0746 D992 BE D4 0B            LDX >CURFCB
2120
0747 D995 7D D4 1A            TST >ZD41A
2121
0748 D998 27 06               BEQ ZD9A0
2122
0749 D99A A6 0F               LDA $0F,X
2123
0750 D99C 85 20               BITA #$20
2124
0751 D99E 26 29               BNE ZD9C9
2125
0752 D9A0 BD DC C0           ZD9A0 JSR >ZDCC0
2126
0753 D9A3 25 2A               BCS ZD9CF
2127
0754 D9A5 EC 88 11            LDD $11,X
2128
0755 D9A8 ED 88 40            STD $40,X
2129
0756 D9AB BD DA 76            JSR >ZDA76
2130
0757 D9AE E6 88 17            LDB $17,X
2131
0758 D9B1 27 13               BEQ ZD9C6
2132
0759 D9B3 34 04              ZD9B3 PSHS B
2133
0760 D9B5 BD D6 0C            JSR >ZD60C
2134
0761 D9B8 35 04               PULS B
2135
0762 D9BA 25 0C               BCS ZD9C8
2136
0763 D9BC 5A                  DECB
2137
0764 D9BD 26 F4               BNE ZD9B3
2138
0765 D9BF BE D4 0B            LDX >CURFCB
2139
0766 D9C2 5F                  CLRB
2140
0767 D9C3 E7 88 22            STB $22,X
2141
0768 D9C6 1C FE              ZD9C6 ANDCC #$FE
2142
0769 D9C8 39                 ZD9C8 RTS
2143
0770
2144
0771 D9C9 C6 11              ZD9C9 LDB #$11
2145
0772 D9CB 20 02               BRA ZD9CF
2146
0773
2147
0774 D9CD C6 04              ZD9CD LDB #$04
2148
0775 D9CF 34 04              ZD9CF PSHS B
2149
0776 D9D1 BD D5 0C            JSR >ZD50C
2150
0777 D9D4 35 04               PULS B
2151
0778 D9D6 1A 01               ORCC #$01
2152
0779 D9D8 39                  RTS
2153
0780
2154
0781 D9D9 BE D4 0B           OPENWR LDX >CURFCB
2155
0782 D9DC 6D 03               TST $03,X
2156
0783 D9DE 2A 08               BPL ZD9E8
2157
0784 D9E0 BD DD BD            JSR >NXTDRV
2158
0785 D9E3 24 03               BCC ZD9E8
2159
0786 D9E5 C6 10               LDB #$10
2160
0787 D9E7 39                  RTS
2161
0788
2162
0789 D9E8 BD D4 FA           ZD9E8 JSR >ZD4FA
2163
0790 D9EB 25 E2               BCS ZD9CF
2164
0791 D9ED BD D5 37            JSR >ZD537
2165
0792 D9F0 BD D9 17            JSR >ZD917
2166
0793 D9F3 25 DA               BCS ZD9CF
2167
0794 D9F5 BD D8 92            JSR >ZD892
2168
0795 D9F8 25 D5               BCS ZD9CF
2169
0796 D9FA 26 04               BNE ZDA00
2170
0797 D9FC C6 03               LDB #$03
2171
0798 D9FE 20 CF               BRA ZD9CF
2172
0799
2173
0800 DA00 BD DC C0           ZDA00 JSR >ZDCC0
2174
0801 DA03 25 CA               BCS ZD9CF
2175
0802 DA05 BE D4 0B            LDX >CURFCB
2176
0803 DA08 C6 0A               LDB #$0A
2177
0804 DA0A 6F 0F              ZDA0A CLR $0F,X
2178
0805 DA0C 30 01               LEAX $01,X
2179
0806 DA0E 5A                  DECB
2180
0807 DA0F 26 F9               BNE ZDA0A
2181
0808 DA11 BE D4 0B            LDX >CURFCB
2182
0809 DA14 EC 88 32            LDD $32,X
2183
0810 DA17 27 27               BEQ ZDA40
2184
0811 DA19 ED 88 2F            STD $2F,X
2185
0812 DA1C A6 88 34            LDA $34,X
2186
0813 DA1F A7 88 31            STA $31,X
2187
0814 DA22 FC CC 0E            LDD >DATERG
2188
0815 DA25 ED 88 19            STD $19,X
2189
0816 DA28 B6 CC 10            LDA >YEAR
2190
0817 DA2B A7 88 1B            STA $1B,X
2191
0818 DA2E BD DD AD            JSR >ZDDAD
2192
0819 DA31 BD D9 69            JSR >RESV1
2193
0820 DA34 25 99               BCS ZD9CF
2194
0821 DA36 8D 3E               BSR ZDA76
2195
0822 DA38 86 04               LDA #$04
2196
0823 DA3A A7 88 22            STA $22,X
2197
0824 DA3D 1C FE               ANDCC #$FE
2198
0825 DA3F 39                  RTS
2199
0826
2200
0827 DA40 BE D4 0B           ZDA40 LDX >CURFCB
2201
0828 DA43 6F 88 17            CLR $17,X
2202
0829 DA46 6C 88 12            INC $12,X
2203
0830 DA49 EC 88 2F            LDD $2F,X
2204
0831 DA4C BD D6 20            JSR >ZD620
2205
0832 DA4F 25 0D               BCS ZDA5E
2206
0833 DA51 BD D7 72            JSR >ZD772
2207
0834 DA54 25 08               BCS ZDA5E
2208
0835 DA56 BD D6 9F            JSR >WRSECT
2209
0836 DA59 24 06               BCC ZDA61
2210
0837 DA5B BD DB C1            JSR >ZDBC1
2211
0838 DA5E 7E D9 CF           ZDA5E JMP >ZD9CF
2212
0839
2213
0840 DA61 BE D4 0B           ZDA61 LDX >CURFCB
2214
0841 DA64 EC 88 1E            LDD $1E,X
2215
0842 DA67 ED 88 32            STD $32,X
2216
0843 DA6A 86 10               LDA #$10
2217
0844 DA6C A7 88 34            STA $34,X
2218
0845 DA6F BD D9 47            JSR >ZD947
2219
0846 DA72 25 EA               BCS ZDA5E
2220
0847 DA74 20 8A               BRA ZDA00
2221
0848
2222
0849 DA76 BE D4 0B           ZDA76 LDX >CURFCB
2223
0850 DA79 A6 84               LDA ,X
2224
0851 DA7B A7 02               STA $02,X
2225
0852 DA7D 6F 84               CLR ,X
2226
0853 DA7F 6F 88 3B            CLR $3B,X
2227
0854 DA82 4F                  CLRA
2228
0855 DA83 A7 88 22            STA $22,X
2229
0856 DA86 39                  RTS
2230
0857                         *
2231
0858                         ** READ/WRITE NEXT SECTOR
2232
0859                         *
2233
0860 DA87 8D 28              NXTSEC BSR ZDAB1
2234
0861 DA89 25 0E               BCS ZDA99
2235
0862 DA8B 6F 84               CLR ,X
2236
0863 DA8D 44                  LSRA
2237
0864 DA8E 10 25 FB 7A         LBCS ZD60C
2238
0865 DA92 C6 04               LDB #$04
2239
0866 DA94 E7 88 22            STB $22,X
2240
0867 DA97 1C FE               ANDCC #$FE
2241
0868 DA99 39                 ZDA99 RTS
2242
0869
2243
0870 DA9A BE D4 0B           ZDA9A LDX >CURFCB
2244
0871 DA9D A6 02               LDA $02,X
2245
0872 DA9F 81 83               CMPA #$83
2246
0873 DAA1 26 0B               BNE ZDAAE
2247
0874 DAA3 86 03               LDA #$03
2248
0875 DAA5 A7 02               STA $02,X
2249
0876 DAA7 BD D6 9F           ZDAA7 JSR >WRSECT
2250
0877 DAAA 10 25 01 13         LBCS ZDBC1
2251
0878 DAAE 1C FE              ZDAAE ANDCC #$FE
2252
0879 DAB0 39                  RTS
2253
0880
2254
0881 DAB1 8D E7              ZDAB1 BSR ZDA9A
2255
0882 DAB3 25 0D               BCS ZDAC2
2256
0883 DAB5 BE D4 0B            LDX >CURFCB
2257
0884 DAB8 A6 02               LDA $02,X
2258
0885 DABA 81 03               CMPA #$03
2259
0886 DABC 23 F0               BLS ZDAAE
2260
0887 DABE C6 12               LDB #$12
2261
0888 DAC0 1A 01               ORCC #$01
2262
0889 DAC2 39                 ZDAC2 RTS
2263
0890
2264
0891 DAC3 8D EC              CLOSE BSR ZDAB1
2265
0892 DAC5 25 31               BCS ZDAF8
2266
0893 DAC7 81 02               CMPA #$02
2267
0894 DAC9 27 08               BEQ ZDAD3
2268
0895 DACB BE D4 0B           ZDACB LDX >CURFCB
2269
0896 DACE 6F 02               CLR $02,X
2270
0897 DAD0 7E D5 0C            JMP >ZD50C
2271
0898
2272
0899 DAD3 A6 88 12           ZDAD3 LDA $12,X
2273
0900 DAD6 26 05               BNE ZDADD
2274
0901 DAD8 BD DB A7            JSR >ZDBA7
2275
0902 DADB 20 19               BRA ZDAF6
2276
0903
2277
0904 DADD 8D C8              ZDADD BSR ZDAA7
2278
0905 DADF 25 17               BCS ZDAF8
2279
0906 DAE1 BE D4 0B            LDX >CURFCB
2280
0907 DAE4 6D 88 17            TST $17,X
2281
0908 DAE7 27 05               BEQ ZDAEE
2282
0909 DAE9 BD DC 98            JSR >ZDC98
2283
0910 DAEC 25 0A               BCS ZDAF8
2284
0911 DAEE BD D9 69           ZDAEE JSR >RESV1
2285
0912 DAF1 25 05               BCS ZDAF8
2286
0913 DAF3 BD D9 47            JSR >ZD947
2287
0914 DAF6 24 D3              ZDAF6 BCC ZDACB
2288
0915 DAF8 39                 ZDAF8 RTS
2289
0916                         *
2290
0917                         ** OPEN FOR UPDATE
2291
0918                         *
2292
0919 DAF9 BD D9 86           OPENUD JSR >OPENRD
2293
0920 DAFC 25 28               BCS ZDB26
2294
0921 DAFE BD D6 0C            JSR >ZD60C
2295
0922 DB01 25 23               BCS ZDB26
2296
0923 DB03 86 03               LDA #$03
2297
0924 DB05 20 18               BRA ZDB1F
2298
0925                         *
2299
0926                         **
2300
0927                         *
2301
0928 DB07 BD D9 86           RESV3 JSR >OPENRD
2302
0929 DB0A 25 1A               BCS ZDB26
2303
0930 DB0C BE D4 0B            LDX >CURFCB
2304
0931 DB0F A6 0F               LDA $0F,X
2305
0932 DB11 85 80               BITA #$80
2306
0933 DB13 26 12               BNE ZDB27
2307
0934 DB15 EC 88 13            LDD $13,X
2308
0935 DB18 BD D6 20            JSR >ZD620
2309
0936 DB1B 25 09               BCS ZDB26
2310
0937 DB1D 86 02               LDA #$02
2311
0938 DB1F BE D4 0B           ZDB1F LDX >CURFCB
2312
0939 DB22 A7 02               STA $02,X
2313
0940 DB24 1C FE               ANDCC #$FE
2314
0941 DB26 39                 ZDB26 RTS
2315
0942
2316
0943 DB27 C6 0B              ZDB27 LDB #$0B
2317
0944 DB29 1A 01               ORCC #$01
2318
0945 DB2B 39                  RTS
2319
0946                         *
2320
0947                         ** RENAME FILE
2321
0948                         *
2322
0949 DB2C 8D 35              RENAME BSR ZDB63
2323
0950 DB2E BD D8 92            JSR >ZD892
2324
0951 DB31 25 2A               BCS ZDB5D
2325
0952 DB33 27 24               BEQ ZDB59
2326
0953 DB35 BE D4 0B            LDX >CURFCB
2327
0954 DB38 C6 0B               LDB #$0B
2328
0955 DB3A A6 88 24           ZDB3A LDA $24,X
2329
0956 DB3D A7 04               STA $04,X
2330
0957 DB3F 30 01               LEAX $01,X
2331
0958 DB41 5A                  DECB
2332
0959 DB42 26 F6               BNE ZDB3A
2333
0960 DB44 8D 4D               BSR ZDB93
2334
0961 DB46 25 15               BCS ZDB5D
2335
0962 DB48 BE D4 0B            LDX >CURFCB
2336
0963 DB4B A6 0F               LDA $0F,X
2337
0964 DB4D 85 80               BITA #$80
2338
0965 DB4F 26 D6               BNE ZDB27
2339
0966 DB51 85 60               BITA #$60
2340
0967 DB53 26 09               BNE ZDB5E
2341
0968 DB55 8D 0C               BSR ZDB63
2342
0969 DB57 20 55               BRA ZDBAE
2343
0970
2344
0971 DB59 C6 03              ZDB59 LDB #$03
2345
0972 DB5B 1A 01               ORCC #$01
2346
0973 DB5D 39                 ZDB5D RTS
2347
0974 DB5E C6 0C              ZDB5E LDB #$0C
2348
0975 DB60 1A 01               ORCC #$01
2349
0976 DB62 39                  RTS
2350
0977
2351
0978 DB63 BE D4 0B           ZDB63 LDX >CURFCB
2352
0979 DB66 86 0B               LDA #$0B
2353
0980 DB68 B7 D4 11            STA >ZD411
2354
0981 DB6B A6 04              ZDB6B LDA $04,X
2355
0982 DB6D E6 88 35            LDB $35,X
2356
0983 DB70 A7 88 35            STA $35,X
2357
0984 DB73 E7 04               STB $04,X
2358
0985 DB75 30 01               LEAX $01,X
2359
0986 DB77 7A D4 11            DEC >ZD411
2360
0987 DB7A 26 EF               BNE ZDB6B
2361
0988 DB7C BE D4 0B            LDX >CURFCB
2362
0989 DB7F A6 0C               LDA $0C,X
2363
0990 DB81 26 0C               BNE ZDB8F
2364
0991 DB83 C6 03               LDB #$03
2365
0992 DB85 A6 88 3D           ZDB85 LDA $3D,X
2366
0993 DB88 A7 0C               STA $0C,X
2367
0994 DB8A 30 01               LEAX $01,X
2368
0995 DB8C 5A                  DECB
2369
0996 DB8D 26 F6               BNE ZDB85
2370
0997 DB8F BE D4 0B           ZDB8F LDX >CURFCB
2371
0998 DB92 39                  RTS
2372
0999
2373
1000 DB93 8D CE              ZDB93 BSR ZDB63
2374
1001 DB95 BD D8 92           ZDB95 JSR >ZD892
2375
1002 DB98 25 07               BCS ZDBA1
2376
1003 DB9A 26 06               BNE ZDBA2
2377
1004 DB9C BE D4 0B            LDX >CURFCB
2378
1005 DB9F 1C FE               ANDCC #$FE
2379
1006 DBA1 39                 ZDBA1 RTS
2380
1007
2381
1008 DBA2 C6 04              ZDBA2 LDB #$04
2382
1009 DBA4 1A 01               ORCC #$01
2383
1010 DBA6 39                  RTS
2384
1011
2385
1012 DBA7 BE D4 0B           ZDBA7 LDX >CURFCB
2386
1013 DBAA 86 FF               LDA #$FF
2387
1014 DBAC A7 04               STA $04,X
2388
1015 DBAE BD D9 69           ZDBAE JSR >RESV1
2389
1016 DBB1 BE D4 0B            LDX >CURFCB
2390
1017 DBB4 86 00               LDA #$00
2391
1018 DBB6 A7 02               STA $02,X
2392
1019 DBB8 39                  RTS
2393
1020
2394
1021 DBB9 ED 88 40           ZDBB9 STD $40,X
2395
1022 DBBC BD D6 9F            JSR >WRSECT
2396
1023 DBBF 24 14               BCC ZDBD5
2397
1024 DBC1 C5 40              ZDBC1 BITB #$40
2398
1025 DBC3 26 08               BNE ZDBCD
2399
1026 DBC5 C5 80               BITB #$80
2400
1027 DBC7 27 0A               BEQ ZDBD3
2401
1028 DBC9 C6 10               LDB #$10
2402
1029 DBCB 20 06               BRA ZDBD3
2403
1030 DBCD C6 0B              ZDBCD LDB #$0B
2404
1031 DBCF 20 02               BRA ZDBD3
2405
1032
2406
1033 DBD1 C6 0A               LDB #$0A
2407
1034 DBD3 1A 01              ZDBD3 ORCC #$01
2408
1035 DBD5 39                 ZDBD5 RTS
2409
1036                         *
2410
1037                         ** DELETE FILE
2411
1038                         *
2412
1039 DBD6 BD D9 17           DELETE JSR >ZD917
2413
1040 DBD9 25 5E               BCS ZDC39
2414
1041 DBDB 8D B8               BSR ZDB95
2415
1042 DBDD 25 5A               BCS ZDC39
2416
1043 DBDF BE D4 0B            LDX >CURFCB
2417
1044 DBE2 A6 0F               LDA $0F,X
2418
1045 DBE4 85 80               BITA #$80
2419
1046 DBE6 26 52               BNE ZDC3A
2420
1047 DBE8 85 60               BITA #$60
2421
1048 DBEA 26 52               BNE ZDC3E
2422
1049 DBEC BD D7 87            JSR >ZD787
2423
1050 DBEF BE D4 1B            LDX >ZD41B
2424
1051 DBF2 EC 02               LDD $02,X
2425
1052 DBF4 26 0F               BNE ZDC05
2426
1053 DBF6 BE D4 0B            LDX >CURFCB
2427
1054 DBF9 EC 88 11            LDD $11,X
2428
1055 DBFC 27 33               BEQ ZDC31
2429
1056 DBFE BE D4 1B            LDX >ZD41B
2430
1057 DC01 ED 84               STD ,X
2431
1058 DC03 20 14               BRA ZDC19
2432
1059
2433
1060 DC05 BE D4 0B           ZDC05 LDX >CURFCB
2434
1061 DC08 BD D6 20            JSR >ZD620
2435
1062 DC0B 25 2C               BCS ZDC39
2436
1063 DC0D BE D4 0B            LDX >CURFCB
2437
1064 DC10 EC 88 11            LDD $11,X
2438
1065 DC13 27 1C               BEQ ZDC31
2439
1066 DC15 8D A2               BSR ZDBB9
2440
1067 DC17 25 20               BCS ZDC39
2441
1068 DC19 BE D4 0B           ZDC19 LDX >CURFCB
2442
1069 DC1C EC 88 13            LDD $13,X
2443
1070 DC1F BE D4 1B            LDX >ZD41B
2444
1071 DC22 ED 02               STD $02,X
2445
1072 DC24 BE D4 0B            LDX >CURFCB
2446
1073 DC27 EC 88 15            LDD $15,X
2447
1074 DC2A BE D4 1B            LDX >ZD41B
2448
1075 DC2D E3 04               ADDD $04,X
2449
1076 DC2F ED 04               STD $04,X
2450
1077 DC31 BD DB A7           ZDC31 JSR >ZDBA7
2451
1078 DC34 25 03               BCS ZDC39
2452
1079 DC36 BD D9 47            JSR >ZD947
2453
1080 DC39 39                 ZDC39 RTS
2454
1081
2455
1082 DC3A C6 0B              ZDC3A LDB #$0B
2456
1083 DC3C 20 02               BRA ZDC40
2457
1084 DC3E C6 0C              ZDC3E LDB #$0C
2458
1085 DC40 1A 01              ZDC40 ORCC #$01
2459
1086 DC42 39                  RTS
2460
1087
2461
1088 DC43 EC 88 1E           ZDC43 LDD $1E,X
2462
1089 DC46 5C                  INCB
2463
1090 DC47 E1 88 3C            CMPB $3C,X
2464
1091 DC4A 23 03               BLS ZDC4F
2465
1092 DC4C C6 01               LDB #$01
2466
1093 DC4E 4C                  INCA
2467
1094 DC4F 10 A3 88 13        ZDC4F CMPD $13,X
2468
1095 DC53 26 0E               BNE ZDC63
2469
1096 DC55 A6 88 37            LDA $37,X
2470
1097 DC58 81 FF               CMPA #$FF
2471
1098 DC5A 27 07               BEQ ZDC63
2472
1099 DC5C 4C                  INCA
2473
1100 DC5D A7 88 37            STA $37,X
2474
1101 DC60 1C FE               ANDCC #$FE
2475
1102 DC62 39                  RTS
2476
1103
2477
1104 DC63 8D 33              ZDC63 BSR ZDC98
2478
1105 DC65 25 30               BCS ZDC97
2479
1106 DC67 BE D4 0B            LDX >CURFCB
2480
1107 DC6A A6 88 3A            LDA $3A,X
2481
1108 DC6D 8B 03               ADDA #$03
2482
1109 DC6F 26 16               BNE ZDC87
2483
1110 DC71 EC 88 1E            LDD $1E,X
2484
1111 DC74 10 A3 88 11         CMPD $11,X
2485
1112 DC78 27 05               BEQ ZDC7F
2486
1113 DC7A C6 17               LDB #$17
2487
1114 DC7C 1A 01               ORCC #$01
2488
1115 DC7E 39                  RTS
2489
1116
2490
1117 DC7F EC 88 40           ZDC7F LDD $40,X
2491
1118 DC82 ED 88 38           ZDC82 STD $38,X
2492
1119 DC85 86 04               LDA #$04
2493
1120 DC87 A7 88 3A           ZDC87 STA $3A,X
2494
1121 DC8A EC 88 13            LDD $13,X
2495
1122 DC8D ED 88 35            STD $35,X
2496
1123 DC90 86 01               LDA #$01
2497
1124 DC92 A7 88 37            STA $37,X
2498
1125 DC95 1C FE               ANDCC #$FE
2499
1126 DC97 39                 ZDC97 RTS
2500
1127
2501
1128 DC98 EC 88 38           ZDC98 LDD $38,X
2502
1129 DC9B BD D6 20            JSR >ZD620
2503
1130 DC9E 25 F7               BCS ZDC97
2504
1131 DCA0 BE D4 0B            LDX >CURFCB
2505
1132 DCA3 1F 12               TFR X,Y
2506
1133 DCA5 E6 88 3A            LDB $3A,X
2507
1134 DCA8 3A                  ABX
2508
1135 DCA9 C6 03               LDB #$03
2509
1136 DCAB A6 A8 35           ZDCAB LDA $35,Y
2510
1137 DCAE 31 21               LEAY $01,Y
2511
1138 DCB0 A7 88 40            STA $40,X
2512
1139 DCB3 30 01               LEAX $01,X
2513
1140 DCB5 5A                  DECB
2514
1141 DCB6 26 F3               BNE ZDCAB
2515
1142 DCB8 BD D6 9F            JSR >WRSECT
2516
1143 DCBB 24 DA               BCC ZDC97
2517
1144 DCBD 7E DB C1            JMP >ZDBC1
2518
1145
2519
1146 DCC0 BD D8 10           ZDCC0 JSR >OPNREC
2520
1147 DCC3 BD D6 0C            JSR >ZD60C
2521
1148 DCC6 25 46               BCS ZDD0E
2522
1149 DCC8 BE D4 0B            LDX >CURFCB
2523
1150 DCCB 4F                  CLRA
2524
1151 DCCC 5F                  CLRB
2525
1152 DCCD ED 88 20            STD $20,X
2526
1153 DCD0 A6 88 67            LDA $67,X
2527
1154 DCD3 A7 88 3C            STA $3C,X
2528
1155 DCD6 5F                  CLRB
2529
1156 DCD7 6F 88 40           ZDCD7 CLR $40,X
2530
1157 DCDA 30 01               LEAX $01,X
2531
1158 DCDC 5A                  DECB
2532
1159 DCDD 26 F8               BNE ZDCD7
2533
1160 DCDF BE D4 0B            LDX >CURFCB
2534
1161 DCE2 1C FE               ANDCC #$FE
2535
1162 DCE4 39                  RTS
2536
1163                         *
2537
1164                         ** BACKUP ONE RECORD
2538
1165                         *
2539
1166 DCE5 BE D4 0B           BAKREC LDX >CURFCB
2540
1167 DCE8 A6 88 17            LDA $17,X
2541
1168 DCEB 27 1D               BEQ ZDD0A
2542
1169 DCED EC 88 20            LDD $20,X
2543
1170 DCF0 83 00 01            SUBD #$0001
2544
1171 DCF3 2A 03               BPL ZDCF8
2545
1172 DCF5 7E DD 9A            JMP >ZDD9A
2546
1173                         *
2547
1174                         ** POSITION TO RECORD N
2548
1175                         *
2549
1176 DCF8 ED 88 20           ZDCF8 STD $20,X
2550
1177 DCFB BD DA B1           POSREC JSR >ZDAB1
2551
1178 DCFE 25 0E               BCS ZDD0E
2552
1179 DD00 46                  RORA
2553
1180 DD01 24 07               BCC ZDD0A
2554
1181 DD03 6F 84               CLR ,X
2555
1182 DD05 A6 88 17            LDA $17,X
2556
1183 DD08 26 05               BNE ZDD0F
2557
1184 DD0A C6 12              ZDD0A LDB #$12
2558
1185 DD0C 1A 01               ORCC #$01
2559
1186 DD0E 39                 ZDD0E RTS
2560
1187
2561
1188 DD0F 7F D4 11           ZDD0F CLR >ZD411
2562
1189 DD12 EC 88 11            LDD $11,X
2563
1190 DD15 10 AE 88 20         LDY $20,X
2564
1191 DD19 27 6A               BEQ ZDD85
2565
1192 DD1B BD DD 9F            JSR >ZDD9F
2566
1193 DD1E 25 EE               BCS ZDD0E
2567
1194 DD20 4F                  CLRA
2568
1195 DD21 5F                  CLRB
2569
1196 DD22 6D 02              ZDD22 TST $02,X
2570
1197 DD24 27 74               BEQ ZDD9A
2571
1198 DD26 EB 02               ADDB $02,X
2572
1199 DD28 89 00               ADCA #$00
2573
1200 DD2A BF D4 0F            STX >ZD40F
2574
1201 DD2D BE D4 0B            LDX >CURFCB
2575
1202 DD30 10 A3 88 20         CMPD $20,X
2576
1203 DD34 24 2C               BCC ZDD62
2577
1204 DD36 BE D4 0F            LDX >ZD40F
2578
1205 DD39 30 03               LEAX $03,X
2579
1206 DD3B 34 02               PSHS A
2580
1207 DD3D B6 D4 11            LDA >ZD411
2581
1208 DD40 4C                  INCA
2582
1209 DD41 B7 D4 11            STA >ZD411
2583
1210 DD44 81 54               CMPA #$54
2584
1211 DD46 27 08               BEQ ZDD50
2585
1212 DD48 81 A8               CMPA #$A8
2586
1213 DD4A 35 02               PULS A
2587
1214 DD4C 27 4C               BEQ ZDD9A
2588
1215 DD4E 20 D2               BRA ZDD22
2589
1216
2590
1217 DD50 34 04              ZDD50 PSHS B
2591
1218 DD52 BE D4 0B            LDX >CURFCB
2592
1219 DD55 EC 88 40            LDD $40,X
2593
1220 DD58 8D 45               BSR ZDD9F
2594
1221 DD5A 25 3E               BCS ZDD9A
2595
1222 DD5C 35 04               PULS B
2596
1223 DD5E 35 02               PULS A
2597
1224 DD60 20 C0               BRA ZDD22
2598
1225
2599
1226 DD62 A3 88 20           ZDD62 SUBD $20,X
2600
1227 DD65 BE D4 0F            LDX >ZD40F
2601
1228 DD68 A6 02               LDA $02,X
2602
1229 DD6A 34 04               PSHS B
2603
1230 DD6C A0 E0               SUBA ,S+
2604
1231 DD6E 4A                  DECA
2605
1232 DD6F 1F 89               TFR A,B
2606
1233 DD71 A6 84               LDA ,X
2607
1234 DD73 EB 01               ADDB $01,X
2608
1235 DD75 BE D4 0B            LDX >CURFCB
2609
1236 DD78 25 05               BCS ZDD7F
2610
1237 DD7A E1 88 3C           ZDD7A CMPB $3C,X
2611
1238 DD7D 23 06               BLS ZDD85
2612
1239 DD7F E0 88 3C           ZDD7F SUBB $3C,X
2613
1240 DD82 4C                  INCA
2614
1241 DD83 20 F5               BRA ZDD7A
2615
1242
2616
1243 DD85 BD D6 20           ZDD85 JSR >ZD620
2617
1244 DD88 25 14               BCS ZDD9E
2618
1245 DD8A BE D4 0B            LDX >CURFCB
2619
1246 DD8D EC 88 42            LDD $42,X
2620
1247 DD90 10 A3 88 20         CMPD $20,X
2621
1248 DD94 27 14               BEQ ZDDAA
2622
1249 DD96 C6 19               LDB #$19
2623
1250 DD98 20 02               BRA ZDD9C
2624
1251
2625
1252 DD9A C6 18              ZDD9A LDB #$18
2626
1253 DD9C 1A 01              ZDD9C ORCC #$01
2627
1254 DD9E 39                 ZDD9E RTS
2628
1255
2629
1256 DD9F BD D6 20           ZDD9F JSR >ZD620
2630
1257 DDA2 25 08               BCS ZDDAC
2631
1258 DDA4 BE D4 0B            LDX >CURFCB
2632
1259 DDA7 C6 44               LDB #$44
2633
1260 DDA9 3A                  ABX
2634
1261 DDAA 1C FE              ZDDAA ANDCC #$FE
2635
1262 DDAC 39                 ZDDAC RTS
2636
1263
2637
1264 DDAD BE D4 0B           ZDDAD LDX >CURFCB
2638
1265 DDB0 C6 0B               LDB #$0B
2639
1266 DDB2 A6 88 24           ZDDB2 LDA $24,X
2640
1267 DDB5 A7 04               STA $04,X
2641
1268 DDB7 30 01               LEAX $01,X
2642
1269 DDB9 5A                  DECB
2643
1270 DDBA 26 F6               BNE ZDDB2
2644
1271 DDBC 39                  RTS
2645
1272                         *
2646
1273                         ** FIND NEXT DRIVE
2647
1274                         *
2648
1275 DDBD BE D4 0B           NXTDRV LDX >CURFCB
2649
1276 DDC0 A6 03               LDA $03,X
2650
1277 DDC2 4C                  INCA
2651
1278 DDC3 81 04               CMPA #$04
2652
1279 DDC5 24 0F               BCC ZDDD6
2653
1280 DDC7 A7 03               STA $03,X
2654
1281 DDC9 26 05               BNE ZDDD0
2655
1282 DDCB BD DE 0F            JSR >DRVRDY
2656
1283 DDCE 20 03               BRA ZDDD3
2657
1284
2658
1285 DDD0 BD DE 12           ZDDD0 JSR >QUICK
2659
1286 DDD3 25 E8              ZDDD3 BCS NXTDRV
2660
1287 DDD5 39                  RTS
2661
1288
2662
1289 DDD6 C6 10              ZDDD6 LDB #$10
2663
1290 DDD8 1A 01               ORCC #$01
2664
1291 DDDA 39                  RTS
2665
0011                          END
2666
0000                          INCLUDE "f9-cfdsk.txt"
2667
0001                         *
2668
0002                         ** FLEX 9 COMPACT FLASH DISK DRIVERS
2669
0003                         *
2670
0004                         * FOR SYS09BUG 1.2 ON THE BURCHED B5-X300
2671
0005                         * WITH I/O MAPPED AT $XE000
2672
0006                         * AND ROM MAPPED AT $XF000
2673
0007                         * THE BURCHED B5-X300 HAS 256KBYTES OF SRAM
2674
0008                         * THE FIRST 64K IS USED BY FLEX,
2675
0009                         * THE SECOND 192K MAY BE USED AS A RAM DISK
2676
0010                         *
2677
0011                         *
2678
0012 0010                    IMASK  EQU $10     IRQ MASK CC
2679
0013 0040                    FMASK  EQU $40     FIRQ MASK CC
2680
0014 FFF0                    DATREG EQU $FFF0   DAT REGISTERS
2681
0015                         *
2682
0016 E040                    CF_BASE    EQU $E040
2683
0017 E040                    CF_DATA    EQU CF_BASE+0
2684
0018 E041                    CF_ERROR   EQU CF_BASE+1 ; read error
2685
0019 E041                    CF_FEATURE EQU CF_BASE+1 ; write feature
2686
0020 E042                    CF_SECCNT  EQU CF_BASE+2
2687
0021 E043                    CF_SECNUM  EQU CF_BASE+3
2688
0022 E044                    CF_CYLLO   EQU CF_BASE+4
2689
0023 E045                    CF_CYLHI   EQU CF_BASE+5
2690
0024 E046                    CF_HEAD    EQU CF_BASE+6
2691
0025 E047                    CF_STATUS  EQU CF_BASE+7 ; read status
2692
0026 E047                    CF_COMAND  EQU CF_BASE+7 ; write command
2693
0027                         *
2694
0028                         * Command Equates
2695
0029                         *
2696
0030 0020                    CMDREAD    EQU $20 ; Read Single sector
2697
0031 0030                    CMDWRITE   EQU $30 ; Write Single sector
2698
0032 00EF                    CMDFEATURE EQU $EF
2699
0033 0001                    FEAT8BIT   EQU $01 ; enable 8 bit transfers
2700
0034 00E0                    HEADLBA    EQU $E0
2701
0035                         *
2702
0036                         * Status bit equates
2703
0037                         *
2704
0038 0080                    BSY        EQU $80
2705
0039 0040                    DRDY       EQU $40
2706
0040 0008                    DRQ        EQU $08
2707
0041 0001                    ERR        EQU $01
2708
0042 DE00                           ORG   $DE00
2709
0043                         *
2710
0044                         * DISK DRIVER JUMP TABLE
2711
0045                         *
2712
0046 DE00 7E DE 4B           READ   JMP   READSC
2713
0047 DE03 7E DE 6C           WRITE  JMP   WRITSC
2714
0048 DE06 7E DE 8E           VERIFY JMP   BUSY
2715
0049 DE09 7E DE 32           RESTOR JMP   RESTR1
2716
0050 DE0C 7E DE 90           DRIVE  JMP   DRVSEL
2717
0051 DE0F 7E DE 9C           DRVRDY JMP   CHKDRV
2718
0052 DE12 7E DE 9C           QUICK  JMP   CHKDRV
2719
0053 DE15 7E DE 1F           COLDDR JMP   INITDR
2720
0054 DE18 7E DE 4A           WARMDR JMP   WARMD1
2721
0055 DE1B 7E DE 37           SEEK   JMP   SEEKTS
2722
0056                         *
2723
0057                         * RAM SPACE
2724
0058                         *
2725
0059 DE1E 00                 DRVNUM FCB   0
2726
0060                         *
2727
0061                         *
2728
0062                         * INITIALIZE CF CARD FOR 8 BIT LBA MODE
2729
0063                         *
2730
0064 DE1F 8D 7F              INITDR BSR WAITRDY
2731
0065 DE21 86 E0                     LDA  #HEADLBA
2732
0066 DE23 B7 E0 46                  STA  CF_HEAD
2733
0067 DE26 86 01                     LDA #FEAT8BIT
2734
0068 DE28 B7 E0 41                  STA CF_FEATURE
2735
0069 DE2B 86 EF                     LDA #CMDFEATURE
2736
0070 DE2D B7 E0 47                  STA CF_COMAND
2737
0071 DE30 20 6E                     BRA WAITRDY
2738
0072                         *
2739
0073                         * RESTORE DISK DRIVER (SEEK TRACK 00)
2740
0074                         *
2741
0075 DE32 8D 5C              RESTR1 BSR   DRVSEL
2742
0076 DE34 4F                        CLRA           ; Track 0
2743
0077 DE35 C6 01                     LDB   #$01     ; Sector 1
2744
0078                         *
2745
0079                         * Seek track and sector
2746
0080                         * A holds track number (0 - ??)
2747
0081                         * B holds sector number (1 - ??)
2748
0082                         * Sector numbers starts from 1
2749
0083                         * subtract 1 to start from sector 0 on CF
2750
0084                         *
2751
0085 DE37 5A                 SEEKTS DECB
2752
0086 DE38 F7 E0 43                  STB  CF_SECNUM
2753
0087 DE3B B7 E0 44                  STA  CF_CYLLO
2754
0088 DE3E F6 DE 1E                  LDB  DRVNUM
2755
0089 DE41 F7 E0 45                  STB  CF_CYLHI
2756
0090 DE44 C6 01                     LDB  #$01
2757
0091 DE46 F7 E0 42                  STB  CF_SECCNT
2758
0092 DE49 5F                        CLRB
2759
0093 DE4A 39                 WARMD1 RTS
2760
0094                         *
2761
0095                         * READ SECTORS FROM CF
2762
0096                         *
2763
0097                         *
2764
0098 DE4B 8D EA              READSC BSR  SEEKTS
2765
0099 DE4D 86 20                     LDA  #CMDREAD ; IDE READ MULTIPLE
2766
0100 DE4F B7 E0 47                  STA  CF_COMAND
2767
0101 DE52 8D 4C                     BSR  WAITRDY
2768
0102                         *
2769
0103                         * READ LOOP
2770
0104                         *
2771
0105 DE54 5F                        CLRB
2772
0106 DE55 8D 58              RDLP1  BSR  WAITDRQ
2773
0107 DE57 B6 E0 40                  LDA  CF_DATA
2774
0108 DE5A A7 80                     STA  ,X+
2775
0109 DE5C 5A                        DECB
2776
0110 DE5D 26 F6                     BNE  RDLP1
2777
0111                         *
2778
0112 DE5F 5F                        CLRB
2779
0113 DE60 8D 4D              RDLP2  BSR  WAITDRQ
2780
0114 DE62 B6 E0 40                  LDA  CF_DATA
2781
0115 DE65 5A                        DECB
2782
0116 DE66 26 F8                     BNE  RDLP2
2783
0117                         *
2784
0118 DE68 8D 36                     BSR  WAITRDY
2785
0119 DE6A 5F                        CLRB
2786
0120 DE6B 39                        RTS
2787
0121                         *
2788
0122                         * WRITE SECTOR TO CF
2789
0123                         *
2790
0124 DE6C 8D C9              WRITSC BSR  SEEKTS   ; SEEK TRACK & SECTOR
2791
0125 DE6E 86 30                     LDA  #CMDWRITE; IDE WRITE MULTIPLE
2792
0126 DE70 B7 E0 47                  STA  CF_COMAND
2793
0127 DE73 8D 2B                     BSR  WAITRDY
2794
0128                         *
2795
0129                         * WRITE LOOP
2796
0130                         *
2797
0131 DE75 5F                        CLRB
2798
0132 DE76 8D 37              WRTLP1 BSR  WAITDRQ
2799
0133 DE78 A6 80                     LDA  ,X+
2800
0134 DE7A B7 E0 40                  STA  CF_DATA
2801
0135 DE7D 5A                        DECB
2802
0136 DE7E 26 F6                     BNE  WRTLP1
2803
0137                         *
2804
0138 DE80 5F                        CLRB
2805
0139 DE81 8D 2C              WRTLP2 BSR  WAITDRQ
2806
0140 DE83 4F                        CLRA
2807
0141 DE84 B7 E0 40                  STA  CF_DATA
2808
0142 DE87 5A                        DECB
2809
0143 DE88 26 F7                     BNE WRTLP2
2810
0144                         *
2811
0145 DE8A 8D 14                     BSR  WAITRDY
2812
0146 DE8C 5F                        CLRB
2813
0147 DE8D 39                        RTS
2814
0148                         *
2815
0149                         * CHECK FOR BUSY
2816
0150                         * Doubles as VERIFY
2817
0151                         *
2818
0152 DE8E 5F                 BUSY   CLRB            Never busy
2819
0153 DE8F 39                        RTS
2820
0154                         *
2821
0155                         * DRIVE SELECT DISK DRIVER
2822
0156                         *
2823
0157 DE90 A6 03              DRVSEL LDA   3,X       GET DRIVE # FROM FCB
2824
0158 DE92 81 03                     CMPA  #3
2825
0159 DE94 23 01                     BLS   DRVS2     IF > 3, SET IT TO 0
2826
0160 DE96 4F                        CLRA
2827
0161 DE97 B7 DE 1E           DRVS2  STA   DRVNUM
2828
0162 DE9A 5F                        CLRB            ; SET Z, CLEAR C
2829
0163 DE9B 39                        RTS
2830
0164                         *
2831
0165                         * CHECK DRIVE READY DISK DRIVER
2832
0166                         *
2833
0167 DE9C A6 03              CHKDRV LDA  3,X
2834
0168 DE9E 5F                        CLRB             ; CLEAR C, SET Z
2835
0169 DE9F 39                        RTS
2836
0170                         *
2837
0171                         * WAIT UNTIL READY
2838
0172                         *
2839
0173 DEA0 B6 E0 47           WAITRDY LDA  CF_STATUS
2840
0174 DEA3 85 80                      BITA #BSY
2841
0175 DEA5 26 F9                      BNE  WAITRDY
2842
0176 DEA7 B6 E0 47                   LDA  CF_STATUS
2843
0177 DEAA 85 40                      BITA #DRDY
2844
0178 DEAC 27 F2                      BEQ  WAITRDY
2845
0179 DEAE 39                         RTS
2846
0180                         *
2847
0181                         * WAIT FOR DATA REQUEST
2848
0182                         *
2849
0183 DEAF B6 E0 47           WAITDRQ LDA  CF_STATUS
2850
0184 DEB2 85 08                      BITA #DRQ
2851
0185 DEB4 27 F9                      BEQ  WAITDRQ
2852
0186 DEB6 39                         RTS
2853
0187                         *
2854
0012                                 END
2855
0013                          END COLDS
2856
Program + Init Data = 5127 bytes
2857
Error count = 0

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.