Open fcabjolsky opened 1 year ago
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.
0x5000..=0x5FFF
0x5000..=0x5FF0
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]); },
The operation
0x5000..=0x5FFF
should compare two registers. Also the pattern match could be0x5000..=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: