X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fcbm%2Fscratch.s;h=e1665e5a67899f3f2ffe314b5c1678cfb73269e3;hb=6a92d8b987ef98b97fced19533573c9e74b208a9;hp=e8ffad9d564a37a384f87edb29c3f58841f5a9b3;hpb=751aaee63dd64a751458c9798d4c808fa7689b64;p=cc65 diff --git a/libsrc/cbm/scratch.s b/libsrc/cbm/scratch.s index e8ffad9d5..e1665e5a6 100644 --- a/libsrc/cbm/scratch.s +++ b/libsrc/cbm/scratch.s @@ -1,12 +1,12 @@ ; -; Ullrich von Bassewitz, 16.11.2002 +; Ullrich von Bassewitz, 2002-11-16, 2009-02-22 ; ; Scratch a file on disk ; .export scratch - .import readdiskerror - .import fnunit, fnlen, fncmd + .import opencmdchannel, closecmdchannel, writefndiskcmd + .import fnunit, fncmd .include "cbm.inc" @@ -18,28 +18,17 @@ .proc scratch - lda #15 ; Command channel - ldx fnunit ; Unit - tay ; Secondary address - jsr SETLFS + ldx fnunit + jsr opencmdchannel + bne done lda #'s' ; Scratch command sta fncmd - ldx fnlen - inx ; Account for "S" - txa ; Length of name into A - ldx #fncmd - jsr SETNAM - - jsr OPEN - bcs done - - jsr readdiskerror ; Read the command channel + jsr writefndiskcmd pha - lda #15 - jsr CLOSE + ldx fnunit + jsr closecmdchannel pla done: rts