A89: Re: bsr <-> bra


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

A89: Re: bsr <-> bra




oh wow, this is great. all this stuff will be very useful to me... the url
you gave me to order the books didnt work (kept wiggin out) but i found them
and got all 3 :)

thanks everyone :) i can tell this list will probably be a big help to me,
and i hope to make some nice things in the coming months...

~neticule
-----Original Message-----
From: Olle Hedman <oh@hem.passagen.se>
To: assembly-89@lists.ticalc.org <assembly-89@lists.ticalc.org>
Date: Wednesday, April 19, 2000 7:54 AM
Subject: A89: bsr <-> bra


>
>> wow, thanks man :)
>> may i ask, whats the difference?
>
>
>bsr is branch to subroutine, while bra is just branch.
>
>the difference is that bra just jumps to the label, while
>bsr first put the address of the instruction after the bsr instruction on
the
>stack, and then jumps to the label.
>this is so you can use the rts (return from subroutine) instruction later,
wich
>takes the address to jump to, from the top of the stack.
>if you do a lot of bsr:s without any rts:s you will after a while run out
of
>space on the stack, and start overwrite vital parts of memory and can end
up
>with all kinds of strange errors.
>
>Go to http://alh.dhs.org/ti89/  and download 68KPM.pdf and 68000.pdf, and
then
>go to http://www.mot-sps.com/home/lit_ord.html and order them as books
(free)
>the codes for the books you need is on alh.dhs.org/ti89.
>
>thoose books are complete references to the 68000 processor, and containes
>absolutley everything you could ever need to know. (and a lot more)
>They can feel a little big for a beginner, but especially the 68KPM is
good,
>since it contains a complete reference to all the different instructions
and
>wich addressing modes you can use with wich. It is a must for any serious
>programmer.
>
>//Olle
>(btw, please don't post formatted mail's to the list.)
>