read.o \
revers.o \
systime.o \
+ sysuname.o \
where.o \
write.o
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "Apple ]["
+
+
+
#--------------------------------------------------------------------------
# Object files
-OBJS = _scrsize.o \
- break.o \
- cclear.o \
- cgetc.o \
- chline.o \
- clock.o \
- close.o \
- clrscr.o \
- color.o \
- cputc.o \
- crt0.o \
- ctype.o \
- cvline.o \
- dio_cts.o \
- dio_stc.o \
- diopncls.o \
- dioread.o \
- diowrite.o \
- diowritev.o \
- fdtable.o \
- getargs.o \
- getfd.o \
- gotox.o \
- gotoy.o \
- gotoxy.o \
- graphics.o \
- graphuse.o \
- joy_stddrv.o \
- kbhit.o \
- lseek.o \
- mouse.o \
- mul40.o \
- open.o \
- oserrlist.o \
- oserror.o \
- ostype.o \
- randomize.o \
- read.o \
- readjoy.o \
- remove.o \
- revers.o \
- rs232.o \
- rwcommon.o \
- savevec.o \
- scroll.o \
- setcolor.o \
- siocall.o \
- systime.o \
- tvtype.o \
- ucase_fn.o \
- wherex.o \
- wherey.o \
- write.o
+OBJS = _scrsize.o \
+ break.o \
+ cclear.o \
+ cgetc.o \
+ chline.o \
+ clock.o \
+ close.o \
+ clrscr.o \
+ color.o \
+ cputc.o \
+ crt0.o \
+ ctype.o \
+ cvline.o \
+ dio_cts.o \
+ dio_stc.o \
+ diopncls.o \
+ dioread.o \
+ diowrite.o \
+ diowritev.o \
+ fdtable.o \
+ getargs.o \
+ getfd.o \
+ gotox.o \
+ gotoy.o \
+ gotoxy.o \
+ graphics.o \
+ graphuse.o \
+ joy_stddrv.o \
+ kbhit.o \
+ lseek.o \
+ mouse.o \
+ mul40.o \
+ open.o \
+ oserrlist.o \
+ oserror.o \
+ ostype.o \
+ randomize.o \
+ read.o \
+ readjoy.o \
+ remove.o \
+ revers.o \
+ rs232.o \
+ rwcommon.o \
+ savevec.o \
+ scroll.o \
+ setcolor.o \
+ siocall.o \
+ systime.o \
+ tvtype.o \
+ sysuname.o \
+ ucase_fn.o \
+ wherex.o \
+ wherey.o \
+ write.o
#--------------------------------------------------------------------------
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "Atari"
+
+
+
mainargs.o \
revers.o \
systime.o \
+ sysuname.o \
wherex.o \
wherey.o \
write.o
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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"
+
+
+
revers.o \
rs232.o \
slow.o \
+ sysuname.o \
tgi_mode_table.o \
toggle_videomode.o
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "Commodore 128"
+
+
+
kernal.o \
mainargs.o \
randomize.o \
- revers.o
+ revers.o \
+ sysuname.o
#--------------------------------------------------------------------------
# Drivers
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "Commodore 16"
+
+
+
randomize.o \
revers.o \
rs232.o \
+ sysuname.o \
tgi_mode_table.o
#--------------------------------------------------------------------------
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "Commodore 64"
+
+
+
randomize.o \
revers.o \
rs232.o \
+ sysuname.o \
tgi_mode_table.o
#--------------------------------------------------------------------------
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "Commodore 510"
+
+
+
pokesys.o \
randomize.o \
revers.o \
- rs232.o
+ rs232.o \
+ sysuname.o
#--------------------------------------------------------------------------
# Drivers
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "Commodore 610"
+
+
+
toupper.o \
uname.o \
unlink.o \
+ utscopy.o \
vfprintf.o \
vprintf.o \
vsprintf.o \
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; This module contains a utility function for the machine dependent parts
+; of uname (__sysuname): It copies a packed struct utsname (just the strings
+; without padding) into a struct utsname. The source of the data is an
+; external symbol named "utsdata", the target is passed in a/x.
+; The function is written so that it is a direct replacement for __sysuname
+; for systems where utsdata is fixed. It may also be called via jump or
+; subroutine on systems where utsdata must be changed at runtime.
+;
+
+ .export utscopy
+
+ .import utsdata
+ .importzp ptr1, tmp1
+
+ .include "utsname.inc"
+
+
+
+;--------------------------------------------------------------------------
+; Data.
+
+.rodata
+
+; Table with offsets into struct utsname
+fieldoffs:
+ .byte utsname_sysname
+ .byte utsname_nodename
+ .byte utsname_release
+ .byte utsname_version
+ .byte utsname_machine
+
+;--------------------------------------------------------------------------
+
+.code
+
+.proc utscopy
+
+ sta ptr1
+ stx ptr1+1 ; Save buf
+
+ ldx #0
+ stx tmp1 ; Field number
+
+next: ldy tmp1
+ cpy #utsname_fieldcount
+ beq done
+ inc tmp1 ; Bump field counter
+ lda fieldoffs,y ; Get next field offset
+ tay ; Field offset -> y
+
+loop: lda utsdata,x
+ sta (ptr1),y
+ inx ; Next char in utsdata
+ cmp #$00 ; Check for end of string
+ beq next ; Jump for next field
+ iny ; Next char in utsname struct
+ bne loop ; Copy string
+
+done: lda #$00 ; Always successful
+ rts
+
+.endproc
+
+
mainloop.o \
panic.o \
tobasic.o \
- setdevice.o
+ setdevice.o \
+ sysuname.o
C_OBJS = systime.o
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "GEOS"
+
+
+
randomize.o \
revers.o \
setcursor.o \
+ sysuname.o \
waitvblank.o \
wherex.o \
wherey.o
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "NES"
+
+
+
ksetnam.o \
mainargs.o \
randomize.o \
- revers.o
+ revers.o \
+ sysuname.o
#--------------------------------------------------------------------------
# Targets
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "Commodore PET"
+
+
+
mainargs.o \
randomize.o \
revers.o \
+ sysuname.o \
tgi_mode_table.o
#--------------------------------------------------------------------------
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "Commodore Plus/4"
+
+
+
kplot.o \
mainargs.o \
randomize.o \
- revers.o
+ revers.o \
+ sysuname.o
#--------------------------------------------------------------------------
# Drivers
--- /dev/null
+;
+; Ullrich von Bassewitz, 2003-08-12
+;
+; unsigned char __fastcall__ _sysuname (struct utsname* buf);
+;
+
+ .export __sysuname, utsdata
+
+ .import 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 "Commodore VIC20"
+
+
+