Changes

Jump to: navigation, search

GBZ80

794 bytes added, 23 April
Fun fact: Way more GBZ80 cores were produced for Gameboy hardware (118 million Gameboys and 81 million GBA) than all the Z80 chips produced for home computers and game consoles. [https://www.chibiakumas.com/z80/Gameboy.php Learn GBZ80 Assembly Programming with ChibiAkumas]
 
== Registers==
 
{| class="wikitable" style="white-space: nowrap;"
! Register !! Size !! Description !! Notes
|-
| B, C, D, E, H, L || 8-bit || General-purpose registers || Can form 16-bit pairs: BC, DE, HL
|-
| A (Accumulator) || 8-bit || Main register for arithmetic, logic, and data transfer || Most used register
|-
| F (Flags) || 8-bit ||
* bit7 - ZF - Zero Flag
* bit6 - NF - Negate Flag (last ALU op was subtract or compare)
* bit5 - HF - Half Carry Flag
* bit4 - CF - Carry Flag
* bits3..0 - Always 0
|| NF and HF are used in the DAA algorithm
|-
| SP (Stack Pointer) || 16-bit || Points to top of the stack || Used for subroutine calls and interrupt handling
|-
| PC (Program Counter) || 16-bit || Points to the next instruction || Automatically increments as instructions execute
|}
== Opcodes ==
13,147
edits