mirror of
https://github.com/danbee/8080
synced 2025-03-04 08:39:07 +00:00
Better number formatting
This commit is contained in:
parent
fc4764c5de
commit
c5a0f40eac
@ -15,12 +15,12 @@ fn print_mnemonic(mnemonic: &str, bytes: &[u8]) {
|
||||
opcode = bytes[0],
|
||||
mnemonic = mnemonic,
|
||||
arg = argument),
|
||||
2 => println!("{opcode:02x} {byte:02x} {mnemonic:6} {arg}#0x{byte:02x}",
|
||||
2 => println!("{opcode:02x} {byte:02x} {mnemonic:6} {arg}#${byte:02x}",
|
||||
opcode = bytes[0],
|
||||
byte = bytes[1],
|
||||
mnemonic = mnemonic,
|
||||
arg = argument),
|
||||
3 => println!("{opcode:02x} {low_byte:02x} {high_byte:02x} {mnemonic:6} {arg}${high_byte:02x}{low_byte:02x}",
|
||||
3 => println!("{opcode:02x} {low_byte:02x} {high_byte:02x} {mnemonic:6} {arg}#${high_byte:02x}{low_byte:02x}",
|
||||
opcode = bytes[0],
|
||||
low_byte = bytes[1],
|
||||
high_byte = bytes[2],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user