home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / docum / hadware.doc / chapter.002 < prev    next >
Encoding:
Text File  |  1992-03-15  |  62.9 KB  |  1,308 lines

  1.                                     -10-
  2.  
  3.    **  Programmer's  Technical    Reference  for    MSDOS  and  the  IBM  PC **
  4. ─────────────────────────┤ Registered User Version ├───────────────────────────
  5.              not for public distribution
  6.          Copyright (c) 1987, 1988, 1989 Dave Williams
  7.  
  8.  
  9.                  C H A P T E R   T W O
  10.  
  11.  
  12.  CPU Port Assignments, System Memory Map, BIOS Data Area, Interrupts 00h to 09h
  13.  
  14.  
  15.  
  16.                 C O N T E N T S
  17.  
  18. Introduction .......................................................... 2**1
  19. System Memory Map ..................................................... 2**2
  20. PC Port Assignment .................................................... 2**3
  21. Reserved Memory Locations ............................................. 2**4
  22.     Interrupt Vector Table .......................................      "
  23.     BIOS Data Area ................................................   "
  24.     DOS Data Area .................................................   "
  25.     BASIC Data Area ...............................................   "
  26.     EGA Signature .................................................   "
  27.     Model and BIOS ID .............................................   "
  28. The IBM PC System Interrupts (Overview) ............................... 2**5
  29.     Quick Chart 00h-0FFh ..........................................   "
  30. The IBM-PC System Interrupts (in detail) .............................. 2**6
  31.     00h-0Fh .......................................................   "
  32.  
  33.  
  34.  
  35. Introduction .......................................................... 2**1
  36.  
  37.  For consistency in this reference, all locations and offsets are in
  38. hexadecimal unless otherwise specified. All hex numbers are prefaced with a
  39. leading zero if they begin with an alphabetic character, and are terminated
  40. with a lowercase H (h). The formats vary according to common usage.
  41.  
  42.                                     -11-
  43.  
  44. System Memory Map ..................................................... 2**2
  45.  
  46.  The IBM PC handles its address space in 64k segments, divided into 16k
  47. fractions and then further as necessary.
  48.  
  49. ┌──────┬─────┬─────┬──────────────────────────────────────────────────────────┐
  50. │start │start│end  │                                  │
  51. │addr. │addr.│addr.│                  usage                  │
  52. │(dec) │   (hex)   │                                  │
  53. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  54. │   *640k RAM Area*                                  │
  55. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  56. │ 0k   │       │  start of RAM, first K is interrupt vector table          │
  57. │ 16k  │00000-03FFF│  PC-0 system board RAM ends                  │
  58. │ 32k  │04000-07FFF│                                  │
  59. │ 48k  │08000-0BFFF│                                  │
  60. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  61. │ 64k  │10000-13FFF│  PC-1 system board RAM ends                  │
  62. │ 80k  │14000-17FFF│                                  │
  63. │ 96k  │18000-1BFFF│                                  │
  64. │ 112k │1C000-1FFFF│                                  │
  65. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  66. │ 128k │20000-23FFF│                                  │
  67. │ 144k │24000-27FFF│                                  │
  68. │ 160k │28000-2BFFF│                                  │
  69. │ 176k │2C000-2FFFF│                                  │
  70. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  71. │ 192k │30000-33FFF│                                  │
  72. │ 208k │34000-37FFF│                                  │
  73. │ 224k │38000-3BFFF│                                  │
  74. │ 240k │3C000-3FFFF│                                  │
  75. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  76. │ 256k │40000-43FFF│  PC-2 system board RAM ends                  │
  77. │ 272k │44000-47FFF│                                  │
  78. │ 288k │48000-4BFFF│                                  │
  79. │ 304k │4C000-4FFFF│                                  │
  80. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  81. │ 320k │50000-53FFF│                                  │
  82. │ 336k │54000-57FFF│                                  │
  83. │ 352k │58000-5BFFF│                                  │
  84. │ 368k │5C000-5FFFF│                                  │
  85. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  86. │ 384k │60000-63FFF│                                  │
  87. │ 400k │64000-67FFF│                                  │
  88. │ 416k │68000-6BFFF│                                  │
  89. │ 432k │6C000-6FFFF│                                  │
  90. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  91. │ 448k │70000-73FFF│                                  │
  92. │ 464k │74000-77FFF│                                  │
  93. │ 480k │78000-7BFFF│                                  │
  94. │ 496k │7C000-7FFFF│                                  │
  95. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  96. │ 512k │80000-83FFF│                                  │
  97. │ 528k │84000-87FFF│                                  │
  98. │ 544k │88000-8BFFF│  the original IBM PC-1 BIOS limited memory to 544k       │
  99. │ 560k │8C000-8FFFF│                                  │
  100. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  101. │ 576k │90000-93FFF│                                  │
  102. │ 592k │94000-97FFF│                                  │
  103. │ 609k │98000-9BFFF│                                  │
  104. │ 624k │9C000-9FFFF│  to 640k (top of RAM address space)              │
  105. └──────┴───────────┴──────────────────────────────────────────────────────────┘
  106.  
  107.                                     -12-
  108.  
  109.  
  110.  
  111. ┌─────────────────────────────────────────────────────────────────────────────┐
  112. │A0000 ***** 64k ***** EGA/VGA starting address                   │
  113. │A0000 ***** 64k ***** Toshiba 1000 DOS ROM (MS-DOS 2.11V)              │
  114. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  115. │ 640k │A0000-A95B0│  MCGA 320x200 256 color video buffer              │
  116. │      │     -AF8C0│  MCGA 640x480 2 color video buffer               │
  117. │      │     -A3FFF│                                  │
  118. │ 656k │A4000-A7FFF│                                  │
  119. │ 672k │A8000-ABFFF│      this 64k segment may be used for contiguous DOS     │
  120. │ 688k │AC000-AFFFF│      RAM with appropriate hardware and software          │
  121. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  122. │B0000 ***** 64k ***** mono and CGA address                      │
  123. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  124. │ 704k │B0000-B3FFF│  4k  monochrome display   | The PCjr and early Tandy 1000│
  125. │ 720k │B4000-B7FFF│                   | BIOS revector direct write to│
  126. │ 736k │B8000-BBFFF│  16k CGA uses           | the B8 area to the Video Gate│
  127. │ 756k │BC000-BFFFF│                   | Array and reserved system RAM│
  128. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  129. │C0000 ***** 64k *************** expansion ROM                      │
  130. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  131. │ 768k │C0000-C3FFF│  16k EGA BIOS C000:001E EGA BIOS signature (letters IBM  │
  132. │ 784k │C4000-C5FFF│                                  │
  133. │      │C6000-C63FF│  256 bytes Professional Graphics Display comm. area      │
  134. │      │C6400-C7FFF│                                  │
  135. │ 800k │C8000-CBFFF│  16k hard disk controller BIOS, drive 0 default          │
  136. │      │CA000       │      some 2nd floppy (high density) controller BIOS      │
  137. │ 816k │CC000-CDFFF│   8k IBM PC Network NETBIOS                  │
  138. │      │CE000-CFFFF│                                  │
  139. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  140. │D0000 ***** 64k ***** expansion ROM                          │
  141. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  142. │ 832k │D0000-D7FFF│  32k IBM Cluster Adapter  | PCjr first ROM cartridge     │
  143. │      │      DA000│  voice communications     | address area.              │
  144. │ 848k │D4000-D7FFF│                   | Common expanded memory board │
  145. │ 864k │D8000-DBFFF│                   | paging area.              │
  146. │ 880k │DC000-DFFFF│                   |                  │
  147. │      │DE000       │  TI Pro default video buffer, 4k in length           │
  148. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  149. │E0000 ***** 64k ***** expansion ROM                          │
  150. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  151. │ 896k │E0000-E3FFF│                   | PCjr second ROM cartridge    │
  152. │ 912k │E4000-E7FFF│                   | address area              │
  153. │ 928k │E8000-EBFFF│                   |                  │
  154. │ 944k │EC000-EFFFF│                   |    spare ROM sockets on AT   │
  155. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  156. │F0000 ***** 64k ***** system                              │
  157. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  158. │ 960k │F0000-F3FFF│  reserved by IBM           |    cartridge address          │
  159. │ 976k │F4000-       │                   |    area (PCjr cartridge      │
  160. │      │F6000       │  ROM BASIC Begins           |    BASIC)              │
  161. │ 992k │F8000-FB000│                   |                  │
  162. │ 1008k│FC000-FFFFF│  ROM BASIC and original   |                  │
  163. │      │       │  BIOS (Compatibility BIOS |                  │
  164. │      │       │  in PS/2)               |                  │
  165. │ 1024k│      FFFFF│  end of memory (1024k) for 8088 machines              │
  166. ├──────┼───────────┴─┬────────────────────────────────────────────────────────┤
  167. │ 384k │100000-15FFFF│ 80286/AT extended memory area, 1Mb motherboard          │
  168. │ 15Mb │100000-FFFFFF│ 80286/AT extended memory address space              │
  169. │ 15Mb │160000-FDFFFF│ Micro Channel RAM expansion (15Mb extended memory)     │
  170. │ 128k │FE0000-FFFFFF│ system board ROM        (PS/2 Advanced BIOS)       │
  171. └──────┴─────────────┴────────────────────────────────────────────────────────┘
  172.  
  173.                                     -13-
  174.  
  175.  
  176.  Note that the ROM BIOS has a duplicated address space which causes it to
  177. "appear" both at the end of the 1 megabyte real mode space and at the end of
  178. the 16 megabyte protected mode space. The addresses from 0E0000 to 0FFFFF are
  179. equal to 0FE0000 to 0FFFFFF. This is necessary due to differences in the memory
  180. addressing between Real and Protected Modes.
  181.  
  182.  
  183.  
  184. PC Port Assignment .................................................... 2**3
  185.  
  186.  
  187.  These are functions common across the IBM range. The PCjr, PC-AT, PC
  188. Convertible and PS/2 (both buses) have enhancements. In some cases, the
  189. AT and PS/2 series ignore, duplicate, or reassign ports arbitrarily. If
  190. your code incorporates specific port addresses for video or system board
  191. control it would be wise to have your application determine the machine
  192. type and video adapter and address the ports as required.
  193.  
  194.  
  195.  hex address               Function           Models
  196.                         PCjr|PC|XT|AT|CVT|M30|PS2
  197.  
  198.  0000-000F    8237 DMA controller             PC
  199.  0010-001F    8237 DMA controller               AT          PS2
  200.  0020-0027    8259A interrupt controller
  201.  0020-002F    IOSGA interrupt function                  PS2
  202.  0020-003F    8259A interrupt controller  (AT)
  203.  0020-0021    interrupt controller 1, 8259A         PC    AT          PS2
  204.  0040-0043    programmable timer 8253          PC
  205.  0040-0047    programmable timers                      PS2
  206.  0040-005F    8253-5 programmable timers           AT
  207.         note 1) 0041 was memory refresh in PCs. Not used in PS/2.
  208.              2) A few early 80386 machines used static RAM and did
  209.             not use refresh at all. The PCjr refreshes by the
  210.             video vertical retrace signal.
  211.  0060-0063    keyboard controller 8255A         PC
  212.  0060-006F    8042 keyboard controller           AT
  213.  0060        IOSGA keyboard input port                  PS2
  214.  0061        speaker             PCjr PC XT AT CVT
  215.  0061        IOSGA speaker control                  M30 PS2
  216.  0061        On some clones, setting or clearing bit 2 controls Turbo mode
  217.  0061        Toshiba 1000 - system command
  218.  0062        IOSGA configuration control              M30 PS2
  219.  0062        Toshiba 1000 - System Status, port C
  220.  0063        SSGA, undocumented                      PS2
  221.  0063        Toshiba 1000 - mode set)
  222.  0064        keyboard auxiliary device                  PS2
  223.  0065-006A    SSGA, undocumented                      PS2
  224.  006B        SSGA, RAM enable/remap                      PS2
  225.  006C-006F    SSGA, undocumented                      PS2
  226.  0070        AT CMOS write internal register
  227.  0071        AT CMOS read internal register
  228.  0070-0071    CMOS real-time clock, NMI mask                  PS2
  229.  0070-007F    CMOS real-time clock, NMI mask           AT
  230.  0074-0076    reserved                          PS2
  231.  0800-008F    SSGA DMA page registers                   PS2
  232.  0080-009F    DMA page registers, 74LS612           AT
  233.  0090        central arbitration control port (Micro Channel)
  234.  0091        card selected feedback         (Micro Channel)
  235.  0092        system control port A         (Micro Channel)
  236.  0093        reserved             (Micro Channel)
  237.  0094        system board setup         (Micro Channel)
  238.  0096        POS "CD SETUP" selector      (Micro Channel)
  239.  
  240.                                     -14-
  241.  
  242.  00A0-00A1    Interrupt controller 2, 8259A           AT          PS2
  243.  00A0-00AF    IOSGA NMI mask register                   PS2
  244.  00B0-00BF    realtime clock/calendar, (undocumented)           PS2
  245.  00C0-00DF    reserved            PCjr PC XT AT CVT M30
  246.  00C0-00CF    DOS ROM register, Toshiba 1000
  247.  00D0-00EF    "special" register, Toshiba 1000
  248.       00C0    0C1 key register, Toshiba 1000
  249.       00C1    keyboard transfer register, Toshiba 1000
  250.       00C2    keyboard receive register, Toshiba 1000
  251.       00C3    keyboard status register, Toshiba 1000
  252.       00C8    DOS ROM page register, Toshiba 1000
  253.       00E0    CPU speed control, Toshiba 1000
  254.       00E1    keyboard status/0E2 key register, Toshiba 1000
  255.       00E2    work register, Toshiba 1000
  256.       00E3    0E4 key register, Toshiba 1000
  257.       00E4    system control register 0, Toshiba 1000
  258.       00E5    0E6 key register, Toshiba 1000
  259.       00E6    system control register 1, Toshiba 1000
  260.       00EE    EMS unit index, Toshiba 1000
  261.       00EF    EMS unit data, Toshiba 1000
  262.  00C0-00DF    DMA controller 2, 8237A-5           AT          PS2
  263.  00E0-00EF    realtime clock/calendar, (undocumented)       M30 PS2
  264.  00F0-00FF    PS/2 math coprocessor I/O  (Model 50+)    (diskette IO on PCjr)
  265.  0100-0101    PS/2 POS adapter ID response        (Micro Channel)
  266.  0102-0107    PS/2 POS adapter configuration response (Micro Channel)
  267.  01F0-01F8    hard disk                   AT          PS2
  268.  0200-0201    game-control adapter (joystick)
  269.  0200-020F    game controller              PC    AT
  270.  0208-020F    Toshiba 1000 - EMS unit I/O #1
  271.  020C-020D    reserved by IBM
  272.  0210-0217    expansion box (PC, XT)
  273.  0218-021F    Toshiba 1000 - EMS unit I/O #2
  274.  021F        reserved by IBM
  275.  0258-025F    Toshiba 1000 - EMS unit I/O #3
  276.  0268-026F    Toshiba 1000 - EMS unit I/O #4
  277.  0278-027F    parallel printer port 2            AT
  278.  0278-027B    parallel printer port 3                   PS2
  279.  02A8-02AF    Toshiba 1000 - EMS unit I/O #5
  280.  02B8-02BF    Toshiba 1000 - EMS unit I/O #6
  281.  02B0-02DF    EGA (alternate)               PC   AT
  282.  02C0-02DF    Toshiba 1000 - realtime clock
  283.  02E1        GPIB (adapter 0)               AT
  284.  02E2-02E3    data acquisition (adapter 0)           AT
  285.  02E8        "industry standard" COM4
  286.  02E8-02EF    Toshiba 1000 - EMS unit I/O #7
  287.  02F8-02FF    serial communications (COM2)          PC   AT          PS2
  288.  0300-031F    prototype card                  PC   AT
  289.  0300-031F    Leading Edge Model D clock          -------------------
  290.  0320-032F    hard disk controller              PC
  291.  0320        Perstor HD controller, primary          -------------------
  292.  0324        Perstor HD controller, secondary      -------------------
  293.  0340        Sony CD-ROM                  -------------------
  294.  0348-0357    DCA 3278
  295.  0360-0367    PC Network (low address)
  296.  0368-036F    PC Network (high address)           AT
  297.  0370        Colorado Memory external tape backup control port
  298.         some "second controller" floppy cards -------------------
  299.  0378-037F    parallel printer port 1           PC   AT
  300.  0378-037B    parallel printer port 2                   PS2
  301.  0380-038F    SDLC, bi-synchronous 2              PC   AT
  302.  0380-0389    BSC communications (alternate)          PC
  303.  0390-0393    cluster (adapter 0)              PC   AT
  304.  03A0-03A9    BSC communications (primary)          PC   AT
  305.  03B0-03BF    monochrome/parallel printer adapter   PC   AT
  306.  
  307.                                     -15-
  308.  
  309.  03B4-03B5    video subsystem                       PS2
  310.  03BA        video subsystem                       PS2
  311.  03BC-03BF    parallel printer port 1                   PS2
  312.  03C0-03CF    Enhanced Graphics Adapter
  313.  03C0-03DA    video subsystem and DAC                   PS2
  314.  03DA        video status register              AT&T 6300, Olivetti PC
  315.  03D0-03DF    CGA, MCGA, VGA adapter control
  316.  03DE        video mode selector register          AT&T 6300, Olivetti PC
  317.  03E8h        "industry standard" COM3
  318.  03F0-03F7    floppy disk controller              PC   AT          PS2
  319.  03F0        Colorado Memory internal tape backup control port
  320.  03F8-03FF    serial communications (COM1)          PC   AT          PS2
  321.  06E2-06E3    data acquisition (adapter 1)           AT
  322.  0790-0793    cluster (adapter 1)              PC   AT
  323.  0AE2-0AE3    data acquisition (adapter 2)           AT
  324.  0B90-0B93    cluster (adapter 2)              PC   AT
  325.  0EE2-0EE3    data acquisition (adapter 3)           AT
  326.  1390-1393    cluster (adapter 3)              PC   AT
  327.  22E1        GPIB (adapter 1)
  328.  2390-2393    cluster (adapter 4)              PC   AT
  329.  42E1        GPIB (adapter 2)               AT
  330.  62E1        GPIB (adapter 3)               AT
  331.  82E1        GPIB (adapter 4)               AT
  332.  A2E1        GPIB (adapter 5)               AT
  333.  C2E1        GPIB (adapter 6)               AT
  334.  E2E1        GPIB (adapter 7)               AT
  335.  
  336. note 1) IOSGA = I/O Support Gate Array
  337.     SSGA = System Support Gate Array
  338.      2) I/O Addresses, hex 000 to 0FF, are reserved for the system board I/O.
  339.     Hex 100 to 3FF are available on the I/O channel.
  340.      3) These are the addresses decoded by the current set of adapter cards.
  341.     IBM may use any of the unlisted addresses for future use.
  342.      4) SDLC Communication and Secondary Binary Synchronous Communications
  343.     cannot be used together because their port addresses overlap.
  344.  
  345.                                     -16-
  346.  
  347. Reserved Memory Locations ............................................. 2**4
  348.  
  349. ┌──────────────────────────────────────────────────────────────────────────────
  350. │ 000-3FF  - 1k DOS interrupt vector table, 4 byte vectors for ints 00h-0FFh.
  351. │   30:00  - used as a stack area during POST and bootstrap routines. This
  352. │to 3F:FF    stack area may be revectored by an application program.
  353. ├──────────────────────────────────────────────────────────────────────────────
  354. │ ** The BIOS Data Area ** addresses from 400h to 4FFh
  355. ├─────┬───────┬────────────────────────────────────────────────────────────────
  356. │addr.│ size  │             description
  357. ├─────┼───────┼────────────────────────────────────────────────────────────────
  358. │40:00│  word │ COM1 port address |   These addresses are zeroed out in the
  359. │40:02│  word │ COM2 port address |   OS/2 DOS Compatibility Box if any of
  360. │40:04│  word │ COM3 port address |   the OS/2 COMxx.SYS drivers are loaded.
  361. │40:06│  word │ COM4 port address |
  362. │40:08│  word │ LPT1 port address
  363. │40:0A│  word │ LPT2 port address
  364. │40:0C│  word │ LPT3 port address
  365. │40:0E│  word │ LPT4 port address     (not valid in PS/2 machines)
  366. │40:0E│  word │ PS/2 pointer to 1k extended BIOS Data Area at top of RAM
  367. │40:10│  word │ equipment flag (see int 11h)
  368. └─────┴───────┤ bits:
  369.           │ 0    0    no floppy drive present
  370.           │     1    if floppy drive present (see bits 6&7)
  371.           │ 1    0    no math coprocessor installed
  372.           │     1    if 80x87 installed  (not valid in PCjr)
  373.           │ 2,3    system board RAM   (not used on AT or PS/2)
  374.           │     0,0    16k        0,1    32k
  375.           │     1,0    48k        1,1    64k
  376.           │ 4,5    initial video mode
  377.           │     0,0    no video adapter
  378.           │     0,1    40 column color  (PCjr default)
  379.           │     1,0    80 column color
  380.           │     1,1    MDA
  381.           │ 6,7    number of diskette drives
  382.           │     0,0    1 drive     0,1    2 drives
  383.           │     1,0    3 drives    1,1    4 drives
  384.           │ 8    0    DMA present
  385.           │     1    DMA not present (PCjr, Tandy 1400, Sanyo 55x)
  386.           │ 9,A,B    number of RS232 serial ports
  387.           │ C    game adapter  (joystick)
  388.           │     0    no game adapter
  389.           │     1    if game adapter
  390.           │ D    serial printer (PCjr only)
  391.           │     0    no printer
  392.           │     1    serial printer present
  393.        ┌──────┘ E,F    number of parallel printers installed
  394.        │note 1) The IBM PC and AT store the settings of the system board
  395.        └───┐    switches or CMOS RAM setup information (as obtained by the BIOS
  396.        │    in the Power-On Self Test (POST)) at addresses 40:10h and
  397.        │    40:13h. 00000001b indicates "on", 00000000b is "off".
  398.  
  399.                                     -17-
  400.  
  401.  
  402. ┌─────┬───────┐
  403. │40:12│  byte │ reserved (PC, AT)
  404. └─────┴───────┤  number of errors detected by infrared keyboard link (PCjr)
  405. ┌─────┬───────┤  POST status (Convertible)
  406. │40:13│  word │ availible memory size in Kbytes (less display RAM in PCjr)
  407. ├─────┼───────┤  this is the value returned by int 12h
  408. │40:15│  word │ reserved
  409. │40:17│  byte │ keyboard flag byte 0 (see int 9h)
  410. └─────┴───────┤ bit 7  insert mode on       3  alt pressed
  411.           │     6  capslock on       2  ctrl pressed
  412.           │     5  numlock on       1  left shift pressed
  413. ┌─────┬───────┤     4  scrollock on       0  right shift pressed
  414. │40:18│  byte │ keyboard flag byte 1 (see int 9h)
  415. └─────┴───────┤ bit 7  insert pressed       3  ctrl-numlock (pause) toggled
  416.           │     6  capslock pressed    2  PCjr keyboard click active
  417.           │     5  numlock pressed       1  PCjr ctrl-alt-capslock held
  418. ┌─────┬───────┤     4  scrollock pressed   0
  419. │40:19│  byte │ storage for alternate keypad entry (not normally used)
  420. │40:1A│  word │ pointer to keyboard buffer head character
  421. │40:1C│  word │ pointer to keyboard buffer tail character
  422. │40:1E│32bytes│ 16 2-byte entries for keyboard circular buffer, read by int 16h
  423. │40:3E│  byte │ drive seek status - if bit=0, next seek will recalibrate by
  424. └─────┴───────┤ repositioning to Track 0.
  425.           │ bit 3  drive D        bit 2  drive C
  426. ┌─────┬───────┤     1  drive B            0  drive A
  427. │40:3F│  byte │ diskette motor status (bit set to indicate condition)
  428. └─────┴───────┤ bit 7  write in progress    3  motor on (floppy 3)
  429.           │     6                2  motor on (floppy 2)
  430.           │     5                1  B: motor on (floppy 1)
  431. ┌─────┬───────┤     4                0  A: motor on (floppy 0)
  432. │40:40│  byte │ motor off counter
  433. │     │       │ starts at 37 and is decremented 1 by each system clock tick.
  434. │     │       │ motor is shut off when count = 0.
  435. │40:41│  byte │ status of last diskette operation     where:
  436. └─────┴───────┤ bit 7 timeout failure             3 DMA overrun
  437.           │     6 seek failure             2 sector not found
  438.           │     5 controller failure         1 address not found
  439. ┌─────┬───────┤     4 CRC failure             0 bad command
  440. │40:42│7 bytes│ NEC floppy controller chip status
  441. │40:49│  byte │ Video Control Data Area 1 from 0040:0049 through 0040:0066
  442. └─────┴───────┤ current CRT mode (hex value)
  443.           │    00h 40x25 BW      (CGA)        01h 40x25 color   (CGA)
  444.           │    02h 80x25 BW      (CGA)        03h 80x25 color   (CGA)
  445.           │    04h 320x200 color (CGA)        05h 320x200 BW    (CGA)
  446.           │    06h 640x200 BW    (CGA)        07h monochrome    (MDA)
  447.           │extended video modes (EGA/MCGA/VGA or other)
  448.           │    08h lores,16 color            09h med res,16 color
  449.           │    0Ah hires,4 color            0Bh n/a
  450.           │    0Ch med res,16 color         0Dh hires,16 color
  451. ┌─────┬───────┤    0Eh hires,4 color            0Fh hires,64 color
  452. │40:4A│  word │ number of columns on screen, coded as hex number of columns
  453. └─────┴───────┤ 20 col = 14h  (video mode 8, low res 160x200 CGA graphics)
  454.           │ 40 col = 28h
  455. ┌─────┬───────┤ 80 col = 46h
  456. │40:4C│  word │ screen buffer length in bytes
  457. ├─────┼───────┤(number of bytes used per screen page, varies with video mode)
  458. │40:4E│  word │ current screen buffer starting offset (active page)
  459. │40:50│8 words│ cursor position pages 1-8
  460. └─────┴───────┤ the first byte of each word gives the column (0-19, 39, or 79)
  461. ┌─────┬───────┤ the second byte gives the row (0-24)
  462. │40:60│  byte │ end line for cursor   (normally 1)
  463. │40:61│  byte │ start line for cursor (normally 0)
  464. │40:62│  byte │ current video page being displayed  (0-7)
  465. │40:63│  word │ base port address of 6845 CRT controller or equivalent
  466. └─────┴───────┘ for active display         3B4h=mono, 3D4h=color
  467.  
  468.                                     -18-
  469.  
  470.  
  471. ┌─────┬───────┐
  472. │40:65│  byte │ current setting of the CRT mode register
  473. │40:66│  byte │ current palette mask setting  (CGA)
  474. │40:67│5 bytes│ temporary storage for SS:SP during shutdown (cassette interface)
  475. │40:6C│  word │ timer counter low word
  476. │40:6E│  word │ timer counter high word
  477. │40:69│  byte │ HD_INSTALL (Columbia PCs) (not valid on most clone computers)
  478. └─────┴───────┤ bit  0      0  8 inch external floppy drives
  479.           │       1  5-1/4 external floppy drives
  480.           │      1,2     highest drive address which int 13 will accept
  481.           │          (since the floppy drives are assigned 0-3,subtract
  482.           │          3 to obtain the number of hard disks installed)
  483.           │      4,5     # of hard disks connected to expansion controller
  484.           │      6,7     # of hard disks on motherboard controller
  485.           │          (if bit 6 or 7 = 1, no A: floppy is present and
  486. ┌─────┬───────┤          the maximum number of floppies from int 11 is 3)
  487. │40:70│  byte │ 24 hour timer overflow 1 if timer went past midnight
  488. ├─────┼───────┤ it is reset to 0 each time it is read by int 1Ah
  489. │40:71│  byte │ BIOS break flag (bit 7 = 1 means break key hit)
  490. │40:72│  word │ reset flag
  491. └─────┴───────┤ PCjr keeps 1234h here for softboot when a cartridge is installed
  492.           │ bits 1234h = soft reset, memory check will be bypassed
  493.           │      4321h = preserve memory         (PS/2 other only)
  494.           │      5678h = system suspended         (Convertible)
  495.           │      9ABCh = manufacturing test mode (Convertible)
  496. ┌─────┬───────┤      ABCDh = system POST loop mode   (Convertible)
  497. │40:74│  byte │ status of last hard disk operation; PCjr special disk control
  498. │40:75│  byte │ # of hard disks attached (0-2)      ; PCjr special disk control
  499. │40:76│  byte │ HD control byte; temp holding area for 6th param table entry
  500. │40:77│  byte │ port offset to current hd adapter ; PCjr special disk control
  501. │40:78│4 bytes│ timeout value for LPT1,LPT2,LPT3,LPT4
  502. │40:7C│4 bytes│ timeout value for COM1,COM2,COM3,COM4 (0-0FFh secs, default 1)
  503. │40:80│  word │ pointer to start of circular keyboard buffer, default 03:1E
  504. │40:82│  word │ pointer to end of circular keyboard buffer, default 03:3E
  505. └─────┴───────┤ note: early Zenith Z183 BIOS set these pointers to zero and
  506. ┌─────┬───────┤       ignored them.
  507. │40:84│  .... │ Video Control Data Area 2, 0040:0084 through 0040:008A
  508. │40:84│  byte │ rows on the screen minus 1 (EGA only)
  509. │40:84│  byte │ PCjr interrupt flag; timer channel 0  (used by POST)
  510. │40:85│  word │ bytes per character (EGA only)
  511. │40:85│2 bytes│ (PCjr only) typamatic character to repeat
  512. │40:86│2 bytes│ (PCjr only) typamatic initial delay
  513. │40:87│  byte │ mode options (EGA only)
  514. └─────┴───────┤ bit 0    0   cursor emulation in effect
  515.           │     1   no cursor emulation
  516.           │     1    0   EGA is connected to a color display
  517.           │     1   EGA is connected to monochrome TTL display
  518.           │     2    0   wait for vertical retrace (CGA active)
  519.           │     1   don't wait for vertical retrace (EGA or MDA active)
  520.           │     3    0   EGA is the active display,
  521.           │     1   "other" display is active.
  522.           │     4        reserved
  523.           │     5,6     EGA memory size
  524.           │         0,0   64k
  525.           │         0,1   128k
  526.           │         1,0   192k
  527.           │         1,1   256k
  528.           │     7    0   don't clear screen on mode changes
  529.           │     1   if the last "set mode" specified not to clear the
  530.           │         video buffer
  531.           │ mode combinations:
  532.           │ bit3  bit1     Meaning
  533.           │   0    0   EGA is active display and is color
  534.           │   0    1   EGA is active display and is monochrome
  535.           │   1    0   EGA is not active, a mono card is active
  536.           │   1    1   EGA is not active, a CGA is active
  537.  
  538.                                     -19-
  539.  
  540.  
  541. ┌─────┬───────┐
  542. │40:87│  byte │ (PCjr only) current Fn key code
  543. ├─────┼───────┤         80h bit indicates make/break key code?
  544. │40:88│  byte │ feature bits and switches (EGA only) 0=on, 1=off
  545. └─────┴───────┤ bit 0    switch 1
  546.           │     1    switch 2
  547.           │     2    switch 3
  548.           │     3    switch 4
  549. ┌─────┬───────┤     4-7 feature bits
  550. │40:88│  byte │ (PCjr only) special keyboard status byte
  551. └─────┴───────┤ bit 7 function flag     3 typamatic (0=enable,1=disable)
  552.           │     6 Fn-B break     2 typamatic speed (0=slow,1=fast)
  553.           │     5 Fn pressed     1 extra delay bef.typamatic (0=enable)
  554. ┌─────┬───────┤     4 Fn lock         0 write char, typamatic delay elapsed
  555. │40:89│  byte │ (PCjr) current value of 6845 reg 2 (horizontal synch) used by
  556. └─────┴───────┤ ctrl-alt-cursor screen positioning routine in ROM
  557.           │  (VGA)
  558.           │ bit 0        reserved
  559.           │     1        video summing enabled
  560.           │     2    0   for color monitor attached
  561.           │     1   for mono monitor
  562.           │     3    0   for default palette loading enabled
  563.           │     4    0   for 8x8 text font
  564.           │     1   for 8x16 text font
  565. ┌─────┬───────┤     5-7     reserved
  566. │40:8A│  byte │ (PCjr) CRT/CPU Page Register Image, default 3Fh
  567. └─────┴───────┤ (VGA)  Display Combination Code Index. This is the value
  568.           │  set/returned by function 1Ah of the Video BIOS. This byte
  569.           │  contains an index into the ROM BIOS Display Combination Code
  570.           │  table, which is a list of byte pairs that specify valid
  571.           │  combinations of one or two video subsystems. Video subsystems
  572.           │  are designated by the following values:
  573.           │  00h     no display
  574.           │  01h     MDA with monochrome display
  575.           │  02h     CGA with color display
  576.           │  03h     reserved
  577.           │  04h     EGA with color display
  578.           │  05h     EGA with monochrome display
  579.           │  06h     Professional Graphics Adapter
  580.           │  07h     VGA with analog monochrome display
  581.           │  08h     VGA with analog color display
  582.           │  09h     reserved
  583.           │  0Ah     MCGA with digital color display
  584.           │  0Bh     MCGA with analog monochrome display
  585.           │  0Ch     MCGA with analog color display
  586. ┌─────┬───────┤  0FFh     unrecognized video subsystem
  587. │40:8B│  byte │ last diskette data rate selected
  588. └─────┴───────┤ bit 7,6 starting data transfer rate to use
  589.           │     0,0     500 kb/sec
  590.           │     0,1     300 kb/sec
  591.           │     1,0     250 kb/sec
  592.           │     1,1     reserved
  593.           │     5,4 last step rate selected
  594.           │     3    ending data transfer rate to use
  595.           │     2    reserved
  596.           │     1    reserved
  597.           │     0    1  combination floppy/fixed disk controller detected
  598.           │     0  XT floppy only controller (for 360kb drive) detected
  599.           │            Data Transfer Rates
  600.           │       Kbits/sec     Media   Drive   Sectors/Track
  601.           │     250        360k    360k    9
  602.           │     300        360k    1.2M    9
  603.           │     500        1.2M    1.2M       15
  604.           │     250        720k    720k    9
  605.           │     250        720k    1.4M    9
  606.           │     500        1.4M    1.4M       18
  607.  
  608.                                     -20-
  609.  
  610.  
  611. ┌─────┬───────┐
  612. │40:8C│  byte │ hard disk status returned by controller
  613. │40:8D│  byte │ hard disk error returned by controller
  614. │40:8E│  byte │ hard disk interrupt (bit 7=working interrupt)
  615. │40:8F│  byte │ combo_card - status of drives 0 and 1
  616. └─────┴───────┤ bit 7    reserved
  617.           │     6    drive type determined for drive 1
  618.           │     5    drive multiple data rate capability for drive 1
  619.           │     0    no multiple data rate
  620.           │     1    multiple data rate
  621.           │     4    1 then drive 1 has 80 tracks
  622.           │     0 then drive 1 has 40 tracks
  623.           │     3    reserved
  624.           │     2    drive type determined for drive 0
  625.           │     1    drive multiple data rate capability for drive 0
  626.           │     0    no multiple data rate
  627.           │     1    multiple data rate
  628.           │     0    1    the drive 0 has 80 tracks
  629. ┌─────┬───────┤     0    the drive 0 has 40 tracks
  630. │40:90│4 bytes│ media state drive 0, 1, 2, 3
  631. └─────┴───────┤ floppy_media_state
  632.           │ bit 7,6 Data transfer rate
  633.           │     00 - 500 K/sec
  634.           │     01 - 300 K/sec
  635.           │     10 - 250 K/sec
  636.           │     11 - reserved
  637.           │     5    double stepping required
  638.           │     4    media/drive determined
  639.           │     3    reserved
  640.           │     2-0 present state
  641.           │     000  360k in 360k unestablished
  642.           │     001  360k in 1.2M unestablished
  643.           │     010  1.2M in 1.2M unestablished
  644.           │     011  360k in 360k established
  645.           │     100  360k in 1.2M established
  646.           │     101  1.2M in 1.2M established
  647.           │     110  reserved
  648. ┌─────┬───────┤     111  none of the above
  649. │40:94│2 bytes│ track currently seeked to drive 0, 1
  650. │40:96│  byte │ keyboard flag byte 3 (see int 9h)
  651. │40:97│  byte │ keyboard flag byte 2 (see int 9h)
  652. │40:98│ dword │ segment:offset pointer to users wait flag
  653. │40:9C│ dword │ users timeout value in microseconds
  654. │40:A0│  byte │ real time clock wait function in use
  655. └─────┴───────┤ bits 7      wait time elapsed and posted flag
  656.           │      6-1  reserved
  657. ┌─────┬───────┤      0      int 15h, function 86h (WAIT) has occurred
  658. │40:A1│  byte │ LAN A DMA channel flags
  659. │40:A2│2 bytes│ status LAN A 0,1
  660. │40:A4│ dword │ saved hard disk interrupt vector
  661. │40:A8│ dword │ SAVE_PTR: EGA pointer to table of 7 parameters in segment:
  662. └─────┴───────┤       offset format. Format of table:
  663.           │ D_1 dword   pointer to 1472 byte table of 64 video parameters
  664.           │ D_2 dword   reserved
  665.           │ D_3 dword   reserved
  666.           │ D_4 dword   reserved
  667.           │ D_5 dword   reserved for future use
  668.           │ D_6 dword   reserved for future use
  669.           │ D_7 dword   reserved for future use
  670.  
  671.                                     -21-
  672.  
  673.  
  674. ┌─────┬───────┐
  675. │40:B0│2 words│ international support            (Tandy 1000 TX)
  676. │40:B4│  byte │ keyboard NMI control flags        (Convertible)
  677. │40:B4│  byte │ monochrome monitor hookup detect    (Tandy 1000 TX)
  678. │     │       │ 00h not present   0FFh    present
  679. │40:B5│ dword │ keyboard break pending flags        (Convertible)
  680. │40:B5│  byte │ extended equipment detect  (5 bits)    (Tandy 1000 TX)
  681. └─────┴───────┤ bit 0 = 0   drive A is 5¼
  682.           │     1   drive A is 3½
  683.           │     1 = 0   drive A is 5¼
  684.           │     1   drive A is 3½
  685.           │     2 = 0   Tandy 1000 keyboard layout
  686.           │     1   IBM keyboard layout
  687.           │     3 = 0   CPU slow mode
  688.           │     1   CPU fast mode
  689.           │     4 = 0   internal color video support enabled
  690.           │     1   internal color video support disabled, external
  691.           │         video enabled (chg from mb'd to expansion card)
  692.           │     5 = 0   no external monochrome video installed
  693. ┌─────┬───────┤     1   external monochrome video installed
  694. │40:B6│  byte │ extended equipment detect  (1 bit)    (Tandy 1000 TX)
  695. └─────┴───────┤ bit 0 = 0   drive C is 5¼
  696. ┌─────┬───────┤     1   drive C is 3½
  697. │40:B9│  byte │ port 60 single byte queue        (Convertible)
  698. │40:BA│  byte │ scan code of last key            (Convertible)
  699. │40:BB│  byte │ pointer to NMI buffer head        (Convertible)
  700. │40:BC│  byte │ pointer to NMI buffer tail        (Convertible)
  701. │40:BD│16bytes│ NMI scan code buffer            (Convertible)
  702. │40:CE│  word │ day counter                (Convertible and after)
  703. │  to │ -04:8F│           end of BIOS Data Area
  704. ├─────┴───────┴────────────────────────────────────────────────────────────────
  705. │ ** End of BIOS Data Area **
  706. ├─────┬───────┬────────────────────────────────────────────────────────────────
  707. │40:90│-40:EF │ reserved by IBM
  708. │40:F0│16bytes│ Inter-Application Communications Area (for use by applications
  709. │40:FF│       │ to transfer data or parameters to each other)
  710. │50:00│ byte  │ DOS print screen status flag
  711. └─────┴───────┤        00h    not active or successful completion
  712.           │        01h    print screen in progress
  713. ┌─────┬───────┤        0FFh   error during print screen operation
  714. │50:01│       │ Used by BASIC
  715. │50:02-03     │ PCjr POST and diagnostics work area
  716. │50:04│  byte │ Single drive mode status byte - not used by AT&T DOS 2.11!
  717. └─────┴───────┤     00     logical drive A was last active
  718. ┌─────────────┤     01     logical drive B was last active
  719. │50:05-0E     │ PCjr POST and diagnostics work area
  720. │50:0F│       │ BASIC: SHELL flag (set to 02h if there is a current SHELL)
  721. │50:10│  word │ BASIC: segment address storage (set with DEF SEG)
  722. │50:12│4 bytes│ BASIC: int 1Ch clock interrupt vector segment:offset storage
  723. │50:16│4 bytes│ BASIC: int 23h ctrl-break interrupt segment:offset storage
  724. │50:1A│4 bytes│ BASIC: int 24h disk error int vector segment:offset storage
  725. │50:1B-1F     │ Used by BASIC for dynamic storage
  726. │50:20-21     │ Used by DOS for dynamic storage
  727. │50:22-2C     │ Used by DOS for diskette parameter table. See int 1Eh for values
  728. └─────┴───────┤ In DOS 1.0 this is located in the ROM BIOS, but in DOS 1.1 and
  729.           │ subsequent it is a part of DOS located at 05:22. The first byte
  730.           │ (out of eleven) of the Disk Parameter contains the hexadecimal
  731.           │ value CF in DOS 1.0 and DF in DOS 1.1 and later.
  732.           │ DOS 1.0   24ms
  733. ┌─────────────┤ DOS 1.1   26ms
  734. │50:30-33     │ Used by MODE command
  735. │50:81│       │ number of floppies installed in the system?
  736. │50:82│       │ first hard disk drive?
  737. │50:83│       │ last hard disk drive?
  738. │50:34-FF     │ Unknown - Reserved for DOS
  739. └─────────────┴─────────────────────────────────────────────────────────────────
  740.  
  741.  
  742.                                     -22-
  743. At absolute addresses:
  744.  
  745. 0008:0047 IO.SYS or IBMBIO.COM IRET instruction. This is the dummy routine that
  746.       interrupts 01h, 03h, and 0Fh are initialized to during POST.
  747. C000:001E EGA BIOS signature (the letters IBM)
  748. F000:FA6E table of characters 00h-7Fh used by int 10h video BIOS
  749.       The first 128 characters are stored here and each occupies 8 bytes.
  750.       The high bit ones are somewhere on the video adapter card.
  751. F000:FFF5 BIOS release date
  752. F000:FFFE PC model identification
  753.  
  754.      ┌─────────────────────────────────────────────────────────────────────┐
  755.      │ ROM BIOS    ┌ model byte                        │
  756.      │ copyright   │    ┌ submodel byte      machine           │
  757.      │     date       │    │    ┌ revision                    │
  758.      ├──────────┼────┼────┼────┼───────────────────────────────────────────┤
  759.      │        │ 00 │ 00 │ 00 │ AT&T 6300, Olivetti PC            │
  760.      │ 09/02/86 │ FA │ 00 │ 00 │ PS/2 Model 30                   │
  761.      │ 01/10/86 │ FB │ 00 │ 01 │ XT                       │
  762.      │ 01/10/86 │ FB │ 00 │ 00 │ XT-2 (early)      (640k motherboard       │
  763.      │ 05/09/86 │ FB │ 01 │    │ XT-2 (revised)   (640k motherboard)       │
  764.      │ 01/10/84 │ FC │ -- │ -- │ AT                       │
  765.      │ 06/10/85 │ FC │ 00 │ 01 │ AT Model 239 6mHz    (6.6 max governor) │
  766.      │ 11/15/85 │ FC │ 01 │ 00 │ AT Model 319, 339 8mHz (8.6 max governor) │
  767.      │ 04/21/86 │ FC │ 02 │ 00 │ XT/286                    │
  768.      │ 02/13/87 │ FC │ 04 │ 00 │ PS/2 Model 50                   │
  769.      │ 02/13/87 │ FC │ 05 │ 00 │ PS/2 Model 60                   │
  770.      │        │ FC │ 00 │    │ 7531/2 Industrial AT               │
  771.      │        │ FC │ 06 │    │ 7552 "Gearbox"                │
  772.      │ 06/01/83 │ FD │ -- │ -- │ PCjr                       │
  773.      │ 11/08/82 │ FE │ -- │ -- │ XT, Portable PC, XT/370, 3270PC       │
  774.      │ 04/24/81 │ FF │ -- │ -- │ PC-0          (16k motherboard)       │
  775.      │ 10/19/81 │ FF │ -- │ -- │ PC-1          (64k motherboard)       │
  776.      │ 08/16/82 │ FF │ -- │ -- │ PC, XT, XT/370   (256k motherboard)       │
  777.      │ 10/27/82 │ FF │ -- │ -- │ PC, XT, XT/370   (256k motherboard)       │
  778.      │       1987 │ F8 │ 00 │ 00 │ PS/2 Model 80                   │
  779.      │       1987 │ F8 │ 01 │ 00 │ PS/2 Model 80 20mHz               │
  780.      │ 09/13/85 │ F9 │ 00 │ 00 │ Convertible                   │
  781.      │        │ 2D │ -- │ -- │ Compaq PC      (4.77mHz original)       │
  782.      │        │ 9A │ -- │ -- │ Compaq Plus      (XT compatible)       │
  783.      └──────────┴────┴────┴────┴───────────────────────────────────────────┘
  784.  
  785.  
  786.  
  787. The IBM PC System Interrupts (Overview) ............................... 2**5
  788.  
  789.  The interrupt table is stored in the very lowest location in memory, starting
  790. at 0000:0000h. The locations are offset from segment 0, i.e. location 0000h has
  791. the address for int 0, etc. The table is 1024 bytes in length and contains 256
  792. four byte vectors from 00h to 0FFh. Each address' location in memory can be
  793. found by multiplying the interrupt number by 4. For example, int 7 could be
  794. found by (7x4=28) or 1Bh (0000:001Bh).
  795.  
  796.  These interrupt vectors normally point to ROM tables or are taken over by DOS
  797. when an application is run. Some applications revector these interrupts to
  798. their own code to change the way the system responds to the user. DOS provides
  799. int 21h function 25h to change interrupts from a high level; altering the
  800. interrupt vector table directly is not recommended, nor would it really get
  801. you anywhere.
  802.  
  803.                                     -23-
  804.  
  805.  
  806. ┌─────────────────────┬────────────────────────────────────────────────────────┐
  807. │  Interrupt Address  │                                │
  808. ├───────┬───────┬─────┘                Function                │
  809. │ Number│ (Hex) │ Type                                   │
  810. ├───────┼───────┼─────┬────────────────────────────────────────────────────────┤
  811. │   0    │ 00-03 │ CPU │  Divide by Zero                        │
  812. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  813. │   1    │ 04-07 │ CPU │  Single Step                           │
  814. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  815. │   2    │ 08-0B │ CPU │  Nonmaskable                           │
  816. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  817. │   3    │ 0C-0F │ CPU │  Breakpoint                           │
  818. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  819. │   4    │ 10-13 │ CPU │  Overflow                           │
  820. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  821. │   5    │ 14-17 │ BIOS│  Print Screen                           │
  822. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  823. │   6    │ 18-1B │ hdw │  Reserved                           │
  824. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  825. │   7    │ 1C-1F │ hdw │  Reserved                           │
  826. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  827. │   8    │ 20-23 │ hdw │  Time of Day                           │
  828. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  829. │   9    │ 24-27 │ hdw │  Keyboard                           │
  830. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  831. │   A    │ 28-2B │ hdw │  Reserved                           │
  832. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  833. │   B    │ 2C-2F │ hdw │  Communications (8259)                       │
  834. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  835. │   C    │ 30-33 │ hdw │  Communications                        │
  836. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  837. │   D    │ 34-37 │ hdw │  Disk                               │
  838. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  839. │   E    │ 38-3B │ hdw │  Diskette                           │
  840. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  841. │   F    │ 3C-3F │ hdw │  Printer                           │
  842. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  843. │   10    │ 40-43 │ BIOS│  Video                               │
  844. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  845. │   11    │ 44-47 │ BIOS│  Equipment Check                       │
  846. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  847. │   12    │ 48-4B │ BIOS│  Memory                            │
  848. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  849. │   13    │ 4C-4F │ BIOS│  Diskette/Disk                           │
  850. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  851. │   14    │ 50-53 │ BIOS│  Serial Communications                       │
  852. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  853. │   15    │ 54-57 │ BIOS│  Cassette, System Services                   │
  854. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  855. │   16    │ 58-5B │ BIOS│  Keyboard                           │
  856. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  857. │   17    │ 5C-5F │ BIOS│  Parallel Printer                       │
  858. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  859. │   18    │ 60-63 │ BIOS│  ROM BASIC Loader                       │
  860. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  861. │   19    │ 64-67 │ BIOS│  Bootstrap Loader                       │
  862. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  863. │   1A    │ 68-6B │ BIOS│  Time of Day                           │
  864. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  865. │   1B    │ 6C-6F │ BIOS│  Keyboard Break                        │
  866. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  867. │   1C    │ 70-73 │ BIOS│  Timer Tick                           │
  868. └───────┴───────┴─────┴────────────────────────────────────────────────────────┘
  869.  
  870.                                     -24-
  871.  
  872.  
  873. ┌───────┬───────┬─────┬────────────────────────────────────────────────────────┐
  874. │   1D    │ 74-77 │ BIOS│  Video Initialization                       │
  875. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  876. │   1E    │ 78-7B │ BIOS│  Diskette Parameters                       │
  877. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  878. │   1F    │ 7C-7F │ BIOS│  Video Graphics Characters, second set               │
  879. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  880. │   20    │ 80-83 │ DOS │  General Program Termination                   │
  881. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  882. │   21    │ 84-87 │ DOS │  DOS Services Function Request                   │
  883. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  884. │   22    │ 88-8B │ DOS │  Called Program Termination Address               │
  885. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  886. │   23    │ 8C-8F │ DOS │  Control Break Termination Address               │
  887. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  888. │   24    │ 90-93 │ DOS │  Critical Error Handler                    │
  889. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  890. │   25    │ 94-97 │ DOS │  Absolute Disk Read                       │
  891. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  892. │   26    │ 98-9B │ DOS │  Absolute Disk Write                       │
  893. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  894. │   27    │ 9C-9F │ DOS │  Terminate and Stay Resident                   │
  895. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  896. │ 28-3F │ A0-FF │ DOS │  Reserved for DOS                       │
  897. └───────┴───────┴─────┼────────────────────────────────────────────────────────┤
  898.               │ *29h   Fast Screen Write                   │
  899.               │ *2Ah   Microsoft Networks - Session Layer Interrupt    │
  900.               │  2Fh   Multiplex Interrupt                   │
  901.               │ *30h   Far jump instruction for CP/M-style calls       │
  902.               │  33h   Used by Microsoft Mouse Driver               │
  903. ┌───────┬───────┬─────┼────────────────────────────────────────────────────────┤
  904. │ 40-43 │100-115│ BIOS│  Reserved for BIOS                       │
  905. └───────┴───────┴─────┼────────────────────────────────────────────────────────┤
  906.               │  40h   Hard Disk BIOS                       │
  907.               │  41h   Hard Disk Parameters  (except PC1)           │
  908.               │  42h   Pointer to screen BIOS entry  (EGA, VGA, PS/2)  │
  909.               │  43h   Pointer to EGA initialization parameter table   │
  910. ┌───────┬───────┬─────┼────────────────────────────────────────────────────────┤
  911. │   44    │116-119│ BIOS│  First 128 Graphics Characters                   │
  912. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  913. │ 45-47 │120-131│ BIOS│  Reserved for BIOS                       │
  914. └───────┴───────┴─────┼────────────────────────────────────────────────────────┤
  915.               │  45h   Reserved by IBM    (not initialized)           │
  916.               │  46h   Pointer to hard disk 2 params (AT, PS/2)        │
  917.               │  47h   Reserved by IBM    (not initialized)           │
  918. ┌───────┬───────┬─────┼────────────────────────────────────────────────────────┤
  919. │   48    │132-135│ BIOS│  PCjr Cordless Keyboard Translation               │
  920. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  921. │   49    │136-139│ BIOS│  PCjr Non-Keyboard Scancode Translation Table           │
  922. └───────┴───────┴─────┼────────────────────────────────────────────────────────┤
  923.               │  4Ah   Real-Time Clock Alarm (Convertible, PS/2)       │
  924. ┌───────┬───────┬─────┼────────────────────────────────────────────────────────┤
  925. │ 50-5F │140-17F│ BIOS│  Reserved for BIOS                       │
  926. └───────┴───────┴─────┼────────────────────────────────────────────────────────┤
  927.               │  5Ah   Cluster Adapter BIOS entry address           │
  928.               │ *5Bh   IBM  (cluster adapter?)                   │
  929.               │  5Ch   NETBIOS interface entry port               │
  930. ┌───────┬───────┬─────┴────────────────────────────────────────────────────────┤
  931. │ 60-67 │180-19F│  User Program Interrupts (availible for general use)           │
  932. └───────┴───────┴─────┬────────────────────────────────────────────────────────┤
  933.               │  60h   10-Net Network                       │
  934.               │  67h   Used by LIM & AQA EMS, EEMS               │
  935.               └────────────────────────────────────────────────────────┘
  936.  
  937.                                     -25-
  938.  
  939.  
  940. ┌───────┬───────┬──────────────────────────────────────────────────────────────┐
  941. │ 68-7F │1A0-1FF│  Reserved by IBM                           │
  942. └───────┴───────┴─────┬────────────────────────────────────────────────────────┤
  943.               │  6Ch   System Resume Vector (Convertible)           │
  944.               │  6Fh   some Novell and 10-Net API functions           │
  945.               │  70h   IRQ 8, Real Time Clock Interrupt (AT, PS/2)     │
  946.               │  71h   IRQ 9, LAN Adapter 1                   │
  947.               │  72h   IRQ 10  (AT, XT/286, PS/2)  Reserved           │
  948.               │  73h   IRQ 11  (AT, XT/286, PS/2)  Reserved           │
  949.               │  74h   IRQ 12  Mouse Interrupt (PS/2)               │
  950.               │  75h   IRQ 13, Coprocessor Error               │
  951.               │  76h   IRQ 14, Hard Disk Controller (AT, PS/2)           │
  952.               │  77h   IRQ 15 (AT, XT/286, PS/2)  Reserved           │
  953.               │  7Ch   IBM REXX88PC command language               │
  954. ┌───────┬───────┬─────┴────────────────────────────────────────────────────────┤
  955. │ 80-85 │200-217│  ROM BASIC                               │
  956. ├───────┼───────┼──────────────────────────────────────────────────────────────┤
  957. │ 86-F0 │218-3C3│  Used by BASIC Interpreter When BASIC is running           │
  958. ├───────┼───────┼──────────────────────────────────────────────────────────────┤
  959. │ F1-FF │3C4-3FF│  Reserved by IBM                           │
  960. └───────┴───────┴──────┬───────────────────────────────────────────────────────┤
  961.                │  0F1h-0FFh  Interprocess Communications Area           │
  962.                │ *0F8h    Set Shell Interrupt (OEM)               │
  963.                │ *0F9h    OEM SHELL service codes                │
  964.                │  0FAh    USART ready (RS-232C)                   │
  965.                │  0FBh    USART RS ready (keyboard)               │
  966.                │ *0FEh    used on '283 & '386                   │
  967.                │ *0FFh    used on '283 & '386                   │
  968.                └───────────────────────────────────────────────────────┘
  969.  
  970.  
  971.  
  972.  
  973. The IBM-PC System Interrupts (in detail) .............................. 2**6
  974.  
  975. ┌─────────────────────────────────────────────────────────────────────────────┐
  976. │Interrupt  00h Divide by Zero                              │
  977. └─────────────────────────────────────────────────────────────────────────────┘
  978. (0:0000h) (processor error). Automatically called at end of DIV or IDIV
  979.       operation that results in error. Normally set by DOS to display an
  980.       error message and abort the program.
  981.  
  982.  
  983. ┌─────────────────────────────────────────────────────────────────────────────┐
  984. │Interrupt  01h Single step                              │
  985. └─────────────────────────────────────────────────────────────────────────────┘
  986. (0:0004h) Taken after every instruction when CPU Trap Flag indicates
  987.       single-step mode (bit 8 of FLAGS is 1). This is what makes the "T"
  988.       command of DEBUG work for single stepping. Is not generated after MOV
  989.       to segment register or POP of segment register. (unless you have a
  990.       very early 8088 with the microcode bug).
  991.  
  992.  
  993. ┌─────────────────────────────────────────────────────────────────────────────┐
  994. │Interrupt  02h Non-maskable interrupt                          │
  995. └─────────────────────────────────────────────────────────────────────────────┘
  996. (0:0008h)    Vector not disabled via CLI. Generated by NMI signal in
  997.         hardware. This function is called in the event of a memory
  998.         parity error or may occur in the event of other hardware
  999.         problems or failures depending on the specific manufacturer's
  1000.         hardware. Displays the appropriate error message and halts the
  1001.         processor.
  1002.  
  1003.                                     -26-
  1004.  
  1005.         This signal has various uses:
  1006.     POST parity error:            all except PCjr and Convertible
  1007.     80x87 coprocessor interrupt:        all except PCjr and Convertible
  1008.     Keyboard interrupt:            PCjr, Convertible
  1009.     I/O channel check:            Convertible, PS/2 50+
  1010.     Disk controller power-on request:   Convertible
  1011.     System suspend:             Convertible
  1012.     Realtime clock:             Convertible
  1013.     System watchdog timer:            PS/2 50+
  1014.     Timeout interrupt:            PS/2 50+
  1015.     DMA timer time-out interrupt:        PS/2 50+
  1016.     Infrared keyboard link:         PCjr
  1017.  
  1018.  
  1019. ┌─────────────────────────────────────────────────────────────────────────────┐
  1020. │Interrupt  03h Breakpoint                              │
  1021. └─────────────────────────────────────────────────────────────────────────────┘
  1022. (0:000Ch)  Taken when CPU executes the 1-byte int 3 (0CCh). Similar to 8080's
  1023.  
  1024. (internal) RST instruction. Generally used to set breakpoints for DEBUG.
  1025.  
  1026. note 1)  Also used by Turbo Pascal versions 1,2,3 when {$U+} specified.
  1027.      2)  Int 3s are sometimes inserted by the Microsoft Linker in response to
  1028.      an unresolved symbol.
  1029.  
  1030.  
  1031. ┌─────────────────────────────────────────────────────────────────────────────┐
  1032. │Interrupt  04h Divide overflow                           │
  1033. └─────────────────────────────────────────────────────────────────────────────┘
  1034. (0:0010h)  Generated by INTO instruction if OF flag is set. If flag is not set,
  1035.  
  1036. (internal) INTO is effectively a NOP. Used to trap any arithmetic errors when
  1037.        program is ready to handle them rather than immediately when they
  1038.        occur.
  1039.  
  1040.  
  1041. ┌─────────────────────────────────────────────────────────────────────────────┐
  1042. │Interrupt  05h Print Screen                              │
  1043. └─────────────────────────────────────────────────────────────────────────────┘
  1044. (0:0014h)  Service dumps the screen to the printer. Invoked by int 9 for shifted
  1045.        key 55 (PrtSc). Automatically called by keyboard scan when PrtSc key
  1046.        is pressed. Normally executes a routine to print the screen, but may
  1047.        call any routine that can safely be executed from inside the keyboard
  1048.        handler. Status and result byte are at address 0050:0000.
  1049.  
  1050. (internal) BOUND Check Failed (80286+)
  1051.        Generated by BOUND instruction when the value to be tested is less
  1052.        than the indicated lower bound or greater than the indicated upper
  1053.        bound.
  1054.  
  1055. entry    AH    05h
  1056. return    absolute address 50:0
  1057.     00h    print screen has not been called, or upon return from a call
  1058.         there were no errors
  1059.     01h    print screen is already in progress
  1060.     0FFh    error encountered during printing
  1061. note 1) Uses BIOS services to read the screen.
  1062.      2) Output is directed to LPT1.
  1063.      3) Revectored into GRAPHICS.COM if GRAPHICS.COM is loaded.
  1064.  
  1065.                                     -27-
  1066.  
  1067. ┌─────────────────────────────────────────────────────────────────────────────┐
  1068. │Interrupt  06h Reserved by IBM                           │
  1069. └─────────────────────────────────────────────────────────────────────────────┘
  1070. (0:0018h)
  1071.  
  1072. (internal) Undefined Opcode (80286+)
  1073.  
  1074.  
  1075.  
  1076. ┌─────────────────────────────────────────────────────────────────────────────┐
  1077. │Interrupt  07h Reserved by IBM                           │
  1078. └─────────────────────────────────────────────────────────────────────────────┘
  1079. (0:00C0h)
  1080.  
  1081. (internal) No Math Unit Available (80286+)
  1082.  
  1083. note    The 80286 and later can be programmed to generate an int 7 whenever
  1084.     an ESC instruction is encountered. This could be used to emulate an
  1085.     80x87 series coprocessor in software and be transparent to the
  1086.     application software. It could also be used to make a non-Intel
  1087.     floating point processor emulate an 80x87.
  1088.  
  1089.  
  1090.  
  1091. ┌─────────────────────────────────────────────────────────────────────────────┐
  1092. │Interrupt  08h Timer                                  │
  1093. └─────────────────────────────────────────────────────────────────────────────┘
  1094. (0:0020h)  55ms timer "tick" issued 18.2 times per second.
  1095.  (IRQ0)    8259-1 Interrupt Controller
  1096.        Updates the system time at [0040:006C] (low word) and [0040:006E]
  1097.        (high word) and issues an int 1Ch (timer). (int 1Ch points to an
  1098.        IRET instruction unless changed by a resident program). The timer
  1099.        interrupt is given the highest maskable interrupt priority upon
  1100.        power up.
  1101.  
  1102. (internal) Double Fault (80286+ protected mode) Called when multiple exceptions
  1103.        occur on one instruction, or an exception occurs in an exception
  1104.        handler. If an exception occurs in the double fault handler, the CPU
  1105.        goes into SHUTDOWN mode (which circuitry in the PC/AT converts to a
  1106.        reset).
  1107.  
  1108. entry    AH    08h
  1109. return    absolute addresses:
  1110.     40:6C    number of interrupts since power on (4 bytes)
  1111.     40:70    number of days since power on        (1 byte)
  1112.     40:67    day counter on all products after AT
  1113.     40:40    motor control count - gets decremented and shuts off diskette
  1114.         motor if zero
  1115.  
  1116.  
  1117.  
  1118. ┌─────────────────────────────────────────────────────────────────────────────┐
  1119. │Interrupt  09h Keyboard                              │
  1120. └─────────────────────────────────────────────────────────────────────────────┘
  1121. (0:0024h)  Taken whenever a key is pressed or released. This is normally a scan
  1122.  (IRQ1)    code, but may also be an ACK or NAK of a command on AT-type
  1123.        keyboards. The hardware provides the key pressed in a non-ASCII scan
  1124.        code format read at I/O port 60h. The servicer acknowledges receipt
  1125.        of the key by toggling bit 7 of port 61h. (Port 61h should be read
  1126.        first, then bit 7 ORed on, output to port 61h, then ANDed off, and
  1127.        resent to port 61h).
  1128.  
  1129.                                     -28-
  1130.  
  1131.         The read key is decoded to yield an ASCII character, special
  1132.        function key (such as F1) or a control function like Left Shift Key.
  1133.        The converted ASCII character is placed into the next available
  1134.        position in the circular queue keyboard. It is put in the position
  1135.        indicated by queue tail when it will not cause the loss of earlier
  1136.        entered data. The queue head points to the oldest key pressed in the
  1137.        buffer which has not been removed from the queue (the normal process
  1138.        uses int 16h to remove keys from the queue and return the key value
  1139.        to the int 16h caller).
  1140.  
  1141.         The 16 word queue holds up to 16 keys. If the queue head equals the
  1142.         queue tail, the queue is empty. Valid keys in the queue comprise
  1143.         the upper byte scan code and the lower byte ASCII character. If the
  1144.         key pressed has no ASCII equivalent (i.e F1 to F12), the lower byte
  1145.         is zero.
  1146.  
  1147.          Toggle and shift keys are not placed in the buffer, but appear in
  1148.        the two status bytes at absolute addr. [0040:0017,18].
  1149.  
  1150.        Special key combinations will cause other events to occur:
  1151.        a) Ctrl-Alt_Del  -  Reset computer by jumping to power_on_reset
  1152.        b) Print screen  -  Call int_5_prn_scrn to print the current screen
  1153.        c) Ctrl-Break    -  Call int_1Bh control break key processor (DOS)
  1154.        d) Pause        -  Wait until an ASCII key is pressed, without
  1155.                    placing the key in the queue
  1156.  
  1157. (internal) Math Unit Protection Fault (80286+ protected mode)
  1158.  
  1159. entry    AH    09h
  1160. return    at absolute memory addresses:
  1161.     40:17    bit
  1162.         0    right shift key depressed
  1163.         1    left shift key depressed
  1164.         2    control key depressed
  1165.         3    alt key depressed
  1166.         4    ScrollLock state has been toggled
  1167.         5    NumLock state has been toggled
  1168.         6    CapsLock state has been toggled
  1169.         7    insert state is active
  1170.     40:18    bit
  1171.         0    left control key depressed
  1172.         1    left alt key depressed
  1173.         2    SysReq key depressed
  1174.         3    Pause key has been toggled
  1175.         4    ScrollLock key is depressed
  1176.         5    NumLock key is depressed
  1177.         6    CapsLock key is depressed
  1178.         7    Insert key is depressed
  1179.     40:96    bit
  1180.         0    last code was the E1h hidden code
  1181.         1    last code was the E0h hidden code
  1182.         2    right control key down
  1183.         3    right alt key down
  1184.         4    101 key Enhanced keyboard installed
  1185.         5    force NumLock if rd ID & kbx
  1186.         6    last character was first ID character
  1187.         7    doing a read ID (must be bit 0)
  1188.     40:97    bit
  1189.         0    ScrollLock indicator
  1190.         1    NumLock indicator
  1191.         2    CapsLock indicator
  1192.         3    circus system indicator
  1193.         4    ACK received
  1194.         5    resend received flag
  1195.         6    mode indicator update
  1196.         7    keyboard transmit error flag
  1197.  
  1198.                                     -29-
  1199.  
  1200.     40:1E    keyboard buffer (20h bytes)
  1201.     40:1C    buffer tail pointer
  1202.     40:72    1234h if ctrl-alt-del pressed on keyboard
  1203.      AL   scan code
  1204. note 1) Int 05h invoked if PrtSc key pressed.
  1205.      2) Int 1Bh invoked if Ctrl-Break key sequence pressed.
  1206.      3) Int 15h, AH=85h invoked on AT and after if SysReq key is pressed.
  1207.      4) Int 15h, AH=4Fh invoked on machines after AT.
  1208.      5) Int 16h, BIOS keyboard functions, uses this interrupt.
  1209.  
  1210.  
  1211. ┌─────────────────────────────────────────────────────────────────────────────┐
  1212. │Interrupt  0Ah  EGA Vertical Retrace                          │
  1213. └─────────────────────────────────────────────────────────────────────────────┘
  1214. (0:0028h)  used by EGA vertical retrace
  1215.  (IRQ2)    8259-1 Interrupt Controller
  1216. note 1) The TOPS and PCnet adapters use this IRQ line by default.
  1217.      2) On systems equipped with 2 interrupt controller chips (8259), IRQ 2
  1218.     is used to support the second interrupt controller. In this case,
  1219.     int 71h (IRQ 9) is used to replace IRQ 2. Hardware calls to int 71h
  1220.     are redirected to this interrupt to maintain compatibility.
  1221.  
  1222. (internal) Invalid Task State Segment (80286+ protected mode)
  1223.  
  1224.  
  1225.  
  1226. ┌─────────────────────────────────────────────────────────────────────────────┐
  1227. │Interrupt  0Bh  Communications Controller (serial port) hdw. entry          │
  1228. └─────────────────────────────────────────────────────────────────────────────┘
  1229. (0:002Ch)  Serial Port 2 (COM2) 8259-1
  1230.  (IRQ3)
  1231. note 1) IRQ 3 may be used by SDLC (synchronous data-link control) or
  1232.     bisynchronous communications cards instead of a serial port.
  1233.      2) The TOPS and PCnet adapters use this interrupt request line as an
  1234.     alternate.
  1235.      3) On PS/2s, COM2 through COM8 share this IRQ.
  1236.      4) For most serial boards, COM4 shares this IRQ.
  1237.      5) On the Commodore Amiga 2000 with the PC Bridge Board, this interrupt
  1238.     is used for communication between the Amiga system board and the
  1239.     Bridge Board. This was probably the lowest IRQ level they felt safe
  1240.     using, but limits the A2000's use of network cards, etc.
  1241.      6) This interrupt is used by part of the stack-switching code added
  1242.     to DOS 3.2 for use with Local Area Network adapters.
  1243.      7) The PS/2 puts COM3 through COM8 at port addresses above 3FFh (not
  1244.     properly decoded by older PCs) and has all of them sharing IRQ3.
  1245.  
  1246. (internal) Not Present (80286+ protected mode)
  1247.        Generated when loading a segment register if the segment descriptor
  1248.        indicates that the segment is not currently in memory. May be used
  1249.        to implement virtual memory.
  1250.  
  1251.                                     -30-
  1252.  
  1253.  
  1254. ┌─────────────────────────────────────────────────────────────────────────────┐
  1255. │Interrupt  0Ch  Communications Controller (serial port) hdw. entry          │
  1256. └─────────────────────────────────────────────────────────────────────────────┘
  1257. (0:0030h)  Serial Port 1 (COM1) or internal modem in PCjr or Convertible
  1258.  (IRQ4)    8259-1
  1259. note 1) IRQ 4 may be used by SDLC (synchronous data-link control) or
  1260.     bisynchronous communications cards instead of a serial port.
  1261.      2) On some PCs, this interrupt is shared by COM3.
  1262.      3) Tandy computers use IRQ4 instead of IRQ5 for the hard disk interrupt.
  1263.      4) Best performance of mice sometimes happens when they are configured
  1264.     for IRQ4 instead of IRQ3, since some mouse drivers may lock system
  1265.     interrupts for long periods.
  1266.  
  1267. (internal) Stack Fault (80286+ protected mode)
  1268.        Generated on stack overflow/underflow. Note that the 80286 will shut
  1269.        down in real mode if SP=1 before a push.
  1270.  
  1271.  
  1272. ┌─────────────────────────────────────────────────────────────────────────────┐
  1273. │Interrupt  0Dh  Hard disk                              │
  1274. └─────────────────────────────────────────────────────────────────────────────┘
  1275. (0:0034h)  Miscelleneous uses
  1276.  (IRQ5)    8259-1
  1277. note 1) Various Tandy 1000 models may use this line for the 60Hhz RAM refresh
  1278.     or as "optional bus interrupt."
  1279.      2) Used by hard disk on IBM XT and most compatibles.
  1280.      3) LPT2 on AT, XT/286, and PS/2
  1281.      4) Dummy CRT vertical retrace on PCjr
  1282.  
  1283. (internal) General Protection Violation (80286+)
  1284.        Called in real mode when an instruction attempts to access a word
  1285.        operand located at offset 0FFFFh or a PUSH MEM or POP MEM
  1286.        instruction contains an invalid bit code in the second byte.
  1287.  
  1288.  
  1289. ┌─────────────────────────────────────────────────────────────────────────────┐
  1290. │Interrupt  0Eh  Diskette Interrupt                          │
  1291. └─────────────────────────────────────────────────────────────────────────────┘
  1292. (0:0038h)  Generated by floppy controller on completion of an operation
  1293.  (IRQ6)    (sets bit 8 of 40:3E)
  1294.  
  1295. (internal) Page Fault (80386+ native mode)
  1296.  
  1297.  
  1298. ┌─────────────────────────────────────────────────────────────────────────────┐
  1299. │Interrupt  0Fh  Reserved by IBM                          │
  1300. └─────────────────────────────────────────────────────────────────────────────┘
  1301. (0:003Ch)  IRQ7 used by 8259 PPI interrupt (LPT1, LPT2)
  1302.  (IRQ7)
  1303. note 1) Generated by the LPT1 printer adapter when printer becomes ready. Many
  1304.     printer adapters do not reliably generate this interrupt.
  1305.      2) This interrupt is normally avoided. If a bad interrupt occurs, it will
  1306.     vector to this spot (when caused by a misprogrammed 8259 PIC)
  1307.  
  1308.