[A83] Re: Opcodes (clock values)


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

[A83] Re: Opcodes (clock values)






> In the Opcode table in ASMguru by James Matthews, what kind of time are
the
>clock values measured in?  For example RET (Return to basic mode) has a
>clockvalue of ten and NOP (No Operation), has a clock value of 4.  Are
these
>numbers are measured in milliseconds or is this a whole different system?
>Thanks.
>

Clock rates are measured in a whole different system - CPU cycles.  On the
z80 in the 83(+), the CPU runs at ~6mhz or ~6000000 CPU cycles/sec (this
varies with battery power).  A NOP takes 4 CPU cycles to execute.  Other
commands (such as RET) takes ten CPU cycles.  Other commands (such as jr z)
have 2 clock rates - the first one is generally the one that it takes when
the required condition is met (in this case, the z flag being set).  The
second one is the one that it takes when the condition isn't met (the z
flag being reset).
BTW, the opcode RET is not "return to basic mode".  This opcode is used
whenever you are returning from a call, as well.  It pops a word of the top
of the stack and puts it into the PC (program counter) and increments the
stack by two.
- - Joe


--------------------------------
Joe Pemberton
http://tiworld.calc.org
--------------------------------


_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com