]> git.sur5r.net Git - cc65/commitdiff
Added _systime for all platforms
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 12 Nov 2002 22:49:38 +0000 (22:49 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 12 Nov 2002 22:49:38 +0000 (22:49 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1510 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/apple2/Makefile
libsrc/apple2/systime.s [new file with mode: 0644]
libsrc/atari/Makefile
libsrc/atari/systime.s [new file with mode: 0644]
libsrc/atmos/Makefile
libsrc/atmos/systime.s [new file with mode: 0644]
libsrc/cbm/Makefile
libsrc/cbm/systime.s [new file with mode: 0644]
libsrc/geos/system/Makefile
libsrc/geos/system/systime.s [new file with mode: 0644]

index c87d436613be7de808341b7e4effb9dad635f375..248cfae8b24f11783a61b536b8029b6a26a5c7a9 100644 (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)
 
 
diff --git a/libsrc/apple2/systime.s b/libsrc/apple2/systime.s
new file mode 100644 (file)
index 0000000..1d039e8
--- /dev/null
@@ -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
+
+
index afc4e7c9c3d54f7984d5e2e89ec9a802fc522a2c..e5a4095f37971be5f6c34f6bdf951016eb46468c 100644 (file)
@@ -61,6 +61,7 @@ OBJS =        _scrsize.o   \
        scroll.o     \
        setcolor.o   \
        siocall.o    \
+        systime.o    \
        tvtype.o     \
        ucase_fn.o   \
        where.o      \
diff --git a/libsrc/atari/systime.s b/libsrc/atari/systime.s
new file mode 100644 (file)
index 0000000..1d039e8
--- /dev/null
@@ -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
+
+
index 454edd96af4391e80e586c379b91f3aad267fa47..b878d96c5059385c2b6b9a1d6114ed41a3741365 100644 (file)
 %.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)
 
diff --git a/libsrc/atmos/systime.s b/libsrc/atmos/systime.s
new file mode 100644 (file)
index 0000000..1d039e8
--- /dev/null
@@ -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
+
+
index 54e6c6314750f62a3c12c278b057ff66347e9ed0..b224d139b3a2a51bde0cd75b28ce4541b880c284 100644 (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)
diff --git a/libsrc/cbm/systime.s b/libsrc/cbm/systime.s
new file mode 100644 (file)
index 0000000..1d039e8
--- /dev/null
@@ -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
+
+
index e3508b4ded9edd9f0923cd062868ceaa58aaad45..4389b8eba6e1b71ff4c874e2c0c256da4214d4aa 100644 (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)
 
diff --git a/libsrc/geos/system/systime.s b/libsrc/geos/system/systime.s
new file mode 100644 (file)
index 0000000..1d039e8
--- /dev/null
@@ -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
+
+