What size are Gameboy opcodes?

Discussion in 'Other Handhelds' started by StackMasher, Apr 11, 2017.

  1. StackMasher
    OP

    StackMasher GBAtemp Regular

    Member
    118
    57
    Nov 29, 2016
  2. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,546
    3,955
    Jun 9, 2007
    Antarctica
    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):

    [​IMG]

    *CB opcodes (as in an opcode that uses the CB prefix) are always two bytes.
     
    Last edited by daxtsu, Apr 11, 2017
  3. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,716
    9,587
    Nov 21, 2005
    United Kingdom
    daxtsu likes this.