From: MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 22-MAY-1992 19:14:31.65 To: Mark-Tarbell@suite.com, INFO-VAX@SRI.COM CC: Subj: Re: Access to caller's SP I posted the following code: .title fixsp .entry fixsp,^m subl2 #10000,sp movl 16(fp),r0 movl 12(fp),fp jmp (r0) .end > However... don't you also need to restore ALL of > the saved context from the call frame? Things such > as all of the registers, the condition handler (if > any), etc? Won't these things be lost otherwise? > Is it necessary to restore the (uh-oh) PSL? We have to restore everything we have changed. If we change R2, then we need to restore R2 from the call-stack-frame. But I only changed R0 and compilers do not assume R0 an R1 unchanged after a CALLx instruction. I do not think you need to restore the PSW (not the PSL !) with the N,Z,V and C bits, because the CALLx instruction clears them anyway. Arne Vajhxj Arne Vajhxj local DECNET: KO::ARNE Computer Department PSI: PSI%238310013040::ARNE Business School of Southern Denmark Internet: ARNE@KO.HHS.DK