NOP
Revision as of 16:43, 3 June 2013 by TheAlmightyGuru (talk | contribs) (Created page with "{{Infobox Opcode | Title = No Operation | Opcode = NOP | Operation = None | StatusN = Ignore | StatusZ = Ignore | StatusC = Ignore | StatusI = Ignore | StatusD ...")
| No Operation | ||||||
| ||||||
NOP (No Operation) does what it says. When the opcode is executed, the processor does nothing for two clock cycles. This is effective if you want to create a brief delay or make a gap for later additions to machine code.
Because this opcode doesn't do anything, it is a useful way of "commenting out" a section of a game. For example, there is a subroutine that decrements the player's lives, you can change the opcode and operand to NOPs, thus preventing the code from executing, effectively giving the player infinite lives.
Addressing Modes
| Addressing Mode | Assembly Language Form | Opcode | # Bytes | # Cycles |
|---|---|---|---|---|
| Implied | NOP | EA | 1 | 2 |