03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

OVERVIEW OF THE 80C186 FAMILY ARCHITECTURE<br />

The CPU is now executing the interrupt service routine. The programmer must save (usually by<br />

pushing onto the stack) all registers used in the interrupt service routine; otherwise, their contents<br />

will be lost. To allow nesting of maskable interrupts, the programmer must set the Interrupt Enable<br />

bit in the Processor Status Word.<br />

When exiting an interrupt service routine, the programmer must restore (usually by popping off<br />

the stack) the saved registers and execute an IRET instruction, which performs the following<br />

steps.<br />

1. Loads the return CS and IP by popping them off the stack.<br />

2. Pops and restores the old Processor Status Word from the stack.<br />

The CPU now executes from the point at which the interrupt or exception occurred.<br />

Stack<br />

PSW<br />

1<br />

Interrupt Enable Bit<br />

Trap Flag<br />

2<br />

CS<br />

0 0<br />

Processor Status Word<br />

SP<br />

IP<br />

3<br />

Code Segment Register<br />

Instruction Pointer<br />

4<br />

CS<br />

IP<br />

Interrupt<br />

Vector<br />

Table<br />

A1029-0A<br />

Figure 2-26. Interrupt Sequence<br />

2-41

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

Saved successfully!

Ooh no, something went wrong!