aboutsummaryrefslogtreecommitdiffstats
path: root/include/gbos.inc
diff options
context:
space:
mode:
authoruser <user@clank>2026-07-16 07:21:40 +0200
committeruser <user@clank>2026-07-16 07:21:40 +0200
commit4335d248d18987a050d8ac26965c90718eef7562 (patch)
treee05038b2a21209281fd1c849c30145da9b7d77bc /include/gbos.inc
parentC toolchain: run SDCC-compiled C programs as gbos processes (diff)
downloadgbos-4335d248d18987a050d8ac26965c90718eef7562.tar.gz
gbos-4335d248d18987a050d8ac26965c90718eef7562.tar.xz
gbos-4335d248d18987a050d8ac26965c90718eef7562.zip
libc + CLI tools: a small C userland
- libc: add putc, puts, strlen, getargs (args string), EOF (=4) for readc. - args: shell splits the command line at the first space ("cmd\0args\0" at $A000, inherited by the child via fork); getargs() returns the arg string. - shell: exit on Ctrl-D/EOF; $ prompt over a clean read loop. - tools (c/): echo (argv), cat (stdin->stdout to EOF), uname, pid (decimal print), true, false. Each built to a ROM-bank blob and registered. - Makefile: CBLOBS list builds all C programs. - README: document libc + the tool set.
Diffstat (limited to 'include/gbos.inc')
-rw-r--r--include/gbos.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/gbos.inc b/include/gbos.inc
index 9f6a98a..01d7f1a 100644
--- a/include/gbos.inc
+++ b/include/gbos.inc
@@ -92,6 +92,12 @@ DEF SYS_MAX EQU 12
DEF PROG_WORKER EQU 0
DEF PROG_SH EQU 1
DEF PROG_HELLO EQU 2
-DEF PROG_CHELLO EQU 3 ; a C program (compiled with SDCC), see c/
+DEF PROG_CHELLO EQU 3 ; C programs (compiled with SDCC), see c/
+DEF PROG_ECHO EQU 4
+DEF PROG_TRUE EQU 5
+DEF PROG_FALSE EQU 6
+DEF PROG_UNAME EQU 7
+DEF PROG_PID EQU 8
+DEF PROG_CAT EQU 9
ENDC