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:
ol.sc
2012-02-04 20:58:15 +00:00
parent 6cdef72fb3
commit e6d886750b
12 changed files with 20 additions and 12 deletions

View File

@@ -36,7 +36,8 @@ DIRS = dlgbox \
menuicon \
mousesprite \
process \
runtime
runtime \
system
#--------------------------------------------------------------------------
# Directives

View 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

View File

@@ -0,0 +1,13 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 21.12.99
; void CallRoutine (myRoutine);
.export _CallRoutine
.include "jumptab.inc"
_CallRoutine = CallRoutine

View 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

View File

@@ -0,0 +1,13 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 30.10.99
; void FirstInit (void);
.export _FirstInit
.include "jumptab.inc"
_FirstInit = FirstInit

View 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

View 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

View 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

View File

@@ -0,0 +1,13 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 30.10.99
; void Panic (void);
.export _Panic
.include "jumptab.inc"
_Panic = Panic

View 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(&currentTime);
}
clock_t clock(void) {
return _systime();
}

View 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"