1000 REM "Entries" 1010[OPT Pass 1020 1030.fsdie 1040 Rts 1050 1060.starcommand 1070.shell 1080 Ldy #ASC("X") 1090 Jsr transact 1100 Jsr CopyAll 1110 Sec 1120 Rts 1130 1140.rename 1150 Ldy #ASC("M") \ Check... 1160 Jsr transact 1170 Jsr verify 1180 Sec 1190 Rts 1191 1192.copy 1193 Ldy #ASC("T") \ Check... 1194 Jsr transact 1195 Jsr verify 1196 Sec 1197 Rts 1200 1210.lib 1220 Ldy #ASC("R") 1230 Jsr transact 1240 Jsr verify 1250 Sec 1260 Rts 1270 1280.setdef 1290 Ldy #ASC("D") 1300 Jsr transact 1310 Jsr verify 1320 Sec 1330 Rts 1340 1350.info 1370 \ Set up CB & call OSFILE 1380 Sec:Rts 1390 1400.delete 1410 Ldy #ASC("K") 1420 Jsr transact 1430 Jsr verify 1440 Sec 1450 Rts 1460 1470.starcat 1471 Stx zp0 1472 Sty zp1 1480 Ldy #ASC("C") 1490 Jsr transact 1500 Jmp CopyAll 1510 1520.transact 1530 Tya:Jsr SendCom 1540\\\\\\\\\\\ Send parameter line here. 1550 Ldy #0 1560.param_copy 1570 Lda (zp0),Y \ ZP0,1 set up in CLI 1580 Cmp #13 1590 Beq dne1 1600 Jsr SendCom \ Should expand this in-line 1610 Iny 1620 Jmp param_copy 1630.dne1 1640 Lda #27: Jsr SendCom 1650 Rts 1660 1670.starrun 1680 JSR dobrk 1690 EQUB Not_imp_error 1700 EQUS "RUN not implemented" 1710 BRK 1720 1730\ 1740\ 1750\Enters here to do a BRK instruction which must not happen 1760\in a sideways ROM. Uses page 1. 1770 1780.dobrk 1790 PLA \ Low byte of return address 1800 STA zp0 1810 PLA \ High byte 1820 STA zp1 1830 LDA #0 1840 TAY \Offset-1 about to be INC'd 1850 \(offset=1 because return addr-1 on stack) 1860 STA &100 \Store a BRK 1870.dobrk1 1880 INY 1890 LDA (zp0),Y \Get byte of message 1900 STA &100,Y \Note that &100 has the BRK (Y=1 initially) 1910 BNE dobrk1 \Terminates on zero 1920 JMP &100 \Execute it 1930 1940.filesys \ ************** OSFSCMD vector points here 1950 STA zp0 \reason code 1960 PHA 1970 TXA 1980 PHA 1990 LDA zp0 2000 CMP #8 \ Highest reasoncode we want, +1 2010 BCC fscmd1 2020 PLA 2030 TAX 2040 PLA 2050 RTS 2060.fscmd1 2070 ASLA 2080 TAX 2090 LDA fscmdtab,X 2100 STA zp0 2110 LDA fscmdtab+1,X 2120 STA zp1 2130 PLA 2140 TAX 2150 PLA 2160 JMP (zp0) 2170\ 2180\ 2190\ 2200\ 2210.fshandles \ return our range of handles 2220 LDX #low_handle 2230 LDY #high_handle 2240 RTS 2250\ 2260\ 2270\ 2280.fseof 2290 CPX #input_handle 2300 BNE eof_chan 2310 LDX input_eof_flag 2320 RTS 2330.eof_chan 2340 JSR dobrk 2350 EQUB Channel_error \ 222. 2360 EQUS "Channel" 2370 BRK 2380\ 2390\ 2400\ 2410\ 2420.starcmd \Star command - set up & pass to our CLI 2430 PHA 2440 TXA 2450 PHA 2460 STA swzp0:sta zp0 \ STORED HERE TO BE READ WHEN FETCHING PARAMS transact 2470 TYA 2480 PHA 2490 STA swzp1:sta zp1 \ REM Save to use zp0,1 here as FS selected 2500 LDX #0 \All commands allowed in this context 2510 LDY#0 \Original pointer needs no offset 2520 JSR cli 2530 BCS star1 2540 PLA:TAY 2550 PLA:TAX 2560 PLA 2570 Jmp starcommand 2580 JSR dobrk 2590 EQUB Bad_comm_error \254. 2600 EQUS "Bad command" 2610 BRK 2620\ 2630.star1 2640 Pla 2650 TAY 2660 PLA 2670 TAX 2680 PLA 2690 LDA #0 2700 RTS 2710\ 2720\ 2730\ 2740.staropt 2750 CPX #1 2760 BNE opt1 2770 \ Set messages flag 2780 RTS 2790.opt1 \ ******* OTHER *OPT's IN HERE ****** 2800 JSR dobrk 2810 EQUB Option_error \&CB. 2820 EQUS "Bad option" 2830 BRK 2840\ 2850\ 2860\ 2870\ 2880\ 2890.fscmdtab 2900 EQUW staropt \ 0 - *OPT X,Y 2910 EQUW fseof \ 1 - EOF#X from BASIC, via *FX 2920 EQUW starrun \ 2 - */ equivalent to *RUN 2930 EQUW starcmd \ 3 - * - decode command only, not *RUN 2940 \ since this is a slow, cassette-like filing system 2950 EQUW starrun \ 4 - *RUN 2960 EQUW starcat \ 5 - *CAT 2970 EQUW fsdie \ 6 - file system vectors being removed 2980 EQUW fshandles \ 7 - return range of handles used by file system 2990.fscmdtab1 3000] 3010RETURN