# What size are Gameboy opcodes?



## StackMasher (Apr 11, 2017)

All I could find is this: http://www.pastraiser.com/cpu/gameboy/gameboy_opcodes.html
Presumably they are 1 byte, with an optional 1 byte prefix? Just making sure


----------



## daxtsu (Apr 11, 2017)

1-3 bytes, it depends (I'm including immediate data in that assertion, and it looks like that table does too, meaning that the opcode is always one byte*, but it can include up to two bytes of data after). The table shows you how many bytes are in an opcode (the number on the left in the 2nd row of each entry):







*CB opcodes (as in an opcode that uses the CB prefix) are always two bytes.


----------



## FAST6191 (Apr 11, 2017)

Better guide for an overview
http://bgb.bircd.org/pandocs.htm#cpuinstructionset
though as a quick reference once you know I do prefer the style you linked for which you can have another version of that http://imrannazar.com/Gameboy-Z80-Opcode-Map


----------

