aboutsummaryrefslogtreecommitdiffstats
path: root/src/programs.asm
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-24 12:48:42 +0200
committeruser <user@clank>2026-09-24 12:48:42 +0200
commit62c392178e774c09e42927cfdd0d4daebcd185ce (patch)
tree3347624de15c81a80a5e9bad395cbdebf288be61 /src/programs.asm
parentkernel: stat/fsstat/isatty syscalls, and O_APPEND (diff)
downloadgbos-62c392178e774c09e42927cfdd0d4daebcd185ce.tar.gz
gbos-62c392178e774c09e42927cfdd0d4daebcd185ce.tar.xz
gbos-62c392178e774c09e42927cfdd0d4daebcd185ce.zip
sh: run scripts, and >> redirection
`sh < file` already executed the file - and then powered the Game Boy off, because the read loop treated EOF as "the machine is done". That is right for init and wrong for everything else, so scripts were unusable. A shell now asks isatty(): with stdin on a file it prints no prompt, does not echo the script back, and exits at EOF. Only pid 1 on the console still powers down. init also runs /rc at boot if the cart has one, so a Game Boy can come up with its own startup script - verified across a real power cycle (write /rc, poweroff, reboot the same cart, watch init run it). `>>` appends instead of truncating, which is what makes writing that script on the device possible in the first place.
Diffstat (limited to 'src/programs.asm')
0 files changed, 0 insertions, 0 deletions