On Tue, 6 Aug 2013 16:25:34 -0400, Tom Marchant <[email protected]> wrote:
>On Tue, 6 Aug 2013 14:33:52 -0400, John Parke wrote: > >>I have provided prolog code: >> >>LARL R15,@@LIT@2 >>Using @@LIT@2,R15 > >Why do you set R15 here, before saving the caller's registers? Note >that register 15 is not a good one to use for a base register. > >>STMG R14,R12,8(R13) >>LGR R9,R1 Save R1 >>LGR R2,R0 >>LGHI R0,312 >>LA R1,1 >>SLL R1,20 >>AGR R0,R1 >>Storage Obtain >>LGR R15,R1 > >In case STORAGE didn't clobber your base register, the LGR did, >but the USING is still in effect. > >>STG R15,136(,R13) Addr of Next Savearea >>STG R13,128(,R15) Addr of Previous Savearea >>LGR R13,R15 Point R13 to this DSA > >It looks like you intend to use F4SA format to save your caller's >registers, but you have not marked your save area with "F4SA" to >indicate that you have done that. > >-- >Tom Marchant Tom: The prolog code I am using is sample code from IBM. R15 is not a good idea, I agree. The LGR R9,R1 was my attempt to save parm list address (act of desperation). I later attempt to restore it with LGR R1,R9. The sample code executes: LLILH 12,X'C6F4' OILL 12,X'E2C1' ST 12,4(,13) Which is IBM's way of marking savearea with "F4SA". Thanks, John
