2004-05-13 21:09:08 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 2004-05-13
|
|
|
|
;
|
2022-08-28 22:09:44 +02:00
|
|
|
; ___seterrno: Will set ___errno to the value in A and return zero in A. Other
|
2022-04-17 16:06:22 +02:00
|
|
|
; registers aren't changed. The function is C callable, but
|
2004-05-13 21:09:08 +00:00
|
|
|
; currently only called from asm code.
|
|
|
|
;
|
|
|
|
|
2013-05-09 13:56:54 +02:00
|
|
|
.include "errno.inc"
|
2004-05-13 21:09:08 +00:00
|
|
|
|
|
|
|
.code
|
|
|
|
|
2022-08-28 21:52:53 +02:00
|
|
|
.proc ___seterrno
|
2004-05-13 21:09:08 +00:00
|
|
|
|
2022-08-28 22:09:44 +02:00
|
|
|
sta ___errno
|
2004-05-13 21:09:08 +00:00
|
|
|
lda #0
|
2022-08-28 22:09:44 +02:00
|
|
|
sta ___errno+1
|
2004-05-13 21:09:08 +00:00
|
|
|
rts
|
|
|
|
|
|
|
|
.endproc
|
|
|
|
|
|
|
|
|