]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/remove.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / remove.s
index 1bda12474e0f5226d9a23fbd3a3584d567cfe3c5..e66f047efde849d4bf383fe69724429ab8c54977 100644 (file)
@@ -1,5 +1,5 @@
 ;
-; Ullrich von Bassewitz, 16.11.2002
+; Ullrich von Bassewitz, 2003-08-12
 ;
 ; int __fastcall__ remove (const char* name);
 ;
@@ -7,36 +7,15 @@
         .export         _remove
 
         .import         __sysremove
-        .import         __osmaperrno
-        .import         __errno
+        .import         __mappederrno
 
 
 ;--------------------------------------------------------------------------
-; 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
+        jsr     __sysremove     ; Call the machine specific function
+        jmp     __mappederrno   ; Store into _oserror, set errno, return 0/-1
 
 .endproc