Re: A83: Re: Where is everybody?


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

Re: A83: Re: Where is everybody?




In a message dated 03/03/00 18:29:31 GMT Standard Time, david@acz.org writes:

<< How do you figure that one?  It is many times more efficient to load the
 value into the accumulator, shift and test the carry flag, such as when
 reading keys using the ports. >>

Depends what you are trying to do.

Undoubtedly the clearest way of testing bits is as follows :-

bit 7,a
jr nz, _DoSomething

Even though the rr a ; jr c, approach does save a single byte, 
and is quicker. The speed is irrelevant usually ; the old 90/10
law still applies. I don't know about "many times" ; saving
1 byte and about 10 T-states is unlikely to matter that much.

In the TI83 world, the byte is slightly more important.  However,
there are quite a few programs that save a byte here and there
by such methods, that then waste them all on a title screen
(possibly with graphics).

Against that, ease of changing. If you are bit testing using rr or
add a,a it is fine, but it is more error prone when you insert in
other tests. 

Paul Robson


Follow-Ups: