Prev: 2.6 Interrupts and Exceptions
Next: 3.1 Data Movement Instructions

Chapter 3 Applications Instruction Set

This chapter presents an overview of the instructions which programmers can use to write application software for the 80386 executing in protected virtual-address mode. The instructions are grouped by categories of related functions.

The instructions not discussed in this chapter are those that are normally used only by operating-system programmers. Part II describes the operation of these instructions.

The descriptions in this chapter assume that the 80386 is operating in protected mode with 32-bit addressing in effect; however, all instructions discussed are also available when 16-bit addressing is in effect in protected mode, real mode, or virtual 8086 mode. For any differences of operation that exist in the various modes, refer to Chapter 13, Chapter 14, or Chapter 15.

The instruction dictionary in Chapter 17 contains more detailed descriptions of all instructions, including encoding, operation, timing, effect on flags, and exceptions.

  • Figure 3-1. PUSH
  • Figure 3-2. PUSHA
  • Figure 3-3. POP
  • Figure 3-4. POPA
  • Figure 3-5. Sign Extension
  • Figure 3-6. SAL and SHL
  • Figure 3-7. SHR
  • Figure 3-8. SAR
  • Figure 3-9. Using SAR to Simulate IDIV
  • Figure 3-10. Shift Left Double
  • Figure 3-11. Shift Right Double
  • Figure 3-12. ROL
  • Figure 3-13. ROR
  • Figure 3-14. RCL
  • Figure 3-15. RCR
  • Figure 3-16. Formal Definition of the ENTER Instruction
  • Figure 3-17. Variable Access in Nested Procedures
  • Figure 3-18. Stack Frame for MAIN at Level 1
  • Figure 3-19. Stack Frame for Procedure A
  • Figure 3-20. Stack Frame for Procedure B at Level 3 Called from A
  • Figure 3-21. Stack Frame for Procedure C at Level 3 Called from B
  • Figure 3-22. LAHF and SAHF
  • Figure 3-23. Flag Format for PUSHF and POPF
  • Table 3-1. Bit Test and Modify Instructions
  • Table 3-2. Interpretation of Conditional Transfers
    Prev: 2.6 Interrupts and Exceptions
    Next: 3.1 Data Movement Instructions