From ae788c9d22c03611d472e6992f6b6c1a7b620091 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Fri, 5 Jan 2024 17:18:23 -0500 Subject: [PATCH] chore: formatting --- src/main.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2f04b91..e8136dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,11 @@ +// NOTE +// trying this out https://www.pathsensitive.com/2023/12/should-you-split-that-file.html + #![allow(dead_code)] #![allow(unused_variables)] -use std::{fs::File, io::BufReader}; use byteorder::{BigEndian, ReadBytesExt}; +use std::{fs::File, io::BufReader}; enum OpCodes { // branch @@ -19,7 +22,7 @@ enum OpCodes { AND, // load register LDR, - // store registerj + // store register STR, // return from interrupt (unused) RTI, @@ -187,7 +190,9 @@ impl VM { // Therefore, it flips each pair of bytes. // Meanwhile, `hed` uses big-endian. // To make hexdump ignore words, pass the `-C` flag for a byte-by-byte output. - let base_addr = f.read_u16::().expect("Program file could not be read"); + let base_addr = f + .read_u16::() + .expect("Program file could not be read"); let mut addr = base_addr; loop {