[A83] Re: Gameboy


[Prev][Next][Index][Thread]

[A83] Re: Gameboy



>The Game Boy does not have a Z80.  It's CPU is missing all of the 16 bit 
>operations.

This is not quite true.  The Gameboy does have several of the 16-bit 
operations.  Here are the actual differences, (from PanDOC/gbspec.txt):

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
  LD  (HLI),A            ;Write A to (HL) and increment HL
  LD  (HLD),A            ;Write A to (HL) and decrement HL
  LD  A,(HLI)            ;Write (HL) to A and increment HL
  LD  A,(HLD)            ;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





Stupid like a fox!
Look ma, I'm an artist: http://aaronstj.deviantart.com

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail