<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gbos.git/src/tasks.asm, branch master</title>
<subtitle>gbos - a tiny Unix-flavored OS for the Game Boy Color (kernel, shell, coreutils in C, RAM filesystem)</subtitle>
<id>https://git.sl0p.foo/gbos.git/atom/src/tasks.asm?h=master</id>
<link rel='self' href='https://git.sl0p.foo/gbos.git/atom/src/tasks.asm?h=master'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/'/>
<updated>2026-07-15T22:31:27Z</updated>
<entry>
<title>wip: sys_read + serial console shell (read-store bug under investigation)</title>
<updated>2026-07-15T22:31:27Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-07-15T22:31:27Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/commit/?id=d5c06116d3d1257b46c476cf73b634cf089bcb82'/>
<id>urn:sha1:d5c06116d3d1257b46c476cf73b634cf089bcb82</id>
<content type='text'>
- sys_read (SYS_READ): blocking console input via external-clock serial poll;
  yields while waiting. Verified working (direct-echo cat: 'hi' -&gt; 'hi').
- shell (PROG_SH): prompt/read/parse/fork+exec+wait; worker+hello programs;
  StrEqual/SkipName helpers; command table.
- init now execs the shell.
- KNOWN BUG: storing the typed char to the line buffer at $A000 (cart RAM of an
  exec'd program) corrupts the following sys_read; sys_write reading $A000 also
  returns $3E. Kernel syscalls themselves are correct; isolating the cart-RAM /
  exec RAM-bank interaction next.
</content>
</entry>
<entry>
<title>kernel: complete the process lifecycle (exit/wait/reap + bank free list)</title>
<updated>2026-07-15T22:12:43Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-07-15T22:12:43Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/commit/?id=19a2b63bab71b796ee456b3ae8bec1a2ab297158'/>
<id>urn:sha1:19a2b63bab71b796ee456b3ae8bec1a2ab297158</id>
<content type='text'>
- exit(): zombie + status, reparent orphans to init, wake blocked parent,
  schedule away forever (resources reclaimed by the reaper)
- wait(): scan for a zombie child; reap (free cart-RAM bank + PCB slot) and
  return pid/code; block PS_BLOCKED + yield if children still live; $FF if none
- cart-RAM banks are now a free list (wBankUsed bitmap): AllocRamBank/FreeRamBank
- scheduler: FindNextReady returns carry when nothing runnable; yield idles
  instead of blindly picking slot 0
- helpers: FindPcbByPid, ReparentToInit
- demo: init forks 3 workers -&gt; exec -&gt; exit(pid) -&gt; wait/reap =&gt; wwwR2R3R4!
  verified bank recycling with 6 workers over 3 banks (w2w3w4w5w6w7)
- README: document the lifecycle + syscall status
</content>
</entry>
<entry>
<title>kernel: implement exec()</title>
<updated>2026-07-15T22:04:09Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-07-15T22:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/commit/?id=0a77a11e17f697bf797655c4ae87b927432b1f88'/>
<id>urn:sha1:0a77a11e17f697bf797655c4ae87b927432b1f88</id>
<content type='text'>
- sys_exec(B=program id): look up ProgramTable, point PROC_ROMB at the program's
  ROM text bank, map it into $4000-$7FFF, reset stack, jp to entry (no return)
- programs.asm: two demo programs (ping/pong) ORG'd at the SAME $4000 in banks
  2 and 3 - proves execution is driven purely by PROC_ROMB
- demo: init forks; parent execs PROG_PING (bank2, '1'), child execs PROG_PONG
  (bank3, '2') -&gt; '1212...', 2000/2000 balanced, zero garbage
- README: document exec + text-in-ROM model
</content>
</entry>
<entry>
<title>kernel: implement fork()</title>
<updated>2026-07-15T21:54:13Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-07-15T21:54:13Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/commit/?id=ab3ebbe227c72b745a46f9233fbfbb27477586b8'/>
<id>urn:sha1:ab3ebbe227c72b745a46f9233fbfbb27477586b8</id>
<content type='text'>
- sys_fork: switch to a kernel stack, bump-allocate a cart-RAM bank, copy the
  parent's 8 KiB bank via a WRAM bounce buffer, plant a switch-in frame so the
  child returns 0 to the post-fork PC, fill the child PCB (shared ROM text)
- add AllocRamBank (bump allocator) + FindFreeSlot helpers
- demo: init forks; parent prints P, child prints C (PCPC...); nested fork
  gives three distinct pids (123...)
- README: document the fork mechanism, mark syscall status
</content>
</entry>
<entry>
<title>gbos scaffold: working cooperative microkernel (verified ABAB in emulator)</title>
<updated>2026-07-15T21:44:28Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-07-15T21:44:28Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/commit/?id=de725da74db5cba0f9bfd0755269e1683423d87b'/>
<id>urn:sha1:de725da74db5cba0f9bfd0755269e1683423d87b</id>
<content type='text'>
- fix ClearKernelRAM clobbering the kernel stack (only clear $C000-$CBFF)
- fix SyscallTrap clobbering DE (buffer arg) during table dispatch
- README: run via ~/dev/gbc --headless; note bring-up bugs
</content>
</entry>
</feed>
