aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gbos.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/gbos.inc b/include/gbos.inc
index 92d8732..246628c 100644
--- a/include/gbos.inc
+++ b/include/gbos.inc
@@ -10,6 +10,10 @@ DEF GBOS_INC EQU 1
; -----------------------------------------------------------------------------
DEF rIF EQU $FF0F ; interrupt flags
DEF rIE EQU $FFFF ; interrupt enable
+DEF rTIMA EQU $FF05 ; timer counter
+DEF rTMA EQU $FF06 ; timer modulo (reload)
+DEF rTAC EQU $FF07 ; timer control (bit2 = enable, bits1-0 = clock)
+DEF IEF_TIMER EQU %00000100
DEF rDIV EQU $FF04 ; divider register: free-running 8-bit @ 16384 Hz
DEF rSVBK EQU $FF70 ; CGB WRAM bank select ($D000-$DFFF): 1..7
DEF wCurMask EQU $D589 ; term/osk: cursor underline bits OR'd into a tile's last row
@@ -134,7 +138,8 @@ DEF SYS_POLLIN EQU 32 ; poll OSK for a typed char (-> A=char or 0)
DEF SYS_NET EQU 33 ; socket layer (DE=&netreq -> A=result)
DEF SYS_SLEEP EQU 34 ; cooperative delay (B = 1/64-second units)
DEF SYS_POLLCON EQU 35 ; poll console ring (link-injected -> A=byte or 0)
-DEF SYS_MAX EQU 36
+DEF SYS_UPTIME EQU 36 ; copy the 64 Hz tick counter (4B LE) to [DE]
+DEF SYS_MAX EQU 37
; ---- socket layer (SYS_NET) --------------------------------------------------
; netreq struct (in caller RAM; DE points to it):
@@ -259,5 +264,6 @@ DEF PROG_PING EQU 27
DEF PROG_NSLOOKUP EQU 28
DEF PROG_DHCP EQU 29
DEF PROG_IRC EQU 30
+DEF PROG_UPTIME EQU 31
ENDC