The Compiler, in Its Own Language
io-builtins

Add read_input and print_char to the interpreter, compiler, and VM.

In the interpreter: read_input() copies the source into heap at address 0 and returns the length. print_char(c) writes one byte to output.

In the compiler: these become imported WAT functions. Add to c_program():

    emit_str("(import \"env\" \"print_char\" (func $print_char (param i64)))\n");
    emit_str("(import \"env\" \"read_input\" (func $read_input (result i64)))\n");
    emit_str("(memory (export \"memory\") 10)\n");

In the VM: call $print_char pops and prints the byte. call $read_input loads test data into vm_memory and pushes the length.

### The scanner