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 => { self.se(x, y); }, |
One possible solution:
0x5000..=0x5FF0 => { self.se(x, self.registers[y as usize]); },