1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-21 20:29:24 +00:00

Added remove()

git-svn-id: svn://svn.cc65.org/cc65/trunk@2187 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2003-06-02 16:10:54 +00:00
parent 7b3f6f9369
commit 6e301bc88e

45
libsrc/common/remove.s Normal file
View File

@ -0,0 +1,45 @@
;
; 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