Re: A89: Re: conditional return


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

Re: A89: Re: conditional return




This was the first thing I tried.  I also tried jumping over a rts
instruction and I tried destroying the top longword of the stack and then
branching out of the call.  Hold on ... I think I found the error, I forgot
about the multiple pushes at the start of the routine.  Beautiful ...
thanks!


>I would make a label called Return, which you could do a conditional jump
>to with Bcc, such as BRA or BEQ.  The only instruction after the label
>would be the rts instruction.  It should not give you any instruction
>error, if you did the simple Bcc variant.  The address to return to, as on
>most processors, is on top of the stack, so unless you forget to pop off
>some pushed values, or popped off to many, there is no reason for that
>error.  That is one of the most common assembly errors!  Watch the SP :)
>
>Hope that helps!
>
>-Mark
>
>