Mark,

This may not clarify the issue, but isn't the offset in the LG instruction 
20-bit?
That would mean that it can address 00000 to FFFFF, or 0 to 1,048,575, right?

Using your last instruction as an example:
00000012 E310 1B58 0104          00001B58      7          lg    1,far4          
    
               xxx xx 
The "x" are the displacement from register 1 so, that means you are addressing 
x'01B58' from register 1.

Maybe try a L instruction and see if it holds up to what your interpretation is.
If it does, then try an LY instruction. The LY has the same 20-bit displacement 
as the LG.

Just a thought, not an explanation.

Chuck

Charles (Chuck) Hardee
Senior Systems Engineer/Database Administration
EAS Information Technology

Thermo Fisher Scientific
300 Industry Drive | Pittsburgh, PA 15275
Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230
chuck.har...@thermofisher.com | www.thermofisher.com

WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this 
e-mail or the information herein by anyone other than the intended recipient, 
or an employee or agent of a system responsible for delivering the message to 
the intended recipient, is prohibited. If you are not the intended recipient, 
please inform the sender and delete all copies.

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Mark Boonie
Sent: Monday, November 03, 2014 1:57 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: What does the 'end' address on a USING statement mean?

I recently started looking at the 'end' specification for the USING statement, 
something I've neglected for a long time.  I *thought* it indicated the last 
location that could be assembled with that USING, but I'm not so sure any more. 
 I have the following source file:

dummy    csect ,                   
         using (dummy,dummy+6000),1
         ceject 0                  
         lg    1,far1              
         lg    1,far2              
         lg    1,far3              
         lg    1,far4              
                                   
         org   dummy+4000          
far1     dc    ad(1)               
         org   dummy+5000          
far2     dc    ad(2)               
         org   dummy+6000          
far3     dc    ad(3)               
         org   dummy+7000          
far4     dc    ad(4)               
         end   ,                   

The relevant portion of the listing looks like this:

  Loc    Object Code      Addr1    Addr2    Stmt  Source Statement              
    
00000000                00000000 00001B60      1 dummy    csect ,               
    
                    R:1 00000000               2          using 
(dummy,dummy+6000),1
                                                                                
    
  Active Usings: dummy(X'1770'),R1                                              
    
  Loc    Object Code      Addr1    Addr2    Stmt  Source Statement              
    
00000000 E310 1FA0 0004          00000FA0      4          lg    1,far1          
    
00000006 E310 1388 0104          00001388      5          lg    1,far2          
    
0000000C E310 1770 0104          00001770      6          lg    1,far3          
    
00000012 E310 1B58 0104          00001B58      7          lg    1,far4          
    
00000018                00000018 00000FA0      9          org   dummy+4000      
    
00000FA0 0000000000000001                     10 far1     dc    ad(1)           
    
00000FA8                00000FA8 00001388     11          org   dummy+5000      
    
00001388 0000000000000002                     12 far2     dc    ad(2)           
    
00001390                00001390 00001770     13          org   dummy+6000      
    
00001770 0000000000000003                     14 far3     dc    ad(3)           
    
00001778                00001778 00001B58     15          org   dummy+7000      
    
00001B58 0000000000000004                     16 far4     dc    ad(4)           
    
                                              17          end   ,               
    

The last sentence of the description of the 'end' specification for an ordinary 
USING says, "Thus USING base,reg is equivalent to USING (base,base+4096),reg."  
So, my thinking was as follows:

- Since a "default" USING can only be used up to base+4095 (because the maximum 
4K displacement is x'FFF'), I assume this means that the 'base+4096' points to 
the byte *past* the last valid USING location.

- If the previous item is true then the "Active Usings" line that shows a range 
of x'1770' bytes for 'dummy' would mean that the last valid address that can 
use R1 as a base is dummy+5999.

- If the previous item is true then the LG of FAR3 at location x'C' should not 
successfully assemble because FAR3 is at DUMMY+6000.

- Even if there is a confusion between "1 byte prior to the specified end" vs. 
"the specified end", the LG for FAR4 at location x'12' should certainly fail.

Since the LG of FAR4 didn't fail, my understanding of the function of the 'end' 
specification must be a misunderstanding.  Can anyone offer any clarity?  
Thanks.

- mb

Reply via email to