[A83] Re: call, stack adresses and free space
[Prev][Next][Index][Thread]
[A83] Re: call, stack adresses and free space
In case of HL it would of course be better to use
jp (hl)
instead of
push hl
ret
It's a byte shorter and a lot faster
> ----------------------------------------
> From: David Phillips <david@acz.org>
> Sent: Tue Aug 21 04:10:40 GMT+02:00 2001
> To: <assembly-83@lists.ticalc.org>
> Subject: [A83] Re: call, stack adresses and free space
>
>
>
> There are actually times when this is not so silly to do. For example, when
> you will have a sort of "switch" statement (C terminology), and need to jump
> to a common address at the end of each block. It is much shorter to push
> the jump address once and ret to it many places, rather than jumping to it
> many places.
>
> > ld hl,bob
> > push hl
> > ret
> >
> > it would be like
> >
> > jp bob
>
>
>
>
-----------------------------------------------------
Mail.be, Free WebMail and Virtual Office
http://www.mail.be
Follow-Ups: