cctech Digest, Vol 54, Issue 43

Chuck Guzis cclist at sydex.com
Wed Feb 27 01:23:22 CST 2008


On 26 Feb 2008 at 12:27, Jeff Erwin wrote:

> sui   3ch   ; subtract the ascii base
> cpi   0ah   ; check for 0-9
> rc
> sui   07h   ; subtract further for A-F
> ret
 
Has to be invoked by a CALL to work and has a conditional return, so 
it's not a no-branch solution.  Mine works for both upper- and lower-
case alpha and always yields a result from 0 to 15.

Any more candidates?

Cheers,
Chuck




More information about the cctalk mailing list