Back to: Learn 6502 assembly
What I will do is create a hard-wired program! I will achieve this by using an OpCode named NOP. OpCode is short for Operation Code. An OpCode is an instruction that specifies an operation to be performed. NOP stands for No OPeration. NOP is an OpCode that does nothing, except for incrementing the program counter. If you look at table 1, you will see a section of the 6502 datasheet named OpCode matrix. This contains all of the different OpCodes that the 6502 can perform. If you go to the row with E in it and across to the column with A in it, you will see NOP. This means that if EA is presented to the data bus, the 6502 will run the NOP. Also, if you look under NOP, you will see an i. The i denotes that a NOP takes two clock cycles to complete.
EA is a hexadecimal number, we need its binary equivalent to know which values to place onto the data bus. EA is equal to 11101010 in binary. I will place 11101010 onto the data bus by connecting pins that need to see a 0 to ground and those that need to see a 1 to 5v, see figure 2. I can then monitor the 16 address lines by watching the LEDs. The 6502 running the NOP should cause the program counter to increment each time and the address to increase. What should be seen is the address on the address bus being incremented in binary.