Processor ---------
The GameBoy uses a computer chip similar to an Intel 8080. It contains all of the instructions of an 8080 except there are no exchange instructions. In many ways the processor is more similar to the Zilog Z80 processor. Compared to the Z80, some instructions have been added and some have been taken away.
The following are added instructions:
ADD SP,nn ;nn = signed byte LDI (HL),A ;Write A to (HL) and increment HL LDD (HL),A ;Write A to (HL) and decrement HL LDI A,(HL) ;Write (HL) to A and increment HL LDD A,(HL) ;Write (HL) to A and decrement HL LD A,($FF00+nn) LD A,($FF00+C) LD ($FF00+nn),A LD ($FF00+C),A LD (nnnn),SP LD HL,SP+nn ;nn = signed byte STOP ;Stop processor & screen until button press SWAP r ;Swap high & low nibbles of r
The following instructions have been removed:
Any command that uses the IX or IY registers. All IN/OUT instructions. All exchange instructions. All commands prefixed by ED (except remapped RETI). All conditional jumps/calls/rets on parity/overflow and sign flag.
The following instructions have different opcodes:
LD A,[nnnn] LD [nnnn],A RETI