----------------------------------------------------------------------- FROM "The MSDOS Interrupt List" BY RALF BROWN (100632 lines): ftp://FTP.CS.CMU.EDU/afs/cs.cmu.edu/user/ralf/pub/interrupt-list/ PC Interrupts: A Programmer's Reference to BIOS, DOS, and Third-Party Calls (2nd ed) Ralf Brown and Jim Kyle 1210 pages Addison-Wesley ISBN 0-201-62485-0 dol*ars 39.95 ----------------------------------------------------------------------- TABLES: (also see interrup.1st) DPMI error codes (see #03143 at INT 21/AX=0000h) DPMI mode switch (see #02718 at INT 2F/AX=1687h) DPMI vendor-specific API (see #02719 at INT 2F/AX=168Ah) DPMS registration structure (see #02793 at INT 2F/AX=43E0h) VCPI (see INT 67/AX=DE00h) mode switch (see #03665 at INT 67/AX=DE0Ch) Maybe interesting: (needs privs and is not that useful/dangerous; msr.lst) MSR 174..176h: Pentium II SYSENTER/SYSEXIT control MSR c0000080/1h: K6 SYSCALL/SYSRET enable (else: undefd opcode) and control Maybe interesting: (86bugs.txt - undocumented opcode - AND opcodes.lst ...) LOADALL 0F 07 - loads "all" regs from buffer at ES:EDI, including LDT, TR, DR6/7, TSS-IDT-GDT-LDT-Segs(as 12by values) (... 204 (dec) bytes) --> call it a hack, or call it a cool way to set up everything at once... Workaround / spurious bkp: disable bkp while moving from cr3/tr6/tr7, jmp, en. New for Pentium and above (see 86bugs.txt): CR4: (MSB) .... PVI VME (which is LSB). VME: V86 redirects IF access to VI Flag (IF is privd) instead of calling a special handler in the V86 monitor program. PVI: Protected mode with not enough privs redirects ... blabla ... same. EFLAGS: Bit (of 0..31) 15 Nested Task 17 Resume 18 V86 20 VI 21 VIP ----------------------------------------------------------------------- LIM EMS: 67 40 -- LIM EMS - GET MANAGER STATUS 67 41 -- LIM EMS - GET PAGE FRAME SEGMENT 67 42 -- LIM EMS - GET NUMBER OF PAGES 67 43 -- LIM EMS - GET HANDLE AND ALLOCATE MEMORY 67 44 -- LIM EMS - MAP MEMORY 67 45 -- LIM EMS - RELEASE HANDLE AND MEMORY 67 46 -- LIM EMS - GET EMM VERSION 67 47 -- LIM EMS - SAVE MAPPING CONTEXT 67 48 -- LIM EMS - RESTORE MAPPING CONTEXT 67 49 -- LIM EMS - reserved - GET I/O PORT ADDRESSES 67 4A -- LIM EMS - reserved - GET TRANSLATION ARRAY 67 4B -- LIM EMS - GET NUMBER OF EMM HANDLES 67 4C -- LIM EMS - GET PAGES OWNED BY HANDLE 67 4D -- LIM EMS - GET PAGES FOR ALL HANDLES 67 4E -- LIM EMS - GET OR SET PAGE MAP 67 4F -- LIM EMS 4.0 - GET/SET PARTIAL PAGE MAP 67 50 -- LIM EMS 4.0 - MAP/UNMAP MULTIPLE HANDLE PAGES 67 51 -- LIM EMS 4.0 - REALLOCATE PAGES 67 52 -- LIM EMS 4.0 - GET/SET HANDLE ATTRIBUTES 67 53 -- LIM EMS 4.0 - GET/SET HANDLE NAME 67 54 -- LIM EMS 4.0 - GET HANDLE DIRECTORY 67 55 -- LIM EMS 4.0 - ALTER PAGE MAP AND JUMP 67 56 -- LIM EMS 4.0 - ALTER PAGE MAP AND CALL 67 57 -- LIM EMS 4.0 - MOVE/EXCHANGE MEMORY REGION 67 58 -- LIM EMS 4.0 - GET MAPPABLE PHYSICAL ADDRESS ARRAY 67 59 -- LIM EMS 4.0 - GET EXPANDED MEMORY HARDWARE INFORMATION 67 5A -- LIM EMS 4.0 - ALLOCATE STANDARD/RAW PAGES 67 5B -- LIM EMS 4.0 - ALTERNATE MAP REGISTER SET 67 5B -- LIM EMS 4.0 - ALTERNATE MAP REGISTER SET - DMA REGISTERS 67 5C -- LIM EMS 4.0 - PREPARE EXPANDED MEMORY HARDWARE FOR WARM BOOT 67 5D -- LIM EMS 4.0 - ENABLE/DISABLE OS FUNCTION SET FUNCTIONS 67 FF A5 Microsoft EMM386.EXE v4.20+ - INSTALLATION CHECK CALL xxxxh:xxxxh - Microsoft EMM386.EXE InstallCheck: see INT 67/AX=FFA5h SeeAlso: INT 67/AX=FFA5h ----------------------------------------------------------------------- VCPI: 67 DE 00 Virtual Control Program Interface - INSTALLATION CHECK 67 DE 01 Virtual Control Program Interface - GET PROTECTED MODE INTERFACE 67 DE 02 Virtual Control Program Interface - GET MAX PHYSICAL MEMORY ADDRESS 67 DE 03 Virtual Control Program Interface - GET NUMBER OF FREE 4K PAGES 67 DE 04 Virtual Control Program Interface - ALLOCATE A 4K PAGE 67 DE 05 Virtual Control Program Interface - FREE 4K PAGE 67 DE 06 Virtual Control Program Interface - GET PHYS ADDR OF PAGE IN FIRST MB 67 DE 07 Virtual Control Program Interface - READ CR0 67 DE 08 Virtual Control Program Interface - READ DEBUG REGISTERS 67 DE 09 Virtual Control Program Interface - SET DEBUG REGISTERS 67 DE 0A Virtual Control Program Interface - GET 8259 INTERRUPT VECTOR MAPPING 67 DE 0B Virtual Control Program Interface - SET 8259 INTERRUPT VECTOR MAPPING 67 DE 0C Virtual Control Program Interface - SWITCH TO PROTECTED MODE CALL xxxxh:xxxxh - Virtual Control Program Interface (VCPI) - Protected-Mode InstallCheck: see INT 67/AX=DE01h SeeAlso: INT 67/AX=DE01h ----------------------------------------------------------------------- XMS: 2F 16 10 XMS v1.x only - GET DRIVER ADDRESS 2F 43 00 EXTENDED MEMORY SPECIFICATION (XMS) v2+ - INSTALLATION CHECK 2F 43 08 U> HIMEM.SYS v2.77+ - GET A20 HANDLER NUMBER 2F 43 09 U> HIMEM.SYS v3.09+ - GET XMS HANDLE TABLE 2F 43 10 EXTENDED MEMORY SPECIFICATION (XMS) v2+ - GET DRIVER ADDRESS 2F 43 30 CU> HIMEM.SYS v2.77+ - GET EXTERNAL A20 HANDLER ADDRESS CALL xxxxh:xxxxh - Extended Memory Specification (XMS) InstallCheck: see INT 2F/AX=4300h SeeAlso: INT 2F/AX=4310h ----------------------------------------------------------------------- DPMS: 2F 43 E0 DOS Protected Mode Services (DPMS) v1.0 - INSTALLATION CHECK 2F 43 E1 DOS Protected Mode Services (DPMS) v1.0 - REGISTER CLIENT 2F 43 E2 DOS Protected Mode Services (DPMS) v1.0 - ENABLE/DISABLE DPMS 2F 43 E3 DOS Protected Mode Services (DPMS) v1.0 - DPMS STARTUP BROADCAST 2F 43 E4 DOS Protected Mode Services (DPMS) v1.0 - DPMS EXIT BROADCAST CALL xxxxh:xxxxh - DOS Protected-Mode Services InstallCheck: see INT 2F/AX=43E0h SeeAlso: INT 2F/AX=43E1h ----------------------------------------------------------------------- DPMI: CALL xxxxh:xxxxh - DOS Protected-Mode Interface - MODE SWITCH InstallCheck: see INT 2F/AX=1687h SeeAlso: INT 2F/AX=1687h 31 00 00 P> DPMI 0.9+ - ALLOCATE LDT DESCRIPTORS 31 00 01 P> DPMI 0.9+ - FREE LDT DESCRIPTOR 31 00 02 P> DPMI 0.9+ - SEGMENT TO DESCRIPTOR 31 00 03 P> DPMI 0.9+ - GET NEXT SELECTOR INCREMENT VALUE 31 00 04 P> DPMI 0.9+ - LOCK SELECTOR 31 00 05 P> DPMI 0.9+ - UNLOCK SELECTOR 31 00 06 P> DPMI 0.9+ - GET SEGMENT BASE ADDRESS 31 00 07 P> DPMI 0.9+ - SET SEGMENT BASE ADDRESS 31 00 08 P> DPMI 0.9+ - SET SEGMENT LIMIT 31 00 09 P> DPMI 0.9+ - SET DESCRIPTOR ACCESS RIGHTS 31 00 0A P> DPMI 0.9+ - CREATE ALIAS DESCRIPTOR 31 00 0B P> DPMI 0.9+ - GET DESCRIPTOR 31 00 0C P> DPMI 0.9+ - SET DESCRIPTOR 31 00 0D P> DPMI 0.9+ - ALLOCATE SPECIFIC LDT DESCRIPTOR 31 01 00 P> DPMI 0.9+ - ALLOCATE DOS MEMORY BLOCK 31 01 01 P> DPMI 0.9+ - FREE DOS MEMORY BLOCK 31 01 02 P> DPMI 0.9+ - RESIZE DOS MEMORY BLOCK 31 02 00 P> DPMI 0.9+ - GET REAL MODE INTERRUPT VECTOR 31 02 01 P> DPMI 0.9+ - SET REAL MODE INTERRUPT VECTOR 31 02 02 P> DPMI 0.9+ - GET PROCESSOR EXCEPTION HANDLER VECTOR 31 02 03 P> DPMI 0.9+ - SET PROCESSOR EXCEPTION HANDLER VECTOR 31 02 04 P> DPMI 0.9+ - GET PROTECTED MODE INTERRUPT VECTOR 31 02 05 P> DPMI 0.9+ - SET PROTECTED MODE INTERRUPT VECTOR 31 03 00 P> DPMI 0.9+ - SIMULATE REAL MODE INTERRUPT 31 03 01 P> DPMI 0.9+ - CALL REAL MODE PROCEDURE WITH FAR RETURN FRAME 31 03 02 P> DPMI 0.9+ - CALL REAL MODE PROCEDURE WITH IRET FRAME 31 03 03 P> DPMI 0.9+ - ALLOCATE REAL MODE CALLBACK ADDRESS 31 03 04 P> DPMI 0.9+ - FREE REAL MODE CALLBACK ADDRESS 31 03 05 P> DPMI 0.9+ - GET STATE SAVE/RESTORE ADDRESSES 31 03 06 P> DPMI 0.9+ - GET RAW MODE SWITCH ADDRESSES 31 04 00 P> DPMI 0.9+ - GET DPMI VERSION 31 05 00 P> DPMI 0.9+ - GET FREE MEMORY INFORMATION 31 05 01 P> DPMI 0.9+ - ALLOCATE MEMORY BLOCK 31 05 02 P> DPMI 0.9+ - FREE MEMORY BLOCK 31 05 03 P> DPMI 0.9+ - RESIZE MEMORY BLOCK 31 06 00 P> DPMI 0.9+ - LOCK LINEAR REGION 31 06 01 P> DPMI 0.9+ - UNLOCK LINEAR REGION 31 06 02 P> DPMI 0.9+ - MARK REAL MODE REGION AS PAGEABLE 31 06 03 P> DPMI 0.9+ - RELOCK REAL MODE REGION 31 06 04 P> DPMI 0.9+ - GET PAGE SIZE 31 07 00 Pu> DPMI 0.9+ - MARK PAGES AS PAGING CANDIDATES 31 07 01 Pu> DPMI 0.9+ - DISCARD PAGES 31 07 02 P> DPMI 0.9+ - MARK PAGE AS DEMAND PAGING CANDIDATE 31 07 03 P> DPMI 0.9+ - DISCARD PAGE CONTENTS 31 08 00 P> DPMI 0.9+ - PHYSICAL ADDRESS MAPPING 31 09 00 P> DPMI 0.9+ - GET AND DISABLE VIRTUAL INTERRUPT STATE 31 09 01 P> DPMI 0.9+ - GET AND ENABLE VIRTUAL INTERRUPT STATE 31 09 02 P> DPMI 0.9+ - GET VIRTUAL INTERRUPT STATE 31 0A 00 P> DPMI 0.9+ - GET VENDOR SPECIFIC API ENTRY POINT 31 0B 00 P> DPMI 0.9+ - SET DEBUG WATCHPOINT 31 0B 01 P> DPMI 0.9+ - CLEAR DEBUG WATCHPOINT 31 0B 02 P> DPMI 0.9+ - GET STATE OF DEBUG WATCHPOINT 31 0B 03 P> DPMI 0.9+ - RESET DEBUG WATCHPOINT 31 00 0E P> DPMI 1.0+ - GET MULTIPLE DESCRIPTORS 31 00 0F P> DPMI 1.0+ - SET MULTIPLE DESCRIPTORS 31 02 10 P> DPMI 1.0+ - GET PROTECTED MODE EXTENDED PROCESSOR EXCEPTION HANDLE 31 02 11 P> DPMI 1.0+ - GET REAL MODE EXTENDED PROCESSOR EXCEPTION HANDLER 31 02 12 P> DPMI 1.0+ - SET PROTECTED MODE EXTENDED PROCESSOR EXCEPTION HANDLE 31 02 13 P> DPMI 1.0+ - SET REAL MODE EXTENDED PROCESSOR EXCEPTION HANDLER 31 04 01 P> DPMI 1.0+ - GET DPMI CAPABILITIES 31 05 04 P> DPMI 1.0+ - ALLOCATE LINEAR MEMORY BLOCK 31 05 05 P> DPMI 1.0+ - RESIZE LINEAR MEMORY BLOCK 31 05 06 P> DPMI 1.0+ - GET PAGE ATTRIBUTES 31 05 07 P> DPMI 1.0+ - MODIFY PAGE ATTRIBUTES 31 05 08 P> DPMI 1.0+ - MAP DEVICE IN MEMORY BLOCK 31 05 09 P> DPMI 1.0+ - MAP CONVENTIONAL MEMORY IN MEMORY BLOCK 31 05 0A P> DPMI 1.0+ - GET MEMORY BLOCK SIZE AND BASE 31 05 0B P> DPMI 1.0+ - GET MEMORY INFORMATION 31 08 01 P> DPMI 1.0+ - FREE PHYSICAL ADDRESS MAPPING 31 0C 00 P> DPMI 1.0+ - INSTALL RESIDENT HANDLER INIT CALLBACK 31 0C 01 P> DPMI 1.0+ - TERMINATE AND STAY RESIDENT 31 0D 00 P> DPMI 1.0+ - ALLOCATE SHARED MEMORY 31 0D 01 P> DPMI 1.0+ - FREE SHARED MEMORY 31 0D 02 P> DPMI 1.0+ - SERIALIZE SHARED MEMORY 31 0D 03 P> DPMI 1.0+ - FREE SERIALIZATION ON SHARED MEMORY 31 0E 00 P> DPMI 1.0+ - GET COPROCESSOR STATUS 31 0E 01 P> DPMI 1.0+ - SET EMULATION ----------------------------------------------------------------------- OTHER STUFF: 2F 4A 01 DOS 5+ - QUERY FREE HMA SPACE 2F 4A 02 DOS 5+ - ALLOCATE HMA SPACE 21 58 -- DOS 5+ - GET OR SET UMB LINK STATE ----------------------------------------------------------------------- ----------------------------------------------------------------------- FROM "INTEL 80386 PROGRAMMER'S REFERENCE MANUAL 1986" (20854 lines): ----------------------------------------------------------------------- Chapter 4 Systems Architecture 4.1 Systems Registers 4.1.2 Memory-Management Registers 4.1.3 Control Registers 4.1.4 Debug Register (maybe) 4.2 Systems Instructions ----------------------------------------------------------------------- Chapter 5 Memory Management 5.1 Segment Translation 5.1.1 Descriptors 5.1.2 Descriptor Tables 5.1.3 Selectors 5.1.4 Segment Registers 5.2 Page Translation 5.2.1 Page Frame 5.2.2 Linear Address 5.2.3 Page Tables 5.2.4 Page-Table Entries 5.2.4.1 Page Frame Address 5.2.4.2 Present Bit 5.2.4.3 Accessed and Dirty Bits 5.2.4.4 Read/Write and User/Supervisor Bits 5.2.5 Page Translation Cache 5.3 Combining Segment and Page Translation 5.3.1 "Flat" Architecture 5.3.2 Segments Spanning Several Pages 5.3.3 Pages Spanning Several Segments 5.3.4 Non-Aligned Page and Segment Boundaries 5.3.5 Aligned Page and Segment Boundaries 5.3.6 Page-Table per Segment ----------------------------------------------------------------------- Chapter 6 Protection (maybe) ----------------------------------------------------------------------- Chapter 7 Multitasking 7.1 Task State Segment 7.2 TSS Descriptor 7.3 Task Register 7.4 Task Gate Descriptor 7.5 Task Switching 7.6 Task Linking 7.6.1 Busy Bit Prevents Loops 7.6.2 Modifying Task Linkages 7.7 Task Address Space 7.7.1 Task Linear-to-Physical Space Mapping 7.7.2 Task Logical Address Space ----------------------------------------------------------------------- Chapter 8 Input/Output 8.3 Protection and I/O 8.3.1 I/O Privilege Level 8.3.2 I/O Permission Bit Map ----------------------------------------------------------------------- Chapter 9 Exceptions and Interrupts 9.1 Identifying Interrupts 9.2 Enabling and Disabling Interrupts 9.2.1 NMI Masks Further NMls 9.2.2 IF Masks INTR 9.2.3 RF Masks Debug Faults 9.2.4 MOV or POP to SS Masks Some Interrupts and Exceptions 9.4 Interrupt Descriptor Table 9.5 IDT Descriptors 9.6 Interrupt Tasks and Interrupt Procedures 9.6.1 Interrupt Procedures 9.6.1.1 Stack of Interrupt Procedure 9.6.1.2 Returning from an Interrupt Procedure 9.6.1.3 Flags Usage by Interrupt Procedure 9.6.1.4 Protection in Interrupt Procedures 9.6.2 Interrupt Tasks 9.7 Error Code 9.8 Exception Conditions 9.8.1 Interrupt 0 Divide Error 9.8.2 Interrupt 1 Debug Exceptions 9.8.3 Interrupt 3 Breakpoint 9.8.4 Interrupt 4 Overflow 9.8.5 Interrupt 5 Bounds Check 9.8.6 Interrupt 6 Invalid Opcode 9.8.7 Interrupt 7 Coprocessor Not Available 9.8.8 Interrupt 8 Double Fault 9.8.9 Interrupt 9 Coprocessor Segment Overrun 9.8.10 Interrupt 10 Invalid TSS 9.8.11 Interrupt 11 Segment Not Present 9.8.12 Interrupt 12 Stack Exception 9.8.13 Interrupt 13 General Protection Exception 9.8.14 Interrupt 14 Page Fault 9.8.14.1 Page Fault during Task Switch 9.8.14.2 Page Fault with Inconsistent Stack Pointer 9.8.15 Interrupt 16 Coprocessor Error 9.9 Exception Summary 9.10 Error Code Summary ----------------------------------------------------------------------- Chapter 10 Initialization 10.3 Switching to Protected Mode 10.4 Software Initialization for Protected Mode 10.4.1 Interrupt Descriptor Table 10.4.2 Stack 10.4.3 Global Descriptor Table 10.4.4 Page Tables 10.4.5 First Task 10.5 Initialization Example 10.6 TLB Testing 10.6.1 Structure of the TLB 10.6.2 Test Registers 10.6.3 Test Operations ----------------------------------------------------------------------- Chapter 11 Coprocessing and Multiprocessing 11.1.3 EM and MP Flags 11.1.4 The Task-Switched Flag 11.1.5 Coprocessor Exceptions 11.1.5.1 Interrupt 7 Coprocessor Not Available 11.1.5.2 Interrupt 9 Coprocessor Segment Overrun 11.1.5.3 Interrupt 16 Coprocessor Error ----------------------------------------------------------------------- Chapter 12 Debugging (maybe) ----------------------------------------------------------------------- Chapter 14 80386 Real-Address Mode 14.4 Entering and Leaving Real-Address Mode 14.4.1 Switching to Protected Mode 14.5 Switching Back to Real-Address Mode ----------------------------------------------------------------------- Chapter 15 Virtual 8088 Mode 15.2 Structure of a V86 Task 15.2.1 Using Paging for V86 Tasks 15.2.2 Protection within a V86 Task 15.3 Entering and Leaving V86 Mode 15.3.1 Transitions Through Task Switches 15.3.2 Transitions Through Trap Gates and Interrupt Gates 15.4 Additional Sensitive Instructions 15.4.1 Emulating 8086 Operating System Calls 15.4.2 Virtualizing the Interrupt-Enable Flag 15.5 Virtual I/O 15.5.1 I/O-Mapped I/O 15.5.2 Memory-Mapped I/O 15.5.3 Special I/O Buffers 15.6 Differences from 8086 15.7 Differences from 80286 Real-Address Mode ----------------------------------------------------------------------- Chapter 16 Mixing 16-Bit and 32-Bit Code 16.3 Sharing Data Segments among Mixed Code Segments 16.4 Transferring Control among Mixed Code Segments 16.4.1 Size of Code-Segment Pointer 16.4.2 Stack Management for Control Transfers 16.4.2.1 Controlling the Operand-Size for a CALL 16.4.2.2 Changing Size of Call 16.4.3 Interrupt Control Transfers 16.4.4 Parameter Translation 16.4.5 The Interface Procedure ----------------------------------------------------------------------- Chapter 17 80386 Instruction Set (maybe) 17.2 Instruction Format 17.2.2 How to Read the Instruction Set Pages 17.2.2.8 Protected Mode Exceptions 17.2.2.10 Virtual-8086 Mode Exceptions ----------------------------------------------------------------------- Appendix B Complete Flag Cross-Reference (maybe) -> INT/INTO resets IF, IRET/POPF changes IF, not much else