
BASIC INSTRUCTION SET
Example: STI. Sets IF= 1, which enables the processing of maskable external interrupts.
Example: CLI. Sets IF=O to disable maskable interrupt processing.
HLT (Halt) causes the processor to suspend processing operations pending an interrupt or a system reset. This trusted instruction provides an alternative to an endless software loop in situations where a program must wait for an interrupt. The return address saved after the interrupt will point to the instruction immediately following HLT. This instruction may be executed only when CPL = O.
Example: HLT
LOCK (Assert Bus Lock) is a
3.11.3 Input and Output Instructions
These trusted instructions provide access to the processor's I/O ports to transfer data to and from peripheral devices. In Protected Mode, these instructions may be executed only when CPL :5 IOPL.
IN (Input/rom Port) transfers a byte or a word from an input port to AL or AX. If a program specifies AL with the IN instruction, the processor transfers 8 bits from the selected port to AL. Alternately, if a program specifies AX with the IN instruction, the processor transfers 16 bits from the port to AX.
The program can specify the number of the port in two ways. Using an immediate byte constant, the program can specify 256
Example: IN AL,
BYTEYORT_NUMBER. Transfers 8 bits to AL from the port identified by the immediate constant BYTEYORT_NUMBER.
OUT (Output to Port) transfers a byte or a word to an output port from AL or AX. The program can specify the number of the port using the same methods of the IN instruction.
Example: OUT AX, DX. Transfers 16 bits from AX to the port identified by the
INS and OUTS (Input String and Output String) cause block input or output operations using a Repeat prefix. See Chapter 4 for more information on INS and OUTS.
3.12 PROCESSOR EXTENSION INSTRUCTIONS
Processor Extension provides an extension to the instruction set of the base architecture (e.g., 80287). The NPX extends the instruction set of the