Re: A86: simple math optimization
[Prev][Next][Index][Thread]
Re: A86: simple math optimization
On Mon, 11 May 1998 17:11:35 EDT BIOSERRORS <BIOSERRORS@aol.com> writes:
>
>What's the fastest way to do
>
>hl = (16 * d) + e
I have two methods I just figured out. I don't know if either work, so
someone please check, etc... (I'm not perfect:-).
PUSH de 11
LD h,d 4
LD l,d 4
SLA l 8
SLA l 8
SLA l 8
SLA l 8
SRL h 8
SRL h 8
SRL h 8
SRL h 8
LD d,0 7
ADD hl,de 11
POP de 10
----------------------
111 T-States
PUSH de 11
LD hl,0 10
ADD hl,sp 15
DEC hl 6
XOR a 4
RLD (hl) 18
LD l,(hl) 7
LD h,a 4
LD d,0 7
ADD hl,de 11
POP de 10
-----------------------
103 T-States
See if either of these fit your needs.
Sincerely,
The Unibomer
Jared Ivey
Unibomer@Juno.com
http://www.geocities.com/SiliconValley/Vista/7342
"Computers aren't intelligent, they only think they are." -- Unknown
_____________________________________________________________________
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]
References: