--- /dev/null
+;
+; 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
; 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.
.rodata
utsdata:
- ; 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"
-
-
-
+ ; sysname
+ .asciiz "cc65"
+
+ ; 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"