PrismOS is a small hobby operating system that boots via GRUB and runs on x86 hardware (or in QEMU). It provides a simple framebuffer console, a basic shell, and a handful of built-in commands.
Install the build dependencies (example for Debian/Ubuntu):
sudo apt-get install build-essential nasm gcc-multilib xorriso qemu-system-x86 grub-common grub-pc-bin mtoolsBuild and run:
make run # build (if needed) and boot the ISO in QEMUOther useful targets:
make clean # remove build artifacts
make run-serial # boot and mirror COM1 to your terminal
make run-serial-log # boot and save COM1 output to build/serial.logNotes:
- The build uses 32-bit compilation flags (gcc -m32). Ensure you have multilib support installed.
make runlaunches QEMU for quick testing; you can also bootbuild/os.isoin a BIOS-mode VM.make run-seriallaunches QEMU with debug logs. If you are running bare-metal use serial port.
If you want a reproducible cross-toolchain build, replace the host gcc invocations with an i686-elf cross-compiler and adjust the Makefile accordingly.
Important
All code you commit must be clean and have comments.
For development, edit sources under src/, then re-run make run.
PrismOS includes a lightweight subset-C pipeline that targets a bytecode VM inside the OS.
Build the compiler:
make prismccCompile a program to a Prism app package:
cat > hello.c <<'EOF'
int main() {
int a = 2 + 3;
print("Hello from prismcc");
print_int(a * 10);
return 0;
}
EOF
./build/prismcc hello.c hello.appCopy the generated app to PrismOS disk content (8.3 FAT name recommended), then run in PrismOS shell:
app-run /HELLO.APP
- One function:
int main() { ... } - Statements:
int x = expr;x = expr;print("text");print_int(expr);return expr;
- Expressions: integer literals, variables,
+ - * /, unary-, parentheses
The compiler emits Prism app containers with a BCVM bytecode payload, and PrismOS runs them through the in-kernel bytecode VM.
PrismOS now includes an in-OS subset C compiler command:
cc <input.c> <output.app>
Example flow from PrismOS shell:
edit /HELLO.C
cc /HELLO.C /HELLO.APP
app-run /HELLO.APP
This uses the same subset language as prismcc and compiles directly on the PrismOS filesystem.