Re: A86: Bug in TI86EMU?
[Prev][Next][Index][Thread]
Re: A86: Bug in TI86EMU?
Hmm, that's interesting. But JP (HL) is faster, though. However, I wanted
to jump to the address pointed to by HL...
At 09:27 PM 9/28/98 EDT, you wrote:
>
>In a message dated 9/28/98 00:51:05 Eastern Daylight Time, electrum@tfs.net
>writes:
>
>> I think I found an unfortunate bug in TI86EMU, but I'm not sure. The
>> instruction JP (HL) should jump to the address stored in the memory
>> location that HL points to, correct? But in TI86EMU, it jumps to HL
>> instead. It is not a bug with the assembler, because the emu disassembles
>> it properly as JP (HL). It's probably not a bug, I'm just too tired, but
>> anyway...
>>
>> In an effort to work around it, I came up with this code:
>>
>> ld e,(hl)
>> inc hl
>> ld d,(hl)
>> ex de,hl
>> ld (DoMenuModify+1),hl
>> DoMenuModify:
>> jp 0
>>
>> I'm sure there is a much better solution, but I can't see it tonight.
>> Thanks for any help.
>
>
>if you want to jump to any 16-bit value stored in a register, do this:
>
> push hl
> ret
>
> or whatever register has the address in it. whenever a z80 hits a ret, it
>pops the last value off the stack and jumps there
>
--
David Phillips
mailto:electrum@tfs.net
ICQ: 13811951
AOL/AIM: Electrum32