[Info-vax] A portable VMS, was: Re: OS Ancestry

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Tue May 18 14:33:11 EDT 2021


On 2021-05-17, Arne Vajhøj <arne at vajhoej.dk> wrote:
> On 5/17/2021 3:12 PM, Simon Clubley wrote:
>> 
>> Imagine if, for example, RMS had been designed in a world where C was
>> the lowest level instead of Macro-32. You would not need any of the
>> 32-bit versus 64-bit RMS APIs (it would be just one API at source code
>> level) and your program would either be a pure 32-bit application or a
>> pure 64-bit application.
>
> Note that there is no such thing as 32 bit and 64 bit mode on VMS.
>

VAX. Which is where VMS started (and 32-bit processors are where Unix
and Linux started). It was a lot easier to get 32-bit Unix/Linux working
on 64-bit architectures than it was VMS.

> The CPU on Alpha, Itanium and x86-64 is always in 64 bit mode. Effective
> addresses are always 64 bit.
>
> Pointers in memory can just contain all 64 bits or just 32 bits with an 
> assumption about the high bits.
>

But in a portable implementation, then this detail (mostly) would not
matter as it would be mostly hidden from the source code within the ABI.

> But it is a per pointer characteristic not a per program
> characteristic - it is possible to have both 64 bit and 32
> bit pointers in the same program.
>

But in a portable implementation, you would have either a 32-bit
process or a 64-bit process. There would be no need for the hybrid
mode and all the extra APIs that go with it.

> If all code on VMS had been nice standard ANSI C, then a lot of
> things would have been easy.
>
> The reality was different. Not just Macro-32 .blkl but
> also Fortran INTEGER*4 and possible other languages
> as well.
>

But this is about a portable version of VMS, not the non-portable
version that was created. In a portable version of VMS, you would
not have Macro-32 as a supported application language and the only
place you would see it is in little bits of architecture-specific
code on VAX that couldn't be written in C or a higher-level language..

BTW, how is INTEGER*4 handled on Unix or was Fortran code never
written that way on Unix ? (It's been a very long time since I
wrote any Fortran code.)

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.



More information about the Info-vax mailing list