Fix copy paste errors and read-out-of-bounds check

This commit is contained in:
John 2023-04-29 18:44:00 -05:00
parent 33b6d0218e
commit beab7c968b
2 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ pub enum Insn {
/// | 00ff | Enter high-resolution mode
#[opcode = "0x00ff"]
hires,
/// | fx30 | Enter high-resolution mode
/// | fx30 | Load hires font address into vX
#[opcode = "0xfx30"]
hfont { x: usize },
/// | fx75 | Save to "flag registers"

View File

@ -1149,7 +1149,7 @@ mod behavior {
fn invalid_pc() {
let (mut cpu, mut bus) = setup_environment();
// The bus extends from 0x0..0x1000
cpu.pc = 0xfff;
cpu.pc = 0x1001;
match cpu.tick(&mut bus) {
Err(Error::InvalidAddressRange { range }) => {
eprintln!("InvalidAddressRange {{ {range:04x?} }}")