]> git.sur5r.net Git - cc65/commitdiff
Added stub for _osmaperrno. Improve uname info. By Stefan Haubenthal.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 16 Apr 2011 12:15:49 +0000 (12:15 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 16 Apr 2011 12:15:49 +0000 (12:15 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4985 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atmos/Makefile
libsrc/atmos/oserror.s [new file with mode: 0644]
libsrc/atmos/sysuname.s

index c19fe187b0d45ecb7766f596384c95ca6755547d..5fe1792b329d3d0ed63eb09a9bb61cec0ab0d62d 100644 (file)
@@ -61,6 +61,7 @@ OBJS  =       _scrsize.o      \
         kbhit.o         \
         mainargs.o      \
         oserrlist.o     \
+        oserror.o       \
         revers.o        \
         systime.o       \
         sysuname.o      \
diff --git a/libsrc/atmos/oserror.s b/libsrc/atmos/oserror.s
new file mode 100644 (file)
index 0000000..befbdff
--- /dev/null
@@ -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
index 85fba97385222ea13203efac8404cd912459ca3a..d86ce504754562f0d28d204f051c8d78a37ec899 100644 (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.
 .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"