Subversion Repositories MB01 Project

Rev

Blame | Last modification | View Log | Download | RSS feed

  Thu Mar 24 11:31:55 2016                                                                                               Page    1







          2500 A.D. 65816 Macro Assembler #26960 - Version 5.02g
          -----------------------------------------------------

                       Input  Filename : src\FA\lib1.asm
                       Output Filename : obj\FA\lib1.obj
                       Listing Has Been Relocated                               


 2172                           .LIST           on
 2173                           
 2174  F8FF66                           .INCLUDE inc\dirp00.inc
 2175                           ;----------------------------------------------------------
 2176                           ; DIRP00.ASM
 2177                           ; PROGETTO: B1601
 2178                           ;
 2179                           ; Variabili in Direct Page $00
 2180                           ;----------------------------------------------------------
 2181                           
 2182                           ; sezione COMMON -- questo permette di includere il file in piu' file
 2183                           
 2184                           .LIST on
 2185                           
 2186                           DIRP00: .SECTION page0, ref_only, common        ;Direct-Page 00
 2187                           
 2188  000000                           .ABSOLUTE               ;; inizia sempre da $00
 2189  000000                           .ORG            0x00
 2190  000000                           
 2191  000000  0000             JiffyClk        .DW                     ; contatore 10ms 32 bit
 2192  000002  0000                             .DW
 2193  000004                   SysTmr          .DS     SYSTMRCNT       ; system timer 0 (10ms)
 2194  000008                   SysTMF          .DS     SYSTMRCNT       ; flag timer (80 -> start)
 2195  00000C  00               Bnk0Flag        .DB                     ; <7>: flag test RAM banco 0 ok
 2196                                                                   ; <6>: flag warm reset
 2197  00000D  00               RTCFlag         .DB
 2198                           
 2199  00000E                   atadev          .DS     2       ; flag device on ata bus #0 & #1
 2200                                                           ; <7>: device ready
 2201                                                           ; <6>: compact flash device (C.F.)
 2202                                                           ; <5>: device identification ok
 2203                                                           ; <4>: MBR loaded
 2204                                                           ; <3>: valid signature in MBR
 2205                                                           ; <2>: first partition found&active
 2206                                                           ; <1>:
 2207                                                           ; <0>: valid partition flag
 2208                           
 2209  000010                   atasec          .DS     8       ; max. user sectors on ata device
 2210  000018                   atambr          .DS     8       ; data for first partition found in mbr
 2211                                                           ; first 3 bytes for start sector of partition
 2212                                                           ; last byte for partition type
 2213  000020                   ataprt          .DS     8       ; total sec's of first partition
 2214                           
 2215  000028  00               fdcdrv          .DB             ; phisycal drive status (drive #0)
 2216                                                           ; <7>: disk format established in bit 0&1 
 2217                                                           ; <6>: double step seek done
  Thu Mar 24 11:31:55 2016                                                                                               Page    2




 2218                                                           ; <5>: trust format bit's (set after ok r/w)
 2219                                                           ; <4>: write protect bit (if disk in drive)
 2220                                                           ; <3>: don't care
 2221                                                           ; <2>: don't care                               
 2222                                                           ; <1>: HD disk if set else DD disk
 2223                                                           ; <0>: CBM format if set else IBM format
 2224                           
 2225  000029  00               vdrive          .DB             ; virtual drive status (ram disk, drive #1)
 2226                                                           ; <7>: disk format established in bit 0&1 
 2227                                                           ; <6>: change disk simulation (after format)
 2228                                                           ; <5>: don't care
 2229                                                           ; <4>: write protect bit (under sw control)
 2230                                                           ; <3>: don't care
 2231                                                           ; <2>: don't care                               
 2232                                                           ; <1>: HD disk if set else DD disk
 2233                                                           ; <0>: CBM format if set else IBM format
 2234                           
 2235  00002A  00               fdcctl          .DB             ; fdc controller status
 2236                                                           ; <7>: drive is attached
 2237                                                           ; <6>: drive need recalibration (restore)
 2238                                                           ; <5>: FDC controller ok
 2239                                                           ; <4>: motor on
 2240                                                           ; <3>: dma is active
 2241                                                           ; <2>: dma chip ok (post routine)
 2242                                                           ; <1>: clock rate (1=HD,0=DD)
 2243                                                           ; <0>: disk ready
 2244                           
 2245  00002B  00               fdctrk          .DB             ; fd: current seek track
 2246  00002C  00               fdcerr          .DB             ; fd: last error code
 2247  00002D  00               ataerr          .DB             ; ata: last error code
 2248  00002E  00               ataxer          .DB             ; ata: last extended error code
 2249                           
 2250  00002F  00               CtrlBrk         .DB             ; flag CTRL+BREAK (NMI)
 2251                           
 2252  000030  0000             MemTop          .DW             ; top memoria RAM
 2253  000032  00                               .DB             ; banco top mem
 2254                           
 2255  000033  00               DflTxtIn        .DB             ; device di default text input 
 2256  000034  00               DflTxtOut       .DB             ; device di default text output
 2257                           
 2258  000035                   COPPtr          LP              ; long pointer for COP decoding
 2259  000038  00               COPIdx          .DB             ; COP signature/index
 2260                           
 2261                           ; variabili utilizzate da ACIA
 2262  000039  00               ACIAFlag        .DB
 2263                           
 2264  00003A  00               ACIArxe_1       .DB             ; flag errore   7: errore RX (scarta dato)
 2265                                                           ;               6: overflow buffer RX
 2266                                                           ;               5: disconnessione remota
 2267                                                           ;               2: framing error
 2268                                                           ;               1: parity error
 2269                                                           ;               0: overrun error
 2270  00003B  00               ACIArxe_2       .DB
 2271                           
 2272  00003C  00               ACIAhsk_1       .DB             ; handshake     7: handshake attivo
 2273                                                           ;               6: handshake hardware (RTS,CTS)
 2274  00003D  00               ACIAhsk_2       .DB
  Thu Mar 24 11:31:55 2016                                                                                               Page    3




 2275                           
 2276  00003E  00               ACIAPause_1     .DB             ; flag pausa    7: pausa remota (XOFF/RTS=1)
 2277                                                           ;               6: pausa locale (XON/CTS=1)
 2278  00003F  00               ACIAPause_2     .DB
 2279                           
 2280  000040  00               ACIAdsrt_1      .DB             ; status transizioni DSR, CTS, DCD
 2281                                                           ; 7: DSRT, 6: CTST, 5: DCDT
 2282  000041  00               ACIAdsrt_2      .DB
 2283                           
 2284  000042  00               ACIAdsrl_1      .DB             ; status livello linee DSR, CTS, DCD, DTR, RTS
 2285                                                           ; 7: DSRLVL, 6: CTSLVL, 5: DCDLVL
 2286                                                           ; 1:DTRLVL, 0:RTSLVL
 2287  000043  00               ACIAdsrl_2      .DB
 2288                           
 2289  000044  00               ACIArem_1       .DB             ; byte OR registro formato per pausa remota
 2290  000045  00               ACIArem_2       .DB
 2291                           
 2292  000046  00               ACIAmsk_1       .DB             ; maschera AND per test disconnessione
 2293                                                           ; $80 per test DSR - $20 per test DCD
 2294  000047  00               ACIAmsk_2       .DB
 2295                           
 2296  000048  00               ACIAcsr_1       .DB             ; control status durante IRQ
 2297  000049  00               ACIAcsr_2       .DB
 2298  00004A  00               ACIAfr_1        .DB             ; copia registro di formato
 2299  00004B  00               ACIAfr_2        .DB
 2300  00004C  00               ACIAOut_1       .DB             ; trasmissione XON/XOFF
 2301  00004D  00               ACIAOut_2       .DB
 2302                           
 2303  00004E  0000             ACIAICnt_1      .DW             ; numero bytes in coda RX 1
 2304  000050  0000             ACIAIHead_1     .DW             ; puntatore testa buffer RX 1
 2305  000052  0000             ACIAITail_1     .DW             ; puntatore coda buffer RX 1
 2306  000054  0000             ACIAOCnt_1      .DW             ; numero bytes in coda TX 1
 2307  000056  0000             ACIAOHead_1     .DW             ; puntatore testa buffer TX 1
 2308  000058  0000             ACIAOTail_1     .DW             ; puntatore coda buffer TX 1
 2309                           
 2310  00005A  0000             ACIAICnt_2      .DW             ; numero bytes in coda RX 2
 2311  00005C  0000             ACIAIHead_2     .DW             ; puntatore testa buffer RX 2
 2312  00005E  0000             ACIAITail_2     .DW             ; puntatore coda buffer RX 2
 2313  000060  0000             ACIAOCnt_2      .DW             ; numero bytes in coda TX 2
 2314  000062  0000             ACIAOHead_2     .DW             ; puntatore testa buffer TX 2
 2315  000064  0000             ACIAOTail_2     .DW             ; puntatore coda buffer TX 2
 2316                           
 2317                           ; bios mem
 2318  000066  0000             nsize           .DW     ; dimensione blocco da allocare
 2319                           ;bsize          .DW     ; dimensione vera blocco free
 2320  000068  0000             splitsz         .DW     ; dimensione blocco splittato
 2321  00006A  0000             bfree           .DW     ; puntatore blocco free
 2322  00006C  0000             hdrptr          .DW     ; puntatore header heap
 2323                           
 2324  00006E  0000             pbrklv          .DW     ; current break level of current process
 2325  000070  0000             pbrkmin         .DW     ; minimum breal level of current process
 2326  000072  0000             pbrkmax         .DW     ; maximum breal level of current process
 2327                           
 2328  000074  00               ACIATmp         .DB
 2329  000075  00                               .DB
 2330  000076                           
 2331                           ; bios temp. work area
  Thu Mar 24 11:31:55 2016                                                                                               Page    4




 2332  000076                   bwrktmp         .DS     $28
 2333                           
 2334  00009E  00               BiosEnt         .DB             ; flag accesso a bios setup
 2335                           
 2336  00009F  00                               .DB             ; dummy
 2337  0000A0                                   
 2338                           
 2339  00009F                           .RELATIVE
 2340                           
 2341                                   .ENDS
 2342                           
 2346                           .LIST on
 2347                           
 2348                           ; page 0 local var's (declared in bios temp. work area)
 2349                           _P0BTMP:        .SECTION page0, ref_only, offset bwrktmp        ; DP Tmp. BIOS
 2350                           
 2351  000076                   cmdlin          LP              ; long pointer to command line
 2352  000079                   optstr          LP              ; long pointer to options mask
 2353  00007C  0000 0000        dwres           .LWORD          ; result
 2354  000080  00               slen            .DB             ; string length
 2355  000081  00               squot           .DB             ; flag quotation marks
 2356  000082  00               cmdy            .DB             ; index
 2357  000083  00               chopt           .DB             ; option char
 2358  000084  00               prsfg           .DB             ; parsing flag
 2359  000085  00               opttyp          .DB             ; option type
 2360                           
 2361                                   .ENDS
 2362                           
 2363                           ;---------------------------------------------------------------------------
 2364                           ; code segment -- bank $FA
 2365                           ;---------------------------------------------------------------------------
 2366                           
 2367                                   .CODEFA
 2368                           
 2369                                   .LONGA  off
 2370                                   .LONGI  off
 2371                           
 2372                           ; getopt
 2373                           ;
 2374                           ; param's:
 2375                           ;
 2376                           ;               sFlag   = <7>: show error message
 2377                           ;                         <6>: accept decimal numeric arguments
 2378                           ;                         <0>: called from monitor
 2379                           ;               sCmd    = long pointer to command line
 2380                           ;               sOpt    = long pointer to option's string
 2381                           ;               sRes    = 32 bit result
 2382                           ;
 2383                           ; param's stack offset
 2384          000006           sRes    .SET    6
 2385          00000A           sOpt    .SET    10
 2386          00000D           sCmd    .SET    13
 2387          000010           sFlag   .SET    16
 2388                           
 2389  FA0003                   _getopt:
 2390                                   .PUBLIC _getopt
 2391  FA0003  0B                       phd
  Thu Mar 24 11:31:55 2016                                                                                               Page    5




 2392  FA0004  F4 00 00                 pea     #0
 2393  FA0007  2B                       pld
 2394  FA0008                           ACC16                   ; move param's in local var's
 2395  FA0008  C2 20                    rep     #PMFLAG
 2396                                   .LONGA  on
 2397                                   .MNLIST
 2398  FA000A  A3 0A                    lda     sOpt,s
 2399  FA000C  85 79                    sta     optstr
 2400  FA000E  A3 0D                    lda     sCmd,s
 2401  FA0010  85 76                    sta     cmdlin
 2402  FA0012                           ACC08
 2403  FA0012  E2 20                    sep     #PMFLAG
 2404                                   .LONGA  off
 2405                                   .MNLIST
 2406  FA0014  A3 0C                    lda     sOpt+2,s
 2407  FA0016  85 7B                    sta     optstr+2
 2408  FA0018  A3 0F                    lda     sCmd+2,s
 2409  FA001A  85 78                    sta     cmdlin+2
 2410  FA001C  A3 10                    lda     sFlag,s
 2411  FA001E  85 84                    sta     prsfg
 2412  FA0020  A0 00                    ldy     #0
 2413  FA0022  84 85                    sty     opttyp
 2414  FA0024  20 97 00                 jsr     ?104            ; get next char
 2415  FA0027  F0 6B                    beq     ?95             ; return A=0
 2416  FA0029  C9 2D                    cmp     #'-'            ; option?
 2417  FA002B  F0 0B                    beq     ?05             ; yes
 2418  FA002D  20 A0 00                 jsr     ?110            ; find end of argument
 2419  FA0030  B0 62                    bcs     ?95             ; error
 2420  FA0032  A9 80                    lda     #$80            ; no option argument
 2421  FA0034  85 83                    sta     chopt
 2422  FA0036  80 43                    bra     ?90
 2423  FA0038  20 4B 01         ?05:    jsr     ?130            ; check option
 2424  FA003B  B0 57                    bcs     ?95             ; error
 2425  FA003D  20 B6 01                 jsr     ?140            ; test option argument
 2426  FA0040  B0 52                    bcs     ?95             ; error
 2427  FA0042  A6 85                    ldx     opttyp
 2428  FA0044  E0 20                    cpx     #' '            ; option without argument?
 2429  FA0046  F0 33                    beq     ?90             ; yes...so exit
 2430  FA0048  E0 3A                    cpx     #':'            ; option requires a simple string argument?
 2431  FA004A  F0 2F                    beq     ?90             ; yes...so exit
 2432  FA004C  E0 24                    cpx     #'$'            ; option requires up case string argument?
 2433  FA004E  F0 08                    beq     ?10             ; yes
 2434  FA0050  E0 21                    cpx     #'!'            ; option requires a single char argument?
 2435  FA0052  F0 1D                    beq     ?30             ; yes
 2436  FA0054  E0 5E                    cpx     #'^'            ; option requires a single up case char arg.?
 2437  FA0056  D0 1E                    bne     ?40             ; no
 2438  FA0058  A0 00            ?10:    ldy     #0
 2439  FA005A  B7 7C            ?15:    lda     [dwres],y       ; up case string
 2440  FA005C  F0 0F                    beq     ?25             ; end of string
 2441  FA005E  C9 61                    cmp     #'a'
 2442  FA0060  90 08                    bcc     ?20
 2443  FA0062  C9 7B                    cmp     #'z'+1
 2444  FA0064  B0 04                    bcs     ?20
 2445  FA0066  29 DF                    and     #$DF
 2446  FA0068  97 7C                    sta     [dwres],y
 2447  FA006A  C8               ?20:    iny
 2448  FA006B  80 ED                    bra     ?15
  Thu Mar 24 11:31:55 2016                                                                                               Page    6




 2449  FA006D  E0 24            ?25:    cpx     #'$'            ; if requires string exit
 2450  FA006F  F0 0A                    beq     ?90
 2451  FA0071  20 44 02         ?30:    jsr     ?150            ; check single char argument
 2452  FA0074  B0 1E                    bcs     ?95             ; error
 2453  FA0076  20 9F 02         ?40:    jsr     ?160            ; others option type
 2454  FA0079  B0 19                    bcs     ?95
 2455  FA007B                   ?90:    ACC16                   ; return to the caller result...
 2456  FA007B  C2 20                    rep     #PMFLAG
 2457                                   .LONGA  on
 2458                                   .MNLIST
 2459  FA007D  A5 76                    lda     cmdlin          ; ...and residual command line string
 2460  FA007F  83 0D                    sta     sCmd,s
 2461  FA0081  A5 7C                    lda     dwres
 2462  FA0083  83 06                    sta     sRes,s
 2463  FA0085  A5 7E                    lda     dwres+2
 2464  FA0087  83 08                    sta     sRes+2,s
 2465  FA0089                           ACC08
 2466  FA0089  E2 20                    sep     #PMFLAG
 2467                                   .LONGA  off
 2468                                   .MNLIST
 2469  FA008B  A5 78                    lda     cmdlin+2
 2470  FA008D  83 0F                    sta     sCmd+2,s
 2471  FA008F  A4 85                    ldy     opttyp          ; return Y=option type
 2472  FA0091  A5 83                    lda     chopt           ; return A=option char
 2473  FA0093  18                       clc                     ; no error
 2474  FA0094  2B               ?95:    pld
 2475  FA0095  6B                       rtl
 2476                           
 2477  FA0096  C8               ?100:   iny                     ; get char from command line
 2478  FA0097  B7 76            ?104:   lda     [cmdlin],y
 2479  FA0099  F0 04                    beq     ?106
 2480  FA009B  C9 20                    cmp     #' '
 2481  FA009D  F0 F7                    beq     ?100
 2482  FA009F  60               ?106:   rts
 2483                           
 2484  FA00A0  A2 20            ?110:   ldx     #' '    
 2485  FA00A2  86 81                    stx     squot           ; normal end of string char
 2486  FA00A4  64 80                    stz     slen            ; size of argument
 2487  FA00A6  C9 22                    cmp     #'"'            ; search end of string
 2488  FA00A8  D0 03                    bne     ?112            ; not quoted
 2489  FA00AA  85 81                    sta     squot           ; quoted string
 2490  FA00AC  C8                       iny
 2491  FA00AD  84 82            ?112:   sty     cmdy            ; save index    
 2492  FA00AF  B7 76            ?114:   lda     [cmdlin],y
 2493  FA00B1  D0 08                    bne     ?115
 2494  FA00B3  A6 81                    ldx     squot
 2495  FA00B5  E0 22                    cpx     #'"'
 2496  FA00B7  F0 37                    beq     ?122            ; missing final quote
 2497  FA00B9  80 0E                    bra     ?117
 2498  FA00BB  C5 81            ?115:   cmp     squot           ; first blank/quote is end of string
 2499  FA00BD  F0 05                    beq     ?116
 2500  FA00BF  E6 80                    inc     slen
 2501  FA00C1  C8                       iny
 2502  FA00C2  80 EB                    bra     ?114
 2503  FA00C4  A9 00            ?116:   lda     #0              ; put string terminator
 2504  FA00C6  97 76                    sta     [cmdlin],y
 2505  FA00C8  C8                       iny                     ; next token in command line
  Thu Mar 24 11:31:55 2016                                                                                               Page    7




 2506  FA00C9  A6 80            ?117:   ldx     slen            ; check string length
 2507  FA00CB  F0 53                    beq     ?126            ; error
 2508  FA00CD  A6 82                    ldx     cmdy
 2509  FA00CF                           ACC16CLC
 2510  FA00CF  C2 21                    rep     #(PMFLAG.OR.PCFLAG)
 2511                                   .LONGA  on
 2512                                   .MNLIST
 2513  FA00D1  8A                       txa
 2514  FA00D2  65 76                    adc     cmdlin
 2515  FA00D4  85 7C                    sta     dwres           ; pointer to argument
 2516  FA00D6                           ACC08
 2517  FA00D6  E2 20                    sep     #PMFLAG
 2518                                   .LONGA  off
 2519                                   .MNLIST
 2520  FA00D8  A5 78                    lda     cmdlin+2
 2521  FA00DA  90 01                    bcc     ?118
 2522  FA00DC  1A                       inc     a
 2523  FA00DD  85 7E            ?118:   sta     dwres+2
 2524  FA00DF  64 7F                    stz     dwres+3
 2525  FA00E1                   ?119:   ACC16CLC
 2526  FA00E1  C2 21                    rep     #(PMFLAG.OR.PCFLAG)
 2527                                   .LONGA  on
 2528                                   .MNLIST
 2529  FA00E3  98                       tya
 2530  FA00E4  65 76                    adc     cmdlin
 2531  FA00E6  85 76                    sta     cmdlin          ; bump command line ptr
 2532  FA00E8                           ACC08
 2533  FA00E8  E2 20                    sep     #PMFLAG
 2534                                   .LONGA  off
 2535                                   .MNLIST
 2536  FA00EA  90 03                    bcc     ?120
 2537  FA00EC  E6 78                    inc     cmdlin+2
 2538  FA00EE  18                       clc
 2539  FA00EF  60               ?120:   rts
 2540  FA00F0  A5 84            ?122:   lda     prsfg           ; test bit 7
 2541  FA00F2  10 2A                    bpl     ?124            ; no show error message
 2542  FA00F4  20 42 01                 jsr     ?128
 2543  FA00F7                           SCNPRINT
 2544  FA00F7  02 01                    cop     $01
 2545                                   .MNLIST
 2546  FA00F9  6D 69 73 73 69           .DB     'missig quotation marks in argument.', 13, 0 
               67 20 71 75 6F 
               74 61 74 69 6F 
               6E 20 6D 61 72 
               6B 73 20 69 6E 
               20 61 72 67 75 
               6D 65 6E 74 2E 
               0D 00 
 2547  FA011E  38               ?124:   sec                     ; error flag
 2548  FA011F  60                       rts
 2549  FA0120  A5 84            ?126:   lda     prsfg
 2550  FA0122  10 FA                    bpl     ?124
 2551  FA0124  20 42 01                 jsr     ?128
 2552  FA0127                           SCNPRINT
 2553  FA0127  02 01                    cop     $01
 2554                                   .MNLIST
 2555  FA0129  61 72 67 75 6D           .DB     'argument zero length.', 13, 0 
  Thu Mar 24 11:31:55 2016                                                                                               Page    8




               65 6E 74 20 7A 
               65 72 6F 20 6C 
               65 6E 67 74 68 
               2E 0D 00 
 2556  FA0140  38               ?127:   sec
 2557  FA0141  60                       rts
 2558  FA0142  4A               ?128:   lsr     a
 2559  FA0143  90 05                    bcc     ?129
 2560  FA0145                           SCNPRINT
 2561  FA0145  02 01                    cop     $01
 2562                                   .MNLIST
 2563  FA0147  3A 3A 00                 .DB     '::', 0
 2564  FA014A  60               ?129:   rts
 2565                           
 2566  FA014B  C8               ?130:   iny                     ; check option
 2567  FA014C  B7 76                    lda     [cmdlin],y
 2568  FA014E  F0 1E                    beq     ?135            ; missing option
 2569  FA0150  C9 20                    cmp     #' '
 2570  FA0152  F0 1A                    beq     ?135            ; missing option
 2571  FA0154  BB                       tyx
 2572  FA0155  85 83                    sta     chopt           ; store option char
 2573  FA0157  A0 00                    ldy     #0              ; scan option string
 2574  FA0159  B7 79            ?132:   lda     [optstr],y
 2575  FA015B  F0 2D                    beq     ?136            ; option not found
 2576  FA015D  C5 83                    cmp     chopt
 2577  FA015F  F0 04                    beq     ?134            ; found
 2578  FA0161  C8                       iny
 2579  FA0162  C8                       iny
 2580  FA0163  80 F4                    bra     ?132
 2581  FA0165  C8               ?134:   iny
 2582  FA0166  B7 79                    lda     [optstr],y      ; get option type
 2583  FA0168  85 85                    sta     opttyp
 2584  FA016A  9B                       txy
 2585  FA016B  C8                       iny
 2586  FA016C  18                       clc
 2587  FA016D  60                       rts
 2588  FA016E                           
 2589  FA016E  A5 84            ?135:   lda     prsfg
 2590  FA0170  10 CE                    bpl     ?127
 2591  FA0172  20 42 01                 jsr     ?128
 2592  FA0175                           SCNPRINT
 2593  FA0175  02 01                    cop     $01
 2594                                   .MNLIST
 2595  FA0177  6D 69 73 73 69           .DB     'missing option.', 13, 0
               6E 67 20 6F 70 
               74 69 6F 6E 2E 
               0D 00 
 2596  FA0188  38                       sec
 2597  FA0189  60                       rts
 2598                           
 2599  FA018A  A5 84            ?136:   lda     prsfg
 2600  FA018C  10 B2                    bpl     ?127
 2601  FA018E  20 42 01                 jsr     ?128
 2602  FA0191  A5 83                    lda     chopt
 2603  FA0193  48                       pha
 2604  FA0194  4B                       phk
 2605  FA0195  F4 9F 01                 pea     #!?138
  Thu Mar 24 11:31:55 2016                                                                                               Page    9




 2606  FA0198  A9 05                    lda     #5
 2607  FA019A  48                       pha
 2608  FA019B                           BPRINTF
 2609  FA019B  02 11                    cop     $11
 2610                                   .MNLIST
 2611  FA019D  38                       sec
 2612  FA019E  60                       rts
 2613                           
 2614  FA019F  69 6C 6C 65 67   ?138:   .DB     'illegal option ''-%c''.', 13, 0
               61 6C 20 6F 70 
               74 69 6F 6E 20 
               27 2D 25 63 27 
               2E 0D 00 
 2615                           
 2616  FA01B6  A6 85            ?140:   ldx     opttyp          ; option type
 2617  FA01B8  B7 76                    lda     [cmdlin],y      ; get char after option
 2618  FA01BA  F0 0B                    beq     ?142            ; no argument
 2619  FA01BC  C9 20                    cmp     #' '
 2620  FA01BE  F0 07                    beq     ?142            ; no argument
 2621  FA01C0  E0 20                    cpx     #' '            ; option requires an argument?
 2622  FA01C2  F0 0A                    beq     ?144            ; no...so error
 2623  FA01C4  4C A0 00                 jmp     ?110            ; get argument
 2624  FA01C7  E0 20            ?142:   cpx     #' '            ; option requires an argument?
 2625  FA01C9  D0 45                    bne     ?148            ; yes...so error
 2626  FA01CB  4C E1 00                 jmp     ?119            ; bump command line ptr
 2627  FA01CE                           
 2628  FA01CE  A5 84            ?144:   lda     prsfg
 2629  FA01D0  10 0F                    bpl     ?145
 2630  FA01D2  20 42 01                 jsr     ?128
 2631  FA01D5  A5 83                    lda     chopt
 2632  FA01D7  48                       pha
 2633  FA01D8  4B                       phk
 2634  FA01D9  F4 E3 01                 pea     #!?146
 2635  FA01DC  A9 05            ?144a:  lda     #5
 2636  FA01DE  48                       pha
 2637  FA01DF                           BPRINTF
 2638  FA01DF  02 11                    cop     $11
 2639                                   .MNLIST
 2640  FA01E1  38               ?145:   sec
 2641  FA01E2  60                       rts
 2642                           
 2643  FA01E3  6F 70 74 69 6F   ?146:   .DB     'option ''-%c'' does not requires an argument.', 13, 0
               6E 20 27 2D 25 
               63 27 20 64 6F 
               65 73 20 6E 6F 
               74 20 72 65 71 
               75 69 72 65 73 
               20 61 6E 20 61 
               72 67 75 6D 65 
               6E 74 2E 0D 00 
 2644                           
 2645  FA0210  A5 84            ?148:   lda     prsfg
 2646  FA0212  10 CD                    bpl     ?145
 2647  FA0214  20 42 01                 jsr     ?128
 2648  FA0217  A5 83                    lda     chopt
 2649  FA0219  48                       pha
 2650  FA021A  4B                       phk
  Thu Mar 24 11:31:55 2016                                                                                               Page   10




 2651  FA021B  F4 20 02                 pea     #!?149
 2652  FA021E  80 BC                    bra     ?144a
 2653                           
 2654  FA0220  6F 70 74 69 6F   ?149:   .DB     'option ''-%c'' requires an argument.', 13, 0
               6E 20 27 2D 25 
               63 27 20 72 65 
               71 75 69 72 65 
               73 20 61 6E 20 
               61 72 67 75 6D 
               65 6E 74 2E 0D 
               00 
 2655                           
 2656  FA0244  A5 80            ?150:   lda     slen            ; check single char argument
 2657  FA0246  C9 01                    cmp     #1
 2658  FA0248  D0 0C                    bne     ?152
 2659  FA024A  A7 7C                    lda     [dwres]
 2660  FA024C  85 7C                    sta     dwres
 2661  FA024E  64 7D                    stz     dwres+1
 2662  FA0250  64 7E                    stz     dwres+2
 2663  FA0252  64 7F                    stz     dwres+3
 2664  FA0254  18                       clc
 2665  FA0255  60                       rts
 2666  FA0256  A5 84            ?152:   lda     prsfg
 2667  FA0258  10 0F                    bpl     ?154
 2668  FA025A  20 42 01                 jsr     ?128
 2669  FA025D  A5 83                    lda     chopt
 2670  FA025F  48                       pha
 2671  FA0260  4B                       phk
 2672  FA0261  F4 6B 02                 pea     #!?156
 2673  FA0264  A9 05                    lda     #5
 2674  FA0266  48                       pha
 2675  FA0267                           BPRINTF
 2676  FA0267  02 11                    cop     $11
 2677                                   .MNLIST
 2678  FA0269  38               ?154:   sec
 2679  FA026A  60                       rts
 2680                           
 2681  FA026B  6F 70 74 69 6F   ?156:   .DB     'option ''-%c'' requires a single character argument.', 13, 0
               6E 20 27 2D 25 
               63 27 20 72 65 
               71 75 69 72 65 
               73 20 61 20 73 
               69 6E 67 6C 65 
               20 63 68 61 72 
               61 63 74 65 72 
               20 61 72 67 75 
               6D 65 6E 74 2E 
               0D 00 
 2682                           
 2683  FA029F  18               ?160:   clc
 2684  FA02A0  60                       rts


             Lines Assembled : 2635                  Errors : 0