[A83] Re: call hl


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

[A83] Re: call hl




how about

call jp_hl
...
jp_hl:
 jp (hl)

the jp_hl routine is re-usable and its two bytes less if you used it only
once.

Brandon Sterner

----- Original Message -----
From: "Darren" <qarnos@dingoblue.net.au>
To: "A83" <assembly-83@lists.ticalc.org>
Sent: Saturday, April 27, 2002 4:52 PM
Subject: [A83] call hl


>
> I was just wondering if there was an easy way to call to an address in
> hl (or ix for that matter) and I came up with the following macros.
> Knowing me I've probably overlooked a really obvious way of doing it in
> search of a more convoluted answer :P. So if you know a better way,
> please tell me!
>
> #define call_hl push hl \ ld hl, $+5 \ ex (sp), hl \ jp (hl)
> #define call_ix push ix \ ld ix, $+8 \ ex (sp), ix \ jp (ix)
> #define call_iy push iy \ ld iy, $+8 \ ex (sp), iy \ jp (iy)        ;
> probably never need this one :P
>
>
>
>




References: