Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!ima!haddock!wolfgang From: wolfgang@haddock.UUCP Newsgroups: comp.arch Subject: Re: Interrupt vectors. Message-ID: <538@haddock.UUCP> Date: Tue, 9-Jun-87 21:52:02 EDT Article-I.D.: haddock.538 Posted: Tue Jun 9 21:52:02 1987 Date-Received: Sat, 13-Jun-87 01:08:35 EDT References: <7408@boring.cwi.nl> <2878@pyramid.UUCP> <19253@ucbvax.BERKELEY.EDU> <971@killer.UUCP> Reply-To: wolfgang@haddock.ISC.COM.UUCP (Wolfgang Rupprecht) Organization: Home for Wayward Programmers Lines: 39 Keywords: interrupt handlers As already noted, a 68000 unlike the 68010/68020 doesn't push the vector number onto the stack for you. Here is another way for you to wrestle this information from the 68000, with NO individual stubs for each vector. First notice that the 68000 discards the top 8 address bits a31-a24. (Oh oh, I can here the groans already.) We can use these 8 bits for encoding a separate value for each of the 256 vectors. (And then purify the pc of these dirty bits!) ---- | vector table .long trap .long trap + 0x01000000 .logg trap + 0x02000000 .long trap + 0x03000000 .... .long trap + 0xff000000 trap: moveml #SAVE_A0A1D0D1, -sp@ jsr _trap | this also abandons the dirty bits in the pc | check that this assembles to an absulute | value jump (and not a bsr) moveml sp@+, #RESTORE_A0A1D0D1 rte (Please no flames for typos in the 68000 assembly, I don't have a 68000 assembler on hand to run this through.) ------ I have actually used this on an old homebrew 68000 computer. The biggest problem was the so-called intelligent assembler that didn't understand the difference between jsr and bsr. (I had to hand assemble the jsr to get the jsr opcode). -- Wolfgang Rupprecht haddock.ISC.COM!wolfgang {decvax!cca|yale|ihnp4|cbosgd|bbncca|harvard}!ima!haddock!wolfgang