Re: A92: bsr


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

Re: A92: bsr



Michael Wulff Nielsen schrieb:
> Eric wrote:
> > 
> > anyone know how many bsrs i can use for example,
> > 
> >   bsr place
>
> As many as you like as long as you have room for the return points on
> the stack.
>
Interesting, so you perhaps should tell him how to get enough room for the 
return pointers he needs.That is, one has to count the amount of bsr's that are 
nested (without parameters passed via the stack, link unlink etc). These bytes 
have to be prepared.
As I don't know the size of stack fargo offers (256 Bytes I suppose, but I 
didn't test it), I then would prepare the computed space with
	 ds.l <desired longs>
stackend
oldstack ds.l $1			and then, in the source, redirect the 
stack-pointer to this space and afterwards reinstall the old pointer
	move.l 		a7,oldstack
	movea.l		#stackend,a7	; #oldstack should work,too
	...
	movea.l		oldstack,a7

I hope that helps	AK
Arno.Kizina@t-online.de


References: