On Wed, 18 Mar 1998 08:44:00 PST "STRONG, Neil -Syntegra" writes: >Am I correct in assuming that if you write code that is greater that 1 >page, then you must duplicate the ISR in both pages anyway - >regardless >of whether my ISR changes PCLATH. > >Presumably, if an interrupt occurs whilst executing code in page 1, >the >jump vector at 0004h will jump to that location in the CURRENT page - >not >page 0. > >Therefore ISR _MUST_ exist in both pages(?) An interrupt will always send the PC to 0004, location 4 in the first page. But if your ISR is written like this (which it doesn't have to be): org 4 goto isr of course the goto will go to whichever page PCLATH dictates. If you put the ISR "inline" starting at location 4 then it will execute there regardless of PCLATH, but PCLATH would have to be saved and modified before using any CALL or GOTO in the ISR, unless duplicate copies of the target code are in all pages. >I'm basing these musings on a 16C74 - but it should apply for any >processor. Any 14-bit (PIC 16CXX) one. The GOTO and CALL instructions supply 11 bits of address which can cover a 2K space. Additional bits, if required by having more than 2K of code EPROM, are supplied from PCLATH. _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]