1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00

Added _systime for all platforms

git-svn-id: svn://svn.cc65.org/cc65/trunk@1510 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2002-11-12 22:49:38 +00:00
parent de7bb15dee
commit 704ce5ae22
10 changed files with 163 additions and 6 deletions

View File

@ -28,12 +28,13 @@ S_OBJS= _scrsize.o \
randomize.o \
read.o \
revers.o \
systime.o \
where.o \
write.o
all: $(C_OBJS) $(S_OBJS)
clean:
@rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS) crt0.o
@rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS)

28
libsrc/apple2/systime.s Normal file
View File

@ -0,0 +1,28 @@
;
; Ullrich von Bassewitz, 12.11.2002
;
; time_t _systime (void);
; /* Similar to time(), but:
; * - Is not ISO C
; * - Does not take the additional pointer
; * - Does not set errno when returning -1
; */
;
.export __systime
.importzp sreg
.code
.proc __systime
lda #$FF
tax
sta sreg
sta sreg+1
rts ; Return -1
.endproc

View File

@ -61,6 +61,7 @@ OBJS = _scrsize.o \
scroll.o \
setcolor.o \
siocall.o \
systime.o \
tvtype.o \
ucase_fn.o \
where.o \

28
libsrc/atari/systime.s Normal file
View File

@ -0,0 +1,28 @@
;
; Ullrich von Bassewitz, 12.11.2002
;
; time_t _systime (void);
; /* Similar to time(), but:
; * - Is not ISO C
; * - Does not take the additional pointer
; * - Does not set errno when returning -1
; */
;
.export __systime
.importzp sreg
.code
.proc __systime
lda #$FF
tax
sta sreg
sta sreg+1
rts ; Return -1
.endproc

View File

@ -11,10 +11,13 @@
%.o: %.s
@$(AS) -g -o $@ $(AFLAGS) $<
OBJS = crt0.o
C_OBJS =
all: $(OBJS)
S_OBJS = crt0.o \
systime.o
all: $(C_OBJS) $(S_OBJS)
clean:
@rm -f $(OBJS)
@rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS)

28
libsrc/atmos/systime.s Normal file
View File

@ -0,0 +1,28 @@
;
; Ullrich von Bassewitz, 12.11.2002
;
; time_t _systime (void);
; /* Similar to time(), but:
; * - Is not ISO C
; * - Does not take the additional pointer
; * - Does not set errno when returning -1
; */
;
.export __systime
.importzp sreg
.code
.proc __systime
lda #$FF
tax
sta sreg
sta sreg+1
rts ; Return -1
.endproc

View File

@ -50,6 +50,7 @@ S_OBJS = c_acptr.o \
oserrlist.o \
oserror.o \
revers.o \
systime.o \
where.o
all: $(C_OBJS) $(S_OBJS)

28
libsrc/cbm/systime.s Normal file
View File

@ -0,0 +1,28 @@
;
; Ullrich von Bassewitz, 12.11.2002
;
; time_t _systime (void);
; /* Similar to time(), but:
; * - Is not ISO C
; * - Does not take the additional pointer
; * - Does not set errno when returning -1
; */
;
.export __systime
.importzp sreg
.code
.proc __systime
lda #$FF
tax
sta sreg
sta sreg+1
rts ; Return -1
.endproc

View File

@ -8,8 +8,19 @@
@$(AS) -o $@ $(AFLAGS) $<
S_OBJS = ctype.o callroutine.o enterdesktop.o firstinit.o getrandom.o getserialnumber.o\
initdoneio.o mainloop.o panic.o tobasic.o setdevice.o get_ostype.o
S_OBJS = ctype.o \
callroutine.o \
enterdesktop.o \
firstinit.o \
get_ostype.o \
getrandom.o \
getserialnumber.o \
initdoneio.o \
mainloop.o \
panic.o \
tobasic.o \
setdevice.o \
systime.o
all: $(S_OBJS)

View File

@ -0,0 +1,28 @@
;
; Ullrich von Bassewitz, 12.11.2002
;
; time_t _systime (void);
; /* Similar to time(), but:
; * - Is not ISO C
; * - Does not take the additional pointer
; * - Does not set errno when returning -1
; */
;
.export __systime
.importzp sreg
.code
.proc __systime
lda #$FF
tax
sta sreg
sta sreg+1
rts ; Return -1
.endproc