aboutsummaryrefslogtreecommitdiffstats
path: root/usr/libc.s
diff options
context:
space:
mode:
Diffstat (limited to 'usr/libc.s')
-rw-r--r--usr/libc.s8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/libc.s b/usr/libc.s
index 5b176d9..2366cd8 100644
--- a/usr/libc.s
+++ b/usr/libc.s
@@ -1,7 +1,7 @@
.module libc
.globl _writes, _putc, _puts, _nl, _strlen, _readc, _sexit, _getpid, _getargs
.globl _open, _close, _fgetc, _fputc, _flist, _fremove, _pipe, _ssend, _srecv, _srecv_nb, _pollin, _pollcon
- .globl _sys_net, _gsleep
+ .globl _sys_net, _gsleep, _gticks
;; SDCC sm83 sdcccall(1): 1st arg -> A (byte) or DE (pointer); ret A / BC.
;; rst $30 (the trap) clobbers BC/DE/HL; SDCC treats them caller-saved, so
;; wrappers need not preserve them - but we compute cleanly regardless.
@@ -130,6 +130,12 @@ _gsleep:
rst #0x30
ret
+ ;; void gticks(unsigned char buf[4] /*DE*/) - 64 Hz uptime ticks, LE
+_gticks:
+ ld c, #36 ; SYS_UPTIME
+ rst #0x30
+ ret
+
;; unsigned char pollin(void) -> A (typed OSK char, or 0)
_pollin:
ld c, #32 ; SYS_POLLIN