remove oserror from rp6502
This commit is contained in:
28
libsrc/rp6502/errno.s
Normal file
28
libsrc/rp6502/errno.s
Normal file
@@ -0,0 +1,28 @@
|
||||
;
|
||||
; 2003-08-12, Ullrich von Bassewitz
|
||||
; 2015-09-24, Greg King
|
||||
;
|
||||
; extern int __errno;
|
||||
; /* Library errors go here. */
|
||||
;
|
||||
|
||||
.include "rp6502.inc"
|
||||
.include "errno.inc"
|
||||
.export ___errno, _errno_opt
|
||||
.import _ria_call_int
|
||||
.constructor _errno_opt_constructor
|
||||
|
||||
; The errno on the RIA is the errno for cc65
|
||||
___errno := RIA_ERRNO
|
||||
|
||||
.code
|
||||
|
||||
; Request the RIA use cc65 values for RIA_ERRNO
|
||||
_errno_opt_constructor:
|
||||
lda #$01 ; 1 = cc65
|
||||
|
||||
; int __fastcall__ errno_opt (unsigned char platform);
|
||||
_errno_opt:
|
||||
sta RIA_A
|
||||
lda #RIA_OP_ERRNO_OPT
|
||||
jmp _ria_call_int
|
||||
Reference in New Issue
Block a user