[Info-vax] Userland programming languages on VMS.

John Reagan xyzzy1959 at gmail.com
Mon Jan 31 07:51:28 EST 2022


On Monday, January 31, 2022 at 3:33:06 AM UTC-5, Johnny Billquist wrote:
> On 2022-01-31 01:43, Arne Vajhøj wrote: 
> > On 1/30/2022 7:19 PM, Simon Clubley wrote: 
> >> On 2022-01-29, Arne Vajhøj <ar... at vajhoej.dk> wrote: 
> >>> On 1/29/2022 1:53 AM, George Cornelius wrote: 
> >>>> 
> >>>> Works on Eisner. 
> >>>> 
> >>>> $ show sys/noproc 
> >>>> OpenVMS V8.4-2L2  on node EISNER   29-JAN-2022 [...] 
> >>>> 
> >>>> Here's the memory layout synopsis from a linker map: 
> >>>> 
> >>>> Virtual memory allocated:                         00010000 0005FFFF 
> >>>> 00050000 (327680. bytes, 640. pages) 
> >>>> 64-Bit Virtual memory allocated:                  00000000 00000000 
> >>>> 00000000 
> >>>>                                                     80000000 
> >>>> 80010000 00010000 (65536. bytes, 128. pages) 
> >>>> 
> >>>> The example, though, shows too small an allocation to escape 32 bit 
> >>>> address space. 
> >>> 
> >>> I consider 0000000080000000 to be 64 bit space. 
> >>> 
> >>> 0000000000000000 - 000000007FFFFFFF is P0 and P1 space 
> >>> FFFFFFFF80000000 - FFFFFFFFFFFFFFFF is S0 and S1 space 
> >>> 0000000080000000 and upward is P2 space 
> >>> 
> >> 
> >> I think George's point is that this specific address can be 
> >> represented in a 32-bit pointer. 
> > 
> > It can't. 
> > 
> > A 32 bit pointer with the value 80000000 will end up as 
> > FFFFFFFF80000000.
> Since when are pointers considered to be signed and need sign extension? 
> 
> Johnny
The OpenVMS Calling Standard says that.  As other have said, it helped with moving code
from VAX to Alpha and matched the memory layout.  It allowed the OS to keep 32-bit pointers
in many system data structures and have them considered as system addresses.  

As Andreas pointed out (no pun intended), if you can prevent that sign-extension, you can
get another bit of address space if you are willing to promise not to ever touch a system address.
Some languages like that build/use descriptors (like Pascal and BASIC) know about this
sign-extension internally.   In C, you can typecast your way out of it since you access descriptors manually.



More information about the Info-vax mailing list