Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: New Vax - future directions :-)



On 2021-07-08 01:33, Johnny Billquist wrote:
On 2021-07-07 20:40, Mouse wrote:
If it could run under 2.11, I'm moderately sure I could make it run
under NetBSD/vax, given compatability-mode-capable hardware (or
emulated hardware).  I don't suppose you'd happen to know where I might
be able to get hold of that 2.11 binary?

It's in the standard 2.11BSD distribution.

Actually, getting this running under NetBSD/vax would be a rather interesting, but complicated exercise no matter what.

If we ignore the whole problem that the PDP-11 compatibility mode does not include split I/D space to start with, this is, as I said, a sortof hacked up environment that runs an RT-11 binary.

So, first of all, you'd need to get the system calls for the 2.11BSD system handled, in VAX mode. Since any system call will trap out to VAX mode. That means also handling the different a.out image types (or at least the one used by Zork).

Then the 2.11BSD Zork binary is essentially relocating itself to above 160000, setting up a signal handler for EMT instructions, and in there is then handling all the needed RT-11 system calls, translating them to 2.11BSD stuff. Then it reads in the base overlay of the RT-11 binary, and jumps into that and starts executing.

So you need to also add the capability of having signal handlers in PDP-11 mode, even though you're trapping out the VAX mode on any signal. So, sort things out when such signal happen, create the right state in PDP-11 mode, jump back into PDP-11 mode, resuming at the registered signal handler, and then handle whatever else is thrown at you. And of course, exit out from a signal handler back into the normal PDP-11 execution, dealing with whatever this might imply about interrupted system calls, and so on. :-)

I don't think it's impossible (except that I/D space at the moment), but this is definitely far from trivial.

  Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


Home | Main Index | Thread Index | Old Index