include print: "./lib/io/print.dsa";
include arena: "./lib/memory/arena_alloc.dsa";

fn main() -> u32 {

    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);

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

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

    return 0;
}
