On Mon, 11 Apr 2011 15:46:52 -0600, Steve Comstock wrote:

>One example, reentrant, non-LE program invoked in AMODE 64,
>assuming only 72 byte save area provided, we provide a 144-byte
>save area and set it up standard 64-bit reg linkages:
>
>
>AnyProg csect
>AnyProg AMODE  64
>         SYSSTATE AMODE64=YES,ARCHLVL=2
>         LLGTR  13,13         ensure effective s.a. address is 64 bits
>         stm    14,12,12(13)  save right hand (rh) 32-bit regs
>         GETMAIN R,LV=216     get 144 for calling, + 72 for lh regs
>         xc     0(216,1),0(1) zero out
>         stg    13,128(1)     save pointer to caller's save area
>         st     1,4(13)       save pointer to our save area
>         lgr    13,1          set our savearea address into R13
>         stmh   14,12,144(13) save lh of regs of caller
>         larl   12,Anyprog    addressability
>         using  AnyProg,12    "
>         .
>         .
>         .
>         lmh    14,12,144(13) restore lh of regs
>         lg     13,(128)13    pointer to caller's save area
>         lm     14,12,12(13)  restore rh of regs
>         l      1,4(13)       restore pointer to getmained area
>         FREEMAIN R,LV=216,A=(1)
>         sr     15,15         set return code
>         bsm    0,14          return in AMODE of caller
>

This is almost, but not quite, F5SA format.  Is there a reason why you do
not use F5SA format?  This makes it unlikely that a dump formatting program
will be able to trace back to your caller's save area from the address in
register 13.  I see that you have also hard-coded the offsets rather than
use the data names provided by IHASAVER.

--
Tom Marchant
Abend-AID development
Compuware

Reply via email to