mirror of
https://github.com/cc65/cc65.git
synced 2026-04-25 06:17:58 +00:00
Moved two errno helper functions into separate files.
Only the function that actually is needed will be linked. It is very useful for targets that do not have file-system I/O.
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
;
|
||||
; 2013-05-16, Oliver Schmidt
|
||||
; 2015-07-18, Greg King
|
||||
;
|
||||
; 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:
|
||||
.word 0
|
||||
Reference in New Issue
Block a user