#include "gbos.h" /* poweroff: shut the machine down cleanly. * This is the ONLY safe way to stop a gbos with data on the disk: the cart's * battery-backed RAM is only written out when the emulator exits properly, * so pulling the plug (SIGKILL, closing the window) loses the whole * filesystem - it comes back "formatted" on the next boot. */ void main(void) { puts("poweroff: syncing disk..."); nl(); poweroff(); }