Moved the 'system' files from 'geos-cbm' to 'geos-common' which are believed to work as-is on Apple GEOS too.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5446 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -36,7 +36,8 @@ DIRS = dlgbox \
|
||||
menuicon \
|
||||
mousesprite \
|
||||
process \
|
||||
runtime
|
||||
runtime \
|
||||
system
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Directives
|
||||
|
||||
17
libsrc/geos-common/system/Makefile
Normal file
17
libsrc/geos-common/system/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# makefile for CC65 runtime library
|
||||
#
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Object files
|
||||
|
||||
C_OBJS += systime.o
|
||||
|
||||
S_OBJS += callroutine.o \
|
||||
enterdesktop.o \
|
||||
firstinit.o \
|
||||
getrandom.o \
|
||||
getserialnumber.o \
|
||||
mainloop.o \
|
||||
panic.o \
|
||||
sysuname.o
|
||||
13
libsrc/geos-common/system/callroutine.s
Normal file
13
libsrc/geos-common/system/callroutine.s
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
;
|
||||
; Maciej 'YTM/Alliance' Witkowiak
|
||||
;
|
||||
; 21.12.99
|
||||
|
||||
; void CallRoutine (myRoutine);
|
||||
|
||||
.export _CallRoutine
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_CallRoutine = CallRoutine
|
||||
15
libsrc/geos-common/system/enterdesktop.s
Normal file
15
libsrc/geos-common/system/enterdesktop.s
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
;
|
||||
; Maciej 'YTM/Elysium' Witkowiak
|
||||
;
|
||||
; 30.10.99, 17.04.2003
|
||||
|
||||
; void EnterDeskTop (void);
|
||||
|
||||
.import _exit
|
||||
.export _EnterDeskTop
|
||||
|
||||
_EnterDeskTop:
|
||||
lda #0
|
||||
tax
|
||||
jmp _exit
|
||||
13
libsrc/geos-common/system/firstinit.s
Normal file
13
libsrc/geos-common/system/firstinit.s
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
;
|
||||
; Maciej 'YTM/Alliance' Witkowiak
|
||||
;
|
||||
; 30.10.99
|
||||
|
||||
; void FirstInit (void);
|
||||
|
||||
.export _FirstInit
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_FirstInit = FirstInit
|
||||
16
libsrc/geos-common/system/getrandom.s
Normal file
16
libsrc/geos-common/system/getrandom.s
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
;
|
||||
; Maciej 'YTM/Elysium' Witkowiak
|
||||
;
|
||||
; 30.10.1999, 2.1.2003
|
||||
|
||||
; char GetRandom (void);
|
||||
|
||||
.export _GetRandom
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_GetRandom:
|
||||
jsr GetRandom
|
||||
ldx #0
|
||||
rts
|
||||
19
libsrc/geos-common/system/getserialnumber.s
Normal file
19
libsrc/geos-common/system/getserialnumber.s
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
;
|
||||
; Maciej 'YTM/Alliance' Witkowiak
|
||||
;
|
||||
; 30.10.99
|
||||
|
||||
; int GetSerialNumber (void);
|
||||
|
||||
.export _GetSerialNumber
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_GetSerialNumber:
|
||||
|
||||
jsr GetSerialNumber
|
||||
lda r0L
|
||||
ldx r0H
|
||||
rts
|
||||
13
libsrc/geos-common/system/mainloop.s
Normal file
13
libsrc/geos-common/system/mainloop.s
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
;
|
||||
; Maciej 'YTM/Elysium' Witkowiak
|
||||
;
|
||||
; 30.10.1999, 10.01.2003
|
||||
|
||||
; void MainLoop (void);
|
||||
|
||||
.export _MainLoop
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_MainLoop = MainLoop
|
||||
13
libsrc/geos-common/system/panic.s
Normal file
13
libsrc/geos-common/system/panic.s
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
;
|
||||
; Maciej 'YTM/Alliance' Witkowiak
|
||||
;
|
||||
; 30.10.99
|
||||
|
||||
; void Panic (void);
|
||||
|
||||
.export _Panic
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_Panic = Panic
|
||||
34
libsrc/geos-common/system/systime.c
Normal file
34
libsrc/geos-common/system/systime.c
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
/*
|
||||
* systime.c
|
||||
*
|
||||
* Maciej 'YTM/Elysium' Witkowiak, 22.11.2002
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
#include <geos.h>
|
||||
|
||||
time_t _systime(void) {
|
||||
|
||||
struct tm currentTime;
|
||||
|
||||
currentTime.tm_sec = system_date.s_seconds;
|
||||
currentTime.tm_min = system_date.s_minutes;
|
||||
currentTime.tm_hour = system_date.s_hour;
|
||||
currentTime.tm_mday = system_date.s_day;
|
||||
currentTime.tm_mon = system_date.s_month;
|
||||
currentTime.tm_year = system_date.s_year;
|
||||
if (system_date.s_year < 87) {
|
||||
currentTime.tm_year+=100;
|
||||
}
|
||||
currentTime.tm_isdst = -1;
|
||||
|
||||
return mktime(¤tTime);
|
||||
|
||||
}
|
||||
|
||||
clock_t clock(void) {
|
||||
|
||||
return _systime();
|
||||
|
||||
}
|
||||
39
libsrc/geos-common/system/sysuname.s
Normal file
39
libsrc/geos-common/system/sysuname.s
Normal file
@@ -0,0 +1,39 @@
|
||||
;
|
||||
; 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"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user