Hi,.I tried posting this at IBM-MAIN, however I am experiencing problems
with that site, so I decided to post here.
.
I need some clarification with some instructions being used in an example from 
SA23-1394-30
Im referring to:
MVS Programming Extended addressability Guide
SA23-1394-30
Page 38-39
Figure 12 
Cross Memory Services
EAX 
SETDEF
.
.
Please refer to "MVS Programming Extended Addressability Guide"
SA23-1394-30
Around page 39
Figure 12 
Using ETDEF to dynamically define entry table addresses.
.
The sample code in Figure 12 looks odd to me.
The code sample begins with the following sequence of instructions
The example is trying to show how to set an EAX
 LA 1,1(0)
 ST 1,AXNUM
.
 L 4,AXVAL
 ETDEF TYPE=SETDEF
.
the work areas are:
AXL   DS 0F  AXLIST
AXNUM DS H   Number of AXs Requested
AXVAL DS H   Returned AX (OR EAX)
.
The example is trying to show how to set an EAX for a SETDEF macro.
. 
My understanding - the first 3 instructions want to establish an EAX..
The first Instruction load 1 off of Register 0.
Is register 0 assumed to be zero ?
If the author wanted to initialize Register 1 with a value of 1, wouldn't it be
better to use:
 AHI  R1,1
   *or*
 LA   R1,1 
.
Typically Register 0 can't be used as a base register, however its my 
understanding
when addressing the PSA, Register 0 is acceptable such as:
 USING PSA,R0              MAP Prefix Save Area       
 USING TCB,R2              MAP Task Control Block     
 LA    R0,0                                           
 L     R2,PSATOLD          Get Address Of Current TCB 
 ST    R2,TCB@             Save TCB Address 
.
.
It is my understanding that Register 0 cannot be used as a base register.
Register 0 can be used to address the first 4096 bytes of an address space.
.
.
In the example in Extended Addressability
What value does register 0 contain in Figure 12 page 39 in order to obtain an 
EAX ?
If Register 0 contains a value greater than 4096, then Register 1 contains a 1.
If Register 0 contains a value >0 and < 4096, then Register 1 contains a value 
other
than 1. Do I understand that correctly ?
.
So exactly what value does the author want to use in figure 12 ?
.
Second
Before the SETDEF macro is issued in figure 12 - Register 4 is loaded with 
AXVAL. 
But wait ! AXVAL is a half word &hellip;.. does that make sense ?
Should the instruction have been written
XR R4,R4
LH R4.AXVAL
.
.
The sample code and notes say EAX(4) specifies the EAX for the PC routine is in 
Register 4.
The Load of Register 4 seems incorrect to me..
Can someone clarify ?
.
.
Paul D'Angelo
.
.

Reply via email to