[A83] Re: Weird commands


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

[A83] Re: Weird commands





>From: "Jimmy Pardey" <j_pardey@hotmail.com>
>Subject: [A83] Weird commands
>
>HellO! Why does the z80 have commands to load registers into themselves?
>Does it change the flags around or something?
>
>examples:   ld a,a
>             ld b,b

Because of the way the procesor decodes instructions:
LD A,r   = $78 + rb

  Reg   regbits
   A   =   7
   B   =   0
   C   =   1
   D   =   2
   E   =   3
   H   =   4
   L   =   5
((HL)  =   6 )

And they don't change flags.  They're basicly nops.

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp