ATTACH MACRO



High Level Assembler(HLASM) for MVS & VM & VSE

ATTACH MACRO

Postby belkin99 » Sat Mar 26, 2011 8:27 am

I used ATTACH macro to pass the control to external routine with list of parameters.
In the called subroutine, I would like to know which register will point at those parameters because I want to access them.
is R1 pointing on the list ??
belkin99
 
Posts: 25
Joined: Mon Aug 30, 2010 6:59 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ATTACH MACRO

Postby steve-myers » Sat Mar 26, 2011 8:48 am

The new program receives control with standard linkage. In other words, reg 1 points to a parameter list you specified in your ATTACH macro, reg 13 points to a "standard" OS/360 72 byte save area, register 14 probably points to an SVC 3 instruction, and reg 15 contains the entry point address of the program being started by the ATTACH macro.

Is there a reason you're using the ATTACH macro? There are any number of valid reason to use it, but there is quite a bit of overhead associated with it, so it should only be used for a valid reason.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: ATTACH MACRO

Postby steve-myers » Sat Mar 26, 2011 8:52 am

This simulates starting a program with PARM=PARAMETER.
         ATTACH EP=PGM.                                                X
               PARAM=PARMLEN,                                          X
               VL=1,                                                   X
               ECB=DONE
         ST    1,TCBADDR
         WAIT  1,ECB=DONE
         DETACH TCBADDR
         ...
DONE     DC    F'0'
PARMLEN  DC    AL2(8),C'PARAMETER'
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to Assembler

 


  • Related topics
    Replies
    Views
    Last post