Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mnetor!spectrix!John_M From: John_M@spectrix.UUCP Newsgroups: comp.arch Subject: Re: Interrupt vectors. Message-ID: <291@spectrix.UUCP> Date: Sun, 7-Jun-87 15:48:20 EDT Article-I.D.: spectrix.291 Posted: Sun Jun 7 15:48:20 1987 Date-Received: Sun, 7-Jun-87 23:42:46 EDT References: <7408@boring.cwi.nl> Reply-To: jmm@spectrix.UUCP (John Macdonald) Organization: Spectrix Microsystems Inc., Toronto, Ontario, Canada Lines: 43 Summary: M68020 provides what you want In article <7408@boring.cwi.nl> jack@cwi.nl (Jack Jansen) writes: > ... you want all interrupts to jump to the same routine, and >have the interrupt number handy somewhere. Operating Systems I'm >familiar with all simulate this by either stealing a couple of bits >in the PSR and go through pains to extract them again in the common >interrupt routine, or, even worse, provide lots and lots of twisty little >routines, all slightly different (like >intvec128: push #128. > jmp int_common ). > >Now, the sensible thing for the hardware to do seems to be to >provide one vector, and push the interrupt number along with the >PC, PSW and what have you. > >Is this scheme implemented on any machine? >-- > Jack Jansen, jack@cwi.nl (or jack@mcvax.uucp) > The shell is my oyster. The Motorola 68020 provides almost what you ask for. The exception vector pushed onto the stack contains the exception index that caused the trap. Thus you can use a common routine that does all of the shared code and then uses its "argument" in the exception vector to determine which interrupt (or other trap) actually occurred. It does not do one thing that you ask for - it does have separate vectors for each exception. You have to make them contain the same address to have a shared handler. It would have been a mistake for Motorola to do things exactly as you ask - not every operating system/ hardware design would be set up in such a way that ALL of the interrupts would be handled by a common routine. It would be as much a mistake for the hardware to insist that the software uses a common routine (which you ask for) as it is to ensure that a common routine couldn't be used (which you complain about). This is a case where the hardware should provide mechanisms which are capable of supporting any policy that the software designer chooses to use. -- --------- .signature eater food --------- John Macdonald UUCP: {mnetor,utzoo} !spectrix!jmm internet:Sorry. We're in range, but we're in no domain. Disc-claimer: (noun) any hack's source directory