I used "pseudo registers" extensively a long, long time ago, 
but not recently so I'm very rusty on it.  However, I think 
you also need a CXD instruction which will define a fullword 
into which the linkeditor (or binder, I suppose) will put the 
cumulative length of everything referenced in a QCON.  
At initialization you do a getmain for the value in the CXD 
fullword.  Later, when you want the address of one of your 
areas, you load the QCON and use it as an offset into the 
gotten storage.  

IMHO, using DXDs for each field is not the way to go.  
Rather, referring to a DSECT in a QCON will give you the offset 
to the entire DSECT within the gotten storage.  


 
> Date: Tue, 23 Feb 2010 08:45:49 -0800
> From: charl...@mcn.org
> Subject: Re: Best practice for 24-bit storage in assembler called from C/C++
> To: IBM-MAIN@bama.ua.edu
> 
> Let me come right out and say I am asking a potentially dumb question here.
> I freely admit I have never used pseudo-registers or any of the associated
> features. (Level set: yes, I am totally familiar with the meaning of
> reentrant and reusable and have coded lots of "do-it-yourself" reentrant
> code in 360+ assembler.)
> 
> Why am I asking a dumb question here? Because I don't see much if any
> overview of the topic in the docs, just detail instruction documentation,
> and I don't know where else to turn. If anyone could suggest a source for an
> education in pseudo-registers and related features, I'm all ears.
> 
> Does DXD help solve this problem? If I code 
> 
> FOO DXD F
> BAR DC Q(FOO)
> 
> does that give me a fullword that will be "task-unique" at run time? Will
> 
> GETMAIN ...
> L R2,BAR Point to unique storage pointer
> ST R1,0(,R2) Save my storage area for subsequent use
> 
> do what the comments say it does? Is this code -- assuming the usual other
> requirements are met -- satisfy reentrancy? Or am I off base?
> 
> Environment: Pre-linker, PDS, and "OS" linkage from LE C. Why pre-linker and
> not binder/PDSE? Two reasons: trying to solve one learning curve at a time,
> and hoping to avoid PDSEs because of all of the "customer resistance"
> reasons mentioned in a recent thread on IBMMAIN. (Please don't try to
> convince me that PDSEs are cool. I have no personal problem with them. I am
> in the software product business, and the customer objections are a fact,
> even if some think they are baseless. You don't sell software by arguing
> with the prospects.)
> 
> Charles
> 

                                          
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/201469230/direct/01/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to