changes I GUESS

This commit is contained in:
able 2023-07-25 12:20:35 -05:00
parent a82686ec07
commit f4c55ae3cc
3 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,3 @@
li r20, 1010
st r20, r24, 0, 1
addi r24, r0, 10

BIN
hbvm/assets/memory.hb Normal file

Binary file not shown.

View file

@ -36,7 +36,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("Program interrupt: {:?}", vm.run()); println!("Program interrupt: {:?}", vm.run());
println!("{:?}", vm.registers); println!("{:?}", vm.registers);
std::alloc::dealloc(data, std::alloc::Layout::from_size_align_unchecked(4096, 4096));
println!("{:?}", core::slice::from_raw_parts(data, 4096));
std::alloc::dealloc(
data,
std::alloc::Layout::from_size_align_unchecked(4096, 4096),
);
vm.memory.unmap(0).unwrap(); vm.memory.unmap(0).unwrap();
} }
} }