WIP
This commit is contained in:
@@ -35,6 +35,7 @@ fn main() {
|
||||
print!("0x{:02x}, ", result.unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
fn read_file_to_bools(file_path: &str) -> io::Result<Vec<u8>> {
|
||||
// Open the file
|
||||
let file = File::open(file_path)?;
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct Chip8AsmParser;
|
||||
fn main() {
|
||||
println!("Taxation is Theft");
|
||||
|
||||
let unparsed = fs::read_to_string("resources/test/gemma_disassembler_manual_document.asc")
|
||||
let unparsed = fs::read_to_string("resources/test/asm/gemma_disassembler_manual_document.asm8")
|
||||
.expect("Unable to read input");
|
||||
|
||||
let file = Chip8AsmParser::parse(Rule::file, &unparsed)
|
||||
@@ -36,7 +36,7 @@ fn main() {
|
||||
print!("record = {:?}\t", record.as_str());
|
||||
let x = Chip8CpuInstructions::from_str(record.as_str());
|
||||
println!("DECODED TO {:?} {:04x}", x, x.encode());
|
||||
let (high, low) = InstructionUtil::split_bytes(x.encode());
|
||||
let (low, high) = InstructionUtil::split_bytes(x.encode());
|
||||
target_file
|
||||
.write_all(&[high, low])
|
||||
.expect("Unable to write to the file.");
|
||||
|
||||
Reference in New Issue
Block a user