home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / LA / LA023.ZIP / DOSREF17.ZIP / CHAPTER.002 < prev    next >
Text File  |  1990-03-21  |  59KB  |  938 lines

  1.  
  2.    **  Programmer's  Technical  Reference  for  MSDOS  and  the  IBM  PC **
  3.                         ┌─────────────────────────────┐
  4.                         │ Shareware Version, 03/21/90 │
  5.                         │  Please Register Your Copy  │
  6.                         └─────────────────────────────┘
  7.                     Copyright (c) 1987, 1990 Dave Williams
  8.  
  9.  
  10.                              C H A P T E R   T W O
  11.  
  12.  CPU Port Assignments, System Memory Map, BIOS Data Area, Interrupts 00h to 09h
  13.  
  14.  
  15.  
  16.  For consistency in this reference, all locations and offsets are in
  17. hexadecimal unless otherwise specified. All hex numbers are prefaced with a
  18. leading zero if they begin with an alphabetic character, and are terminated
  19. with a lowercase H (h). The formats vary according to common usage.
  20.  
  21.  
  22. SYSTEM MEMORY MAP - OVERALL├───────────────────────────────────────────────────
  23.  
  24.  The IBM PC handles its address space in 64k segments, divided into 16k
  25. fractions and then further as nescessary.
  26.  
  27. ┌──────┬───────────┬──────────────────────────────────────────────────────────┐
  28. │start │start end  │                                                          │
  29. │addr. │addr. addr.│                          usage                           │
  30. │(dec) │   (hex)   │                                                          │
  31. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  32. │   *640k RAM Area*                                                           │
  33. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  34. │ 0k   │           │  start of RAM                                            │
  35. │ 16k  │00000-03FFF│  PC-0 system board RAM                                   │
  36. │ 32k  │04000-07FFF│                                                          │
  37. │ 48k  │08000-0BFFF│                                                          │
  38. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  39. │ 64k  │10000-13FFF│  PC-1 system board RAM                                   │
  40. │ 80k  │14000-17FFF│                                                          │
  41. │ 96k  │18000-1BFFF│                                                          │
  42. │ 112k │1C000-1FFFF│                                                          │
  43. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  44. │ 128k │20000-23FFF│                                                          │
  45. │ 144k │24000-27FFF│                                                          │
  46. │ 160k │28000-2BFFF│                                                          │
  47. │ 176k │2C000-2FFFF│                                                          │
  48. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  49. │ 192k │30000-33FFF│                                                          │
  50. │ 208k │34000-37FFF│                                                          │
  51. │ 224k │38000-3BFFF│                                                          │
  52. │ 240k │3C000-3FFFF│                                                          │
  53. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  54. │ 256k │40000-43FFF│  PC-2 system board RAM                                   │
  55. │ 272k │44000-47FFF│                                                          │
  56. │ 288k │48000-4BFFF│                                                          │
  57. │ 304k │4C000-4FFFF│                                                          │
  58. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  59. │ 320k │50000-53FFF│                                                          │
  60. │ 336k │54000-57FFF│                                                          │
  61. │ 352k │58000-5BFFF│                                                          │
  62. │ 368k │5C000-5FFFF│                                                          │
  63. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  64. │ 384k │60000-63FFF│                                                          │
  65. │ 400k │64000-67FFF│                                                          │
  66. │ 416k │68000-6BFFF│                                                          │
  67. │ 432k │6C000-6FFFF│                                                          │
  68. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  69. │ 448k │70000-73FFF│                                                          │
  70. │ 464k │74000-77FFF│                                                          │
  71. │ 480k │78000-7BFFF│                                                          │
  72. │ 496k │7C000-7FFFF│                                                          │
  73. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  74. │ 512k │80000-83FFF│                                                          │
  75. │ 528k │84000-87FFF│                                                          │
  76. │ 544k │88000-8BFFF│  the original IBM PC-1 BIOS limited memory to 544k       │
  77. │ 560k │8C000-8FFFF│                                                          │
  78. ├──────┼───────────┼──────────────────────────────────────────────────────────┤
  79. │ 576k │90000-93FFF│                                                          │
  80. │ 592k │94000-97FFF│                                                          │
  81. │ 609k │98000-9BFFF│                                                          │
  82. │ 624k │9C000-9FFFF│  to 640k (top of RAM address space)                      │
  83. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  84. │A0000 ***** 64k ***** EGA address                                            │
  85. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  86. │ 640k │A0000-A95B0│  MCGA 320x200 256 color video buffer                     │
  87. │      │     -AF8C0│  MCGA 640x480 2 color video buffer                       │
  88. │      │     -A3FFF│                                                          │
  89. │ 656k │A4000-A7FFF│                                                          │
  90. │ 672k │A8000-ABFFF│      this 64k segment may be used for contiguous DOS     │
  91. │ 688k │AC000-AFFFF│      RAM with appropriate hardware and software          │
  92. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  93. │B0000 ***** 64k ***** mono and CGA address                                   │
  94. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  95. │ 704k │B0000-B3FFF│  mono uses only 4k        | The PCjr and early Tandy 1000│
  96. │ 720k │B4000-B7FFF│                           | BIOS revector direct write to│
  97. │ 736k │B8000-BBFFF│  CGA uses entire 16k      | the B8 area to the Video Gate│
  98. │ 756k │BC000-BFFFF│                           | Array and reserved system RAM│
  99. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  100. │C0000 ***** 64k *************** expansion ROM                                │
  101. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  102. │ 768k │C0000-C3FFF│16k EGA BIOS C000:001E EGA BIOS signature (letters IBM)   │
  103. │ 784k │C4000-C5FFF│                                                          │
  104. │      │C6000-C63FF│256 bytes Professional Graphics Display communication area│
  105. │      │C6400-C7FFF│                                                          │
  106. │ 800k │C8000-CBFFF│  16k hard disk controller BIOS, drive 0 default          │
  107. │ 816k │CC000-CDFFF│  8k  IBM PC Network NETBIOS                              │
  108. │      │CE000-CFFFF│                                                          │
  109. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  110. │D0000 ***** 64k ***** expansion ROM                                          │
  111. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  112. │ 832k │D0000-D7FFF│  32k IBM Cluster Adapter  | PCjr first ROM cartridge     │
  113. │      │      DA000│  voice communications     | address area.                │
  114. │ 848k │D4000-D7FFF│                           | Common expanded memory board │
  115. │ 864k │D8000-DBFFF│                           | paging area.                 │
  116. │ 880k │DC000-DFFFF│                           |                              │
  117. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  118. │E0000 ***** 64k ***** expansion ROM                                          │
  119. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  120. │ 896k │E0000-E3FFF│                           | PCjr second ROM cartidge     │
  121. │ 912k │E4000-E7FFF│                           | address area                 │
  122. │ 928k │E8000-EBFFF│                           |                              │
  123. │ 944k │EC000-EFFFF│                           |    spare ROM sockets on AT   │
  124. ├──────┴───────────┴──────────────────────────────────────────────────────────┤
  125. │F0000 ***** 64k ***** system                                                 │
  126. ├──────┬───────────┬──────────────────────────────────────────────────────────┤
  127. │ 960k │F0000-F3FFF│  reserved by IBM          |    cartridge address         │
  128. │ 976k │F4000-     │                           |    area (PCjr cartridge      │
  129. │      │F6000      │  ROM BASIC Begins         |    BASIC)                    │
  130. │ 992k │F8000-FB000│                           |                              │
  131. │ 1008k│FC000-FFFFF│  ROM BASIC and original   |                              │
  132. │      │           │  BIOS (Compatibility BIOS |                              │
  133. │      │           │  in PS/2)                 |                              │
  134. │ 1024k│      FFFFF│  end of memory (1024k) for 8088 machines                 │
  135. ├──────┼───────────┴─┬────────────────────────────────────────────────────────┤
  136. │ 384k │100000-15FFFF│ 80286/AT extended memory area, 1Mb motherboard         │
  137. │ 15Mb │100000-FFFFFF│ 80286/AT extended memory address space                 │
  138. │ 15Mb │160000-FDFFFF│ Micro Channel RAM expansion (15Mb extended memory)     │
  139. │ 128k │FE0000-FFFFFF│ system board ROM            (PS/2 Advanced BIOS)       │
  140. └──────┴─────────────┴────────────────────────────────────────────────────────┘
  141.  
  142. Note that the ROM BIOS has a duplicated address space which causes it to
  143. "appear" both at the end of the 1 megabyte real mode space and at the end of
  144. the 16 megabyte protected mode space. The addresses from 0E0000 to 0FFFFF are
  145. equal to FE0000 to FFFFFF. This is necessary due to differences in the memory
  146. addressing between Real and Protected Modes.
  147.  
  148.  
  149. PC PORT ASSIGNMENT, Intel 8088, 80C88, 8086, 80286, 80386 CPUs├────────────────
  150.  
  151. hex addr.                    Function
  152.  
  153. 0000-000F       8237 DMA controller
  154. 0010-001F       8237 DMA controller  (AT, PS/2)
  155. 0020-0027       8259A interrupt controller
  156. 0020-003F       8259A interrupt controller  (AT)
  157. 0040-005F       8253-5 programmable timers
  158.                 (note: 0041 was memory refresh in PCs. Not used in PS/2)
  159. 0060-0067       8255 peripheral interface
  160. 0060-006F       8042 keyboard controller  (AT)
  161. 0200-020F       game-control adapter
  162. 0210-0217       expansion box (PC, XT)
  163. 0278-027F       LPT3
  164. 02F8-02FF       COM2
  165. 0300-031F       prototype card
  166. 0320-032F       hard disk controller 
  167. 0378-037F       LPT2
  168. 03BC-03BF       LPT1
  169. 03D0-03DF       CGA, MCGA, VGA adapter control
  170. 03F0-03F7       floppy disk controller
  171. 03F8-03FF       COM1
  172.  
  173. note:   These are functions common across the IBM range. The PCjr, PC 
  174.         Convertible and PS/2 (both buses) have enhancements. In some cases, the
  175.         AT and PS/2 series ignore, duplicate, or reassign ports arbitrarily. If
  176.         your code incorporates specific port addresses for video or system board
  177.         control it would be wise to have your application determine the machine
  178.         type and video adapter and address the ports as required.
  179.  
  180.  
  181.  
  182. RESERVED MEMORY LOCATIONS IN THE IBM PC├───────────────────────────────────────
  183.  
  184. ┌──────────────────────────────────────────────────────────────────────────────
  185. │ 000-3FF  - 1k DOS interrupt vector table, 4 byte vectors for ints 00h-0FFh.
  186. │   30:00  - used as a stack area during POST and bootstrap routines. This
  187. │to 3F:FF    stack area may be revectored by an application program.
  188. ├──────────────────────────────────────────────────────────────────────────────
  189. │ ** The BIOS Data Area ** addresses from 400h to 4FFh
  190. ├─────┬───────┬────────────────────────────────────────────────────────────────
  191. │addr.│ size  │           description
  192. ├─────┼───────┼────────────────────────────────────────────────────────────────
  193. │40:00│  word │ COM1 port address |   These addresses are zeroed out in the
  194. │40:02│  word │ COM2 port address |   OS/2 DOS Compatibility Box if any of
  195. │40:04│  word │ COM3 port address |   the OS/2 COM??.SYS drivers are loaded.
  196. │40:06│  word │ COM4 port address |  
  197. │40:08│  word │ LPT1 port address
  198. │40:0A│  word │ LPT2 port address
  199. │40:0C│  word │ LPT3 port address
  200. │40:0E│  word │ LPT4 port address        (not valid in PS/2 machines)
  201. │40:0E│  word │ PS/2 pointer to 1k extended BIOS Data Area at top of RAM
  202. │40:10│  word │ equipment flag (see int 11h)
  203. └─────┴───────┤ bits:
  204.               │ 0       1 if floppy drive present (see bits 6&7)  0 if not
  205.               │ 1       1 if 80x87 installed  (not valid in PCjr)
  206.               │ 2,3     system board RAM   (not used on AT or PS/2)
  207.               │         0,0     16k             0,1     32k
  208.               │         1,0     48k             1,1     64k
  209.               │ 4,5     initial video mode
  210.               │         0,0     no video adapter
  211.               │         0,1     40 column color  (PCjr default)
  212.               │         1,0     80 column color
  213.               │         1,1     MDA
  214.               │ 6,7     number of diskette drives
  215.               │         0,0     1 drive         0,1     2 drives
  216.               │         1,0     3 drives        1,1     4 drives
  217.               │ 8       0       DMA present
  218.               │         1       DMA not present (PCjr, Tandy 1400, Sanyo 55x)
  219.               │ 9,A,B   number of RS232 serial ports
  220.               │ C       game adapter  (joystick)
  221.               │         0       no game adapter
  222.               │         1       if game adapter
  223.               │         D        serial printer (PCjr only)
  224.               │         0       no printer
  225.               │         1       serial printer present
  226.        ┌──────┘ E,F     number of parallel printers installed
  227.        │note 1) The IBM PC and AT store the settings of the system board
  228.        └───┐    switches or CMOS RAM setup information (as obtained by the BIOS
  229.            │    in the Power-On Self Test (POST)) at addresses 40:10h and
  230.            │    40:13h. 00000001b indicates "on", 00000000b is "off".
  231.            │ 2) CMOS RAM map, PC/AT:
  232.            │    offset          contents
  233.            │    00h         Seconds
  234.            │    01h         Second Alarm
  235.            │    02h         Minutes
  236.            │    03h         Minute Alarm
  237.            │    04h         Hours
  238.            │    05h         Hour Alarm
  239.            │    06h         Day of the Week
  240.            │    07h         Day of the Month
  241.            │    08h         Month
  242.            │    09h         Year
  243.            │    0Ah         Status Register A
  244.            │    0Bh         Status Register B
  245.            │    0Ch         Status Register C
  246.            │    0Dh         Status Register D
  247.            │    0Eh         Diagnostic Status Byte
  248.            │    0Fh         Shutdown Status Byte
  249.            │    10h         Disk Drive Type for Drives A: and B:
  250.            │                The drive-type bytes use bits 0:3 for the first
  251.            │                drive and 4:7 for the other
  252.            │                Disk drive types:
  253.            │                00h         no drive present
  254.            │                01h         double sided 360k
  255.            │                02h         high capacity (1.2 meg)
  256.            │                03h-0Fh     reserved
  257.            │    11h         (AT):Reserved    (PS/2):drive type for hard disk C:
  258.            │    12h         (PS/2):drive type for hard disk D:
  259.            │                (AT, XT/286):hard disk type for drives C: and D:
  260.            │                Format of drive-type entry for AT, XT/286:
  261.            │                0       number of cyls in drive (0-1023 allowed)
  262.            │                2       number of heads per drive (0-15 allowed)
  263.            │                3       starting reduced write compensation (not
  264.            │                        used on AT)
  265.            │                5       starting cylinder for write compensation
  266.            │                7       max. ECC data burst length, XT only
  267.            │                8       control byte
  268.            │                        Bit
  269.            │                        7    disable disk-access retries
  270.            │                        6    disable ECC retries
  271.            │                        5-4  reserved, set to zero
  272.            │                        3    more than 8 heads
  273.            │                        2-0  drive option on XT (not used by AT)
  274.            │                9       timeout value for XT (not used by AT)
  275.            │               12       landing zone cylinder number
  276.            │               14       number of sectors per track (default 17,
  277.            │                        0-17 allowed)
  278.            │    13h         Reserved
  279.            │    14h         Equipment Byte (corresponds to sw. 1 on PC and XT)
  280.            │    15h-16h     Base Memory Size      (low,high)
  281.            │    17h-18h     Expansion Memory Size (low,high)
  282.            │    19h-20h     Reserved
  283.            │                (PS/2) POS information Model 50 (60 and 80 use a 2k
  284.            │                CMOS RAM that is not accessible through software)
  285.            │    21h-2Dh     Reserved (not checksumed)
  286.            │    2Eh-2Fh     Checksum of Bytes 10 Through 20  (low,high)
  287.            │    30h-31h     Exp. Memory Size as Det. by POST (low,high)
  288.            │    32h         Date Century Byte
  289.            │    33h         Information Flags (set during power-on)
  290.            │    34h-3Fh     Reserved
  291.            │ 3) The alarm function is used to drive the BIOS WAIT function
  292.            │    (int 15h function 90h).
  293.            │ 4) To access the configuration RAM write the byte address (00-3Fh)
  294.            │    you need to access to I/O port 70h, then access the data via
  295.            │    I/O port 71h.
  296.            │ 5) CMOS RAM chip is a Motorola 146818
  297.            │ 6) The equipment byte is used to determine the configuration for
  298.            │    the POST power-on diagnostics.
  299.            │ 7) Bytes 00-0Dh are defined by the chip for timing functions,
  300.            │    bytes 0Eh-3Fh  are defined by IBM.
  301.            │ 8) Compaq 386 uses came CMOS chip as IBM AT. Extra functions:
  302.            │    byte 45 (2Dh) store aditional info not maintained by AT
  303.            │    bit 0 indicates is Compaq dual-mode monitor isntalled
  304.            │        1 indicates whether keyclick is enabled
  305.            │        2 not used
  306. ┌─────┬────┴──┐     3 if non-Compaq graphics adapter installed
  307. │40:12│  byte │ reserved (PC, AT)
  308. └─────┴───────┤ number of errors detected by infrared keyboard link (PCjr)
  309. ┌─────┬───────┤ POST status (Convertible)
  310. │40:13│  word │ availible memory size in Kbytes (less display RAM in PCjr)
  311. ├─────┼───────┤ this is the value returned by int 12h
  312. │40:15│  word │ reserved
  313. │40:17│  byte │ keyboard flag byte 0 (see int 9h)
  314. └─────┴───────┤ bit 7  insert mode on      3  alt pressed
  315.               │     6  capslock on         2  ctrl pressed
  316.               │     5  numlock on          1  left shift pressed
  317. ┌─────┬───────┤     4  scrollock on        0  right shift pressed
  318. │40:18│  byte │ keyboard flag byte 1 (see int 9h)
  319. └─────┴───────┤ bit 7  insert pressed      3  ctrl-numlock (pause) toggled
  320.               │     6  capslock pressed    2  PCjr keyboard click active
  321.               │     5  numlock pressed     1  PCjr ctrl-alt-capslock held
  322. ┌─────┬───────┤     4  scrollock pressed   0
  323. │40:19│  byte │ storage for alternate keypad entry (not normally used)
  324. │40:1A│  word │ pointer to keyboard buffer head character
  325. │40:1C│  word │ pointer to keyboard buffer tail character
  326. │40:1E│32bytes│ 16 2-byte entries for keyboard circular buffer, read by int 16h
  327. │40:3E│  byte │ drive seek status - if bit=0, next seek will recalibrate by
  328. └─────┴───────┤ repositioning to Track 0.     
  329.               │ bit 3  drive D          bit 2  drive C
  330. ┌─────┬───────┤     1  drive B              0  drive A
  331. │40:3F│  byte │ diskette motor status (bit set to indicate condition)
  332. └─────┴───────┤ bit 7  write in progress    3  motor on (floppy 3)
  333.               │     6                       2  motor on (floppy 2)
  334.               │     5                       1  B: motor on (floppy 1)
  335. ┌─────┬───────┤     4                       0  A: motor on (floppy 0)
  336. │40:40│  byte │ motor off counter
  337. │     │       │ starts at 37 and is decremented 1 by each system clock tick.
  338. │     │       │ motor is shut off when count = 0.
  339. │40:41│  byte │ status of last diskette operation     where:
  340. └─────┴───────┤ bit 7 timeout failure                3 DMA overrun
  341.               │     6 seek failure                   2 sector not found
  342.               │     5 controller failure             1 address not found
  343. ┌─────┬───────┤     4 CRC failure                    0 bad command
  344. │40:42│7 bytes│ NEC status
  345. │40:49│  byte │ current CRT mode (hex value)
  346. └─────┴───────┤    00h 40x25 BW      (CGA)          01h 40x25 color   (CGA)
  347.               │    02h 80x25 BW      (CGA)          03h 80x25 color   (CGA)
  348.               │    04h 320x200 color (CGA)          05h 320x200 BW    (CGA)
  349.               │    06h 640x200 BW    (CGA)          07h monochrome    (MDA)  
  350.               │extended video modes (EGA/MCGA/VGA or other)
  351.               │    08h lores,16 color               09h med res,16 color
  352.               │    0Ah hires,4 color                0Bh n/a
  353.               │    0Ch med res,16 color             0Dh hires,16 color   
  354. ┌─────┬───────┤    0Eh hires,4 color                0Fh hires,64 color 
  355. │40:4A│  word │ number of columns on screen, coded as hex number of columns
  356. └─────┴───────┤ 20 col = 14h  (video mode 8, low res 160x200 CGA graphics)
  357.               │ 40 col = 28h
  358. ┌─────┬───────┤ 80 col = 46h
  359. │40:4C│  word │ screen buffer length in bytes
  360. ├─────┼───────┤(number of bytes used per screen page, varies with video mode)
  361. │40:4E│  word │ current screen buffer starting offset (active page)
  362. │40:50│8 words│ cursor position pages 1-8
  363. └─────────────┤ the first byte of each word gives the column (0-19, 39, or 79)
  364. ┌─────┬───────┤ the second byte gives the row (0-24)
  365. │40:60│  byte │ end line for cursor   (normally 1)
  366. │40:61│  byte │ start line for cursor (normally 0)
  367. │40:62│  byte │ current video page being displayed  (0-7)
  368. │40:63│  word │ base port address of 6845 CRT controller or equivalent
  369. ├─────┼───────┤ for active display           3B4h=mono, 3D4h=color
  370. │40:65│  byte │ current setting of the CRT mode register
  371. │40:66│  byte │ current palette mask setting  (CGA)
  372. │40:67│5 bytes│ temporary storage for SS:SP during shutdown (cassette interface)
  373. │40:6C│  word │ timer counter low word
  374. │40:6E│  word │ timer counter high word
  375. │40:69│  byte │ HD_INSTALL (Columbia PCs) (not valid on most clone computers)
  376. └─────┴───────┤ bit  0 = 0  8 inch external floppy drives
  377.               │          1  5-1/4 external floppy drives
  378.               │      1,2 =  highest drive address which int 13 will accept
  379.               │             (since the floppy drives are assigned 0-3, subtract
  380.               │             3 to obtain the number of hard disks installed)
  381.               │      4,5 =  # of hard disks connected to expansion controller
  382.               │      6,7 =  # of hard disks on motherboard controller
  383.               │             (if bit 6 or 7 = 1, no A: floppy is present and
  384. ┌─────┬───────┤             the maximum number of floppies from int 11 is 3)
  385. │40:70│  byte │ 24 hour timer overflow 1 if timer went past midnight
  386. ├─────┼───────┤ it is reset to 0 each time it is read by int 1Ah
  387. │40:71│  byte │ BIOS break flag (bit 7 = 1 means break key hit)
  388. │40:72│  word │ reset flag 
  389. └─────┴───────┤ PCjr keeps 1234h here for softboot when a cartridge is installed
  390.               │ bits 1234h = soft reset, memory check will be bypassed
  391.               │      4321h = preserve memory (PS/2 other only)
  392.               │      5678h = system suspended (Convertible)
  393.               │      9ABCh = manufacturing test mode (Convertible)
  394. ┌─────┬───────┤      ABCDh = system POST loop mode (Convertible)
  395. │40:74│  byte │ status of last hard disk operation; PCjr special disk control
  396. │40:75│  byte │ # of hard disks attached (0-2)    ; PCjr special disk control
  397. │40:76│  byte │ HD control byte; temp holding area for 6th param table entry
  398. │40:77│  byte │ port offset to current hd adapter ; PCjr special disk control
  399. │40:78│4 bytes│ timeout value for LPT1,LPT2,LPT3,LPT4
  400. │40:7C│4 bytes│ timeout value for COM1,COM2,COM3,COM4 (0-0FFh secs, default 1)
  401. │40:80│  word │ pointer to start of circular keyboard buffer, default 03:1E
  402. │40:82│  word │ pointer to end of circular keyboard buffer, default 03:3E
  403. │40:84│  byte │ rows on the screen minus 1 (EGA only)
  404. │40:84│  byte │ PCjr interrupt flag; timer channel 0  (used by POST)
  405. │40:85│  word │ bytes per character (EGA only)
  406. │40:85│2 bytes│ (PCjr only) typamatic char to repeat
  407. │40:86│2 bytes│ (PCjr only) typamatic initial delay
  408. │40:87│  byte │ mode options (EGA only)
  409. └─────┴───────┤ bit 1   0 = EGA is connected to a color display
  410.               │         1 = EGA is monochrome.
  411.               │ bit 3   0 = EGA is the active display,
  412.               │         1 = "other" display is active.
  413.               │ mode combinations:
  414.               │ bit3  Bit1     Meaning
  415.               │   0     0   EGA is active display and is color
  416.               │   0     1   EGA is active display and is monochrome
  417.               │   1     0   EGA is not active, a mono card is active
  418. ┌─────┬───────┤   1     1   EGA is not active, a CGA is active
  419. │40:87│  byte │ (PCjr only) current Fn key code
  420. │40:88│  byte │ feature bit switches (EGA only) 0=on, 1=off
  421. └─────┴───────┤ bit 3 = switch 4 
  422.               │ bit 2 = switch 3
  423.               │ bit 1 = switch 2
  424. ┌─────┬───────┤ bit 0 = switch 1
  425. │40:88│  byte │ (PCjr only) special keyboard status byte
  426. └─────┴───────┤ bit 7 function flag      3 typamatic (0=enable,1=disable)
  427.               │     6 Fn-B break         2 typamatic speed (0=slow,1=fast)
  428.               │     5 Fn pressed         1 extra delay bef.typamatic (0=enable)
  429. ┌─────┬───────┤     4 Fn lock            0 write char, typamatic delay elapsed
  430. │40:89│  byte │ PCjr, current value of 6845 reg 2 (horiz.synch) used by
  431. ├─────┼───────┤ ctrl-alt-cursor screen positioning routine in ROM
  432. │40:8A│  byte │ PCjr CRT/CPU Page Register Image, default 3Fh
  433. │40:8B│  byte │ last diskette data rate selected
  434. │40:8C│  byte │ hard disk status returned by controller
  435. │40:8D│  byte │ hard disk error returned by controller
  436. │40:8E│  byte │ hard disk interrupt (bit 7=working int)
  437. │40:90│4 bytes│ media state drive 0, 1, 2, 3
  438. │40:94│2 bytes│ track currently seeked to drive 0, 1
  439. │40:96│  byte │ keyboard flag byte 3 (see int 9h)
  440. │40:97│  byte │ keyboard flag byte 2 (see int 9h)
  441. │40:98│ dword │ segment:offset pointer to users wait flag
  442. │40:9C│ dword │ users timeout value in microseconds
  443. │40:A0│  byte │ real time clock wait function in use
  444. └─────┴───────┤ bits 7    wait time elapsed and posted flag
  445.               │      6-1  reserved
  446. ┌─────┬───────┤      0    int 15h, function 86h (WAIT) has occurred
  447. │40:A1│  byte │ LAN A DMA channel flags
  448. │40:A2│2 bytes│ status LAN A 0,1
  449. │40:A4│ dword │ saved hard disk interrupt vector
  450. │40:A8│ dword │ EGA pointer to table of 7 parameters. Format of table:
  451. └─────┴───────┤ dword   pointer to 1472 byte table containing 64 video parms
  452.               │ dword   reserved
  453.               │ dword   reserved
  454.               │ dword   reserved
  455.               │ dword   reserved
  456.               │ dword   reserved
  457. ┌─────┬───────┤ dword   reserved
  458. │40:B4│  byte │ keyboard NMI control flags              (Convertible)
  459. │40:B5│ dword │ keyboard break pending flags            (Convertible)
  460. │40:B9│  byte │ port 60 single byte queue               (Convertible)
  461. │40:BA│  byte │ scan code of last key                   (Convertible)
  462. │40:BB│  byte │ pointer to NMI buffer head              (Convertible)
  463. │40:BC│  byte │ pointer to NMI buffer tail              (Convertible)
  464. │40:BD│16bytes│ NMI scan code buffer                    (Convertible)
  465. │40:CE│  word │ day counter                             (Convertible and after)
  466. │  to │ -04:8F│               end of BIOS Data Area
  467. ├─────┴───────┴────────────────────────────────────────────────────────────────
  468. │ ** End of BIOS Data Area ** 
  469. ├─────┬───────┬────────────────────────────────────────────────────────────────
  470. │40:90│-40:EF │ reserved by IBM
  471.  
  472. 04:F0 16 bytes Inter-Application Communications Area (for use by applications
  473. 04:FF          to transfer data or parameters to each other)
  474.  
  475. 05:00  byte    DOS print screen status flag
  476.                         00h    not active or successful completion
  477.                         01h    print screen in progress
  478.                         0FFh   error during print screen operation
  479. 05:01          Used by BASIC
  480. 05:02-03       PCjr POST and diagnostics work area
  481. 05:04  byte    Single drive mode status byte
  482.                         00     logical drive A
  483.                         01     logical drive B
  484. 05:05-0E       PCjr POST and diagnostics work area
  485. 05:0F          BASIC: SHELL flag (set to 02h if there is a current SHELL)
  486. 05:10  word    BASIC: segment address storage (set with DEF SEG)
  487. 05:12  4 bytes BASIC: int 1Ch clock interrupt vector segment:offset storage
  488. 05:16  4 bytes BASIC: int 23h ctrl-break interrupt segment:offset storage
  489. 05:1A  4 bytes BASIC: int 24h disk error interrupt vector segment:offset storage
  490. 05:1B-1F       Used by BASIC for dynamic storage
  491. 05:20-21       Used by DOS for dynamic storage
  492. 05:22-2C       Used by DOS for diskette parameter table. See int 1Eh for values
  493. 05:30-33       Used by MODE command
  494. 05:34-FF       Unknown - Reserved for DOS
  495.  
  496.  
  497. AT ABSOLUTE ADDRESSES├─────────────────────────────────────────────────────────
  498.  
  499. 0008:0047 IO.SYS or IBMBIO.COM IRET instruction. This is the dummy routine that
  500.           interrupts 01h, 03h, and 0Fh are initialized to during POST. 
  501. C000:001E EGA BIOS signature (the letters IBM)
  502. F000:FA6E table of characters 00h-7Fh used by int 10 video BIOS
  503. F000:FFF5 BIOS release date
  504. F000:FFFE PC model identification
  505.  
  506.      ┌─────────────────────────────────────────────────────────────────────┐
  507.      │ ROM BIOS    ┌ model byte                                            │
  508.      │ copyright   │     ┌ submodel byte         machine                   │
  509.      │   date      │     │    ┌ revision                                   │
  510.      ├──────────┼────┼────┼────┼───────────────────────────────────────────┤
  511.      │ 09/02/86 │ FA │ 00 │ 00 │ PS/2 Model 30                             │
  512.      │ 01/10/86 │ FB │ 00 │ 01 │ XT                                        │
  513.      │ 01/10/86 │ FB │ 01 │ 00 │ XT-2 (early)     (640k motherboard        │
  514.      │ 05/09/86 │ FB │    │    │ XT-2 (revised)   (640k motherboard)       │
  515.      │ 01/10/84 │ FC │ -- │ -- │ AT                                        │
  516.      │ 06/10/85 │ FC │ 00 │ 01 │ AT Model 239 6mHz (6.6 max governor)      │
  517.      │ 11/15/85 │ FC │ 01 │ 00 │ AT Model 319, 339 8mHz (8.6 max governor) │
  518.      │ 04/21/86 │ FC │ 02 │ 00 │ XT/286                                    │
  519.      │ 02/13/87 │ FC │ 04 │ 00 │ PS/2 Model 50                             │
  520.      │ 02/13/87 │ FC │ 05 │ 00 │ PS/2 Model 60                             │
  521.      │          │ FC │ 00 │    │ 7531/2 Industrial AT                      │
  522.      │          │ FC │ 06 │    │ 7552 "Gearbox"                            │
  523.      │ 06/01/83 │ FD │ -- │ -- │ PCjr                                      │
  524.      │ 11/08/82 │ FE │ -- │ -- │ XT, Portable PC, XT/370, 3270PC           │
  525.      │ 04/24/81 │ FF │ -- │ -- │ PC-0             (16k motherboard)        │
  526.      │ 10/19/81 │ FF │ -- │ -- │ PC-1             (64k motherboard)        │
  527.      │ 08/16/82 │ FF │ -- │ -- │ PC, XT, XT/370   (256k motherboard)       │
  528.      │ 10/27/82 │ FF │ -- │ -- │ PC, XT, XT/370   (256k motherboard)       │
  529.      │     1987 │ F8 │ 00 │ 00 │ PS/2 Model 80                             │
  530.      │ 09/13/85 │ F9 │ 00 │ 00 │ Convertible                               │
  531.      │          │ 2D │ -- │ -- │ Compaq PC (4.77)                          │
  532.      │          │ 9A │ -- │ -- │ Compaq Plus (XT)                          │
  533.      └──────────┴────┴────┴────┴───────────────────────────────────────────┘
  534.  
  535.  
  536.  
  537.  
  538. THE IBM PC SYSTEM INTERRUPTS (Overview)├───────────────────────────────────────
  539.  
  540.  The interrupt table is stored in the very lowest location in memory, starting 
  541. at 0000:0000h. The locations are offset from segment 0, ie location 0000h has
  542. the address for int 0, etc. The table is 1024 bytes in length and contains 256 
  543. four byte vectors from 00h to 0FFh. Each address' location in memory can be
  544. found by multiplying the interrupt number by 4. For example, int 7 could be
  545. found by (7x4=28) or 1Bh (0000:001Bh).
  546.  These interrupt vectors normally point to ROM tables or are taken over by DOS 
  547. when an application is run. Some applications revector these interrupts to 
  548. their own code to change the way the system responds to the user.
  549.  
  550. ┌─────────────────────┬────────────────────────────────────────────────────────┐
  551. │  Interrupt Address  │                                                        │
  552. ├───────┬───────┬─────┘                        Function                        │
  553. │ Number│ (Hex) │ type                                                         │
  554. ├───────┼───────┼─────┬────────────────────────────────────────────────────────┤
  555. │   0   │ 00-03 │ CPU │  Divide by Zero                                        │
  556. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  557. │   1   │ 04-07 │ CPU │  Single Step                                           │
  558. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  559. │   2   │ 08-0B │ CPU │  Nonmaskable                                           │
  560. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  561. │   3   │ 0C-0F │ CPU │  Breakpoint                                            │
  562. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  563. │   4   │ 10-13 │ CPU │  Overflow                                              │
  564. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  565. │   5   │ 14-17 │ BIOS│  Print Screen                                          │
  566. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  567. │   6   │ 18-1B │ hdw │  Reserved                                              │
  568. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  569. │   7   │ 1C-1F │ hdw │  Reserved                                              │
  570. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  571. │   8   │ 20-23 │ hdw │  Time of Day                                           │
  572. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  573. │   9   │ 24-27 │ hdw │  Keyboard                                              │
  574. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  575. │   A   │ 28-2B │ hdw │  Reserved                                              │
  576. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  577. │   B   │ 2C-2F │ hdw │  Communications (8259)                                 │
  578. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  579. │   C   │ 30-33 │ hdw │  Communications                                        │
  580. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  581. │   D   │ 34-37 │ hdw │  Disk                                                  │
  582. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  583. │   E   │ 38-3B │ hdw │  Diskette                                              │
  584. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  585. │   F   │ 3C-3F │ hdw │  Printer                                               │
  586. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  587. │   10  │ 40-43 │ BIOS│  Video                                                 │
  588. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  589. │   11  │ 44-47 │ BIOS│  Equipment Check                                       │
  590. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  591. │   12  │ 48-4B │ BIOS│  Memory                                                │
  592. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  593. │   13  │ 4C-4F │ BIOS│  Diskette/Disk                                         │
  594. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  595. │   14  │ 50-53 │ BIOS│  Serial Communications                                 │
  596. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  597. │   15  │ 54-57 │ BIOS│  Cassette, System Services                             │
  598. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  599. │   16  │ 58-5B │ BIOS│  Keyboard                                              │
  600. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  601. │   17  │ 5C-5F │ BIOS│  Parallel Printer                                      │
  602. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  603. │   18  │ 60-63 │ BIOS│  ROM BASIC Loader                                      │
  604. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  605. │   19  │ 64-67 │ BIOS│  Bootstrap Loader                                      │
  606. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  607. │   1A  │ 68-6B │ BIOS│  Time of Day                                           │
  608. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  609. │   1B  │ 6C-6F │ BIOS│  Keyboard Break                                        │
  610. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  611. │   1C  │ 70-73 │ BIOS│  Timer Tick                                            │
  612. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  613. │   1D  │ 74-77 │ BIOS│  Video Initialization                                  │
  614. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  615. │   1E  │ 78-7B │ BIOS│  Diskette Parameters                                   │
  616. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  617. │   1F  │ 7C-7F │ BIOS│  Video Graphics Characters, second set                 │
  618. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  619. │   20  │ 80-83 │ DOS │  General Program Termination                           │
  620. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  621. │   21  │ 84-87 │ DOS │  DOS Services Function Request                         │
  622. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  623. │   22  │ 88-8B │ DOS │  Called Program Termination Address                    │
  624. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  625. │   23  │ 8C-8F │ DOS │  Control Break Termination Address                     │
  626. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  627. │   24  │ 90-93 │ DOS │  Critical Error Handler                                │
  628. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  629. │   25  │ 94-97 │ DOS │  Absolute Disk Read                                    │
  630. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  631. │   26  │ 98-9B │ DOS │  Absolute Disk Write                                   │
  632. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  633. │   27  │ 9C-9F │ DOS │  Terminate and Stay Resident                           │
  634. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  635. │ 28-3F │ A0-FF │ DOS │  Reserved for DOS                                      │
  636. └───────┴───────┴─────┼────────────────────────────────────────────────────────┤
  637.                       │ *29h   Fast Screen Write                               │
  638.                       │ *2Ah   Microsoft Networks - Session Layer Interrupt    │
  639.                       │  2Fh   Multiplex Interrupt                             │
  640.                       │ *30h   Far jump instruction for CP/M-style calls       │
  641.                       │  33h   Used by Microsoft Mouse Driver                  │
  642. ┌───────┬───────┬─────┼────────────────────────────────────────────────────────┤
  643. │ 40-43 │100-115│ BIOS│  Reserved for BIOS                                     │
  644. └───────┴───────┴─────┼────────────────────────────────────────────────────────┤
  645.                       │  40h   Hard Disk BIOS                                  │
  646.                       │  41h   Hard Disk Parameters  (except PC1)              │
  647.                       │  42h   Pointer to screen BIOS entry  (EGA, VGA, PS/2)  │
  648.                       │  43h   Pointer to EGA initialization parameter table   │
  649. ┌───────┬───────┬─────┼────────────────────────────────────────────────────────┤
  650. │   44  │116-119│ BIOS│  First 128 Graphics Characters                         │
  651. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  652. │ 45-47 │120-131│ BIOS│  Reserved for BIOS                                     │
  653. └───────┴───────┴─────┼────────────────────────────────────────────────────────┤
  654.                       │  45h   Reserved by IBM  (not initialized)              │
  655.                       │  46h   Pointer to hard disk 2 params (AT, PS/2)        │
  656.                       │  47h   Reserved by IBM  (not initialized)              │
  657. ┌───────┬───────┬─────┼────────────────────────────────────────────────────────┤
  658. │   48  │132-135│ BIOS│  PCjr Cordless Keyboard Translation                    │
  659. ├───────┼───────┼─────┼────────────────────────────────────────────────────────┤
  660. │   49  │136-139│ BIOS│  PCjr Non-Keyboard Scancode Translation Table          │
  661. └───────┴───────┴─────┼────────────────────────────────────────────────────────┤
  662.                       │  4Ah   Real-Time Clock Alarm (Convertible, PS/2)       │
  663. ┌───────┬───────┬─────┼────────────────────────────────────────────────────────┤
  664. │ 50-5F │140-17F│ BIOS│  Reserved for BIOS                                     │
  665. └───────┴───────┴─────┼────────────────────────────────────────────────────────┤
  666.                       │  5Ah   Cluster Adapter BIOS entry address              │
  667.                       │ *5Bh   IBM  (cluster adapter?)                         │
  668.                       │  5Ch   NETBIOS interface entry port                    │
  669. ┌───────┬───────┬─────┴────────────────────────────────────────────────────────┤
  670. │ 60-67 │180-19F│  User Program Interrupts (availible for general use)         │
  671. └───────┴───────┴─────┬────────────────────────────────────────────────────────┤
  672.                       │  60h   10-Net Network                                  │
  673.                       │  67h   Used by LIM & AQA EMS, EEMS                     │
  674. ┌───────┬───────┬─────┴────────────────────────────────────────────────────────┤
  675. │ 68-7F │1A0-1FF│  Reserved by IBM                                             │
  676. └───────┴───────┴─────┬────────────────────────────────────────────────────────┤
  677.                       │  6Ch   System Resume Vector (Convertible)              │
  678.                       │  6Fh   some Novell and 10-Net API functions            │
  679.                       │  70h   IRQ 8, Real Time Clock Interrupt (AT, PS/2)     │
  680.                       │  71h   IRQ 9, LAN Adapter 1                            │
  681.                       │  72h   IRQ 10  (AT, XT/286, PS/2)  Reserved            │
  682.                       │  73h   IRQ 11  (AT, XT/286, PS/2)  Reserved            │
  683.                       │  74h   IRQ 12  Mouse Interrupt (PS/2)                  │
  684.                       │  75h   IRQ 13, Coprocessor Error                       │
  685.                       │  76h   IRQ 14, Hard Disk Controller (AT, PS/2)         │
  686.                       │  77h   IRQ 15 (AT, XT/286, PS/2)  Reserved             │
  687.                       │  7Ch   IBM REXX88PC command language                   │
  688. ┌───────┬───────┬─────┴────────────────────────────────────────────────────────┤
  689. │ 80-85 │200-217│  ROM BASIC                                                   │
  690. ├───────┼───────┼──────────────────────────────────────────────────────────────┤
  691. │ 86-F0 │218-3C3│  Used by BASIC Interpreter When BASIC is running             │
  692. ├───────┼───────┼──────────────────────────────────────────────────────────────┤
  693. │ F1-FF │3C4-3FF│  Reserved by IBM                                             │
  694. └───────┴───────┴──────┬───────────────────────────────────────────────────────┤
  695.                        │  0F1h-0FFh  Interprocess Communications Area          │
  696.                        │ *0F8h  Set Shell Interrupt (OEM)                      │
  697.                        │ *0F9h  OEM SHELL service codes                        │
  698.                        │  0FAh  USART ready (RS-232C)                          │
  699.                        │  0FBh  USART RS ready (keyboard)                      │
  700.                        │ *0FEh  used on '283 & '386                            │
  701.                        │ *0FFh  used on '283 & '386                            │
  702.                        └───────────────────────────────────────────────────────┘
  703.  
  704.  
  705.  
  706.  
  707. THE IBM-PC SYSTEM INTERRUPTS (in detail)├──────────────────────────────────────
  708.  
  709. ┌─────────────────────────────────────────────────────────────────────────────┐
  710. │Interrupt  00h Divide by Zero                                                │
  711. └─────────────────────────────────────────────────────────────────────────────┘
  712. (0:0000h) (processor error). Automatically called at end of DIV or IDIV
  713.           operation that results in error. Normally set by DOS to display an
  714.           error message and abort the program.
  715.  
  716.  
  717. ┌─────────────────────────────────────────────────────────────────────────────┐
  718. │Interrupt  01h Single step                                                   │
  719. └─────────────────────────────────────────────────────────────────────────────┘
  720. (0:0004h) Taken after every instruction when CPU Trap Flag indicates
  721.           single-step mode (bit 8 of FLAGS is 1). This is what makes the T
  722.           command of DEBUG work for single stepping. Is not generated after MOV
  723.           to segment register or POP of segment register. (unless you have a
  724.           very early 8088 with the microcode bug).
  725.  
  726.  
  727. ┌─────────────────────────────────────────────────────────────────────────────┐
  728. │Interrupt  02h Non-maskable interrupt                                        │
  729. └─────────────────────────────────────────────────────────────────────────────┘
  730. (0:0008h)       Vector not disabled via CLI. Generated by NMI signal in
  731.                 hardware. This signal has various uses:
  732.                   POST parity error
  733.                   Parity error: all except Jr and Convertible
  734.                   8087 Coprocessor interrupt: all except Jr and Convertible
  735.                   Keyboard interrupt: Jr, Convertible
  736.                   I/O channel check: Convertible, PS50+
  737.                   Disk-controller power-on request: Convertible
  738.                   System suspend: Convertible
  739.                   Real-time clock: Convertible 
  740.                   System watch-dog timer, time-out interrupt: PS50+
  741.                   DMA timer time-out interrupt: PS50+
  742.                   Infrared keyboard link: PCjr
  743.  
  744.  
  745. ┌─────────────────────────────────────────────────────────────────────────────┐
  746. │Interrupt  03h Breakpoint                                                    │
  747. └─────────────────────────────────────────────────────────────────────────────┘
  748. (0:000Ch)  Taken when CPU executes the 1-byte int 3 (0CCh). Similar to 8080's
  749. (internal) RST instruction. Generally used to set breakpoints for DEBUG.
  750.            Also used by Turbo Pascal versions 1,2,3 when {$U+} specified
  751.  
  752.  
  753. ┌─────────────────────────────────────────────────────────────────────────────┐
  754. │Interrupt  04h Divide overflow                                               │
  755. └─────────────────────────────────────────────────────────────────────────────┘
  756. (0:0010h) Generated by INTO instruction if OF flag is set. If flag is not set,
  757. (internal) INTO is effectively a NOP. Used to trap any arithmetic errors when
  758.           program is ready to handle them rather than immediately when they
  759.           occur.
  760.  
  761.  
  762. ┌─────────────────────────────────────────────────────────────────────────────┐
  763. │Interrupt  05h Print Screen                                                  │
  764. └─────────────────────────────────────────────────────────────────────────────┘
  765. (0:0014h) service dumps the screen to the printer. Invoked by int 9 for shifted
  766.           key 55 (PrtSc). Automatically called by keyboard scan when PrtSc key
  767.           is pressed. Normally executes a routine to print the screen, but may
  768.           call any routine that can safely be executed from inside the keyboard
  769.           scanner. Status and result byte are at address 0050:0000.
  770. (internal) BOUND check failed (80186/80286)
  771.            Generated by BOUND instruction when the value to be tested is less
  772.            than the indicated lower bound or greater than the indicated upper
  773.            bound.
  774.  
  775. entry   AH      05h
  776. return  absolute address 50:0   
  777.         00h     print screen has not been called, or upon return from a call 
  778.                 there were no errors.
  779.         01h     print screen is already in progress.
  780.         0FFh    error encountered during printing.
  781. note 1) Uses BIOS services to read the screen
  782.      2) Output is directed to LPT1
  783.      3) Revectored into GRAPHICS.COM if GRAPHICS.COM is loaded
  784.  
  785.  
  786. ┌─────────────────────────────────────────────────────────────────────────────┐
  787. │Interrupt  06h Reserved by IBM                                               │
  788. └─────────────────────────────────────────────────────────────────────────────┘
  789. (0:0018h)
  790. (internal) undefined opcode (80286)
  791.  
  792.  
  793. ┌─────────────────────────────────────────────────────────────────────────────┐
  794. │Interrupt  07h Reserved by IBM                                               │
  795. └─────────────────────────────────────────────────────────────────────────────┘
  796. (0:00C0h)
  797. (internal) no math unit available (80286)
  798.  
  799.  
  800. ┌─────────────────────────────────────────────────────────────────────────────┐
  801. │Interrupt  08h Timer                                                         │
  802. └─────────────────────────────────────────────────────────────────────────────┘
  803. (0:0020h) 55ms timer "tick" taken 18.2 times per second. Updates BIOS clock and
  804. (IRQ0)    turns off diskette drive motors after 2 seconds of inactivity. 
  805.  
  806. entry   AH      08h
  807. return  absolute addresses:
  808.         40:6C   number of interrupts since power on (4 bytes)
  809.         40:70   number of days since power on (1 byte)
  810.         40:67   day counter on all products after AT
  811.         40:40   motor control count - gets decremented and shuts off diskette 
  812.                 motor if zero
  813. note    Int 1Ch invoked by int 08h as a user interrupt.
  814. (internal) - DOUBLE FAULT (80286/80386 protected mode)
  815.         Called when multiple exceptions occur on one instruction, or an
  816.         exception occurs in an exception handler. If an exception occurs in the
  817.         double fault handler, the CPU goes into SHUTDOWN mode (which circuitry
  818.         in the PC/AT converts to a reset).
  819.  
  820.  
  821. ┌─────────────────────────────────────────────────────────────────────────────┐
  822. │Interrupt  09h Keyboard                                                      │
  823. └─────────────────────────────────────────────────────────────────────────────┘
  824. (0:0024h)  Taken whenever a key is pressed or released. This is normally a scan
  825.  (IRQ1)    code, but may also be an ACK or NAK of a command on AT-type
  826.            keyboards.
  827.            Stores characters/scan-codes in status at [0040:0017,18]
  828. (internal) math unit protection fault (80286 protected mode)
  829. entry   AH      09h
  830. return  at absolute memory addresses:
  831.         40:17   bit
  832.                 0       right shift key depressed
  833.                 1       left shift key depressed
  834.                 2       control key depressed
  835.                 3       alt key depressed
  836.                 4       ScrollLock state has been toggled
  837.                 5       NumLock state has been toggled
  838.                 6       CapsLock state has been toggled
  839.                 7       insert state is active
  840.         40:18   bit
  841.                 0       left control key depressed
  842.                 1       left alt key depressed
  843.                 2       SysReq key depressed
  844.                 3       Pause key has been toggled
  845.                 4       ScrollLock key is depressed
  846.                 5       NumLock key is depressed
  847.                 6       CapsLock key is depressed
  848.                 7       Insert key is depressed
  849.         40:96   bit
  850.                 0       last code was the E1h hidden code
  851.                 1       last code was the E0h hidden code
  852.                 2       right control key down
  853.                 3       right alt key down
  854.                 4       101 key Enhanced keyboard installed
  855.                 5       force NumLock if rd ID & kbx
  856.                 6       last character was first ID character
  857.                 7       doing a read ID (must be bit 0)
  858.         40:97   bit
  859.                 0       ScrollLock indicator
  860.                 1       NumLock indicator
  861.                 2       CapsLock indicator
  862.                 3       circus system indicator
  863.                 4       ACK received
  864.                 5       resend received flag
  865.                 6       mode indicator update
  866.                 7       keyboard transmit error flag
  867.         40:1E   keyboard buffer (20h bytes)
  868.         40:1C   buffer tail pointer
  869.         40:72   1234h if ctrl-alt-del pressed on keyboard
  870.      AL   scan code
  871. note 1) Int 05h invoked if PrtSc key pressed
  872.      2) Int 1Bh invoked if Ctrl-Break key sequence pressed
  873.      3) Int 15h, AH=85h invoked on AT and after if SysReq key is pressed
  874.      4) Int 15h, AH=4Fh invoked on machines after AT
  875.      5) Int 16h, BIOS keyboard functions, uses this interrupt.
  876.  
  877.  
  878. ┌─────────────────────────────────────────────────────────────────────────────┐
  879. │Interrupt  0Ah  EGA Vertical Retrace                                         │
  880. └─────────────────────────────────────────────────────────────────────────────┘
  881. (0:0028h)  (IRQ2)  used by EGA vertical retrace, hard disk
  882. note 1) On the Tandy 1000, this interrupt is used by the hard disk
  883.      2) The TOPS and PCnet adapters use this interrupt request line by default
  884. (internal) invalid task state segment (80286 protected-mode)
  885.  
  886.  
  887. ┌─────────────────────────────────────────────────────────────────────────────┐
  888. │Interrupt  0Bh  Communications Controller (serial port) hdw. entry           │
  889. └─────────────────────────────────────────────────────────────────────────────┘
  890. (0:002Ch)  (IRQ3)  Serial Port 2 (com2)
  891. note 1) IRQ 3 may be used by SDLC (synchronous data-link control) or 
  892.         bisynchronous communications cards instead of a serial port.
  893.      2) The TOPS and PCnet adapters use this interrupt request line as an
  894.         alternate
  895. (internal) not present (80286 protected-mode)
  896.         Generated when loading a segment register if the segment descriptor
  897.         indicates that the segment is not currently in memory. May be used to
  898.         implement virtual memory.
  899.  
  900.  
  901. ┌─────────────────────────────────────────────────────────────────────────────┐
  902. │Interrupt  0Ch  Communications Controller (serial port) hdw. entry           │
  903. └─────────────────────────────────────────────────────────────────────────────┘
  904. (0:0030h)  (IRQ4)  Serial Port 1 (com1) or modem in PCjr or Convertible
  905. note    IRQ 4 may be used by SDLC (synchronous data-link control) or 
  906.         bisynchronous communications cards instead of a serial port.
  907. (internal) stack fault (80286 protected-mode)
  908.         Generated on stack overflow/underflow. Note that the 80286 will shut
  909.         down in real mode if SP=1 before a push.
  910.  
  911.  
  912. ┌─────────────────────────────────────────────────────────────────────────────┐
  913. │Interrupt  0Dh  Alternate Printer, AT 80287                                  │
  914. └─────────────────────────────────────────────────────────────────────────────┘
  915. (0:0034h)  (IRQ5)  used by hard disk, 60 Hz RAM refresh, LPT2 on AT, XT/286,
  916.             and PS/2, dummy CRT vertical retrace on PCjr
  917. note    Tandy 1000 uses this line for the 60Hhz RAM refresh
  918. (internal) general protection violation (80286)
  919.         Called in real mode when an instruction attempts to access a word
  920.         operand located at offset 0FFFFh
  921.  
  922.  
  923. ┌─────────────────────────────────────────────────────────────────────────────┐
  924. │Interrupt  0Eh  Diskette Interrupt                                           │
  925. └─────────────────────────────────────────────────────────────────────────────┘
  926. (0:0038h)  Generated by floppy controller on completion of an operation
  927.  (IRQ6)  (sets bit 8 of 40:3E)
  928. (internal) page fault (80386 native mode)
  929.  
  930.  
  931. ┌─────────────────────────────────────────────────────────────────────────────┐
  932. │Interrupt  0Fh  Reserved by IBM                                              │
  933. └─────────────────────────────────────────────────────────────────────────────┘
  934. (0:003Ch)  (IRQ7)  IRQ7 used by PPI interrupt (LPT1, LPT2)
  935. note    Generated by the LPT1 printer adapter when printer becomes ready. Most
  936.         printer adapters do not reliably generate this interrupt.
  937.  
  938.