[A83] Re: call (hl)


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

[A83] Re: call (hl)




> Van: SUCKER from the old days <sucker_pvn@hotmail.com>
> 
> Is there a way to do:
> 
>   ld hl,label
>   call (hl)
>   [...]
>   ret
> 
> label:
>   [...]
>   ret
> 
> 
>      SUCKER

Just do this:

	ld	hl,label
	call	jp_hl
	[..]
	ret

label:
	[...]
	ret

jp_hl
	jp	(hl)

On the Ti83 you can do:

jp_hl  =  EXECUTE_Z80+3	; $52E8

Since EXECUTE_Z80 is just:
	ld	hl,$9327
	jp	(hl)