Skip to content

Commit

Permalink
Skip C_RAWIO on BDOS traces
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanizag committed Dec 15, 2021
1 parent 64eb204 commit 946cca8
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,16 @@ fn main() {
if trace_bdos && !machine.is_rom_rank()
&& cpu.registers().pc() == 0x0005 {
let command = cpu.registers().get8(Reg8::C);
let args = cpu.registers().get16(Reg16::DE);

let name = if command < BDOS_COMMAND_NAMES.len() as u8 {
BDOS_COMMAND_NAMES[command as usize]
} else {
"unknown"
};

print!("BDOS command {}: {}({:04x})\n", command, name, args);
if command != 0x06 /*C_RAWIO*/ {
let args = cpu.registers().get16(Reg16::DE);
let name = if command < BDOS_COMMAND_NAMES.len() as u8 {
BDOS_COMMAND_NAMES[command as usize]
} else {
"unknown"
};

print!("BDOS command {}: {}({:04x})\n", command, name, args);
}
}
}
}
Expand Down

0 comments on commit 946cca8

Please sign in to comment.