11.07.2015 Views

section 7 - Index of

section 7 - Index of

section 7 - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

interrupts makes it very useful for setting breakpoints in monitor programs. The JSRinstruction does not affect the interrupt mask.The III is also a nonmaskable interrupt (IPL 3). It is serviced immediately following theexecution or the attempted execution <strong>of</strong> an illegal instruction (any undefined operationcode). Ills are fatal errors. Only a long interrupt routine should be used for the III routine.RTI or RTS should not be used at the end <strong>of</strong> the interrupt routine because, during the IIIservice, the JSR located in the III' vector will normally stack the address <strong>of</strong> the illegalinstruction (see Figure 7-4). Returning from the interrupt routine would cause the processorto attempt to execute the illegal interrupt again and cause an infinite loop which canonly be broken by cycling power. This long interrupt (see Figure 7-4) can be used as adiagnostic tool to allow the programmer to examine the stack (MOVE SSH, dest) andlocate the illegal instruction, or the application program can be restarted with the hopethat the failure was a s<strong>of</strong>t error. The illegal instruction is useful for triggering the illegalinterrupt service routine to see if the III routine can recover from illegal instructions.-INTERRUPT CONTROL CYCLE 1INTERRUPT CONTROL CYCLE 2ii*i i*FETCH n3 n4DECODE n2 n3EXECUTE n1 n2INSTRUCTION BEING DECODED 1n5 ii1 ii3SWI - - -n3 SWI NOP NOPii4 sw1 sw2 sw3 sw4JSR - sw1 sw2 sw3NOP JSR - sw1 sw2i = INTERRUPT REQUESTi* = INTERRUPT REQUEST GENERATED BY SWIii1 = FIRST VECTOR OF INTERRUPT iii3 = FIRST SWI VECTOR (ONE-WORD JSR)ii4 = SECOND SWI VECTORn = NORMAL INSTRUCTION WORDn4 =SWIsw = INSTRUCTIONS PERTAINING TO THE SWI LONG INTERRUPT ROUTINEFigure 7-3 Interrupting an SWI

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!