Renamed vasm to vasm_core

This commit is contained in:
2022-06-06 23:08:55 -05:00
parent 80daca0584
commit f9902e39cf
14 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2021"
[dependencies]
vcore = { path = "../vcore" }
vasm = { path = "../vasm" }
vasm = { path = "../vasm_core" }
rand = "0.8.0"
winit = "0.26.1"
pixels = "0.9.0"
+5 -4
View File
@@ -45,11 +45,12 @@ fn main() {
let memory = Memory::from(rng);
let mut cpu = CPU::new(memory);
display::reset(&mut cpu);
// let code = assemble_snippet(include_str!("typewriter.asm").lines().map(String::from)).expect("Assemble error");
let code = assemble_snippet(include_str!("typewriter.asm").lines().map(String::from))
.expect("Assemble error");
// let code = assemble_file("init.asm").expect("Assemble error");
let mut file = File::open("4th.rom").expect("ROM not found");
let mut code = Vec::new();
file.read_to_end(&mut code).expect("Couldn't read ROM");
// let mut file = File::open("4th.rom").expect("ROM not found");
// let mut code = Vec::new();
// file.read_to_end(&mut code).expect("Couldn't read ROM");
println!("ROM size: {} bytes", code.len());
cpu.poke_slice(0x400.into(), code.as_slice());
cpu.start();