This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ion handler 00 exception handler exception table
0 1 2 n-1 code for code for exception handler 11 exception handler code for code for exception handler 22 exception handler ... ...
code for code for exception handler n-1 exception handler n-1 Figure 8.2: Exception table. The exception table is a jump table where entry handler code for exception . contains the address of the At runtime (when the system is executing some program), the processor detects that an event has occurred and determines the corresponding exception number . The processor then triggers the exception by making an indirect procedure call, through entry of the exception table, to the corresponding handler. Figure 8.3 shows how the processor uses the exception table to form the address of the appropriate exception handler. The exception number is an index into the exception table, whose starting address is contained in a special CPU register called the exception table base register.
exception number (x 4) Address of entry for exception # k
0 1 2 n-1 exception table exception table base re...
View Full Document
- Spring '10
- The American