mirror of
https://github.com/cc65/cc65.git
synced 2024-11-03 10:07:02 +00:00
33 lines
689 B
ArmAsm
33 lines
689 B
ArmAsm
;
|
|
; Oliver Schmidt, 15.04.2005
|
|
;
|
|
; unsigned char __fastcall__ _sysremove (const char* name);
|
|
;
|
|
|
|
.export __sysremove
|
|
.import pushname, popname
|
|
|
|
.include "zeropage.inc"
|
|
.include "mli.inc"
|
|
|
|
__sysremove:
|
|
; Push name
|
|
jsr pushname
|
|
bne oserr
|
|
|
|
; Set pushed name
|
|
lda sp
|
|
ldx sp+1
|
|
sta mliparam + MLI::DESTROY::PATHNAME
|
|
stx mliparam + MLI::DESTROY::PATHNAME+1
|
|
|
|
; Remove file
|
|
lda #DESTROY_CALL
|
|
ldx #DESTROY_COUNT
|
|
jsr callmli
|
|
|
|
; Cleanup name
|
|
jsr popname ; Preserves A
|
|
|
|
oserr: rts
|