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

John Dallman jgd at cix.co.uk
Mon May 17 15:46:00 EDT 2021


In article <s7uf6n$l2m$1 at dont-email.me>,
clubley at remove_me.eisner.decus.org-Earth.UFP (Simon Clubley) wrote:

> If you were looking at a C machine model, that would also mean a
> design where you were not tied to any architecture specific modes, 
> so VMS would have been designed around a 2-mode model in that case.

I don't think it's quite that clear. The VAX hardware was designed in
conjunction with VMS, I believe? And more than two modes was picked to
allow the kernel to be protected from bad drivers? There's nothing about
programming in C in itself that dictates a two-model model; UNIX always
works that way, but that's because it evolved to that model. 

> For example, if your lowest level is C, you can define a pointer 
> variable like this:
> 
> 	unsigned char *ptr;
> 
> The size of that pointer is abstracted away from you and you simply
> don't care about that pointer size unless you are working with some
> hardware where it matters.

There are more cases than that when you care, notably when you're writing
memory management code, but you can easily find out the size with the
sizeof() function. 

> In the current VMS design, your lowest level is Macro-32 so you 
> don't have that level of abstraction and the size of the pointers are 
> _very_ visible to you and your source code.

Indeed. If addressing other than 32-bit had been considered when the API
was designed, it should have been fairly easy to write a suite of macros
that allowed for instancing the API by address size. However, this was
not done, and it has not been retrofitted, which would be much harder
work. In 1976-78, addressing bigger than 32-bit must have seemed far away.


John 



More information about the Info-vax mailing list