[A83] call hl


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

[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





Follow-Ups: