mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
Added _directerrno() to the sim6502/sim65c02 libraries.
This commit is contained in:
parent
0b6bcb565e
commit
a9982de475
@ -1,11 +1,29 @@
|
||||
;
|
||||
; Oliver Schmidt, 2013-05-16
|
||||
; 2013-05-16, Oliver Schmidt
|
||||
; 2015-07-18, Greg King
|
||||
;
|
||||
; extern int errno;
|
||||
; Helper functions for several high-level functions.
|
||||
;
|
||||
|
||||
.include "errno.inc"
|
||||
|
||||
; ----------------------------------------------------------------------------
|
||||
; int __fastcall__ _directerrno (unsigned char code);
|
||||
; /* Set errno to a specific error code; and, return -1. Used
|
||||
; ** by the library.
|
||||
; */
|
||||
|
||||
__directerrno:
|
||||
jsr __seterrno ; Save in errno
|
||||
fail: lda #$FF ; Return -1
|
||||
tax
|
||||
ok: rts
|
||||
|
||||
|
||||
; ----------------------------------------------------------------------------
|
||||
;
|
||||
; extern int _errno;
|
||||
;
|
||||
.bss
|
||||
|
||||
__errno:
|
||||
|
Loading…
x
Reference in New Issue
Block a user