2005-08-31 20:11:45 +00:00
|
|
|
;
|
|
|
|
; Oliver Schmidt, 15.04.2005
|
|
|
|
;
|
|
|
|
; unsigned char __fastcall__ _sysremove (const char* name);
|
|
|
|
;
|
|
|
|
|
|
|
|
.export __sysremove
|
2013-05-09 11:56:54 +00:00
|
|
|
.import pushname, popname
|
2005-08-31 20:11:45 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.include "zeropage.inc"
|
|
|
|
.include "mli.inc"
|
2005-08-31 20:11:45 +00:00
|
|
|
|
|
|
|
__sysremove:
|
|
|
|
; Push name
|
2013-05-09 11:56:54 +00:00
|
|
|
jsr pushname
|
|
|
|
bne oserr
|
2005-08-31 20:11:45 +00:00
|
|
|
|
|
|
|
; Set pushed name
|
2013-05-09 11:56:54 +00:00
|
|
|
lda sp
|
|
|
|
ldx sp+1
|
|
|
|
sta mliparam + MLI::DESTROY::PATHNAME
|
|
|
|
stx mliparam + MLI::DESTROY::PATHNAME+1
|
2005-08-31 20:11:45 +00:00
|
|
|
|
|
|
|
; Remove file
|
2013-05-09 11:56:54 +00:00
|
|
|
lda #DESTROY_CALL
|
|
|
|
ldx #DESTROY_COUNT
|
|
|
|
jsr callmli
|
2005-08-31 20:11:45 +00:00
|
|
|
|
|
|
|
; Cleanup name
|
2013-05-09 11:56:54 +00:00
|
|
|
jsr popname ; Preserves A
|
2005-08-31 20:11:45 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
oserr: rts
|