On 3/23/2012 12:59 AM, Scott Bennett wrote:
I am trying to find documentation or examples that show how I can utilize
(I assume) register 1 to access the value of the arguments from a caller to
my assembler routine executed under USS.

For example, if my routine was called from USS as:

$ myroutine arg1 arg2

How can I get the value arg1 and arg2?

Thanks!


Well, here's an extract from our course "Developing
Applications for z/OS UNIX" (I went on a hunt for the
original source and couldn't find it; I know it's
documented out there, but it always takes me a long
time to re-locate it, so simplest just to pass along
the result from earlier work):

R1 -> list of seven words

word 1 -> fullword counter: number of parms passed
word 2 -> pointer -> table of parm lengths (one fullword each)
word 3 -> pointer -> table of parm addresses
word 4 -> fullowrd counter: number of environment variables available
word 5 -> pointer -> table of env var lengths (one fullword each)
word 6 -> pointer -> table of env var addresses
word 7 -> word 1

HTH.

More info on the related course:

 http://www.trainersfriend.com/UNIX_and_Web_courses/u520descr.htm



--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-355-2752
http://www.trainersfriend.com

* To get a good Return on your Investment, first make an investment!
  + Training your people is an excellent investment

* Try our tool for calculating your Return On Investment
    for training dollars at
  http://www.trainersfriend.com/ROI/roi.html

Reply via email to