add pretty-printer for assembled instructions
This commit is contained in:
@@ -14,6 +14,7 @@ use crsn::runtime::run_thread::{RunThread, ThreadToken};
|
||||
use crsn_arith::ArithOps;
|
||||
use crsn_screen::ScreenOps;
|
||||
use crsn_stacks::StackOps;
|
||||
use crsn::module::OpTrait;
|
||||
|
||||
mod read_file;
|
||||
mod serde_duration_millis;
|
||||
@@ -130,13 +131,13 @@ fn main() -> anyhow::Result<()> {
|
||||
|
||||
if config.asm_only {
|
||||
for (n, op) in parsed.ops.iter().enumerate() {
|
||||
println!("{:04} : {:?}", n, op);
|
||||
println!("{:04} : {}", n, op.to_sexp());
|
||||
}
|
||||
return Ok(());
|
||||
} else {
|
||||
trace!("--- Compiled program ---");
|
||||
for (n, op) in parsed.ops.iter().enumerate() {
|
||||
trace!("{:04} : {:?}", n, op);
|
||||
trace!("{:04} : {}", n, op.to_sexp());
|
||||
}
|
||||
trace!("------------------------");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user