code
code copied to clipboard
ch5: incorrect value for skip operation
The operation 0x5000..=0x5FFF should compare two registers. Also the pattern match could be 0x5000..=0x5FF0 as the last byte is not used by this operation.
https://github.com/rust-in-action/code/blob/19c4349758b57bdb233e186746bfec03ad9ea88d/ch5/ch5-cpu4/src/main.rs#L33
One possible solution:
0x5000..=0x5FF0 => { self.se(x, self.registers[y as usize]); },