Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
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)))
Date: 1999/06/04	[thread overview]
Message-ID: <37571AED.41C6@psych.usyd.edu.au> (raw)
In-Reply-To: 7j3ke0$fkd@web.nmti.com

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 by 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 guru's, 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



      parent reply	other threads:[~1999-06-04  4:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mBmZ2.1495$LP2.22361@news6.ispnews.com>
     [not found] ` <7itaj3$9e7$1@rocky.jgk.org>
     [not found]   ` <FCLIJK.L1E@world.std.com>
     [not found]     ` <7j3cah$b4q$1@rocky.jgk.org>
1999-06-02  4:00       ` Microvax. (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's)) Peter da Silva
1999-06-02  4:00         ` Bruce Lane
1999-06-03  4:00           ` Stephen E. Halpin
1999-06-02  4:00         ` Pete Zaitcev
1999-06-02  4:00         ` Chris Scheers
1999-06-03  4:00           ` Tim Llewellyn
1999-06-03  4:00         ` Brian "JARAI" Chase
     [not found]   ` <7j2n2b$63i$1@davinci.thp.univie.ac.at>
1999-06-02  4:00     ` Threaded code on the PDP-11 " Peter da Silva
1999-06-02  4:00       ` Peter da Silva
1999-06-02  4:00       ` cg
1999-06-02  4:00         ` Jeff Kenton
1999-06-02  4:00           ` Peter da Silva
1999-06-07  4:00             ` Threaded code on the PDP-11 amos
1999-06-07  4:00               ` Pete Zaitcev
1999-06-07  4:00               ` John "West" McKenna
1999-06-07  4:00                 ` Jerry Gitomer
1999-06-08  4:00                   ` Jerry Avins
1999-06-10  4:00                     ` kfielden
1999-06-11  4:00                       ` Chris Scheers
1999-06-08  4:00               ` Alan Lehotsky
1999-06-08  4:00                 ` Lars Henrik Mathiesen
1999-06-13  4:00                   ` amos
1999-06-13  4:00               ` Megan
1999-06-13  4:00                 ` Brian Drummond
1999-06-13  4:00                   ` Tim Shoppa
1999-06-02  4:00         ` 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))) Peter da Silva
1999-06-02  4:00           ` John Wilson
1999-06-02  4:00             ` Warren Toomey
1999-06-04  4:00           ` John Holden [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox