From mboxrd@z Thu Jan 1 00:00:00 1970 From: cowan@mercury.ccil.org (John Cowan) Date: Tue, 28 Oct 2014 18:02:50 -0400 Subject: [TUHS] speaking of early C compilers In-Reply-To: <2A352307-DB5B-4434-B5E3-C6747CD71AD4@ronnatalie.com> References: <0F0B9BFC06289346B88512B91E55670D2F86@EXCHANGE> <2c9c14d6fd7d2e98ae0bc98d7f593ff9.squirrel@webmail.yaccman.com> <97AA639D-8BBF-4EE1-9E4D-5326E866B9BA@ronnatalie.com> <2A352307-DB5B-4434-B5E3-C6747CD71AD4@ronnatalie.com> Message-ID: <20141028220250.GC3885@mercury.ccil.org> Ronald Natalie scripsit: > Amusingly, if you read the DEC processor handbook, it says the TRAP > instruction is designed to invoke system calls. UNIX did this > of course. Amuslingly, the DEC operating systems, including RSTS, > used EMT to invoke system calls. The book says this was put there > to allow emulating other OSs. Well this made it relatively easy. Unless I have utterly forgotten, EMT was to be used by DEC and TRAP by users. Since Bell Labs was a user, they used TRAP (I asked ken -- I think it was ken, definitely not Ken -- about this). Of course, DEC didn't anticipate that any user would write an operating system! On RSTS/E as opposed to RSTS, both EMT and TRAP went to the user executive. To reach the kernel, you did EMT 377 followed by another EMT, but EMT 377; EMT 377 was vectored back to the user as an EMT 377. That's what allowed RSTS/E to host other OSes that used EMT. -- John Cowan http://www.ccil.org/~cowan cowan at ccil.org Nobody expects the RESTifarian Inquisition! Our chief weapon is surprise ... surprise and tedium ... tedium and surprise .... Our two weapons are tedium and surprise ... and ruthless disregard for unpleasant facts.... Our three weapons are tedium, surprise, and ruthless disregard ... and an almost fanatical devotion to Roy Fielding....