All messages from thread
Message 1 in thread
From: Peter da Silva (peter@baileynm.com)
Subject: Running RT/RSTS code under UNIX (Re: Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's)))
Newsgroups: comp.arch, comp.sys.dec, alt.sys.pdp11
View this article only
Date: 1999/06/02

In article <u90a2wr21.fsf@Q.i-have-a-misconfigured-system-so-shoot-me>,
 <cg@myrias.com> wrote:
>The only actual contact I had with that stuff was with the DECUS version
>of PDP-11 Adventure, which was written in that Fortran. Even with the
>threading, it needed an overlay as well. I got into the guts of it because
>I made it run under early UNIX on a PDP-11. (Emulate the RT-11 traps).

I ran into some people at Berkeley making a similar effort to run RSTS
Basic+ under V6 or V7... that way the business school people could be
moved from RSTS to UNIX and still run their old code. In fact, IIRC, Basic+
was made their shell so they didn't even have to know they'd changed OS.

It helped that the PDP-11 had 2 TRAP instructions (TRAP and IOT),
and UNIX used one while RSTS and RT used the other.

-- 
In hoc signo hack,
Peter da Silva <peter@baileynm.com>
 `-_-'   Ar rug tú barróg ar do mhactíre inniu? 
  'U`    "Be vewy vewy quiet...I'm hunting Jedi." -- Darth Fudd


Message 2 in thread
From: John Wilson (wilson@dbit.com)
Subject: Re: Running RT/RSTS code under UNIX (Re: Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's)))
Newsgroups: comp.sys.dec, alt.sys.pdp11
View this article only
Date: 1999/06/02
In article <7j3ke0$fkd@web.nmti.com>,
Peter da Silva <peter@baileynm.com> wrote:
>I ran into some people at Berkeley making a similar effort to run RSTS
>Basic+ under V6 or V7... that way the business school people could be
>moved from RSTS to UNIX and still run their old code. In fact, IIRC, Basic+
>was made their shell so they didn't even have to know they'd changed OS.

I remember seeing a hacked copy of BP on an 11/70 at Harvard in 1983 or so
(not as a real student, just summer classes!  they told me in no uncertain
terms not to bother applying) which appeared to have been ported to UNIX.
Maybe it was the same one?  I think they also had something called "PPL"
(PDP Programming Language maybe?)...

John Wilson
D Bit
Message 3 in thread
From: Warren Toomey (wkt@css.adfa.edu.au)
Subject: Re: Running RT/RSTS code under UNIX (Re: Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's)))
Newsgroups: comp.sys.dec, alt.sys.pdp11
View this article only
Date: 1999/06/02
I've written an PDP-11 application emulator: user-mode instructions are
emulated, and TRAP, IOT etc. instructions get caught and the system call
is translated to native OS commands.

Currently I can emulate PDP-11 Unix applications on generic 32-bit Unix
platforms. However, I had thought that RSX, RT-11, other PDP-11 OS
applications could be emulated this way.

Mind you I know nothing about these other systems :-)

ftp://minnie.cs.adfa.edu.au/pub/PDP-11/Sims/Apout/

Cheers,
	Warren
Message 4 in thread
From: John Holden (johnh@psych.usyd.edu.au)
Subject: Re: Running RT/RSTS code under UNIX (Re: Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's)))
Newsgroups: comp.sys.dec, alt.sys.pdp11
View this article only
Date: 1999/06/04
Peter da Silva wrote:

> It helped that the PDP-11 had 2 TRAP instructions (TRAP and IOT),
and UNIX
> used one while RSTS and RT used the other.
> 
> --
Um... almost. The pdp-11 had four software trap instructions,
EMT, TRAP, IOT and BPT. Both EMT and TRAP allowed you to encode 8 bits
of data in the low byte of the instruction. The trap handler could use
it to decode functions etc. The IOT instruction didn't allow any embeded
data. The BPT (break point trap) was used by debuggers such as ODT.
Also, the T (trace bit) in the processor status word would generate
an interrupt to the BPT vector at the end of each instruction.

When I migrated my department from RT-11 to Unix, I wrote a complete
emulation package that would run RT-11 binaries under Edition 7 Unix
on my pdp-11 (written in C except for trap/interrupt handlers). Both
RT-11 and Unix used the EMT instruction for system calls. Fortunately,
standard Unix library calls used indirect versions of the system calls
that allow me to differentiate between a Unix and RT-11 EMT trap call
with a small code change in the kernel. Needless to say, references to
the I/O page weren't allowed, but most standard RT-11 programs ran with
no problems.

For RT-11 gurus, I noticed that even V5 binarys such at the MACRO
assembler used V1 system calls (some undocumented!). I still have the
code somewhere!

						regards John

©2001 Google