home *** CD-ROM | disk | FTP | other *** search
- ; del.asm
- ;---------------------------------------------------------------------------
- ; Command: del file file file ....
- ;---------------------------------------------------------------------------
- ; Old version of del
- ;
- ; Newer version (del.c) allows deleting wildcards like *.asm and is prefered
- ; over this one. This one uses normal CBM DOS wild cards, so del *.asm would
- ; really mean delete everything instead of just files that end in .asm
- ;
- ; This one is substantially smaller though and might be prefered for a RAM
- ; disk thats inside the C128
-
-
- pntr = $00ec ;cursor column
- int04 = $1704 ;get 1st char of parameter
- int05 = $1705 ;get next char of parameter
- int13 = $1713 ;delete file %x
- int0c = $170c ;read ds$
- int0d = $170d ;print ds$ after int0c
- int0e = $170e ;program terminate
- chrout = $ffd2
-
- star = $0b00
- .wor star
- * = star
-
- jmp del
- dw Date
-
- del ldx #1 ;start with %1 and work up
- stx parm
- jsr crdo
- del0 ldx parm ;echo filename to crt
- jsr int04
- bcs delx ;parameter wasn't there
- del1 jsr chrout
- jsr int05
- bcc del1
- del2 jsr spc ;tab(20)
- lda pntr
- cmp #20
- bne del2
- ldx parm
- jsr int13 ;scratch it
- jsr int0c ;read ds$
- jsr int0d ;and print it
- inc parm
- bne del0 ;next parameter
-
- delx jmp int0e
-
- spc lda #" "
- .byt $2c
- crdo lda #13
- jmp chrout
-
- parm = *
-
- .end
-
-