diff options
| author | user <user@clank> | 2026-07-16 07:21:40 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-07-16 07:21:40 +0200 |
| commit | 4335d248d18987a050d8ac26965c90718eef7562 (patch) | |
| tree | e05038b2a21209281fd1c849c30145da9b7d77bc /Makefile | |
| parent | C toolchain: run SDCC-compiled C programs as gbos processes (diff) | |
| download | gbos-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 'Makefile')
| -rw-r--r-- | Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -18,7 +18,8 @@ $(BUILD)/%.o: src/%.asm | $(BUILD) rgbasm $(ASFLAGS) -o $@ $< # C programs: compiled with SDCC into ROM-bank blobs and INCBIN'd by programs.asm -CBLOBS := c/chello.bin +CBLOBS := c/chello.bin c/echo.bin c/true.bin c/false.bin c/uname.bin \ + c/pid.bin c/cat.bin $(BUILD)/programs.o: $(CBLOBS) c/%.bin: c/%.c c/crt0.s c/libc.s c/build.sh |
