From c9495d4b52b245951bf4768379b38aeb1843d60f Mon Sep 17 00:00:00 2001 From: user Date: Fri, 17 Jul 2026 20:22:48 +0200 Subject: irc: a bitchx/irssi-style IRC client irc HOST [NICK] - connects over the kernel TCP stack (DNS-resolves the host), registers, and runs a live client on the 40x18 LCD. UI, within the terminal's means (no cursor addressing - just \r + \b): messages scroll above a fixed irssi-style input line '[#chan] text_' redrawn in place; long input scrolls horizontally. The elders' formats: msg, off-channel, *nick* private, -nick- notice, * nick action, >target< outbound, -!- server/status. Keys come from both the OSK (SELECT) and the console ring (pollcon), so a hub can drive it. Commands: /join /part /msg /me /nick /quit /raw, plus bare text to the current channel. Handles PING (PONG + a wink), CTCP ACTION/VERSION, JOIN/PART/QUIT/KICK/NICK, 332/353 topic+names, and 433 nick-in-use (auto-appends _). Registers on bank 32 as program id 30. Note: gbos doesn't zero C statics, so main() inits its state explicitly; the local TCP port is randomized (DIV) to dodge a stale server-side half-open from an unclean prior exit. Tested end to end against a small ircd through gbhub: full MOTD burst, join, channel + private messages, actions, and bot replies all render correctly. --- src/programs.asm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/programs.asm') diff --git a/src/programs.asm b/src/programs.asm index e89fe0c..36f9d02 100644 --- a/src/programs.asm +++ b/src/programs.asm @@ -130,6 +130,9 @@ ProgNslookup: SECTION "prog_dhcp", ROMX[$4000], BANK[31] ProgDhcp: INCBIN "c/dhcp.bin" +SECTION "prog_irc", ROMX[$4000], BANK[32] +ProgIrc: + INCBIN "c/irc.bin" ; ----------------------------------------------------------------------------- ; PROG_SH (bank 3) - the shell, now written in C (c/sh.c): parses >/ program id, searched by sys_lookup. @@ -298,4 +303,6 @@ NameTable:: db PROG_NSLOOKUP db "dhcp", 0 db PROG_DHCP + db "irc", 0 + db PROG_IRC db 0 -- cgit v1.3.1-sl0p