13.07.2015 Views

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

NUMERICS PROCESSOR EXTENSIONTable 12-1. Interpretation of MP and EM FlagsInstructionWAITESCAPEEM Flag Set ResetMP Flag Reset SetTRAP 7? N ifTS=1TEST BUSY? Y YTEST ERROR? Y Y(TRAP 16)TRAP?? Y ifTS=1TEST BUSY? N y.TEST ERROR? N Y(TRAP 16)TASK STATEWhen a task uses the 80287 NPX, the operating system has two additional concerns in keeping trackof the task's state:• The task database must be expanded to include 47 words of state information forthe 80287.• The operating system must change 80287 state when a different task attempts to use the 80287.The state of the 80287 consists of 47 words. Saving and restoring the 80287 state is therefore a relativelyexpensive operation that should not be performed any more frequently than necessary. Typically, onlya few of the active tasks in a system use. the NPX; therefore, it would be wasteful to save and updatethe state information with every task switch. It is preferable for the operating system to record whichtask is using the 80287 and to swap state information only when some other task attempts to use the80287. .The 80<strong>286</strong> supports sharing of the 80287 by providing the TS flag. The processor automatically setsthe TS every time a task switch occurs. The first use of an ESC or WAIT instruction when the TS isset causes trap 7. This enables the operating system to keep track of the task to which the NPX isassigned at any given time and to change 80287 state when necessary.NUMERICS EXCEPTIONSThree interrupt vector positions are reserved for exceptions that relate to numerics processing. Interruptsfor these vectors are not maskable. 'Interrupt 7-Processor Extension Not Available (NM)This exception occurs in either of two conditions:• The CPU encounters an ESC instruction and EM is set. In 'this case, the exception handler 'shouldemulate the instruction that caused the exception. TS may also be set.12-3 121960-001

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

Saved successfully!

Ooh no, something went wrong!