include serial: "./lib/serial.dsa";
include print: "./lib/print.dsa";
include arena: "./lib/arena_alloc.dsc";

fn main() {
    let x: u32 = 0;
    let y: u32 = &x;

    let alloc: u32 = arena::new(512);
    let ptr1: u32 = arena::alloc(alloc, 32);
    let ptr2: u32 = arena::alloc(alloc, 32);

    serial::print_hex_word(alloc);
    serial::print_newline();
    serial::print_hex_word(ptr1);
    serial::print_newline();
    serial::print_hex_word(ptr2);
    serial::print_newline();
    serial::print_num(*ptr2);
    serial::print_newline();
    *ptr2 = 42;

    serial::print_hex_word(ptr2);
    serial::print_whitespace();
    serial::print_num(*ptr2);
    serial::print_newline();
    serial::println("end");

    return 0;
}
