Re: A86: simple math optimization


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

Re: A86: simple math optimization






BIOSERRORS wrote:

> What's the fastest way to do
>
> hl = (16 * d) + e
>
> ?
>
> The code I have is chunky, and I need to optimize it.  I'm still new at this
> stuff, so I don't really know what I'm doing before I actually try it.  =)

If e is less than 16, you can do this:

 ld (hl),d
 ld a,e
 rld



Follow-Ups: References: