NOP, JMP, Labels and the Program Counter PC

Open a browser window or tab containing the microcontroller simulator.

Copy and paste this program into the code editing area. Press F8 to assemble the code.
The ASSEMBLER translates human readable code into binary needed by the microcontroller chip.

Step the program and watch the PC register carefully. Answer the reviseOmatic questions on this task.

  • NOP is a command that does nothing for one processor clock cycle. It is used to provide tiny time delays.
  • PC is the program counter.
  • PC is a POINTER to the address of the instruction that is about to be executed.
  • After each instruction, one is added to PC to make it point to the next instruction.
  • There are a couple of exceptions to this rule. JMP (jump) commands make the program counter point to a completely new address.
  • JMP START causes the program to jump to the Destination Address labelled by START:
        NOP 
        NOP 
        NOP 
        NOP 
START: 
        NOP 
        NOP 
        NOP 
        NOP 
        JMP     START 

TASK: Add a couple more labels and jumps. This is like the snakes and ladders game. You can jump forwards or backwards.