aboutsummaryrefslogtreecommitdiffstats
path: root/src/net.asm
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.asm')
-rw-r--r--src/net.asm10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/net.asm b/src/net.asm
index f2c4279..8309242 100644
--- a/src/net.asm
+++ b/src/net.asm
@@ -54,6 +54,16 @@ sys_srecv_nb::
and a ; CF = 0 (got a byte)
ret
+; sys_pollcon() -> A = a queued console-ring byte (link-injected input,
+; e.g. gbhub 'type'), or 0 if none. Non-blocking twin of KGetc's con_pop
+; path: programs that own their main loop (irc) poll this alongside the OSK.
+; The ring fills during net pumps, which such programs do constantly.
+sys_pollcon::
+ call con_pop
+ ret nc ; got a byte
+ xor a
+ ret
+
; sys_pollin() -> A = char typed on the OSK this poll, or 0 if none.
sys_pollin::
call pad_poll