S-C DisAssembler

1000 *SAVE D.FILE.CONTROL
1010 *--------------------------------
1020 OPEN.SRC.FILE
1030        JSR GET.PATHNAME
1040        LDA PASS
1050        BEQ .6
1060        JSR CLOSE.OUTPUT.FILE.IF.OPEN    ---3-24-87---
1070        JSR MLI
1080        .DA #$C0,P.CREATE
1090        BCC .4
1100        CMP #$47     JUST A DUPLICATE FILE NAME?
1110        BEQ .5       ...YES
1120        LDY #Q.CREATE    ...NO
1130        JMP MLI.ERROR
1140 .5     JSR MLI
1150        .DA #$C4,P.INFO
1160        LDA I.TYPE
1170        CMP #$FA
1180        BEQ .4
1190        LDY #Q.FILTYP
1200        JMP ERROR
1210 .4     JSR MLI
1220        .DA #$C8,P.OPEN
1230        BCC .2
1240        LDY #Q.OPEN
1250        JMP MLI.ERROR
1260 .2     LDA O.REF
1270        STA WR.REF
1280        STA EOF.REF
1290 .6     RTS
1300 *--------------------------------
1310 OPEN.OBJ.FILE
1320        JSR GET.PATHNAME
1330        JSR CLOSE.INPUT.FILE.IF.OPEN     ---3-24-87---
1340        JSR MLI
1350        .DA #$C8,P.OPEN.INPUT
1360        BCC .1
1370        LDY #Q.OPEN
1380        JMP MLI.ERROR
1390 .1     LDA O.REF.IN
1400        STA RD.REF
1410        STA M.REF
1420        RTS
1430 *--------------------------------
1440 GET.PATHNAME
1450        LDX #0
1460        JSR GNNB     GET FIRST CHAR OF PATHNAME
1470        BEQ .5       ...ERROR, NO NAME
1480        CMP #'/'     IS VOLUME SPECIFIED?
1490        BNE .3       ...NO, GET ONE
1500 .1     INX
1510        STA PATHNAME,X
1520        JSR GNNB
1530        BNE .1
1540        STX PATHNAME
1550        RTS
1560 *---GET VOLUME UNLESS PREFIX-----
1570 .3     LDA MLI.PREFIX
1580        BNE .4       ...WE HAVE A PREFIX
1590        LDA MLI.DEVICE
1600        STA OL.DEVICE
1610        JSR MLI
1620        .DA #$C5,P.ONLINE
1630        BCS .5       ...ERROR, NOTHING IN DRIVE
1640        LDA PATHNAME+1
1650        AND #$0F     GET LENGTH OF VOLUME NAME
1660        TAX
1670        LDA #'/'     STORE SLASHES ON BOTH ENDS
1680        STA PATHNAME+1
1690        STA PATHNAME+2,X
1700        INX
1710        INX
1720 .4     LDA CURRCHAR
1730        JMP .1       GET REST OF PATHNAME
1740 .5     LDY #Q.BADPATH
1750        JMP ERROR
1760 *------------------------VVVVVV------------3-24-87---
1770 CLOSE.OUTPUT.FILE.IF.OPEN
1780        LDA O.REF    REFNUM OF OUTPUT FILE
1790        BEQ RTS1
1800        JSR MLI
1810        .DA #$CF,P.EOF    GET MARK
1820        JSR MLI
1830        .DA #$D0,P.EOF    SET EOF
1840        LDA O.REF
1850 CLOSE.FILE
1860        STA C.REF
1870        JSR MLI
1880        .DA #$CC,P.CLOSE
1890 RTS1   RTS
1900 *------------------------------------------3-24-87---
1910 CLOSE.INPUT.FILE.IF.OPEN
1920        LDA O.REF.IN      REFNUM OF INPUT FILE
1930        BNE CLOSE.FILE
1940        RTS
1950 *------------------------^^^^^^------------3-24-87---
1960 P.ONLINE   .DA #2
1970 OL.DEVICE  .BS 1
1980            .DA PATHNAME+1
1990 *--------------------------------
2000 P.CREATE   .DA #7
2010            .DA PATHNAME
2020            .HS C3.FA.0000.00.0000.0000
2030 *--------------------------------
2040 P.INFO     .DA #10
2050            .DA PATHNAME
2060            .BS 1
2070 I.TYPE     .BS 1
2080            .BS 13
2090 *--------------------------------
2100 P.OPEN     .DA #3
2110 O.PATH     .DA PATHNAME
2120            .DA O.BUFFER
2130 O.REF      .DA #0
2140 *--------------------------------
2150 P.WRITE    .DA #4
2160 WR.REF     .BS 1
2170            .DA LINE
2180 WR.LEN     .DA 80   
2190            .DA 0
2200 *--------------------------------
2210 P.EOF      .DA #2
2220 EOF.REF    .BS 1
2230 MARK       .BS 3
2240 *--------------------------------
2250 P.OPEN.INPUT
2260            .DA #3
2270            .DA PATHNAME,I.BUFFER
2280 O.REF.IN   .DA #0
2290 *--------------------------------
2300 P.READ     .DA #4
2310 RD.REF     .BS 1
2320            .DA INBYTE,1,0
2330 *--------------------------------
2340 P.MARK     .DA #2
2350 M.REF      .BS 1
2360 OFFSET     .BS 3
2370 *--------------------------------
2380 INBYTE     .BS 1
2390 *--------------------------------
2400 P.CLOSE    .DA #1
2410 C.REF      .DA #0
2420 *--------------------------------
2430 PATHNAME   .BS 64
2440 *--------------------------------