Docsity

Exception Handling Two - Microcomputer Structures - Lecture Slides, Slides of Microcomputers

Partial preview of the text

Download Exception Handling Two - Microcomputer Structures - Lecture Slides and more Slides Microcomputers in PDF only on Docsity!

Exception Handling (2)

68000 Exception Handling

  • The 68000’s exception classification
  • Register that support OS and exceptions
  • Protecting OS memory
  • The various exceptions
  • The exception vectors

Supervisory State Registers

9/20/6 Lecture 3 - Instruction Set - Al 4

Registers across The processor Family

Docsity.com

Registers

  • 68000
    • SSP – Supervisor Stack Pointer
    • System Byte of Status Word
  • 68010 adds
    • Vector Base Register
    • Source Function Code
    • Destination Function Code
  • etc

Exceptions and Interrupts

  • Reset
    • Externally Generated
    • Force both the RESET* and HALT* pins low for at least 10 clock cycles
    • Force the 68000 into a known start-up state
    • No RTE

Exceptions and Interrupts

  • Bus Error
    • Externally Generated
    • Initiated by hardware driving BERR* pin low
    • A catchall exception
    • Can be used to indicated non-populated memory has been addressed

Interrupt Hardware

Interrupt HW Level encoder

Exceptions and Interrupts

  • Illegal Instruction
    • What happens when you try to execute and op- code that is not defined?
    • 8-bit uprocessor days
    • 68000?
      • Illegal Instruction Exception

Exceptions and Interrupts

  • Divide by Zero
    • Trying to divide by 0 generates this exception
  • CHK Instruction
    • Check Register against bounds
    • CHK D1,D0 generates an exception if
      • [D0(0:15)] < 0
      • [D0(0:15)] > [D1(0:15)]
    • Point – useful for compiler writers

Exceptions and Interrupts

  • Line 1010 Emulator
    • Allow creation of special instructions
    • When this op code is encountered an exception occurs
    • Remaining bits of instruction word can be used to further specify “user” created instruction
  • Line 1111 Emulator
    • A second version

Exceptions and Interrupts

  • Un-initialized Interrupt Vector
    • When a 68000 device causes and interrupt
    • During IACK device supplies ID
    • If not yet initialized $0F is sent so device can be initialized
    • 68000 Devices respond with $0F when reset

Exceptions and Interrupts

  • TRAPV Instruction
    • Trap on overflow
    • “IF V=1 THEN exception ELSE continue”
  • Double Bus Fault
    • Example: A bus error occurs and while responding to this a second bus error occurs?
    • 68000 halts!!!

Exception Vectors

  • 256 longwords

(512 words)

  • Extend form

address

$00 0000 to $

03FF