Invalid opcode

From Glitch City Wiki
Jump to navigation Jump to search

In programming, an opcode is a byte or series of bytes that represents an instruction which may be followed by an operand (a variable for the opcode).

For example, in Game Boy programming the series of bytes 01 xx yy represents the instruction ld bc,yyxx where xx and yy are the operand values and where 01 represents "ld bc".

Invalid opcodes are the index numbers of bytes or byte combinations that do not represent any existing intended opcode (for example, byte 0xDB is an invalid opcode for Game Boy games). If the game attempts to execute an invalid opcode, it may typically freeze (for Game Boy games) or ignore it (for Generation I and II games on Nintendo 3DS Virtual Console).

This article or section is a stub. You can help Glitch City Wiki wiki by expanding it. RB 234 fs crop.png