Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
nitro2k01 committed Dec 26, 2022
1 parent f6b6e95 commit ce015ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion double-halt-cancel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ In this example, the `rst $08` instruction will not push `$0002` to the stack as

So, we can finally see what the `halt` bug actually is: it's an inhibition of the automatic incrementation of PC, meaning in this case that the previous value of `PC` would be pushed to the stack.

[^1]: It might seem like a stretch that a call to a `rst` vector would not return. However, a fairly common pattern is to use an `rst` for jump tables, where the return address is `pop`ped from the stack and used as the base address for the jump table immediately following the `rst` instruction. Doing this after a `halt` instruction is likely, though.
[^1]: It might seem like a stretch that a call to a `rst` vector would not return. However, a fairly common pattern is to use an `rst` for jump tables, where the return address is `pop`ped from the stack and used as the base address for the jump table immediately following the `rst` instruction. Doing this after a `halt` instruction is unlikely, though.

### The double `halt` bug

Expand Down

0 comments on commit ce015ca

Please sign in to comment.