<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/6502-emulation---the-jump-indirect-bug-wn0qipigx" -->

---
title: 6502 Emulation - The Jump Indirect Bug | daily.dev
description: The MOS 6502 processor has a well-known hardware bug in its JMP indirect instruction: when the pointer address falls on a page boundary (e.g., $70FF), the CPU...
canonical: https://daily.dev/posts/6502-emulation---the-jump-indirect-bug-wn0qipigx
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 6502 Emulation - The Jump Indirect Bug | daily.dev
og:description: The MOS 6502 processor has a well-known hardware bug in its JMP indirect instruction: when the pointer address falls on a page boundary (e.g., $70FF), the CPU...
og:url: https://daily.dev/posts/6502-emulation---the-jump-indirect-bug-wn0qipigx
og:image: https://api.daily.dev/og/posts/wN0QiPigX.png
og:image:alt: 6502 Emulation - The Jump Indirect Bug
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 6502 Emulation - The Jump Indirect Bug

**[Two Stop Bits](https://daily.dev/sources/twostopbits)** · 4 min read · 0 upvotes · 0 comments

## Summary

The MOS 6502 processor has a well-known hardware bug in its JMP indirect instruction: when the pointer address falls on a page boundary (e.g., $70FF), the CPU fails to carry the low-order byte when fetching the high byte of the program counter, reading from $XX00 instead of the next page. This causes incorrect jumps. The fix in emulation is to detect when the pointer's low byte equals $FF and explicitly read PCH from $XX00 rather than pointer+1. Historical compilers like fig-Forth worked around this by padding code to avoid addresses ending in $XXFF.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://markjames.dev/blog/6502-jump-indirect-bug>

## Similar posts on daily.dev

- [Halt and Catch Fire](https://daily.dev/posts/halt-and-catch-fire-ulfnfmbyi) · Hacker News · 0 upvotes · 0 comments
- [A 6502 All In The Data](https://daily.dev/posts/a-6502-all-in-the-data-oir2hkutu) · Hackaday · 1 upvotes · 0 comments
- [8086 Microcode Browser](https://daily.dev/posts/8086-microcode-browser-jddhbtrys) · Hacker News · 1 upvotes · 0 comments
- [Welcome to the machine: emulating a CPU — Bitfield Consulting](https://daily.dev/posts/welcome-to-the-machine-emulating-a-cpu-bitfield-consulting-rggljiotl) · Bitfield Consulting · 20 upvotes · 1 comments
- [Old Vintage Computing Research: 6o6 v1.1: Faster 6502-on-6502 virtualization for a C64/Apple II Apple-1 emulator](https://daily.dev/posts/old-vintage-computing-research-6o6-v1-1-faster-6502-on-6502-virtualization-for-a-c64-apple-ii-appl-poi3fwxyw) · Two Stop Bits · 1 upvotes · 0 comments

---

[View this post on daily.dev](https://daily.dev/posts/6502-emulation---the-jump-indirect-bug-wn0qipigx)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"6502 Emulation - The Jump Indirect Bug","url":"https://daily.dev/posts/6502-emulation---the-jump-indirect-bug-wn0qipigx","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/6502-emulation---the-jump-indirect-bug-wn0qipigx"},"datePublished":"2026-02-19T22:15:25.052Z","dateModified":"2026-02-19T22:30:36.859Z","description":"The MOS 6502 processor has a well-known hardware bug in its JMP indirect instruction: when the pointer address falls on a page boundary (e.g., $70FF), the CPU...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a6105be6dacefc18a0b20f2703179e71?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a6105be6dacefc18a0b20f2703179e71?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Two Stop Bits","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Two Stop Bits","logo":"https://media.daily.dev/image/upload/s--BScjOU_Q--/f_auto/v1728977574/logos/twostopbits","url":"https://daily.dev/sources/twostopbits"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/6502-emulation---the-jump-indirect-bug-wn0qipigx","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Two Stop Bits","item":"https://daily.dev/sources/twostopbits"},{"@type":"ListItem","position":3,"name":"6502 Emulation - The Jump Indirect Bug"}]}
```

