Re: Assy question

From: Steve Judd (sjudd_at_swcp.com)
Date: 2001-03-15 17:13:27

Hola,

On Thu, 15 Mar 2001, Professor Dredd wrote:

> Good question! I consulted charts from both the
> Leventhal book and the C-64 PRG and both state clearly
> that CLC and SED are 2-cycle commands.
> 
> I don't quite know why either. They are both done

I thought that the first cycle is to fetch, the second to decode, and the
third to execute.  Since the execution is internal, the next instruction
can be fetched during the execute, so it's effectively two cycles.  Same
reason NOP is two cycles.

> Either way you look at it, the decimal mode technique
> of converting a binary nybble to an ASCII encoded hex
> digit is a unique approach! I've never seen that
> algorithm in any book or program before. Perhaps

I think it's been around for a while.  It's mentioned in an older issue of
C=Hacking, too (maybe issue 17).

The reason, btw, that some people use the "slower" method of number
conversion is that it is linear, that is, no branches.  It is more
aesthetically pleasing.  The cycle savings are pretty trivial.

-S

-
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tml.hut.fi.

Archive generated by hypermail 2.1.1.