1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-28 10:55:43 +00:00

Added stub for _osmaperrno. Improve uname info. By Stefan Haubenthal.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4985 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2011-04-16 12:15:49 +00:00
parent ccd1f5fcd7
commit 49d7d2df87
3 changed files with 39 additions and 20 deletions

View File

@ -61,6 +61,7 @@ OBJS = _scrsize.o \
kbhit.o \
mainargs.o \
oserrlist.o \
oserror.o \
revers.o \
systime.o \
sysuname.o \

11
libsrc/atmos/oserror.s Normal file
View File

@ -0,0 +1,11 @@
;
; Stefan Haubenthal, 2011-04-10
;
; int __fastcall__ _osmaperrno (unsigned char oserror);
; /* Map a system specific error into a system independent code */
;
.export __osmaperrno
.import return0
__osmaperrno = return0

View File

@ -4,11 +4,11 @@
; unsigned char __fastcall__ _sysuname (struct utsname* buf);
;
.export __sysuname, utsdata
.export __sysuname, utsdata
.import utscopy
.import utscopy
__sysuname = utscopy
__sysuname = utscopy
;--------------------------------------------------------------------------
; Data. We define a fixed utsname struct here and just copy it.
@ -16,24 +16,31 @@
.rodata
utsdata:
; sysname
.asciiz "cc65"
; sysname
.asciiz "cc65"
; nodename
.asciiz ""
; release
.byte ((.VERSION >> 8) & $0F) + '0'
.byte '.'
.byte ((.VERSION >> 4) & $0F) + '0'
.byte $00
; version
.byte (.VERSION & $0F) + '0'
.byte $00
; machine
.asciiz "Oric Atmos"
; nodename
.asciiz ""
; release
.byte ((.VERSION >> 8) & $0F) + '0'
.byte '.'
.if ((.VERSION >> 4) & $0F) > 9
.byte ((.VERSION >> 4) & $0F) / 10 + '0'
.byte ((.VERSION >> 4) & $0F) .MOD 10 + '0'
.else
.byte ((.VERSION >> 4) & $0F) + '0'
.endif
.byte $00
; version
.if (.VERSION & $0F) > 9
.byte (.VERSION & $0F) / 10 + '0'
.byte (.VERSION & $0F) .MOD 10 + '0'
.else
.byte (.VERSION & $0F) + '0'
.endif
.byte $00
; machine
.asciiz "Oric Atmos"