Test Code

Programming the 6502 microprocessor and its relatives in assembly and other languages.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

> Any chance of a quick sketch of that single step button schematic Garth?

Unfortunately I don't have any way to post or E-mail it, but I could fax it or snail-mail it. I'll need an address or fax number. You can PM or E-mail me privately if you don't want to broadcast this info.
User avatar
dclxvi
Posts: 362
Joined: 11 Mar 2004

Post by dclxvi »

The shortest 6502 ROM sequence that loops that I know of is:

$FFFB $4C
$FFFC $FB
$FFFD $FF

When a RESET occurs, the vector at $FFFC (low byte) and $FFFD (high byte) is loaded into the PC (Program Counter) register. So execution starts with the code at $FFFB, which is simply a JMP $FFFB. Assuming there are no NMIs, the remaining ROM contents do not matter. You could also modify a NOP generator to generate $4C rather than $EA and achieve a similar effect.
Post Reply