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.

ILLEGALIllegal Instruction InterruptILLEGALOperation:Begin Illegal Instructionexception processingAssembler Syntax:ILLEGALDescription: The ILLEGAL instruction is executed as if it were a NOP instruction. Normalinstruction execution is suspended and illegal instruction exception processing is initiated.The interrupt vector address is located at address P:$3E. The interrupt prioritylevel (11, 10) is set to 3 in the status register if a long interrupt service routine is used. Thepurpose <strong>of</strong> the ILLEGAL instruction is to force the DSP into an illegal instruction exceptionfor test purposes. If a fast interrupt is used with the ILLEGAL instruction, an infiniteloop will be formed (an illegal instruction interrupt normally"returns to the illegal instruction)which can only be broken by a hardware reset. Therefore, only long interruptsshould be used. Exiting an illegal instruction is a fatal error. The long exception routineshould indicate this condition and cause the system to be restarted.If the ILLEGAL instruction is in a DO loop at LA and the instruction at LA-1 is being interrupted,then LC will be decremented twice due to the same mechanism that causes LCto be decremented twice if JSR, REP, etc. are located at LA. This is why JSR, REP, etc.at LA are restricted. Clearly restrictions cannot be imposed on illegal instructions.Since REP is uninterruptable, repeating an ILLEGAL instruction results in the interruptnot being initiated until after completion <strong>of</strong> the REP. After servicing the interrupt, programcontrol will return to the address <strong>of</strong> the second word following the ILLEGAL instruction.Of course, the ILLEGAL interrupt service routine should abort further processing, and theprocessor should be reinitialized.Example:ILLEGAL;begin ILLEGAL exception processingExplanation <strong>of</strong> Example: The ILLEGAL instruction suspends normal instruction executionand initiates ILLEGAL exception processing.

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

Saved successfully!

Ooh no, something went wrong!