The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: "Ron Natalie" <ron@ronnatalie.com>
To: "TUHS main list" <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] A language question
Date: Wed, 01 Sep 2021 15:59:08 +0000	[thread overview]
Message-ID: <emb7ef3194-1912-4969-9763-7a703eefabc9@alien> (raw)
In-Reply-To: <CAD2gp_TjwJJ9O57cwVAUvy+46-81tgsdPxdfLjbOfRNFTrjRNw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]

I disagree.  TRAP according to the processor handbook was intended to be 
used for what UNIX calls system calls.    EMT was the emulator trap used 
to simulate other operating systems on the same hardware.    Oddly, for 
some reason, all the DEC OSes use EMT instructions for their system 
calls.   This came in handy when JHU ported BasicPlus from RSTS to UNIX. 
     That executable could run fine on UNIX because we caught the few EMT 
traps that mattered to us and simulated them.   The only thing we had to 
do other than that was to add a "nostack()" system call that got rid of 
the normal UNIX-maintained stack starting at the address space (RSTS 
executables like many DEC OSs used a stack that started around 1000).

Many of the UNIX signals come straight from PDP-11 traps:  SIGFPE, 
SIGIOT, SIGSEGV, SIGBUS, SIGILL, SIGEMT. and those traps invoked those 
signals.

FPE - floating point exception
ILL - illegal exception (either unknown opcode or CERTAIN of the 
privileged instructions, others were ignored)
BUS - fatal unibus timeout trap.   Usually an attempt to access a 
memory/unibus address that doesn't respond, or to do word accesses on 
odd boundaries.
SEGV - accessing memory not mapped to you
IOT - the IOT instruction
BPT - the BPT instruction
TRAP, EMT - these instructions

[-- Attachment #2: Type: text/html, Size: 2218 bytes --]

  reply	other threads:[~2021-09-01 16:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01 13:23 Richard Salz
2021-09-01 13:28 ` Dan Cross
2021-09-01 13:44   ` Clem Cole
2021-09-01 14:23   ` Paul Winalski
2021-09-01 14:29     ` John Cowan
2021-09-01 15:59       ` Ron Natalie [this message]
2021-09-01 18:09         ` Warner Losh
2021-09-01 18:43         ` John Cowan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=emb7ef3194-1912-4969-9763-7a703eefabc9@alien \
    --to=ron@ronnatalie.com \
    --cc=tuhs@minnie.tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).