Re: A86: Sorry Dux. =-|
[Prev][Next][Index][Thread]
Re: A86: Sorry Dux. =-|
why clear a?
-josh
On Sun, 09 Aug 1998 14:03:09 -0700 Tercero <tercero@busprod.com> writes:
>
>I have very few ideas of my own but I can easily take
>someone elses theory, routine or whatever and make it
>better. Sorry in advance Dux. I took his Russian
>Peasant algorithm and made it better...voila.
>
>;African Swallow Algorithm_________________________
>;Input: de * b |
>;Output: hl |
>;Destroys: af, b, de, hl |
>;Size: 15 bytes |
>;--------------------------------------------------
>ASMult:
> xor a ;stylish way to clear a
> ld hl, $0000 ;most stylish way to clear hl...bummer
>ASMultLp:
> srl b ;check bit
> jp nc, ASkipadd ;if bit = 1 then hl + de
> add hl, de ;add'm up
>ASkipadd:
> add hl, hl ;mult hl by 2
> jp nz, ASMultLp ;if b != 0 then keep going
> ret z ;ret if b = 0
>
>--
>Tercero -- Email: mailto:tercero@busprod.com
>
>"The stone the builders rejected has become the capstone;"
> --Psalms 118:22
>"Everyone who falls on that stone will be broken to pieces,
>but he on whom it falls will be crushed."
> --Luke 20:18
>
_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]
Follow-Ups:
References: