
BASIC INSTRUCTION SET
AAS (ASCII Adjust for Subtraction) changes the contents of register AL to a valid unpacked decimal number, and zeros the top 4 bits. AAS must always follow the subtraction of one unpacked decimal operand from another in AL. The carry flag will be set and AH decremented if a borrow was necessary.
Example: AAS
AAM (ASCII Adjust for Multiplication) corrects the result of a multiplication of two valid unpacked decimal numbers. AAM must always follow the multiplication of two decimal numbers to produce a valid decimal result. The high order digit will be left in AH, the low order digit in AL.
Example: AAM
AAD (ASCII Adjust for Division) modifies the numerator in AH and AL to prepare for the division of two valid unpacked decimal operands so that the quotient produced by the division will be a valid unpacked decimal number. AH should contain the
Example: AAD
3.11 TRUSTED INSTRUCTIONS
When operating in Protected Mode (Chapter 6 and following), the 80286 processor restricts the execu- tion of trusted instructions according to the Current Privilege Level (CPL) and the current value of 10PL, the
Trusted instructions control I/O operations, interprocessor communications in a multiprocessor system, interrupt enabling, and the HLT instruction.
These protection considerations do not apply in the real address mode.
3.11.1 Trusted and Privileged Restrictions on POPF and IRET
POPF (POP Flags) and IRET (Interrupt Return) are not affected by IOPL unless ihey aUempi io alter IF (flag register bit 9). To change IF, POPF must be part of a program that is executing at a privilege level greater than or equal.to that specified by 10PL. Any attempt to change IF when CPL ;::: 0 will be ignored (i.e., the IF flag will be ignored). To change the 10PL field, CPL must be zero.
3.11.2 Machine State Instructions
These trusted instructions affect the machine state control interrupt response, the processor hair siate, and the bus LOCK signal that regulates memory access in multiprocessor systems.
CLl (Clear