Use a subroutine to set errno to save some space.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3032 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
22
libsrc/common/_seterrno.s
Normal file
22
libsrc/common/_seterrno.s
Normal file
@@ -0,0 +1,22 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 2004-05-13
|
||||
;
|
||||
; __seterrno: Will set __errno to the value in A and return zero in A. Other
|
||||
; registers aren't changed. The function is C callable, but
|
||||
; currently only called from asm code.
|
||||
;
|
||||
|
||||
.include "errno.inc"
|
||||
|
||||
.code
|
||||
|
||||
.proc __seterrno
|
||||
|
||||
sta __errno
|
||||
lda #0
|
||||
sta __errno+1
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user