[A83] Re: Signed division by a power of two.


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

[A83] Re: Signed division by a power of two.



> > FYI, JP can't possibly be 1 because it takes more than 1 cycle just to
> > read the instrcution bytes.
> So, are there any instructions that take less than four cycles?  I
> noticed that ever a nop takes four.
It is worth reading a bit about how the z80 machine cycles are built up.
A machine cycle corresponds to the movement of one single byte from or to
the memory, e. g. a call consists of five machine cycles (3 for the
instruction and 2 for pushing PC). A machine cycle can take around 3-6
clock cycles, and can be of different types. If I remember correctly, nop
is basically a "dummy" opcode fetch cycle that takes 4 clock cycles. A
single byte memory transfer takes 3 cycles in itself (I really don't want
to elaborate on that, it's described in the z80 catalogue), and the
fourth is the operation itself--this single cycle is enough for simple
internal operations, that's why 8-bit arithmetic, logical and load
instructions take also as much as a nop.

PG

-- 
http://www.fastmail.fm - Accessible with your email software
                          or over the web



References: