[Info-vax] VMS process communication

Andreas Gruhl gruhl at isidata.de
Mon Mar 13 05:56:27 EDT 2023


Arne Vajhøj schrieb am Freitag, 10. März 2023 um 22:01:40 UTC+1:
> On 10/31/2022 9:06 PM, Arne Vajhøj wrote: 
> > On 10/31/2022 9:18 AM, Simon Clubley wrote: 
> >> Have you considered adding articles about 64-bit memory access 
> >> programming 
> >> on VMS and its limits ? Or is everyone already (painfully :-)) aware of 
> >> the issues involved here ? 
> > 
> > I have not considered that. 
> > 
> > Long opinionated writing about what DEC decided 30 years ago, 
> > why, consequences of that and, discussions about whether DEC 
> > made the right decision and discussions about what VSI should do 
> > now are out of scope for the series. 
> > 
> > And from the more practical perspective I don't think there 
> > is enough to write about. One page with background, 
> > one page with all the stuff one can do in C and one 
> > page about the fun of Java calling C via JNI. That 
> > must be about it.
> I decided to do it anyway. 
> 
> And it turned out to be more than 3 pages to write. 
> 
> Pre-release for comments: 
> 
> https://www.vajhoej.dk/arne/articles/vms64.html 
> 
> Arne

Thanks for your effort.

I like to add, that you can successfully access the lower 2 GB of P2
(%X00000000 80000000..%X00000000 FFFFFFFF) with 32 bit
pointers and descriptors.
You only have to treat the pointers as unsigned instead of signed
avoiding them to be interpreted as S0/S1 addresses.
We successfully  use this in Pascal, which is missing 64-Bit descriptors.
The caller of a routine can then simply pass a structure in lower P2
without any special adaptions (except having to use the compiler
qualifier /USAGE=64BIT_TO_DESCR).
The routine itself has to do some additional work. It must extract the
structure's address from the descriptor and copy it to a 64-Bit Pointer
WITHOUT sign extension.
This makes the structure directly accessible although it resides in P2.

I wished treating descriptor pointers as unsigned would be the default
behaviour. The reason is simple: You will find extremely few application
programmers who ever needed to access an S0 or S1 structure via
descriptor - but many who would like to access P2 data.

Treating 32-bit pointers as unsigned is probably possible in any language
available under VMS.

Andreas



More information about the Info-vax mailing list