gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 2113bc152bb7924630a2ea8733f4f77c89567ef4 parent 4aa811df9e7794253ef3335135db4eb8955f90e1 Author: Toxa <untoxa@mail.ru> Date: Tue, 4 Jan 2022 12:01:24 +0300 SMS/GG: clock() implementation Diffstat:
| M | gbdk-lib/include/time.h | 2 | +- |
| A | gbdk-lib/libc/targets/z80/clock.s | 12 | ++++++++++++ |
| M | gbdk-lib/libc/targets/z80/gg/Makefile | 2 | +- |
| M | gbdk-lib/libc/targets/z80/sms/Makefile | 2 | +- |
4 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/gbdk-lib/include/time.h b/gbdk-lib/include/time.h @@ -22,7 +22,7 @@ typedef uint16_t time_t; @see sys_time, time() */ -clock_t clock(); +clock_t clock() OLDCALL; /** Converts clock() time to Seconds diff --git a/gbdk-lib/libc/targets/z80/clock.s b/gbdk-lib/libc/targets/z80/clock.s @@ -0,0 +1,12 @@ + .include "global.s" + + .title "System clock" + .module Clock + + .globl .sys_time + + .area _HOME + +_clock:: + LD HL,(.sys_time) + RET diff --git a/gbdk-lib/libc/targets/z80/gg/Makefile b/gbdk-lib/libc/targets/z80/gg/Makefile @@ -24,7 +24,7 @@ ASSRC = set_interrupts.s \ palette.s set_palette.s \ pad.s pad_ex.s \ int.s nmi.s \ - mode.s \ + mode.s clock.s \ delay.s \ memset_small.s \ far_ptr.s \ diff --git a/gbdk-lib/libc/targets/z80/sms/Makefile b/gbdk-lib/libc/targets/z80/sms/Makefile @@ -24,7 +24,7 @@ ASSRC = set_interrupts.s \ palette.s set_palette.s \ pad.s pad_ex.s \ int.s nmi.s \ - mode.s \ + mode.s clock.s \ delay.s \ memset_small.s \ far_ptr.s \
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.