On 2015-08-11, at 07:50, Tom Marchant wrote:

> On Tue, 11 Aug 2015 08:46:39 -0400, Peter Relson wrote:
> 
>> If that is then used with LLGF this will be a branch to an odd address and
>> a specification exception will result.
> 
> You lost me with that one Peter. Given all of these conditions:
> 1. A program stores the low half of R0 as returned from LOAD
> 2. The high half of R0 returned from LOAD is 0
>  
If it's a data-only module with RMODE(64) the high half may be nonzero.

> 3. R15 is loaded from the saved R0 with LLGF
> 4. The program issued BASSM R14,R15
>  
But if it's data-only:
o you wouldn't want to branch to it.
o you need to clear bit 63 before accessing it.

(Might one declare a data-only module as RMODE(64) AMODE(24) so
it may be loaded above the bar, but so LOAD returns an unbiased
address?)

(Might the programmer declare an odd address as an ENTRY for the
purpose of accessing data at that address?  This becomes
ambiguous with AMODE(64).)

> Everything will work correctly. Of course, if the program uses BASR 
> rather than BASSM, a specification exception will result.
> 
> I would say that the correct sequence should be:
> 
> LOAD modulename
> STG R0,moduleaddreess
> LG R15,moduleaddress
> BASSM R14,R15
> 
> where
> moduleaddress DS FD
> or
> moduleaddress DS AD
> 
> Of course, if you don't need to keep the module address around because 
> you will only call it once, the STG/LG can be replaced with 
> LGR  R15,R0 

-- gil

Reply via email to