MACRO &NAME GETPARM * ******************************************************************* * * * * G E T P A R M * * * * Put the address of the passed parameter (if one is passed) * * into R1 and the length into R15 * * * &NAME DS 0H * L 15,4(13) Previous save area address * L 14,4(15) Next previous area address * LTR 14,14 Are we at the OS area? * BZ *+10 Yes - Go and check the parm * LR 15,14 Make r15 same as r14 and go try next * B *-12 Branch back to main loop * L 14,24(15) Are we in the OS yet? * L 14,0(14) Load the address of the address * XR 1,1 Clear register 1 for parm address * XR 15,15 Clear length counter * LH 15,0(14) Put length into r15 * LTR 15,15 Do we have a parm? * BZ *+8 No - Skip putting addreaa into r1 * LA 1,2(14) Load address of parm * * * * R15 contains the length of the passed parmeter, * * If R15 is zero (no parm) then r1 will also contain zero, * * otherwise R1 contains the address of the parameter and R15 * * contains the length of the passed parameter. * * * * Copyright - Abbydale Systems LLC. * * ******************************************************************* * MEND