Feature overview for the in-OS subset C compiler and BCVM runtime
src/apps/prismcc_runtime.csrc/apps/bytecode_vm.csrc/apps/app_format.hcc <input.c> <output.app>PrismCC compiles a C-like subset into BCVM bytecode packaged in the Prism app format.
intstringint[N] fixed-size arraysstruct types with int/string fieldsArrays are currently int-only. Local variable limit per function: 64.
int and string#include "relative/path.h"#include <relative/or/absolute/path.h>.h) are valid include targetsint x;, int x = 5;, string s;,
string s = "hi";, int a[8];, struct Person p;
p.age = 7;, p.name = "neo";if / elsewhilefor (init; condition; increment)return expr;+, -, *, /, %, unary
+, unary -
++a, --a, a++, a-- (int locals)
==, !=, <, <=, >,
>=
These are the built-ins exposed by PrismCC. Each one below includes what it does and how to call it.
print(expr)Use this when you want one call that handles either numeric or text output without choosing a separate function.
print("hello");
print(42);print_int(expr)Use this when the value is definitely numeric and you want the output path to be explicit.
int count = 3;
print_int(count);print_color(colorExpr, stringExpr)Use this for highlighted status output or simple visual emphasis in terminal-style apps.
print_color(2, "success");read_text()Use this when you want to prompt through the shell or UI before collecting free-form text.
string name = read_text();read_text(promptStringExpr)Use this when the user should see the question or context before entering input.
string city = read_text("Enter city: ");input_int()Use this when the app expects a numeric response instead of raw text.
int age = input_int();print_input()Use this for echoing the user’s last input or debugging interactive flows.
print_input();input_len()Use this when you need to check whether the input is empty or to size follow-up logic.
int len = input_len();input_eq("literal")Use this for menu choices, yes/no prompts, and simple command matching.
if (input_eq("yes")) {
print("confirmed");
}string_len(stringExpr)Use this for bounds checks, validation, or any logic that depends on string size.
int size = string_len(name);string_eq(stringExprA, stringExprB)Use this when you need exact string matching without manual character-by-character code.
if (string_eq(mode, "debug")) {
print("debug mode");
}file_read(pathStringExpr)Use this when you want to load text data from the filesystem into a string value.
string data = file_read("/DATA.TXT");file_write(pathStringExpr, textStringExpr)Use this when you want to replace the file contents with a new string.
file_write("/OUT.TXT", "fresh contents");file_append(pathStringExpr, textStringExpr)Use this for logs, traces, or any output that should accumulate over time.
file_append("/LOG.TXT", "next line");file_exists(pathStringExpr)Use this before reading or writing when the app needs to branch on file presence.
if (file_exists("/CONFIG.TXT")) {
print("config found");
}set_fullscreen(int enabled)Use this at app start to hide the text cursor and switch to framebuffer-style drawing updates.
set_fullscreen(1);
// ... draw loop ...
set_fullscreen(0);draw_pixel(int x, int y, int color)Use this for custom software rendering, pixel art, and basic visual effects.
draw_pixel(100, 80, 12);app_should_quit()Use this inside animation loops to exit cleanly without forcing the global shortcut behavior.
while (app_should_quit() == 0) {
// render frame
}app_exit()Use this for explicit termination paths such as menu commands or fatal runtime conditions.
if (done == 1) {
app_exit();
}Path strings are passed directly to VFS operations in the VM.
Array storage is VM heap backed, and out-of-range access fails VM execution.
cc /path/program.c /path/program.app.app-run /path/program.app.cc <input.c> <output.app>Use this inside the PrismOS shell to turn source code into a runnable BCVM application.
cc /HELLO.C /HELLO.APPapp-run <output.app>Use this after compilation to execute the generated app package.
app-run /HELLO.APPSmall Standard Library (Headers)Includes string helpers, math helpers, and IO wrappers that work with the new #include support.
#include "std/prism_string.h"
#include "std/prism_math.h"
#include "std/prism_io.h"struct Person { int age; string name; };int and stringStruct values are represented with VM-backed field storage.
int[N]