1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-10 23:29:05 +00:00
cc65/libsrc/common/remove.s

46 lines
672 B
ArmAsm
Raw Normal View History

;
; Ullrich von Bassewitz, 16.11.2002
;
; int __fastcall__ remove (const char* name);
;
.export _remove
.import __sysremove
.import __osmaperrno
.import __errno
;--------------------------------------------------------------------------
; remove
.proc _remove
; Go ahead and call the machine dependent function
jsr __sysremove
; Check for errors
cmp #$00
bne ok
jsr __osmaperrno
sta __errno
stx __errno+1
lda #$FF
tax
rts
; Error free
ok: lda #$00
tax
rts
.endproc