]> git.sur5r.net Git - cc65/commitdiff
Added remove()
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 2 Jun 2003 16:10:54 +0000 (16:10 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 2 Jun 2003 16:10:54 +0000 (16:10 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2187 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/common/remove.s [new file with mode: 0644]

diff --git a/libsrc/common/remove.s b/libsrc/common/remove.s
new file mode 100644 (file)
index 0000000..1bda124
--- /dev/null
@@ -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
+
+
+
+