Re: A86: Faster way (_ldhlind)?
[Prev][Next][Index][Thread]
Re: A86: Faster way (_ldhlind)?
Wow, I didn't think of that...thanks. It times exactly the same, too.
At 06:46 PM 8/7/98 -0600, you wrote:
>
>er the _ldhlind does this:
>
> ld a,(hl)
> inc hl
> ld l,(hl)
> ld a,h
>
>which appears to be as short as yours, only A rather than DE is killed
>
>David Phillips wrote:
>>
>> Does anyone know how the rom call _ldhlind work? It effectively does this
>> operation:
>>
>> ld hl,(hl)
>>
>> This is useful when hl points to a pointer, and you want it to point to the
>> data pointed to by that pointer (I hope you understood that, because I
>> didn't). What I came up with is below and worked out well because I needed
>> to de to have the old pointer anyway, but is there a better routine (that
>> doesn't destroy other regs)?
>>
>> ld d,(hl) ; 7T
>> inc hl ; 6T
>> ld e,(hl) ; 7T
>> ex hl,de ; 4T
>> ;==== 24 t-states, HL = (HL), DE = HL + 1
>>
>> Thanks,
>>
>> --
>> David Phillips
>> mailto:electrum@tfs.net
>> ICQ: 13811951
>> AOL/AIM: electrum32
>
>--
>
>=====================================
>= =
>= Kirk Meyer (mailto:_@ibm.net) =
>= http://www.bigfoot.com/~kirkmeyer =
>= http://simcommunity.home.ml.org =
>= =
>= "Set your affection on things =
>= above, not on things on the =
>= earth." Colossians 3:2 =
>= =
>=====================================
>
--
David Phillips
mailto:electrum@tfs.net
ICQ: 13811951
AOL/AIM: electrum32
References: