chore: simplify info and debug output
This commit is contained in:
@@ -497,7 +497,7 @@ pub enum CarryUsage {
|
|||||||
|
|
||||||
impl fmt::Display for Computer {
|
impl fmt::Display for Computer {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
write!(f, "{} {} {}", self.regs, self.sregs, self.flags)
|
write!(f, "{} {}", self.regs, self.flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ impl fmt::Display for Register {
|
|||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
write!(
|
write!(
|
||||||
f,
|
f,
|
||||||
"AX({}) BX({}) CX({}) DX({}) SP({:04x}) BP({:04x}) SI({:04x}) DI({:04x})",
|
"{} {} {} {} {:04x} {:04x} {:04x} {:04x}",
|
||||||
self.ax, self.bx, self.cx, self.dx, self.sp, self.bp, self.si, self.di
|
self.ax, self.bx, self.cx, self.dx, self.sp, self.bp, self.si, self.di
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/main.rs
10
src/main.rs
@@ -44,15 +44,7 @@ struct Args {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
Builder::new()
|
Builder::new()
|
||||||
.format(|buf, record| {
|
.format(|buf, record| writeln!(buf, "{}: {}", record.level(), record.args()))
|
||||||
writeln!(
|
|
||||||
buf,
|
|
||||||
"{} {}: {}",
|
|
||||||
record.target(),
|
|
||||||
record.level(),
|
|
||||||
record.args()
|
|
||||||
)
|
|
||||||
})
|
|
||||||
.parse_default_env()
|
.parse_default_env()
|
||||||
.init();
|
.init();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user