mirror of
https://github.com/cc65/cc65.git
synced 2024-11-18 00:07:21 +00:00
30237d3c36
the diskcmd.s module. git-svn-id: svn://svn.cc65.org/cc65/trunk@3939 b7a2c559-68d2-44c3-8de9-860c34a00d81
39 lines
876 B
ArmAsm
39 lines
876 B
ArmAsm
;
|
|
; Ullrich von Bassewitz, 2002-11-16, 2009-02-22
|
|
;
|
|
; Scratch a file on disk
|
|
;
|
|
|
|
.export scratch
|
|
.import opencmdchannel, closecmdchannel, writefndiskcmd
|
|
.import fnunit, fncmd
|
|
|
|
.include "cbm.inc"
|
|
|
|
;--------------------------------------------------------------------------
|
|
; scratch: Scratch a file on disk. Expects the name of the file to be already
|
|
; parsed. Returns an error code in A, which may either be the code read from
|
|
; the command channel, or another error when accessing the command channel
|
|
; failed.
|
|
|
|
.proc scratch
|
|
|
|
ldx fnunit
|
|
jsr opencmdchannel
|
|
bne done
|
|
|
|
lda #'s' ; Scratch command
|
|
sta fncmd
|
|
jsr writefndiskcmd
|
|
|
|
pha
|
|
ldx fnunit
|
|
jsr closecmdchannel
|
|
pla
|
|
|
|
done: rts
|
|
|
|
.endproc
|
|
|
|
|