diff options
Diffstat (limited to 'c/libc.s')
| -rw-r--r-- | c/libc.s | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 - .globl _sys_net + .globl _sys_net, _gsleep ;; 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. @@ -123,6 +123,13 @@ _sys_net: rst #0x30 ret + ;; void gsleep(unsigned char units /*A*/) - delay units*(1/64)s +_gsleep: + ld b, a + ld c, #34 ; SYS_SLEEP + rst #0x30 + ret + ;; unsigned char pollin(void) -> A (typed OSK char, or 0) _pollin: ld c, #32 ; SYS_POLLIN |
