home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / doc / helppc / hardware.txt < prev    next >
Text File  |  1991-04-14  |  131KB  |  3,330 lines

  1. @Hardware Data and Specifications
  2. :6845:CRTC
  3. ^6845 - Motorola CRT Controller
  4.  
  5.     3B0-3BB Monochrome Monitor Adapter
  6.     3D0-3DC Color Graphics Adapter (mapped similarly)
  7.  
  8.     3B0/3D0  port address decodes to 3B4/3D4
  9.     3B1/3D1  port address decodes to 3B5/3D5
  10.     3B2/3D2  port address decodes to 3B4/3D4
  11.     3B3/3D3  port address decodes to 3B5/3D5
  12.     3B4/3D4  6845 index register, selects which register [0-11h]
  13.          is to be accessed through port 3B5/3D5
  14.     3B5/3D5  6845 data register [0-11h] selected by port 3B4/3D4,
  15.          registers 0C-0F may be read.  If a read occurs
  16.          without the adapter installed, FFh is returned.
  17.     3B6/3D6  port address decodes to 3B4/3D4
  18.     3B7/3D7  port address decodes to 3B5/3D5
  19.     3B8/3D8  6845 mode control register
  20.     3B9/3D9  color select register on color adapter
  21.     3BA/3DA  status register (read only)
  22.     3BB/3DB  light pen strobe reset
  23.         3DC  preset light pen latch
  24.         3DF  CRT/CPU page register (PCjr only)
  25.  
  26. %    Registers: Accessed through ports 3B5 & 3D5    VALID VALUES
  27. %                            MONO CO40 CO80 GRPH
  28.     00 - Horiz. total characters             61   38   71   38
  29.     01 - Horiz. displayed characters per line    50   28   50   28
  30.     02 - Horiz. synch position             52   2D   5A   2D
  31.     03 - Horiz. synch width in characters         0F   0A   0A   0A
  32.     04 - Vert. total lines                 19   1F   1F   7F
  33.     05 - Vert. total adjust (scan lines)         06   06   06   06
  34.     06 - Vert. displayed rows             19   19   19   64
  35.     07 - Vert. synch position (character rows)   19   1C   1C   70
  36.     08 - Interlace mode                 02   02   02   02
  37.     09 - Maximum scan line address             0D   07   07   01
  38.     0A - Cursor start (scan line)             0B   06   06   06
  39.     0B - Cursor end (scan line)             0C   07   07   07
  40.     0C - Start address (MSB)             00   00   00   00
  41.     0D - Start address (LSB)             00   00   00   00
  42.     0E - Cursor address (MSB) (read/write)         00   --   --   --
  43.     0F - Cursor address (LSB) (read/write)         00   --   --   --
  44.     10 - Light pen (MSB)   (read only)         --   --   --   --
  45.     11 - Light pen (LSB)   (read only)         --   --   --   --
  46.  
  47.     - Registers 00-0D are write only, registers 0E-0F are read/write and
  48.       registers 10-11 are read only
  49.     - Cursor address is calculated with using the following (row*80)+col
  50.  
  51. ^6845 - Port 3B8 (Monochrome)
  52.  
  53.     │7│6│5│4│3│2│1│0│  3B8 CRT Control Port
  54.      │ │ │ │ │ │ │ └──── 1 = 80x25 text
  55.      │ │ │ │ │ └─┴───── unused
  56.      │ │ │ │ └──────── 1 = enable video signal
  57.      │ │ │ └───────── unused
  58.      │ │ └────────── 1 = blinking on
  59.      └─┴─────────── unused
  60.  
  61. ^6845 - Port 3D8 (Color)
  62.  
  63.     │7│6│5│4│3│2│1│0│  3D8 Mode Select Register
  64.      │ │ │ │ │ │ │ └──── 1 = 80x25 text, 0 = 40x25 text
  65.      │ │ │ │ │ │ └───── 1 = 320x200 graphics, 0 = text
  66.      │ │ │ │ │ └────── 1 = B/W, 0 = color
  67.      │ │ │ │ └─────── 1 = enable video signal
  68.      │ │ │ └──────── 1 = 640x200 B/W graphics
  69.      │ │ └───────── 1 = blink, 0 = no blink
  70.      └─┴────────── unused
  71.  
  72. ^6845 - Port 3D9 Color Text Modes
  73.  
  74.     │7│6│5│4│3│2│1│0│  3D9 Color Select Register (3B9 not used)
  75.      │ │ │ │ │ └─┴─┴──── screen/border RGB
  76.      │ │ │ │ └───────── select intensity setting
  77.      │ │ │ └────────── background intensity
  78.      └─┴─┴─────────── unused
  79.  
  80. ^6845 - Port 3D9 Color Graphics Modes
  81.  
  82.     │7│6│5│4│3│2│1│0│  3D9 Color Select Register (3B9 not used)
  83.      │ │ │ │ │ └─┴─┴──── RGB for background
  84.      │ │ │ │ └───────── intensity
  85.      │ │ │ └────────── unused
  86.      │ │ └─────────── 1 = palette 1, 0=palette 0 (see below)
  87.      └─┴──────────── unused
  88.  
  89.       Palette 0 = green, red, brown
  90.       Palette 1 = cyan, magenta, white
  91.  
  92. ^6845 - Port 3DA  Status Register
  93.  
  94.     │7│6│5│4│3│2│1│0│  3DA Status Register
  95.      │ │ │ │ │ │ │ └──── 1 = display enable, RAM access is OK
  96.      │ │ │ │ │ │ └───── 1 = light pen trigger set
  97.      │ │ │ │ │ └────── 0 = light pen on, 1 = light pen off
  98.      │ │ │ │ └─────── 1 = vertical retrace, RAM access OK for next 1.25ms
  99.      └─┴─┴─┴──────── unused
  100. :765:FDC:NEC 765:8272:floppy controller
  101. ^NEC µPD765  -    Floppy Disk Controller    -  8272A
  102.  
  103. %    PS/2 FDC Diskette Status Register A at 3F0h
  104.  
  105.     │7│6│5│4│3│2│1│0│  3F0h  PS/2 Disk Status Register A (read-only)
  106.      │ │ │ │ │ │ │ └──── direction
  107.      │ │ │ │ │ │ └───── write protect
  108.      │ │ │ │ │ └────── index
  109.      │ │ │ │ └─────── head 1 select
  110.      │ │ │ └──────── track 0
  111.      │ │ └───────── step
  112.      │ └────────── second drive installed
  113.      └─────────── interrupt pending
  114.  
  115. %    PS/2 FDC Diskette Status Register B at 3F1h
  116.  
  117.     │7│6│5│4│3│2│1│0│  3F1h  PS/2 Disk Status Register B (read-only)
  118.      │ │ │ │ │ │ │ └──── motor enable 0
  119.      │ │ │ │ │ │ └──── motor enable 1
  120.      │ │ │ │ │ └──── write enable
  121.      │ │ │ │ └──── read data (toggles w/positive transition in -RD DATA)
  122.      │ │ │ └──── write data (toggles w/positive transition in WR DATA)
  123.      │ │ └──── drive select
  124.      └─┴──── reserved
  125.  
  126. %    FDC Digital Output Register at 3F2h  (all systems)
  127.  
  128.     │7│6│5│4│3│2│1│0│  port 3F2h  (write only)
  129.      │ │ │ │ │ │ └─┴──── floppy drive select (0=A, 1=B, 2=floppy C, ...)
  130.      │ │ │ │ │ └─────── 1 = FDC enable, 0 = hold FDC at reset
  131.      │ │ │ │ └──────── 1 = DMA & I/O interface enabled  (reserved PS/2)
  132.      │ │ │ └───────── 1 = turn floppy drive A motor on
  133.      │ │ └────────── 1 = turn floppy drive B motor on
  134.      │ └─────────── 1 = turn floppy drive C motor on; (reserved PS/2)
  135.      └──────────── 1 = turn floppy drive D motor on; (reserved PS/2)
  136.  
  137.     - used to control drive motors, drive selection, and feature enable
  138.     - PS/2 only uses bit 0 for floppy drive select; bit 1 is reserved
  139.     - PS/2 only uses bits 5 & 4 for  motor enable; bits 7&6 are reserved
  140.     - all DOR bits are cleared during controller reset
  141.  
  142. %    FDC Main Status Register at 3F4h  (all systems)
  143.  
  144.     │7│6│5│4│3│2│1│0│  port 3F4h  (read only)
  145.      │ │ │ │ │ │ │ └──── floppy drive 0 in seek mode/busy
  146.      │ │ │ │ │ │ └───── floppy drive 1 in seek mode/busy
  147.      │ │ │ │ │ └────── floppy drive 2 in seek mode/busy (reserved PS/2)
  148.      │ │ │ │ └─────── floppy drive 3 in seek mode/busy (reserved PS/2)
  149.      │ │ │ └──────── FDC read or write command in progress
  150.      │ │ └───────── FDC is in non-DMA mode
  151.      │ └────────── I/O direction;  1 = FDC to CPU; 0 = CPU to FDC
  152.      └─────────── data reg ready for I/O to/from CPU (request for master)
  153.  
  154. %    FDC Command Status Register 0 at 3F5h  (all systems)
  155.  
  156.     │7│6│5│4│3│2│1│0│  Command Status Register 0 at port 3F5h
  157.      │ │ │ │ │ │ └─┴──── unit selected at interrupt (0=A, 1=B, 2=...)
  158.      │ │ │ │ │ └─────── head number at interrupt (head 0 or 1)
  159.      │ │ │ │ └──────── not ready on read/write or SS access to head 1
  160.      │ │ │ └───────── equipment check (see note)
  161.      │ │ └────────── set to 1 when FDD completes a seek command
  162.      └─┴─────────── last command status (see below)
  163.  
  164. %    Bits
  165. %     76  Last Command Status
  166.      00  command terminated successfully
  167.      01  command execution started but terminated abnormally
  168.      10  invalid command issued
  169.      11  command terminated abnormally due to a change in state of
  170.          the Ready Signal from the FDC  (reserved on PS/2)
  171.  
  172.     - equipment check can occur if FDD signals a fault or track zero is
  173.       not found after 77 steps on a recalibrate command
  174.     - PS/2 only uses bits 1-0 for drive (values are 01b and 10b)
  175.  
  176. %    FDC Command Status Register 1 at 3F5h  (all systems)
  177.  
  178.     │7│6│5│4│3│2│1│0│  Command Status Register 1 at port 3F5h
  179.      │ │ │ │ │ │ │ └──── FDC cannot find ID address mark (see reg 2)
  180.      │ │ │ │ │ │ └───── write protect detected during write
  181.      │ │ │ │ │ └────── FDC cannot find sector ID
  182.      │ │ │ │ └─────── unused (always zero)
  183.      │ │ │ └──────── over-run;  FDC not serviced in reasonable time
  184.      │ │ └───────── data error (CRC) in ID field or data field
  185.      │ └────────── unused (always zero)
  186.      └─────────── end of cylinder; sector# greater than sectors/track
  187.  
  188.     - bit 0 of Status Register 1 and bit 4 of Status Register 2 are
  189.       related and mimic each other
  190.  
  191. %    FDC Command Status Register 2 at 3F5h  (all systems)
  192.  
  193.     │7│6│5│4│3│2│1│0│  Command Status Register 2 at port 3F5h
  194.      │ │ │ │ │ │ │ └──── missing address mark in data field
  195.      │ │ │ │ │ │ └───── bad cylinder, ID not found and Cyl Id=FFh
  196.      │ │ │ │ │ └────── scan command failed, sector not found in cylinder
  197.      │ │ │ │ └─────── scan command equal condition satisfied
  198.      │ │ │ └──────── wrong cylinder detected
  199.      │ │ └───────── CRC error detected in sector data
  200.      │ └────────── sector with deleted data address mark detected
  201.      └─────────── unused (always zero)
  202.  
  203.     - bit 0 of Status Register 1 and bit 4 of Status Register 2 are
  204.       related and mimic each other
  205.  
  206. %    FDC Command Status Register 3 at 3F5h (FDD status, all systems)
  207.  
  208.     │7│6│5│4│3│2│1│0│  Floppy Disk Drive Status at port 3F5h
  209.      │ │ │ │ │ │ └─┴──── FDD unit selected status (0=A, 1=B, 2=...)
  210.      │ │ │ │ │ └─────── FDD side head select status (0=head 0, 1=head 1)
  211.      │ │ │ │ └──────── FDD two sided status signal
  212.      │ │ │ └───────── FDD track zero status signal
  213.      │ │ └────────── FDD ready status signal
  214.      │ └─────────── FDD write protect status signal
  215.      └──────────── FDD fault status signal
  216.  
  217. %    PS/2 FDC Digital Input Register at 3F7h
  218.  
  219.     │7│6│5│4│3│2│1│0│  3F7h  PS/2 Digital Input Register (read only)
  220.      │ │ │ │ │ │ │ └─── high density select
  221.      │ └─┴─┴─┴─┴─┴──── reserved
  222.      └─────────────── diskette change
  223.  
  224. %    PS/2 FDC Configuration Control Register at 3F7h
  225.  
  226.     │7│6│5│4│3│2│1│0│  3F7h  PS/2 Config. Control Register (write only)
  227.      │ │ │ │ │ │ └─┴── DRC1, DRC0  (see below)
  228.      └─┴─┴─┴─┴─┴───── reserved
  229.  
  230.     DRC1 DRC0
  231.       0   0    500000 bit per second mode
  232.       0   1    reserved
  233.       1   0    250000 bit per second mode
  234.       1   1    reserved
  235.  
  236.  
  237.     - Digital Input Register is used to sense the state of the
  238.       (-diskette change) and the (-high density select) signals
  239.     - Configuration Control Register is used to set the transfer rate
  240.  
  241.  
  242. ^FDC Programming Considerations
  243.  
  244. %    Three phases of command execution:
  245.  
  246.     1.  Command phase; commands are sent from the CPU to the FDC via
  247.         port 3F5h;    bit 6 of the Status Register at 3F4h must be zero
  248.     2.  Execution phase; FDC executes instruction & generates INT 6
  249.     3.  Result phase; status and other information is available to CPU;
  250.         INT 6 sets bit 7 of BIOS Data Area location 40:3E which can
  251.         be polled for completion status
  252.  
  253.  
  254. %    Example of a read operation:
  255.  
  256.     1. turn disk motor on and set delay time for drive spin up
  257.     2. perform seek operation;  wait for disk interrupt
  258.     3. prepare DMA chip to move data to memory
  259.     4. send read command and wait for transfer complete interrupt
  260.     5. read status information
  261.     6. turn disk motor off
  262.  
  263.  
  264. ^Floppy Diskette Controller Operations (15 commands)
  265.  
  266. %    Read Data       D7  D6  D5  D4  D3  D2  D1  D0
  267.  
  268.     command byte 0:    MT  MF  SK    0   0    1   1    0
  269.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  270.     command byte 2:    cylinder number
  271.     command byte 3:    head number
  272.     command byte 4:    sector number
  273.     command byte 5:    bytes per sector
  274.     command byte 6:    end of track (last sector in track)
  275.     command byte 7:    gap 3 length
  276.     command byte 8:    data length (if cmd byte 5==0)
  277.     result byte 0:       status register 0
  278.     result byte 1:       status register 1
  279.     result byte 2:       status register 2
  280.     result byte 3:       cylinder number
  281.     result byte 4:       head number
  282.     result byte 5:       sector number
  283.     result byte 6:       bytes per sector
  284.  
  285. %    Read Deleted Data  D7  D6  D5  D4  D3  D2  D1  D0
  286.  
  287.     command byte 0:    MT  MF  SK    0   1    1   0    0
  288.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  289.     command byte 2:    cylinder number
  290.     command byte 3:    head number
  291.     command byte 4:    sector number
  292.     command byte 5:    bytes per sector
  293.     command byte 6:    end of track (last sector in track)
  294.     command byte 7:    gap 3 length
  295.     command byte 8:    data length (if cmd byte 5==0)
  296.     result byte 0:       status register 0
  297.     result byte 1:       status register 1
  298.     result byte 2:       status register 2
  299.     result byte 3:       cylinder number
  300.     result byte 4:       head number
  301.     result byte 5:       sector number
  302.     result byte 6:       bytes per sector
  303.  
  304. %    Write Data       D7  D6  D5  D4  D3  D2  D1  D0
  305.  
  306.     command byte 0:    MT  MF   0    0   0    1   0    1
  307.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  308.     command byte 2:    cylinder number
  309.     command byte 3:    head number
  310.     command byte 4:    sector number
  311.     command byte 5:    bytes per sector
  312.     command byte 6:    end of track (last sector in track)
  313.     command byte 7:    gap 3 length
  314.     command byte 8:    data length (if cmd byte 5==0)
  315.     result byte 0:       status register 0
  316.     result byte 1:       status register 1
  317.     result byte 2:       status register 2
  318.     result byte 3:       cylinder number
  319.     result byte 4:       head number
  320.     result byte 5:       sector number
  321.     result byte 6:       bytes per sector
  322.  
  323. %    Write Deleted Data D7  D6  D5  D4  D3  D2  D1  D0
  324.  
  325.     command byte 0:    MT  MF   0    0   1    0   0    1
  326.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  327.     command byte 2:    cylinder number
  328.     command byte 3:    head number
  329.     command byte 4:    sector number
  330.     command byte 5:    bytes per sector
  331.     command byte 6:    end of track (last sector in track)
  332.     command byte 7:    gap 3 length
  333.     command byte 8:    data length (if cmd byte 5==0)
  334.     result byte 0:       status register 0
  335.     result byte 1:       status register 1
  336.     result byte 2:       status register 2
  337.     result byte 3:       cylinder number
  338.     result byte 4:       head number
  339.     result byte 5:       sector number
  340.     result byte 6:       bytes per sector
  341.  
  342. %    Read a Track       D7  D6  D5  D4  D3  D2  D1  D0
  343. %    (Diagnostic)
  344.     command byte 0:     0  MF  SK    0   0    0   1    0
  345.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  346.     command byte 2:    cylinder number
  347.     command byte 3:    head number
  348.     command byte 4:    sector number
  349.     command byte 5:    bytes per sector
  350.     command byte 6:    end of track (last sector in track)
  351.     command byte 7:    gap 3 length
  352.     command byte 8:    data length (if cmd byte 5==0)
  353.     result byte 0:       status register 0
  354.     result byte 1:       status register 1
  355.     result byte 2:       status register 2
  356.     result byte 3:       cylinder number
  357.     result byte 4:       head number
  358.     result byte 5:       sector number
  359.     result byte 6:       bytes per sector
  360.  
  361. %    Read ID        D7  D6  D5  D4  D3  D2  D1  D0
  362.  
  363.     command byte 0:     0  MF   0    0   1    0   1    0
  364.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  365.     result byte 0:       status register 0
  366.     result byte 1:       status register 1
  367.     result byte 2:       status register 2
  368.     result byte 3:       cylinder number
  369.     result byte 4:       head number
  370.     result byte 5:       sector number
  371.     result byte 6:       bytes per sector
  372.  
  373. %    Format a Track       D7  D6  D5  D4  D3  D2  D1  D0
  374. %    (Write Sector IDs)
  375.     command byte 0:     0  MF   0    0   1    1   0    1
  376.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  377.     command byte 2:    bytes per sector
  378.     command byte 3:    sectors per track
  379.     command byte 4:    gap 3 length
  380.     command byte 5:    filler pattern to write in each byte
  381.     result byte 0:       status register 0
  382.     result byte 1:       status register 1
  383.     result byte 2:       status register 2
  384.     result byte 3:       cylinder number
  385.     result byte 4:       head number
  386.     result byte 5:       sector number
  387.     result byte 6:       bytes per sector
  388.  
  389. %    Scan Equal       D7  D6  D5  D4  D3  D2  D1  D0
  390.  
  391.     command byte 0:    MT  MF  SK    1   0    0   0    1
  392.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  393.     command byte 2:    cylinder number
  394.     command byte 3:    head number
  395.     command byte 4:    sector number
  396.     command byte 5:    bytes per sector
  397.     command byte 6:    end of track (last sector in track)
  398.     command byte 7:    gap 3 length
  399.     command byte 8:    scan test (1=scan contiguous, 2=scan alternate)
  400.     result byte 0:       status register 0
  401.     result byte 1:       status register 1
  402.     result byte 2:       status register 2
  403.     result byte 3:       cylinder number
  404.     result byte 4:       head number
  405.     result byte 5:       sector number
  406.     result byte 6:       bytes per sector
  407.  
  408. %    Scan Low or Equal  D7  D6  D5  D4  D3  D2  D1  D0
  409.  
  410.     command byte 0:    MT  MF  SK    1   1    0   0    1
  411.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  412.     command byte 2:    cylinder number
  413.     command byte 3:    head number
  414.     command byte 4:    sector number
  415.     command byte 5:    bytes per sector
  416.     command byte 6:    end of track (last sector in track)
  417.     command byte 7:    gap 3 length
  418.     command byte 8:    scan test (1=scan contiguous, 2=scan alternate)
  419.     result byte 0:       status register 0
  420.     result byte 1:       status register 1
  421.     result byte 2:       status register 2
  422.     result byte 3:       cylinder number
  423.     result byte 4:       head number
  424.     result byte 5:       sector number
  425.     result byte 6:       bytes per sector
  426.  
  427. %    Scan High or Equal D7  D6  D5  D4  D3  D2  D1  D0
  428.  
  429.     command byte 0:    MT  MF  SK    1   1    1   0    1
  430.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  431.     command byte 2:    cylinder number
  432.     command byte 3:    head number
  433.     command byte 4:    sector number
  434.     command byte 5:    bytes per sector
  435.     command byte 6:    end of track (last sector in track)
  436.     command byte 7:    gap 3 length
  437.     command byte 8:    scan test (1=scan contiguous, 2=scan alternate)
  438.     result byte 0:       status register 0
  439.     result byte 1:       status register 1
  440.     result byte 2:       status register 2
  441.     result byte 3:       cylinder number
  442.     result byte 4:       head number
  443.     result byte 5:       sector number
  444.     result byte 6:       bytes per sector
  445.  
  446. %    Recalibrate       D7  D6  D5  D4  D3  D2  D1  D0
  447.  
  448.     command byte 0:     0    0   0    0   0    1   1    1
  449.     command byte 1:     ?    ?   ?    ?   ?    0  US1 US0
  450.     returns nothing
  451.  
  452. %    Sense Interrupt    D7  D6  D5  D4  D3  D2  D1  D0
  453. %        Status
  454.     command byte 0:     0    0   0    0   1    0   0    0
  455.     result byte 0:       status register 0
  456.     result byte 1:       present cylinder number
  457.  
  458. %    Specify Step &       D7  D6  D5  D4  D3  D2  D1  D0
  459. %      Head Load
  460.     command byte 0:     0    0   0    0   0    0   1    1
  461.     command byte 1:    step rate time │ head unload time
  462.     command byte 2:    ──────head load time──────    ND
  463.     returns nothing
  464.  
  465. %    Sense Drive       D7  D6  D5  D4  D3  D2  D1  D0
  466. %      Status
  467.     command byte 0:     0    0   0    0   0    1   0    0
  468.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  469.     result byte 0:       status register 3
  470.  
  471. %    Seek           D7  D6  D5  D4  D3  D2  D1  D0
  472.  
  473.     command byte 0:     0    0   0    0   1    1   1    1
  474.     command byte 1:     ?    ?   ?    ?   ?  HD  US1 US0
  475.     command byte 2:    new cylinder number
  476.     returns nothing
  477.  
  478. %    µPD765 Version       D7  D6  D5  D4  D3  D2  D1  D0
  479.  
  480.     command byte 0:     ?    ?   ?    1   0    0   0    0
  481.     result byte 0:       status register 0
  482.                90h = µPD765B;  80h = µPD765A or µPD765A-2
  483.  
  484. %    Invalid Command
  485.  
  486.     result byte 0:       status register 0 (value of 80h)
  487.  
  488.  
  489. %    Key to Abbreviations
  490.     HD = Head Number Selected    SK = SKip Deleted-data address mark
  491.     MT = Multi-Track        US0 = drive select bit 0
  492.     MF = MFM mode            US1 = drive select bit 1
  493.     ND = Non-DMA mode
  494.  
  495.     Head Load Time = 2 to 254ms in 2ms increments
  496.     Head Unload Time = 16 to 240ms in 16ms increments
  497.     Step Rate Time = 1 to 16ms in 1ms increments
  498.  
  499.  
  500.     - PS/2 systems use the 8272A diskette controller which is software
  501.       and port compatible with the NEC µPD765
  502.     - accessed through ports 3F0h-3F7h;  NEC µPD765 is accessed through
  503.       ports 3F2h, 3F4h and 3F5h;   the 8272A uses ports 3F0h, 3F1h,
  504.       3F2h, 3F4h, 3F5h and 3F7h
  505.     - data, command and status registers are all accessed through
  506.       port 3F5h a register stack with one address presented to the bus
  507.     - bit 7 of BIOS Data Area byte 40:3E can be polled to determine
  508.       if a disk operation has completed;  this bit is set by the
  509.       interrupt handler when the operation has completed;  it should
  510.       be reset before continuing on with the next FDC operation
  511.  
  512.     - see  ~BIOS Data Area~   ~INT TABLE~   ~INT 13~
  513.  
  514. :8042:keyboard controller
  515. ^8042 - Keyboard Controller  (AT,PS/2)
  516.  
  517. %    8042 Status Register (port 64h read)
  518.  
  519.     │7│6│5│4│3│2│1│0│  8042 Status Register
  520.      │ │ │ │ │ │ │ └──── output register (60h) has data for system
  521.      │ │ │ │ │ │ └───── input register (60h/64h) has data for 8042
  522.      │ │ │ │ │ └────── system flag (set to 0 after power on reset)
  523.      │ │ │ │ └─────── data in input register is command (1) or data (0)
  524.      │ │ │ └──────── 1=keyboard enabled, 0=keyboard disabled (via switch)
  525.      │ │ └───────── 1=transmit timeout (data transmit not complete)
  526.      │ └────────── 1=receive timeout (data transmit not complete)
  527.      └─────────── 1=even parity rec'd, 0=odd parity rec'd (should be odd)
  528.  
  529. %    Port Mode          Description
  530.  
  531.     64h  read   8042 status register. Can be read at any time.  See
  532.             table above for more information.
  533.     64h  write  8042 command register.  Writing this port sets Bit 3
  534.             of the status register to 1 and the byte is treated
  535.             as a controller command.  Devices attached to the
  536.             8042 should be disabled before issuing commands that
  537.             return data since data in the output register will
  538.             be overwritten.
  539.     60h  read   8042 output register (should only be read if Bit 0 of
  540.             status port is set to 1)
  541.     60h  write  8042 data register.  Data should only be written if
  542.             Bit 1 of the status register is zero (register is empty).
  543.             When this port is written Bit 3 of the status register
  544.             is set to zero and the byte is treated as a data.  The
  545.             8042 uses this byte if it's expecting data for a previous
  546.             command, otherwise the data is written directly to the
  547.             keyboard.    See ~KEYBOARD COMMANDS~ for information on
  548.             programming the actual keyboard hardware.
  549.  
  550.  
  551. ^8042 Commands Related to PC Systems  (Port 64h)
  552.  
  553. %    Command            Description
  554.  
  555.      20   Read 8042 Command Byte: current 8042 command byte is placed
  556.           in port 60h.  
  557.      60   Write 8042 Command Byte: next data byte written to port 60h is
  558.           placed in 8042 command register.    Format:
  559.  
  560.          │7│6│5│4│3│2│1│0│    8042 Command Byte
  561.           │ │ │ │ │ │ │ └──── 1=enable output register full interrupt
  562.           │ │ │ │ │ │ └───── should be 0
  563.           │ │ │ │ │ └────── 1=set status register system, 0=clear
  564.           │ │ │ │ └─────── 1=override keyboard inhibit, 0=allow inhibit
  565.           │ │ │ └──────── disable keyboard I/O by driving clock line low
  566.           │ │ └───────── disable auxiliary device, drives clock line low
  567.           │ └────────── IBM scancode translation 0=AT, 1=PC/XT
  568.           └─────────── reserved, should be 0
  569.  
  570.      A4   Password Installed Test: returned data can be read
  571.           from port 60h;  FA=password installed, F1=no password
  572.      A5   Load Security: bytes written to port 60h will be read
  573.           until a null (0) is found.
  574.      A6   Enable Security: works only if a password is already loaded
  575.      A7   Disable Auxiliary Interface: sets Bit 5 of command register
  576.           stopping auxiliary I/O by driving the clock line low
  577.      A8   Enable Auxiliary Interface: clears Bit 5 of command register
  578.      A9   Auxiliary Interface Test: clock and data lines are tested;
  579.           results placed at port 60h are listed below:
  580.  
  581.         00  no error
  582.         01  keyboard clock line is stuck low
  583.         02  keyboard clock line is stuck high
  584.         03  keyboard data line is stuck low
  585.         04  keyboard data line is stuck high
  586.  
  587.      AA   Self Test: diagnostic result placed at port 60h, 55h=OK
  588.      AB   Keyboard Interface Test:    clock and data lines are tested;
  589.           results placed at port 60h are listed above with command A9
  590.      AC   Diagnostic Dump: sends 16 bytes of 8042's RAM, current input
  591.           port state, current output port state and 8042 program status
  592.           word to port 60h in scan-code format.
  593.      AD   Disable Keyboard Interface: sets Bit 4 of command register
  594.           stopping keyboard I/O by driving the clock line low
  595.      AE   Enable Keyboard Interface: clears Bit 4 of command register
  596.           enabling keyboard interface.
  597.      C0   Read Input Port: data is read from its input port (which is
  598.           inaccessible to the data bus) and written to output register
  599.           at port 60h;  output register should be empty before call.
  600.  
  601.            │7│6│5│4│3-0│  8042 Input Port
  602.         │ │ │ │ └──── undefined
  603.         │ │ │ └───── 1=enable 2nd 256K of motherboard RAM, 0=disable
  604.         │ │ └────── 1=manufacturing jumper not installed, 0=installed
  605.         │ └─────── 1=primary display is MDA, 0=primary display is CGA
  606.         └──────── 1=keyboard not inhibited, 0=keyboard inhibited
  607.  
  608.      C1   Poll Input Port Low Bits: Bits 0-3 of port 1 placed in
  609.           status Bits 4-7
  610.      C2   Poll Input Port High Bits: Bits 4-7 of port 1 placed in
  611.           status Bits 4-7
  612.      D0   Read Output Port: data is read from 8042 output port (which is
  613.           inaccessible to the data bus) and placed in output register;
  614.           the output register should be empty.  (see command D1 below)
  615.      D1   Write Output Port: next byte written to port 60h is placed in
  616.           the 8042 output port (which is inaccessible to the data bus)
  617.  
  618.         │7│6│5│4│3│2│1│0│  8042 Output Port
  619.          │ │ │ │ │ │ │ └──── system reset line
  620.          │ │ │ │ │ │ └───── gate A20
  621.          │ │ │ │ └─┴────── undefined
  622.          │ │ │ └───────── output buffer full
  623.          │ │ └────────── input buffer empty
  624.          │ └─────────── keyboard clock (output)
  625.          └──────────── keyboard data (output)
  626.  
  627.      D2   Write Keyboard Output Register: on PS/2 systems the next data
  628.           byte written to port 60h input register is written to port 60h
  629.           output register as if initiated by a device; invokes interrupt
  630.           if enabled
  631.      D3   Write Auxiliary Output Register: on PS/2 systems the next data
  632.           byte written to port 60h input register is written to port 60h
  633.           output register as if initiated by a device; invokes interrupt
  634.           if enabled
  635.      D4   Write Auxiliary Device: on PS/2 systems the next data byte
  636.           written to input register a port at 60h is sent to the
  637.           auxiliary device
  638.      E0   Read Test Inputs: 8042 reads its T0 and T1 inputs; data is
  639.           placed in output register;  Bit 0 is T0, Bit 1 is T1:
  640.  
  641.         │1│0│  Test Input Port Bits
  642.          │ └──── keyboard clock
  643.          └───── keyboard data
  644.  
  645.      Fx   Pulse Output Port: Bits 0-3 of the 8042 output port can be
  646.           pulsed low for 6 µs;  Bits 0-3 of command indicate which
  647.           Bits should be pulsed; 0=pulse, 1=don't pulse; pulsing
  648.           Bit 0 results in CPU reset since it is connected to system
  649.           reset line.
  650.  
  651.     - PC systems previous to the AT use the 8255 PPI as a keyboard
  652.       controller and use the keyboard's internal 8048.
  653.     - the keyboard's internal controller buffers up to 16 bytes of
  654.       make/break code information.    This is common among all PC systems
  655.       and shouldn't be confused with the (32 byte) keyboard buffer
  656.       maintained by the BIOS.
  657.     - see  ~KEYBOARD COMMANDS~ for information on programming the
  658.       keyboards internal microprocessor
  659. :8250:16450:16550:UART
  660. ^UART - Universal Asynchronous Receiver/Transmitter
  661.  
  662. %     Port            Description
  663.  
  664.     3F8/2F8   Transmit/Receive Buffer  (read/write)
  665.           Baud Rate Divisor LSB if bit 7 of LCR is set    (read/write)
  666.     3F9/2F9   IER - Interrupt Enable Register  (read/write)
  667.           Baud Rate Divisor MSB if bit 7 of LCR is set    (read/write)
  668.     3FA/2FA   IIR - Interrupt Identification Register  (read only)
  669.           FCR - 16550 FIFO Control Register  (write only)
  670.     3FB/2FB   LCR - Line Control Register  (read/write)
  671.     3FC/2FC   MCR - Modem Control Register    (read/write)
  672.     3FD/2FD   LSR - Line Status Register  (read only)
  673.     3FE/2FE   MSR - Modem Status Register  (read only)
  674.     3FF/2FF   Scratch Pad Register    (read/write)
  675.  
  676.  
  677. ^Detailed UART Description
  678.  
  679. %    Port 3F8 - Transmit/Receive Buffer  (read/write)
  680. %           Baud Rate Divisor LSB if bit 7 of LCR is set  (read/write)
  681.  
  682. %    Port 3F9 - Interrupt Enable Register - IER  (read/write)
  683. %           Baud Rate Divisor MSB if bit 7 of LCR is set  (read/write)
  684.  
  685.     │7│6│5│4│3│2│1│0│  2F9, 3F9: Interrupt Enable Register
  686.      │ │ │ │ │ │ │ └──── 1 = enable data available int (and 16550 Timeout)
  687.      │ │ │ │ │ │ └───── 1 = enable THRE interrupt
  688.      │ │ │ │ │ └────── 1 = enable lines status interrupt
  689.      │ │ │ │ └─────── 1 = enable modem-status-change interrupt
  690.      └─┴─┴─┴──────── reserved (zero)
  691.  
  692.     - 16550 will interrupt if data exists in the FIFO and isn't read
  693.       within the time it takes to receive four bytes or if no data is
  694.       received within the time it takes to receive four bytes.
  695.  
  696.  
  697. ^Baud Rate Divisor Table
  698.  
  699. %              Baud Rate                 Baud Rate
  700. %    Baud Rate           Divisor           Baud Rate      Divisor
  701.  
  702.       50        900h          2400        30h
  703.      110        417h          3600        20h
  704.      150        300h          4800        18h
  705.      300        180h          7200        10h
  706.      600         C0h          9600        0Ch
  707.     1200         60h         19200        06h
  708.     1800         40h         38400        03h
  709.     2000         3Ah        115200        01h
  710.  
  711.     - Baud rate divisors can be calculated by taking the oscillating
  712.       frequency (1,843,200) and dividing by the quantity of the desired
  713.       baud rate times the UART clocking factor (16).  Use the following
  714.       formula:
  715. ^divisor = 1843200 / (BaudRate * 16);
  716.  
  717.  
  718. ^Port 3FA - Interrupt Identification Register - IIR  (read only)
  719.  
  720.     │7│6│5│4│3│2│1│0│  2FA, 3FA Interrupt ID Register
  721.      │ │ │ │ │ │ │ └──── 1 = no int. pending, 0=int. pending
  722.      │ │ │ │ │ └─┴───── Interrupt Id bits (see below)
  723.      │ │ │ │ └──────── 16550  1 = timeout int. pending, 0 for 8250/16450
  724.      │ │ └─┴───────── reserved (zero)
  725.      └─┴──────────── 16550    set to 1 if FIFO queues are enabled
  726.  
  727. %    Bits
  728. %     21      Meaning         Priority        To reset
  729.      00  modem-status-change      lowest      read MSR
  730.      01  transmit-register-empty  low      read IIR / write THR
  731.      10  data-available          high      read rec buffer reg
  732.      11  line-status          highest      read LSR
  733.  
  734.     - interrupt pending flag uses reverse logic, 0 = pending, 1 = none
  735.     - interrupt will occur if any of the line status bits are set
  736.     - THRE bit is set when THRE register is emptied into the TSR
  737.  
  738.  
  739. ^Port 3FA - 16550 FIFO Control Register - FCR  (write only)
  740.  
  741.     │7│6│5│4│3│2│1│0│  2FA, 3FA  FIFO Control Register
  742.      │ │ │ │ │ │ │ └──── 1 = enable clear XMIT and RCVR FIFO queues
  743.      │ │ │ │ │ │ └───── 1 = clear RCVR FIFO
  744.      │ │ │ │ │ └────── 1 = clear XMIT FIFO
  745.      │ │ │ │ └─────── 1 = change RXRDY & TXRDY pins from mode 0 to mode 1
  746.      │ │ └─┴──────── reserved (zero)
  747.      └─┴─────────── trigger level for RCVR FIFO interrupt
  748.  
  749. %    Bits      RCVR FIFO
  750. %     76    Trigger Level
  751.      00       1 byte
  752.      01       4 bytes
  753.      10       8 bytes
  754.      11      14 bytes
  755.  
  756.     - Bit 0 must be set in order to write to other FCR bits
  757.     - Bit 1 when set to 1 the RCVR FIFO is cleared and this bit is reset.
  758.       The receiver shift register is not cleared.
  759.     - Bit 2 when set to 1 the XMIT FIFO is cleared and this bit is reset.
  760.       The transmit shift register is not cleared.
  761.  
  762.  
  763. ^Port 3FB - Line Control Register - LCR  (read/write)
  764.  
  765.     │7│6│5│4│3│2│1│0│  2FB, 3FB  Line Control Register
  766.      │ │ │ │ │ │ └─┴──── word length select bits (see below)
  767.      │ │ │ │ │ └─────── 0 = 1 stop bit, 1 = 1.5 or 2  (see note)
  768.      │ │ │ │ └──────── 0 = no parity, 1 = parity (PEN)
  769.      │ │ │ └───────── 0 = odd parity, 1 = even (EPS)
  770.      │ │ └────────── 0 = parity disabled, 1 = enabled
  771.      │ └─────────── 0 = turn break off, 1 = force spacing break state
  772.      └──────────── 1 = baud rate divisor (DLAB); 0 = RBR, THR or IER
  773.  
  774. %    Bits
  775. %     10    Word length bits
  776.      00 = 5 bits per character
  777.      01 = 6 bits per character
  778.      10 = 7 bits per character
  779.      11 = 8 bits per character
  780.  
  781.     - stop bits = 1.5 for 5 bit words or 2 for 6, 7 or 8 bit words
  782.     - bit 7 changes the mode of registers 3F8 and 3F9.  If set these
  783.       registers become the LSB and MSB of the baud rate divisor.
  784.       Otherwise 3F8 is the Transmit/Receive Buffer Register and 3F9 is
  785.       the Interrupt Enable Register.
  786.  
  787.  
  788. ^Port 3FC - Modem Control Register - MCR  (read/write)
  789.  
  790.     │7│6│5│4│3│2│1│0│  2FC, 3FC  Modem Control Register
  791.      │ │ │ │ │ │ │ └──── 1 = activate DTR
  792.      │ │ │ │ │ │ └───── 1 = activate RTS
  793.      │ │ │ │ │ └────── OUT1
  794.      │ │ │ │ └─────── OUT2
  795.      │ │ │ └──────── 0 = normal, 1 = loop back test
  796.      └─┴─┴───────── reserved (zero)
  797.  
  798.     - If bit 4 is set, data from the Transmit Shift Register is received
  799.       in the Receiver Shift Register.  The SOUT line is set to logic
  800.       high, the SIN line and control lines are disconnected.   CTS, DSR,
  801.       RI and CD inputs are disconnected.  DTR, RTS, OUT1 and OUT2 are
  802.       then connected internally.
  803.  
  804.  
  805. ^Port 3FD - Line Status Register - LSR    (read only)
  806.  
  807.     │7│6│5│4│3│2│1│0│  2FD, 3FD Line Status Register
  808.      │ │ │ │ │ │ │ └──── 1 = data ready
  809.      │ │ │ │ │ │ └───── 1 = overrun error (OE)
  810.      │ │ │ │ │ └────── 1 = parity error (PE)
  811.      │ │ │ │ └─────── 1 = framing error (FE)
  812.      │ │ │ └──────── 1 = break interrupt  (BI)
  813.      │ │ └───────── 1 = transmitter holding register empty (THRE)
  814.      │ └────────── 1 = transmitter shift register empty (TSRE)
  815.      └─────────── 1 = 16550 PE/FE/Break in FIFO queue, 0 for 8250 & 16450
  816.  
  817.     - Bit 0 is set when a byte is placed in the Receiver Buffer Register
  818.       and cleared when the byte is read by the CPU (or when the CPU
  819.       clears the FIFO for the 16550).  Results in Receive Data Available
  820.       Interrupts if enabled.
  821.     - Bits 1-4 indicate errors and result in Line Status Interrupts
  822.       if enabled.
  823.     - Bit 1 is set when a second byte is received before the byte
  824.       in the Receiver Buffer Register is read by the CPU (the 16550 in
  825.       FIFO mode sets this bit when the queue is full and the byte in the
  826.       Receiver Shift Register hasn't been moved into the queue).  This
  827.       bit is reset when the CPU reads the LSR
  828.     - Bit 2 is set whenever a byte is received that doesn't match the
  829.       requested parity.  Reset upon reading the LSR.  (The 16550 maintains
  830.       parity information with each byte and sets bit 2 only when the byte
  831.       is at the top of the FIFO queue.)
  832.     - Bit 3 is set when a character is received without proper stop
  833.       bits.  Upon detecting a framing error the UART attempts to
  834.       resynchronize.  Reset by reading the LSR.  (The 16550 maintains
  835.       this information with each byte and sets bit 3 only when the byte
  836.       is at the top of the FIFO queue.)
  837.     - Bit 4 is set when a break condition is sensed (when space is
  838.       detected for longer than 1 fullword).  A zero byte is placed in
  839.       the Receiver Buffer Register (or 16550 FIFO).  Reset by reading
  840.       the LSR.  (The 16550 maintains this information with each byte and
  841.       sets bit 4 only when the byte is at the top of the FIFO queue.)
  842.     - Bit 5 is set when the Transmit Holding Register shifts a byte
  843.       into the Transmit Shift Register (or XMIT FIFO queue is empty for
  844.       16550) and is cleared when a byte is written to the THR (or the
  845.       XMIT FIFO).    Results in Transmit Holding Register Empty interrupts
  846.       if enabled.
  847.     - Bit 6 is set when both the Transmitter Holding Register and the
  848.       Transmitter Shift Register are empty. On the 16550, when the XMIT
  849.       FIFO and Transmitter Shift Register are empty.
  850.     - Bit 7 is 16550 specific and indicates there is a byte in the FIFO
  851.       queue that was received with a Parity, Framing or Break error.
  852.  
  853.  
  854. ^Port 3FE - Modem Status Register - MSR (read only)
  855.  
  856.     │7│6│5│4│3│2│1│0│  2FE, 3FE Modem Status Register
  857.      │ │ │ │ │ │ │ └──── 1 = DCTS  Delta CTS  (CTS changed) 
  858.      │ │ │ │ │ │ └───── 1 = DDSR  Delta DSR  (DSR changed)
  859.      │ │ │ │ │ └────── 1 = RI ring indicator changed
  860.      │ │ │ │ └─────── 1 = DDCD  Delta Data Carrier Detect (DCD changed)
  861.      │ │ │ └──────── 1 = CTS
  862.      │ │ └───────── 1 = DSR
  863.      │ └────────── 1 = ring indicator (RI)
  864.      └─────────── 1 = receive line signal detect
  865.  
  866.     - Bits 0-3 are reset when the CPU reads the MSR
  867.     - Bit 4 is the Modem Control Register RTS during loopback test
  868.     - Bit 5 is the Modem Control Register DTR during loopback test
  869.     - Bit 6 is the Modem Control Register OUT1 during loopback test
  870.     - Bit 7 is the Modem Control Register OUT2 during loopback test
  871.  
  872. ^Port 3FF/2FF - Scratch Pad Register  (read/write)
  873.  
  874. %    Programming considerations:
  875.     - 8250's, 16450's are essentially identical to program
  876.     - 16550's is pin and software compatible with the 16450 but has an
  877.       internal FIFO queue that may be enabled/disabled by software
  878.     - PCs are capable of 38.4Kb, while AT's are capable of 115.2Kb
  879.     - receiver checks only the first stop bit of each character regardless
  880.       of the number of stop bits specified
  881.     - Older 8250 and 16450 UARTs may lose THRE interrupt if the THRE and
  882.       Receive Data (RD) or the Line Status (LS) interrupts occur
  883.       simultaneously during a full duplex transmission.  RD and LS have
  884.       higher priority than THRE which causes the lower priority interrupt
  885.       to be lost.  The following are 3 methods used to avoid this problem:
  886.      
  887.       1. Disable/re-enable THRE interrupt via the IER after processing
  888.          Receive Data & Line Status interrupts.
  889.       2. While inside the RD and LS interrupt routines check the LSR
  890.          THRE bit and set a flag that a THRE interrupt was waiting.
  891.       3. Poll the LSR THRE bit instead of using the IRR.
  892.       
  893.     - data loss can occur without overrun or framing errors if the
  894.       interrupts are serviced too slowly
  895.     - reserved bits are usually set to zero.  Code should NOT rely on
  896.       this being the case since future enhancement may use these bits
  897.     - see  ~INT TABLE~  or  ~IRQ~  for interrupt assignments
  898.     - see  ~PORTS~   for COMx port assignment (3F8,2F8,3E8,2E8,3220...)
  899. :8253:8254:PIT:timer
  900. ^8253/8254 PIT - Programmable Interval Timer
  901.  
  902.     Port 40h, 8253 Counter 0 Time of Day Clock (normally mode 3)
  903.     Port 41h, 8253 Counter 1 RAM Refresh Counter (normally mode 2)
  904.     Port 42h, 8253 Counter 2 Cassette and Speaker Functions
  905.     Port 43h, 8253 Mode Control Register, data format:
  906.  
  907.     │7│6│5│4│3│2│1│0│  Mode Control Register
  908.      │ │ │ │ │ │ │ └──── 0=16 binary counter, 1=4 decade BCD counter
  909.      │ │ │ │ └─┴─┴───── counter mode bits
  910.      │ │ └─┴────────── read/write/latch format bits
  911.      └─┴───────────── counter select bits (also 8254 read back command)
  912.  
  913. %    Bits
  914. %     76 Counter Select Bits
  915.      00  select counter 0
  916.      01  select counter 1
  917.      10  select counter 2
  918.      11  read back command (8254 only, illegal on 8253, see below)
  919.  
  920. %    Bits
  921. %     54  Read/Write/Latch Format Bits
  922.      00  latch present counter value
  923.      01  read/write of MSB only
  924.      10  read/write of LSB only
  925.      11  read/write LSB, followed by write of MSB
  926.  
  927. %    Bits
  928. %    321  Counter Mode Bits
  929.     000  mode 0, interrupt on terminal count;  countdown, interrupt,
  930.          then wait for a new mode or count; loading a new count in the
  931.          middle of a count stops the countdown
  932.     001  mode 1, programmable one-shot; countdown with optional
  933.          restart; reloading the counter will not affect the countdown
  934.          until after the following trigger
  935.     010  mode 2, rate generator; generate one pulse after 'count' CLK
  936.          cycles; output remains high until after the new countdown has
  937.          begun; reloading the count mid-period does not take affect
  938.          until after the period
  939.     011  mode 3, square wave rate generator; generate one pulse after
  940.          'count' CLK cycles; output remains high until 1/2 of the next
  941.          countdown; it does this by decrementing by 2 until zero, at
  942.          which time it lowers the output signal, reloads the counter
  943.          and counts down again until interrupting at 0; reloading the
  944.          count mid-period does not take affect until after the period
  945.     100  mode 4, software triggered strobe; countdown with output high
  946.          until counter zero;  at zero output goes low for one CLK
  947.          period;  countdown is triggered by loading counter;  reloading
  948.          counter takes effect on next CLK pulse
  949.     101  mode 5, hardware triggered strobe; countdown after triggering
  950.          with output high until counter zero; at zero output goes low
  951.          for one CLK period
  952.  
  953. %    Read Back Command Format  (8254 only)
  954.  
  955.     │7│6│5│4│3│2│1│0│ Read Back Command (written to Mode Control Reg)
  956.      │ │ │ │ │ │ │ └─── must be zero
  957.      │ │ │ │ │ │ └──── select counter 0
  958.      │ │ │ │ │ └───── select counter 1
  959.      │ │ │ │ └────── select counter 2
  960.      │ │ │ └─────── 0 = latch status of selected counters
  961.      │ │ └──────── 0 = latch count of selected counters
  962.      └─┴───────── 11 = read back command
  963.  
  964. %    Read Back Command Status (8254 only, read from counter register)
  965.  
  966.     │7│6│5│4│3│2│1│0│  Read Back Command Status
  967.      │ │ │ │ │ │ │ └─── 0=16 binary counter, 1=4 decade BCD counter
  968.      │ │ │ │ └─┴─┴──── counter mode bits (see Mode Control Reg above)
  969.      │ │ └─┴───────── read/write/latch format (see Mode Control Reg)
  970.      │ └──────────── 1=null count (no count set), 0=count available
  971.      └───────────── state of OUT pin (1=high, 0=low)
  972.  
  973.  
  974.     - the 8253 is used on the PC & XT, while the 8254 is used on the AT+
  975.     - all counters are decrementing and fully independent
  976.     - the PIT is tied to 3 clock lines all generating 1.19318 MHz.
  977.     - the value of 1.19318MHz is derived from (4.77/4 MHz) and has it's
  978.       roots based on NTSC frequencies
  979.     - counters are 16 bit quantities which are decremented and then
  980.       tested against zero.    Valid range is (0-65535).  To get a value
  981.       of 65536 clocks you must specify 0 as the default count since
  982.       65536 is a 17 bit value.
  983.     - reading by latching the count doesn't disturb the countdown but
  984.       reading the port directly does; except when using the 8254 Read
  985.       Back Command
  986.     - counter 0 is the time of day interrupt and is generated
  987.       approximately 18.2 times per sec.  The value 18.2 is derived from
  988.       the frequency 1.10318/65536 (the normal default count).
  989.     - counter 1 is normally set to 18 (dec.) and signals the 8237 to do
  990.       a RAM refresh approximately every 15µs
  991.     - counter 2 is normally used to generate tones from the speaker
  992.       but can be used as a regular counter when used in conjunction
  993.       with the 8255
  994.     - newly loaded counters don't take effect until after a an output
  995.       pulse or input CLK cycle depending on the mode
  996.     - the 8253 has a max input clock rate of 2.6MHz, the 8254 has max
  997.       input clock rate of 10MHz
  998.  
  999. %    Programming considerations:
  1000.  
  1001.       1.  load Mode Control Register
  1002.       2.  let bus settle (jmp $+2)
  1003.       3.  write counter value
  1004.       4.  if counter 0 is modified, an INT 8 handler must be written to
  1005.           call the original INT 8 handler every 18.2 seconds.  When it
  1006.           does call the original INT 8 handler it must NOT send and EOI
  1007.           to the ~8259~ for the timer interrupt, since the original INT 8
  1008.           handler will send the EOI also.
  1009.  
  1010. %    Example code:
  1011.  
  1012.     countdown  equ    8000h ; approx 36 interrupts per second
  1013.  
  1014.        cli
  1015.        mov    al,00110110b  ; bit 7,6 = (00) timer counter 0
  1016.                   ; bit 5,4 = (11) write LSB then MSB
  1017.                   ; bit 3-1 = (011) generate square wave
  1018.                   ; bit 0 = (0) binary counter
  1019.        out    43h,al          ; prep PIT, counter 0, square wave&init count
  1020.        jmp    $+2
  1021.        mov    cx,countdown  ; default is 0x0000 (65536) (18.2 per sec)
  1022.                   ; interrupts when counter decrements to 0
  1023.        mov    al,cl          ; send LSB of timer count
  1024.        out    40h,al
  1025.        jmp    $+2
  1026.        mov    al,ch          ; send MSB of timer count
  1027.        out    40h,al
  1028.        jmp    $+2
  1029.        sti
  1030. :8259:PIC
  1031. ^8259  Programmable Interrupt Controller  (PIC)
  1032.  
  1033. %    Initialization Command Word 1 at Port 20h and A0h
  1034.  
  1035.     │7│6│5│4│3│2│1│0│  ICW1
  1036.      │ │ │ │ │ │ │ └──── 1=ICW4 is needed, 0=no ICW4 needed
  1037.      │ │ │ │ │ │ └───── 1=single 8259, 0=cascading 8259's
  1038.      │ │ │ │ │ └────── 1=4 byte interrupt vectors, 0=8 byte int vectors
  1039.      │ │ │ │ └─────── 1=level triggered mode, 0=edge triggered mode
  1040.      │ │ │ └──────── must be 1 for ICW1 (port must also be 20h or A0h)
  1041.      └─┴─┴───────── must be zero for PC systems
  1042.  
  1043. %    Initialization Command Word 2 at Port 21h and A1h
  1044.  
  1045.     │7│6│5│4│3│2│1│0│  ICW2
  1046.      │ │ │ │ │ └─┴─┴──── 000= on 80x86 systems
  1047.      └─┴─┴─┴─┴───────── A7-A3 of 80x86 interrupt vector
  1048.  
  1049. %    Initialization Command Word 3 at Port 21h and A1h
  1050.  
  1051.     │7│6│5│4│3│2│1│0│  ICW3 for Master Device
  1052.      │ │ │ │ │ │ │ └──── 1=interrupt request 0 has slave, 0=no slave
  1053.      │ │ │ │ │ │ └───── 1=interrupt request 1 has slave, 0=no slave
  1054.      │ │ │ │ │ └────── 1=interrupt request 2 has slave, 0=no slave
  1055.      │ │ │ │ └─────── 1=interrupt request 3 has slave, 0=no slave
  1056.      │ │ │ └──────── 1=interrupt request 4 has slave, 0=no slave
  1057.      │ │ └───────── 1=interrupt request 5 has slave, 0=no slave
  1058.      │ └────────── 1=interrupt request 6 has slave, 0=no slave
  1059.      └─────────── 1=interrupt request 7 has slave, 0=no slave
  1060.  
  1061.     │7│6│5│4│3│2│1│0│  ICW3 for Slave Device
  1062.      │ │ │ │ │ └─┴─┴──── master interrupt request slave is attached to
  1063.      └─┴─┴─┴─┴───────── must be zero
  1064.  
  1065. %    Initialization Command Word 4 at Port 21h and A1h
  1066.  
  1067.     │7│6│5│4│3│2│1│0│  ICW4
  1068.      │ │ │ │ │ │ │ └──── 1 for 80x86 mode, 0 = MCS 80/85 mode
  1069.      │ │ │ │ │ │ └───── 1 = auto EOI, 0=normal EOI
  1070.      │ │ │ │ └─┴────── slave/master buffered mode (see below)
  1071.      │ │ │ └───────── 1 = special fully nested mode (SFNM), 0=sequential
  1072.      └─┴─┴────────── unused (set to zero)
  1073.  
  1074. %    Bits
  1075. %     32    Buffering Mode
  1076.      00    not buffered
  1077.      01    not buffered
  1078.      10    buffered mode slave (PC mode)
  1079.      11    buffered mode master (PC mode)
  1080.  
  1081. %    Operation Control Word 1 / Interrupt Mask Reg.    (Ports 21h & A1h)
  1082.  
  1083.     │7│6│5│4│3│2│1│0│  OCW1 - IMR Interrupt Mask Register
  1084.      │ │ │ │ │ │ │ └──── 0 = service IRQ0, 1 = mask off
  1085.      │ │ │ │ │ │ └───── 0 = service IRQ1, 1 = mask off
  1086.      │ │ │ │ │ └────── 0 = service IRQ2, 1 = mask off
  1087.      │ │ │ │ └─────── 0 = service IRQ3, 1 = mask off
  1088.      │ │ │ └──────── 0 = service IRQ4, 1 = mask off
  1089.      │ │ └───────── 0 = service IRQ5, 1 = mask off
  1090.      │ └────────── 0 = service IRQ6, 1 = mask off
  1091.      └─────────── 0 = service IRQ7, 1 = mask off
  1092.  
  1093. %    Operation Control Word 2 / Interrupt Command Reg. (Ports 20h & A0h)
  1094.  
  1095.     │7│6│5│4│3│2│1│0│  OCW2 - ICR Interrupt Command Register
  1096.      │ │ │ │ │ └─┴─┴──── interrupt request level to act upon
  1097.      │ │ │ │ └───────── must be 0 for OCW2
  1098.      │ │ │ └────────── must be 0 for OCW2
  1099.      └─┴─┴─────────── EOI type (see table)
  1100.  
  1101. %    Bits
  1102. %    765  EOI - End Of Interrupt code (PC specific)
  1103.     001  non-specific EOI command
  1104.     010  NOP
  1105.     011  specific EOI command
  1106.     100  rotate in automatic EOI mode
  1107.     101  rotate on non-specific EOI command
  1108.     110  set priority command  (uses bits 2-0)
  1109.     111  rotate on specific EOI command
  1110.  
  1111. %    Operation Control Word 3   (Ports 20h & A0h)
  1112.  
  1113.     │7│6│5│4│3│2│1│0│  OCW3
  1114.      │ │ │ │ │ │ │ └─── 1=read IRR on next read, 0=read ISR on next read
  1115.      │ │ │ │ │ │ └──── 1=act on value of bit 0, 0=no action if bit 0 set
  1116.      │ │ │ │ │ └───── 1=poll command issued, 0=no poll command issued
  1117.      │ │ │ │ └────── must be 1 for OCW3
  1118.      │ │ │ └─────── must be 0 for OCW3
  1119.      │ │ └──────── 1=set special mask, 0=reset special mask
  1120.      │ └───────── 1=act on value of bit 5, 0=no action if bit 5 set
  1121.      └────────── not used (zero)
  1122.  
  1123. %    Other Registers
  1124.  
  1125.     IRR - Interrupt Request Register, maintains a bit vector indicating
  1126.           which IRQ hardware events are awaiting service.    Highest
  1127.           level interrupt is reset when the CPU acknowledges interrupt.
  1128.     ISR - In Service Register, tracks IRQ line currently being serviced.
  1129.           Updated by EOI command.
  1130.  
  1131.  
  1132. ^Hardware Interrupt Sequence of Events:
  1133.  
  1134.     1. 8259 ~IRQ~ signal is raised high by hardware setting the
  1135.        corresponding IRR bits true.
  1136.  
  1137.     2. PIC evaluates the interrupt requests and signals the CPU
  1138.        where appropriate.
  1139.  
  1140.     3. CPU acknowledges the INT by pulsing INTA (inverted)
  1141.  
  1142.     4. INTA signal from CPU is received by the PIC, which then sets the
  1143.        highest priority ISR bit, and clears the corresponding IRR bit
  1144.  
  1145.     5. CPU sends a second INTA pulse which causes the PIC to send the
  1146.        interrupt ID byte onto the bus.  CPU begins interrupt processing.
  1147.  
  1148.     6. Interrupts of lower and equal priority are blocked until a
  1149.        Non-Specific EOI (20h) is sent to the command port.
  1150.  
  1151.  
  1152. ^Initialization Procedure
  1153.  
  1154. %    Initialization
  1155.      1. write ICW1 to port 20h
  1156.      2. write ICW2 to port 21h
  1157.      3. if ICW1 bit D1=1  do nothing
  1158.         if ICW1 bit D1=0  write ICW3 to port 20h
  1159.      4. write ICW4 to port 21h
  1160.      5. OCW's can follow in any order
  1161.  
  1162.  
  1163. ^8259 Programmable Interrupt Controller Notes
  1164.  
  1165.     - Operation Command Word (OCW), commands that set the 8259 in
  1166.       various interrupt modes.  These can be written to the 8259
  1167.       anytime after initialization.
  1168.     - The 8259 differentiates between the OCW1, OCW2 and OCW3 by the
  1169.       port address and the value of the data bits D4 and D3.  ICW2
  1170.       through ICW4 are order related and must follow ICW1.    ICW1 is
  1171.       identified by an even port number and data bit D4 set to 1.
  1172.     - PCs operate in fully nested mode, where a Non-Specific EOI resets
  1173.       the interrupt identified by the highest bit value in the ISR
  1174.     - 8259s can be chained together where the INT pin (output) of a
  1175.       slave 8259 can be used as the input to an IRQ line allowing up
  1176.       to 64 priority vectored interrupts.  AT level machines use two
  1177.       8259's for a total of 16 hardware interrupt levels
  1178.     - the first 8259 ports are located at 20h and 21h
  1179.     - the second 8259 ports are located at A0h and A1h
  1180.     - PC and AT interrupts are Edge Triggered while PS/2's are Level
  1181.       Triggered
  1182.     - some ASIC chips designed for Tandy 1000 Systems malfunction if
  1183.       specific and non-specific EOIs are mixed
  1184.     - for a more in-depth discussion of the 8259, see Intel's "Micro-
  1185.       processor and Peripherals Handbook, Volume I"
  1186.  
  1187.     - see  ~PORTS~  and  ~INT TABLE~
  1188. :BUS
  1189. ^PC, XT and AT 8 bit BUS Structure
  1190.  
  1191.                    ┌────────┐
  1192.                Ground ─┤B1    A1├─ -I/O CH CHK (NMI)
  1193.            +Reset DRV ─┤B2    A2├─ +Data 7
  1194.               +5V ─┤B3    A3├─ +Data 6
  1195.             +IRQ2 ─┤B4    A4├─ +Data 5
  1196.               -5V ─┤B5    A5├─ +Data 4
  1197.             +DRQ2 ─┤B6    A6├─ +Data 3
  1198.              -12V ─┤B7    A7├─ +Data 2
  1199.           -CARD SLCTD ─┤B8    A8├─ +Data 1
  1200.              +12V ─┤B9    A9├─ +Data 0
  1201.                Ground ─┤B10  A10├─ +I/O CH RDY
  1202.             -MEMW ─┤B11  A11├─ +AEN
  1203.             -MEMR ─┤B12  A12├─ +Address 19
  1204.              -IOW ─┤B13  A13├─ +Address 18
  1205.              -IOR ─┤B14  A14├─ +Address 17
  1206.                -DACK3 ─┤B15  A15├─ +Address 16
  1207.             +DRQ3 ─┤B16  A16├─ +Address 15
  1208.                -DACK1 ─┤B17  A17├─ +Address 14
  1209.             +DRQ1 ─┤B18  A18├─ +Address 13
  1210.         -DACK0 (MREF) ─┤B19  A19├─ +Address 12
  1211.               CLK ─┤B20  A20├─ +Address 11
  1212.             +IRQ7 ─┤B21  A21├─ +Address 10
  1213.             +IRQ6 ─┤B22  A22├─ +Address 9
  1214.             +IRQ5 ─┤B23  A23├─ +Address 8
  1215.             +IRQ4 ─┤B24  A24├─ +Address 7
  1216.             +IRQ3 ─┤B25  A25├─ +Address 6
  1217.                -DACK2 ─┤B26  A26├─ +Address 5
  1218.               +TC ─┤B27  A27├─ +Address 4
  1219.              +ALE ─┤B28  A28├─ +Address 3
  1220.               +5V ─┤B29  A29├─ +Address 2
  1221.              +OSC ─┤B30  A30├─ +Address 1
  1222.                Ground ─┤B31  A31├─ +Address 0
  1223.                    └────────┘
  1224.  
  1225. ^AT 16 Bit BUS Extension
  1226.  
  1227.                    ┌────────┐
  1228.             -MEM CS16 ─┤D1    C1├─ SBHE
  1229.             -I/O CS16 ─┤D2    C2├─ Address 23
  1230.             IRQ10 ─┤D3    C3├─ Address 22
  1231.             IRQ11 ─┤D4    C4├─ Address 21
  1232.             IRQ12 ─┤D5    C2├─ Address 20
  1233.             IRQ15 ─┤D6    C6├─ Address 19
  1234.             IRQ14 ─┤D7    C7├─ Address 18
  1235.                -DACK0 ─┤D8    C8├─ Address 17
  1236.              DRQ0 ─┤D9    C9├─ -MEMR
  1237.                -DACK5 ─┤D10  C10├─ -MEMW
  1238.              DRQ5 ─┤D11  C11├─ Data 8
  1239.                -DACK6 ─┤D12  C12├─ Data 9
  1240.              DRQ6 ─┤D13  C13├─ Data 10
  1241.                -DACK7 ─┤D14  C24├─ Data 11
  1242.              DRQ7 ─┤D15  C15├─ Data 12
  1243.               +5V ─┤D16  C16├─ Data 13
  1244.               -Master ─┤D17  C17├─ Data 14
  1245.                Ground ─┤D18  C18├─ Data 15
  1246.                    └────────┘
  1247.  
  1248.     - pin numbering starts from the rear of the machine
  1249.  
  1250.  
  1251. %     Signal             Description
  1252.  
  1253.     A0-A19         Address Bits 0-19 allow access to 1Mb memory and 64K of
  1254.              port addresses.
  1255.     A17-A23      Address Bits 17-23 allow access from 1Mb memory to 16Mb
  1256.     AEN         Address Enable; When active the DMA controller has
  1257.              control of the Address and Data BUS as well as the
  1258.              MEMR/MEMW lines. When inactive the CPU has control of
  1259.              these lines
  1260.     ALE         Address Latch Enable (output); used to latch addresses
  1261.              from the CPU.  Forced active during DMA cycles.
  1262.     CARD SLCTD   Card Selected; activated by cards in the XT's slot 8
  1263.     CLK         System clock signal (actual BUS speed)
  1264.     D0-D7         Data bits 0-7 for I/O to memory and I/O
  1265.     DACK0-DACK3  DMA Acknowledge for channels 0-3; used by the controller
  1266.              to acknowledge DMA requested.  DACK0 is used for memory
  1267.              refresh (MREF)
  1268.     DRQ0-DRQ3    DMA Request 0-3; used by peripherals to get service from
  1269.              the DMA controller;  Held active until the corresponding
  1270.              DACKx signal becomes active.
  1271.     I/O CH CHK   I/O Channel Check; Generates a Non Maskable Interrupt
  1272.     I/O CH RDY   I/O Channel Ready; pulled inactive my memory or I/O
  1273.              devices to lengthen memory or I/O cycles.    Usually used
  1274.              by slower devices to add wait states.  Should not be
  1275.              held inactive for more than 17 cycles.
  1276.     I/O CS16     I/O Chip Select 16 Bit; 16 bit I/O cycle
  1277.     IOR         I/O Read; instructs an I/O device to drive its data
  1278.              onto the system BUS
  1279.     IOW         I/O Write; instructs an I/O device to read data from
  1280.              the BUS
  1281.     IRQ2-IRQ7    Interrupt Requests 2-7; signals the CPU that an I/O
  1282.              device needs service  (see ~8259~)
  1283.     MASTER         Used with DRQ to gain control of system
  1284.     MEM CS16     Memory Chip Select 16 Bit; 16 Bit memory cycle
  1285.     MEMR         Memory Read; this signal is driven by the CPU or DMA
  1286.              controller and instructs memory to drive its data onto
  1287.              the system BUS.  Present on both PC and AT extension BUS
  1288.     MEMW         Memory Write;  this signal is driven by the CPU or DMA
  1289.              controller and instructs memory to read and store data
  1290.              from the system BUS.  Present on both PC and AT
  1291.              extension BUS
  1292.     OSC         Oscillator; 14.31818 MHz clock (70ns period); 50% duty
  1293.              cycle
  1294.     RESET DRV    Reset Drive; used to reset system logic
  1295.     SBHE         System BUS High Enable; activates data bits 8-15 on AT
  1296.              extension BUS
  1297.     TC         Terminal Count; pulses when the terminal count for a
  1298.              DMA channel is reached
  1299.  
  1300.  
  1301.     - all ISA BUS signals use standard TTL levels
  1302.     - input and output are relative to the CPU
  1303. :capacitor values
  1304. ^Ceramic File Capacitor Color Code Chart
  1305.  
  1306. %         Color     Digit     Multiplier
  1307.  
  1308.          Black     0      1
  1309.          Brown     1      10
  1310.          Red     2      100         Gold      ± 5% tolerance
  1311.          Orange     3      1,000      Silver   ±10% tolerance
  1312.          Yellow     4      10,000     White      ±10% tolerance
  1313.          Green     5      100,000
  1314.          Blue     6      1,000,000
  1315.          Violet     7
  1316.          Gray     8
  1317.          White     9
  1318.  
  1319. %         ╒═████░██▒██▓██░██▒████═╕
  1320. %         ┴                 ┴
  1321.            │  │  │  │  │
  1322.            │  │  │  └──┴─────── tolerance/temperature dependance
  1323.            │  │  └─────────── picofarad value multiplier
  1324.            └──┴──────────── first 2 digits of picofarad value
  1325. :CMOS RAM:CMOS clock:RTC
  1326. ^CMOS RTC - Real Time Clock and Memory (ports 70h & 71h)
  1327.  
  1328. %    Reg#              Description
  1329.  
  1330.      00  RTC seconds
  1331.      01  RTC seconds alarm
  1332.      02  RTC minutes
  1333.      03  RTC minutes alarm
  1334.      04  RTC hours
  1335.      05  RTC hours alarm
  1336.      06  RTC day of week
  1337.      07  RTC day of month
  1338.      08  RTC month
  1339.      09  RTC year
  1340.      0A  RTC Status register A:
  1341.  
  1342.         │7│6│5│4│3│2│1│0│  RTC Status Register A
  1343.          │ │ │ │ └─┴─┴─┴──── rate selection Bits for divider output
  1344.          │ │ │ │         frequency (set to 0110 = 1.024kHz, 976.562µs)
  1345.          │ └─┴─┴────────── 22 stage divider, time base being used;
  1346.          │              (initialized to 010 = 32.768kHz)
  1347.          └────────────── 1=time update in progress, 0=time/date available
  1348.      
  1349.      0B  RTC Status register B:
  1350.  
  1351.         │7│6│5│4│3│2│1│0│  RTC Status Register B
  1352.          │ │ │ │ │ │ │ └──── 1=enable daylight savings, 0=disable (default)
  1353.          │ │ │ │ │ │ └───── 1=24 hour mode, 0=12 hour mode (24 default)
  1354.          │ │ │ │ │ └────── 1=time/date in binary, 0=BCD (BCD default)
  1355.          │ │ │ │ └─────── 1=enable square wave frequency, 0=disable
  1356.          │ │ │ └──────── 1=enable update ended interrupt, 0=disable
  1357.          │ │ └───────── 1=enable alarm interrupt, 0=disable
  1358.          │ └────────── 1=enable periodic interrupt, 0=disable
  1359.          └─────────── 1=disable clock update, 0=update count normally
  1360.  
  1361.      0C  RTC Status register C (read only):
  1362.  
  1363.         │7│6│5│4│3│2│1│0│  RTC Status Register C  (read only)
  1364.          │ │ │ │ └─┴─┴─┴──── reserved (set to 0)
  1365.          │ │ │ └────────── update ended interrupt enabled
  1366.          │ │ └────────── alarm interrupt enabled
  1367.          │ └────────── periodic interrupt enabled
  1368.          └────────── IRQF flag
  1369.  
  1370.      0D  RTC Status register D (read only):
  1371.  
  1372.         │7│6-0│  RTC Status Register D  (read only)
  1373.          │    └───── reserved (set to 0)
  1374.          └────── 1=CMOS RAM has power, 0=CMOS RAM has lost power
  1375.  
  1376.      0E  Diagnostic status byte:
  1377.  
  1378.         │7│6│5│4│3│2│1│0│  Diagnostic Status Byte
  1379.          │ │ │ │ │ │ └─┴──── reserved
  1380.          │ │ │ │ │ └─────── 1=time is invalid, 0=ok (POST validity check)
  1381.          │ │ │ │ └──────── 1=fixed disk 0 failed initialization, 0=ok
  1382.          │ │ │ └───────── 1=memory size doesn't match config info, 0=ok
  1383.          │ │ └────────── 1=invalid config info found, 0=ok (see below)
  1384.          │ └─────────── 1=config record checksum is bad, 0=ok
  1385.          └──────────── 1=RTC lost power, 0=power state stable
  1386.          
  1387.      0F  Shutdown status byte:
  1388.  
  1389.            0  soft reset or unexpected shutdown
  1390.            1  shut down after memory size determination
  1391.            2  shut down after memory test
  1392.            3  shut down with memory error
  1393.            4  shut down with boot loader request
  1394.            5  JMP DWORD request with INT init
  1395.            6  protected mode test 7 passed
  1396.            7  protected mode test 7 failed
  1397.            8  protected mode test1 failed
  1398.            9  block move shutdown request
  1399.            A  JMP DWORD request without INT init
  1400.  
  1401.      10  Diskette drive type for A: and B:
  1402.          
  1403.         │7│6│5│4│3│2│1│0│  Diskette drive type for A: and B:
  1404.          │ │ │ │ └─┴─┴─┴──── second diskette type
  1405.          └─┴─┴─┴─────────── first diskette type
  1406.  
  1407.         0000  no drive installed
  1408.         0001  DSDD 48 TPI drive
  1409.         0010  DSQD 96 TPI drive
  1410.         other values are reserved
  1411.  
  1412.      11  Reserved
  1413.      12  Fixed disk drive type for drive 0 and drive 1
  1414.  
  1415.         │7│6│5│4│3│2│1│0│  Diskette drive type for A: and B:
  1416.          │ │ │ │ └─┴─┴─┴──── second hard disk drive code (0000=no disk)
  1417.          └─┴─┴─┴─────────── first hard disk drive code (0000=no disk)
  1418.  
  1419.      13  Reserved
  1420.      14  Equipment byte
  1421.  
  1422.         │7│6│5│4│3│2│1│0│  Equipment byte
  1423.          │ │ │ │ │ │ │ └──── 1=diskette drives installed, 0=none
  1424.          │ │ │ │ │ │ └───── 1=math coprocessor installed, 0=none
  1425.          │ │ │ │ └─┴────── unused
  1426.          │ │ └─┴─────── primary display
  1427.          └─┴────────── number of diskette drives installed
  1428.  
  1429. %        Bits               Bits
  1430. %         54  Primary Display    76  Number of Drives
  1431.          00  reserved        00  1 diskette drive
  1432.          01  40 column color    01  2 diskette drives
  1433.          10  80 column color    10  reserved
  1434.          11  monochrome        11  reserved
  1435.  
  1436.      15  LSB of system base memory in 1k blocks
  1437.      16  MSB of system base memory in 1k blocks
  1438.      17  LSB of total extended memory in 1k blocks
  1439.      18  MSB of total extended memory in 1k blocks
  1440.      19  Drive C extension byte (reserved AT)
  1441.      1A  Drive D extension byte (reserved AT)
  1442.      1B  13 bytes reserved
  1443.      2E  CMOS checksum of bytes 10h-20h (MSB)
  1444.      2F  CMOS checksum of bytes 10h-20h (LSB)
  1445.      30  LSB of extended memory size found above 1 megabyte during POST
  1446.      31  MSB of extended memory size found above 1 megabyte during POST
  1447.      32  Date century byte in BCD ( BIOS interface to read and set)
  1448.      33  Information flags (set during power-on)
  1449.  
  1450.         │7│6│5-0│  Information Flags
  1451.          │ │  └───── reserved
  1452.          │ └─────── initial setup message flag
  1453.          └──────── 1=IBM 128k expansion installed, 0=none
  1454.  
  1455.      34  12 bytes reserved
  1456.  
  1457.  
  1458. %    Programming Considerations:
  1459.  
  1460.     Write CMOS address to read or write to port 70h
  1461.     Read/write port 71h to get/set data
  1462.  
  1463.  
  1464.     - the information here is only applicable to AT and PS/2 systems
  1465.     - INT 1A is used to read/set the Time of Day and Alarm.  To use the
  1466.       alarm, INT 4A must be a valid interrupt service routine.
  1467.     - configuration settings are maintained using the Motorola MC146818
  1468.       Real Time Clock.  Each of this chips 64 memory registers is used
  1469.       for storage (0-3F).
  1470.     - Bit 5 of the diagnostic (0Eh) status byte is set during a power
  1471.       on test.  This Bit is set if no floppy disks are found or the
  1472.       display doesn't match the system display switch setting.
  1473.     - all addresses sent to port 70h have Bits 7&6 clear since Bit 7
  1474.       of port 70h is used to enable/disable NMI.  Setting this Bit 7
  1475.       enables NMI, clearing this Bit disables NMI.
  1476.     - when masking the NMI through using port 70H, port 71H should be
  1477.       read immediately after or the RTC may be left in an unknown state.
  1478.       This wont affect the PS/2 watchdog timer or system channel timeout.
  1479.  
  1480.     - see    ~INT 1A~
  1481. :Epson printer codes
  1482. ^Epson FX Printer Codes
  1483.  
  1484. %    Printer Operation:
  1485. %    Decimal      ASCII            Description
  1486.      7         BEL      Beeper
  1487.     17         DC1      Select printer
  1488.     19         DC3      Deselect printer
  1489.     27 25 48     ESC EM 0      Turn cut sheet feeder control off
  1490.     27 25 52     ESC EM 4      Turn cut sheet feeder control on
  1491.     27 56         ESC 8      Disable paper out sensor
  1492.     27 57         ESC 9      Enable paper out sensor
  1493.     27 60         ESC <      Select unidirectional mode for one line
  1494.     27 64         ESC @      Initialize printer
  1495.     27 85 48     ESC U 0      Cancel unidirectional mode
  1496.     27 85 49     ESC U 1      Select unidirectional mode
  1497.     27 115 48    ESC s 0      Turn half speed mode off
  1498.     27 115 49    ESC s 1      Turn half speed mode on
  1499.  
  1500. %    Vertical/Horizontal Motion:
  1501. %    Decimal      ASCII            Description
  1502.      8         BS       Backspace
  1503.      9         HT       Horizontal tab
  1504.     10         LF       Line Feed
  1505.     11         VT       Vertical Tab
  1506.     12         FF       Form Feed
  1507.     27 47 c      ESC / c      Select vertical tab channel (c=0..7)
  1508.     27 48         ESC 0      Select 8 lines per inch
  1509.     27 49         ESC 1      Select 7/72 inch line spacing
  1510.     27 50         ESC 2      Select 6 lines per inch
  1511.     27 51 n      ESC 3 n      Select n/216 inch line spacing (n=0..255)
  1512.     27 65 n      ESC A n      Select n/72 inch line spacing (n=0..85)
  1513.     27 66 0      ESC B NUL      Clear Vertical tabs
  1514.     27 66 tabs   ESC B tabs   Select up to 16 vertical tabs where tabs are
  1515.                   ascending values from 1..255 ending with NUL
  1516.     27 67 n      ESC C n      Select page length in lines (n=1..127)
  1517.     27 67 48 n   ESC C 0 n      Select page length in inches (n=1..22)
  1518.     27 68 0      ESC D NUL      Clears all horizontal tables
  1519.     27 68 tabs 0 ESC D tabs NUL  Sets up to 32 horizontal tabs with
  1520.                   ascending values 1-137.  NUL or a value
  1521.                   less than previous tab ends command.
  1522.     27 74 n      ESC J n      Immediate n/216 inch line feed (n=0..255)
  1523.     27 78 n      ESC N n      Select skip over perforation (n=1..127)
  1524.     27 79         ESC O      Cancel skip over perforation
  1525.     27 81 n      ESC Q n      Set right margin (n=column)
  1526.     27 98 b c 0  ESC b c NUL  Clear vertical tabs in channel (c=0..7)
  1527.     27 98 c tabs ESC b c tabs Select up to 16 vertical tabs in channels
  1528.                   (c=0..7) where tabs are ascending values
  1529.                   from 1..255 ending with NUL
  1530.     27 101 48 s  ESC e 0 s      Set horizontal tab to increments of 's'
  1531.     27 101 49 s  ESC e 1 s      Set vertical tab to increments of 's'
  1532.     27 102 48 s  ESC f 0 s      Set horizontal skip to increments of 's'
  1533.     27 102 49 s  ESC f 1 s      Set vertical skip to increments of 's'
  1534.     27 106 n     ESC j n      Reverse linefeed (n/216 inch after buffer)
  1535.     27 108 n     ESC l n      Set left margin (n=column)
  1536.  
  1537. %    Printing Style:
  1538. %    Decimal      ASCII            Description
  1539.     27 33 n      ESC ! n      Master select where n is a combination of:
  1540.                     0  Pica         16  Double Strike
  1541.                     1  Elite         32  Double Wide
  1542.                     4  Condensed     64  Italic
  1543.                     8  Emphasized    128  Underline
  1544.                   Pica & Elite and Condensed/Emphasized are
  1545.                   mutually exclusive
  1546.     27 107 48    ESC k 0      Select NLQ Roman font
  1547.     27 107 49    ESC k 1      Select NLQ Sans Serif font
  1548.     27 120 48    ESC x 0      Select draft mode
  1549.     27 120 49    ESC x 1      Select NLQ mode
  1550.  
  1551. %    Print Size and Character Width:
  1552. %    Decimal     ASCII           Description
  1553.     14        SO          Select double width for one line
  1554.     15        SI          Select condensed mode
  1555.     18        DC2       Cancel condensed mode
  1556.     20        DC4       Cancel one line double width mode
  1557.     27 14        ESC SO      Double width for one line (duplicate)
  1558.     27 15        ESC SI      Select condensed mode (duplicate)
  1559.     27 77        ESC M      Select elite width (12 cpi)
  1560.     27 80        ESC P      Select pica width (10 cpi)
  1561.     27 87 48    ESC W 0      Cancel double width mode
  1562.     27 87 49    ESC W 1      Select double width mode
  1563.  
  1564. %    Print Enhancement:
  1565. %    Decimal     ASCII           Description
  1566.     27 45 48    ESC - 0      Cancel underlining
  1567.     27 45 49    ESC - 1      Select underlining
  1568.     27 69        ESC E      Select emphasized mode
  1569.     27 70        ESC F      Cancel emphasized mode
  1570.     27 71        ESC G      Select double strike mode
  1571.     27 72        ESC H      Cancel double strike mode
  1572.     27 83 48    ESC S 0      Select superscript
  1573.     27 83 49    ESC S 1      Select subscript
  1574.     27 84        ESC T      Cancel superscript/subscript
  1575.  
  1576. %    Character Sets:
  1577. %    Decimal     ASCII           Description
  1578.     27 52        ESC 4      Select italic mode
  1579.     27 53        ESC 5      Cancel italic mode
  1580.     27 54        ESC 6      Enable printing of characters (128-159,255)
  1581.     27 55        ESC 7      Cancel [ESC 6] command
  1582.     27 82 n     ESC R n      Select International character set where
  1583.                   numeric 'n' is:
  1584.                     0  USA          7  Spain I
  1585.                     1  France          8  Japan
  1586.                     2  Germany          9  Norway
  1587.                     3  United Kingdom     10  Denmark II
  1588.                     4  Denmark I     11  Spain II
  1589.                     5  Sweden         12  Latin America
  1590.                     6  Italy
  1591.     27 116 0    ESC t NUL     Select italic character set
  1592.     27 116 1    ESC t SOH     Select Epson character set
  1593.     
  1594. %    User Defined Characters:
  1595. %    Decimal        ASCII            Description
  1596.     27 37 0      ESC % NUL        Selects normal character set
  1597.     27 37 1      ESC % SOH        Selects user defined set
  1598.     27 38 0      ESC & NUL ?    Select user defined chars (see manual)
  1599.     27 58 0 0 0  ESC : NUL NUL NUL    Copy ROM into RAM
  1600.  
  1601. %    Graphics Character Sets:
  1602. %    Decimal        ASCII            Description
  1603.     27 42 0 n1 n2  ESC * NUL n1 n2    Select single density graphics
  1604.     27 42 1 n1 n2  ESC * SOH n1 n2    Select double density graphics
  1605.     27 63 s n      ESC ? s n    Reassign graphics mode
  1606.                     's'=(K,L,Y or Z) to mode 'n'=(0..6)
  1607.     27 75 n1 n2    ESC K n1 n2    Single density graphics (60 dpi)
  1608.     27 76 n1 n2    ESC L n1 n2    Double density graphics (120 dpi)
  1609.     27 89 n1 n2    ESC Y n1 n2    Hi-speed double den graphics (120 dpi)
  1610.     27 90 n1 n2    ESC Z n1 n2    Quad density graphics (240 dpi)
  1611.     27 94 m n1 n2  ESC ^ m n1 n2    Select 9 pin graphics mode
  1612.  
  1613.     number of columns = n1 + (n2 * 256)
  1614.  
  1615. %    Other:
  1616. %    Decimal      ASCII            Description
  1617.      13         CR       Carriage Return
  1618.      24         CAN      Cancel text in line (but not control codes)
  1619.     127         DEL      Delete character (but not control codes)
  1620.      27 32 n     ESC SP n      Space in n/72 inch following each NLQ char
  1621.      27 35         ESC #      MSB control sequence cancel
  1622.      27 36         ESC $      Select absolute dot position
  1623.      27 61         ESC =      MSB = 0
  1624.      27 62         ESC >      MSB = 1
  1625.      27 73 48    ESC I 0      Cancel above [ESC I 1]
  1626.      27 73 49    ESC I 1      Printable codes expansion (0-31,128-159)
  1627.      27 92         ESC \      Select relative dot position
  1628.      27 97    n    ESC a n      NLQ justification where numeric 'n' is:
  1629.                     0  left justification  (default)
  1630.                     1  center
  1631.                     2  right justification
  1632.                     3  full justification
  1633.      27 112      ESC p      Select/cancel proportional mode
  1634.  
  1635.  
  1636.     - the codes listed are relative to the Epson LX 800
  1637.     - in several situations where a numeric value of zero or one is
  1638.       required, the ASCII value of the number can be substituted
  1639. :hard disks drives:drive specifications:disk drives:hard drives
  1640. ^Hard Drive Specifications
  1641.  
  1642. %                        Avg          Miscellaneous
  1643. %   Manufacturer        MB    Cyl  Hds Access      Information
  1644.  
  1645.     Alloy ID-160       125             30
  1646.     Atasi AT3020          635   3      Wedge servo
  1647.     Atasi AT3033          635   5      Wedge servo
  1648.     Atasi AT3046          635   7
  1649.     Atasi AT3051          703   7
  1650.     Atasi AT3085         1024   8
  1651.     Bull D530                  987   3
  1652.     Bull D550                  987   5
  1653.     Bull D570                  987   7
  1654.     Bull D585                  987   7
  1655.     Bull D530                1166   3
  1656.     CDC Wren I 9415-21              697   3      STnn, MFM, Voice coil
  1657.     CDC Wren I 9415-36              697   5      STnn, MFM, Voice coil
  1658.     CDC Wren II 9415-25              615   4      STnn, MFM, Voice coil
  1659.     CDC Wren II 9415-30              989   3      STnn, MFM, Voice coil
  1660.     CDC Wren II 9415-38              733   5      STnn, MFM, Voice coil
  1661.     CDC Wren II 9415-48              925   5      STnn, MFM, Voice coil
  1662.     CDC Wren II 9415-51     42    989   5    28      STnn, MFM, Voice coil
  1663.     CDC Wren II 9415-67              925   7      STnn, MFM, Voice coil
  1664.     CDC Wren II 9415-86     69    925   9      STnn, MFM, Voice coil
  1665.     CDC Wren II 9416-182   144    969   9      STnn, MFM, Voice coil
  1666.     CDC Wren V                   380  15    16   ESDI/SCSI, FH
  1667.     CDC Wren V                   702  15    16   ESDI/SCSI, FH
  1668.     CDC Wren VI                   766  15   16.5  ESDI/SCSI, FH
  1669.     CDC Wren VII      1.2G           15   16.5  SCSI, FH
  1670.     CMI CM3426                  612   4
  1671.     CMI CM5205                  256   4
  1672.     CMI CM5410                  256   4
  1673.     CMI CM5616                  256   4
  1674.     CMI CM6426                  615   4
  1675.     CMI CM6426S                  640   4
  1676.     CMI CM6640                   640   4
  1677.     CMS F40-K                  42   1024   5    22      STnn, MFM, Voice coil
  1678.     CMS F60-K                  42   1024   7      STnn, MFM, Voice coil
  1679.     CMS F70-K                  42   1024   8      STnn, MFM, Voice coil
  1680.     CMS F80-K                  42   1024   9      STnn, MFM, Voice coil
  1681.     Columbia SCSI        42    834   3    19   SCSI, RLL, Band stepper
  1682.     Core AT40F                  40    564   4    10   ESDI, MFM, Voice coil
  1683.     Core AT43                  43    988   5    20   STnn, MFM, Voice coil
  1684.     Core HC150                150   1024+       18   ESDI
  1685.     Emerald DOS 150-3000   150   1024+              ESDI
  1686.     Emulex ATS-170       142   1022               SCSI & ESDI
  1687.     Emulex ATS-380       310   1222               SCSI & ESDI
  1688.     FlashCard 49        49    615   6    28   STnn, RLL, Voice coil
  1689.     Fuji 302-13                  10    612   2
  1690.     Fuji 302-26                  20    612   4
  1691.     Fujitsu M2230AS           320   2
  1692.     Fujitsu M2233AS         10    320   4
  1693.     Fujitsu M2234AS           320   6
  1694.     Fujitsu M2235AS         21    320   8    56
  1695.     Fujitsu M2241AS               754   4
  1696.     Fujitsu M2242AS         43    754   7    33   STnn, MFM, Voice coil
  1697.     Fujitsu M2243AS         72    754  11    33   STnn, MFM, Voice coil
  1698.     Fujitsu M2263       778u           14    16   ESDI/SCSI, FH
  1699.     Hitachi DK511-5        699            7
  1700.     Hitachi DK511-8        823         10
  1701.     Hitachi DK515C-78      780u            8    16   SCSI, FH
  1702.     Hitachi DK515-78       780u            8    16   ESDI, FH
  1703.     IMI 5006H                 306   2
  1704.     IMI 5012H                 306   4
  1705.     IMI 5018H              306   6
  1706.     Imprimis (see CDC)
  1707.     Irwin 416                 819   2
  1708.     Irwin 510                 628   2      HD/tape
  1709.     Irwin 516                 819   2      HD/tape
  1710.     Irwin 561              180   4
  1711.     Kalok KL320                  26u   615   4    40   STnn, MFM, Band stepper
  1712.     Kalok KL330                  38u   615   4    40   STnn, RLL, Band stepper
  1713.     Maxtor XT1065        52    918   7    28   STnn, Voice coil
  1714.     Maxtor XT1085        68   1024   8    28   STnn, Voice coil
  1715.     Maxtor XT1105        83    918  11    28   STnn, Voice coil
  1716.     Maxtor XT1140       112    918  15    28   STnn, Voice coil
  1717.     Maxtor XT1190       150   1224        28   STnn, Voice coil
  1718.     Maxtor XT2085         1224   7    28   STnn, Voice coil
  1719.     Maxtor XT2140         1224  11      STnn, Voice coil
  1720.     Maxtor XT2190       160   1224  15      STnn, Voice coil
  1721.     Maxtor XT4170E       179u  1224   7    14   ESDI, MFM, FH Voice coil
  1722.     Maxtor XT4230E       231u  1224   9    16   ESDI, MFM, FH Voice coil
  1723.     Maxtor XT4380E       384u  1224  15    16   ESDI, MFM, FH Voice coil
  1724.     Maxtor XT4380S       384u  1224        16   SCSI, MFM, FH Voice coil
  1725.     Maxtor XT8380E       410u                14.5  ESDI, FH
  1726.     Maxtor XT8380S       410u                14.5  SCSI, FH
  1727.     Maxtor XT8760E       768u                16.5  ESDI, FH
  1728.     Maxtor XT8760S       768u                16.5  SCSI, FH
  1729.     Micropolis 1302              830   3
  1730.     Micropolis 1303              830   5
  1731.     Micropolis 1304              830   6
  1732.     Micropolis 1323            1024   4
  1733.     Micropolis 1323A           1024   5
  1734.     Micropolis 1324            1024   6
  1735.     Micropolis 1324A           1024   7
  1736.     Micropolis 1325            1024   8
  1737.     Micropolis 1333A        44   1024   5    28   STnn, MFM, Voice coil
  1738.     Micropolis 1335         71   1024   8    30
  1739.     Micropolis 1355        142   1022
  1740.     Micropolis 1518       1.2Gu        15    14   ESDI, FH
  1741.     Micropolis 1558        382u           15    18   ESDI, FH
  1742.     Micropolis 1568        765u           15    16   ESDI, FH
  1743.     Micropolis 1578        382u           15    18   SCSI, FH
  1744.     Micropolis 1588        765u           15    16   SCSI, FH
  1745.     Micropolis 1598       1.2Gu           15    14   SCSI, FH
  1746.     Microscience HH312      10    306   4
  1747.     Microscience HH325      20    612   4
  1748.     Microscience HH612      10    306   4
  1749.     Microscience HH725      21    612   4      Band stepper
  1750.     Microscience HH1050     44   1024   5    28   STnn, MFM, Voice coil
  1751.     Miniscribe 1006               306   2
  1752.     Miniscribe 1012              306   4
  1753.     Miniscribe 2006               306   2
  1754.     Miniscribe 3012         10    612   4
  1755.     Miniscribe 3053         44   1024   6    25   STnn, MFM, Voice coil
  1756.     Miniscribe 3212         10    612   4
  1757.     Miniscribe 3412           306   4
  1758.     Miniscribe 3425         20    615   4
  1759.     Miniscribe 3438       31.2    615   4
  1760.     Miniscribe 3650         50u   809   6    61   STnn, MFM, linear drive
  1761.     Miniscribe 3650F        50u   809   6    46   STnn, MFM, linear drive
  1762.     Miniscribe 3675         75u   809   6    61   STnn, MFM, linear drive
  1763.     Miniscribe 4010               480   2
  1764.     Miniscribe 4020               480   4
  1765.     Miniscribe 6032         26   1024   3
  1766.     Miniscribe 6053         43   1024   5    28   STnn, MFM, FH Voice coil
  1767.     Miniscribe 6085         71   1024   8
  1768.     Miniscribe 6128        104   1024   8
  1769.     Miniscribe 8051A        51u   745   4    28   STnn, MFM, Voice coil
  1770.     Miniscribe 8212           615   2
  1771.     Miniscribe 8425         20    615   4      STnn, MFM, 3½
  1772.     Miniscribe 8438       31.2    615   4
  1773.     Miniscribe 9380E       382u  1224  15    16   ESDI, RLL, FH Voice coil
  1774.     Miniscribe 9380S       382u  1224  15    16   SCSI, RLL, FH Voice coil
  1775.     Miniscribe 9780E       781u           15    17   ESDI, FH Voice coil
  1776.     Mitsubisi MR535         42    981   6      STnn, MFM, 5¼ Voice coil
  1777.     NEC D5662                385u                 18   ESDI, FH
  1778.     NEC D5682               765u           18    16   ESDI, FH
  1779.     NEC D5862               385u                 18   SCSI, FH
  1780.     NEC D5882               765u           18    16   SCSI, FH
  1781.     NEC 5124              310   4
  1782.     NEC 5126              612   4
  1783.     NEC 5146              615   8
  1784.     Newberry Penny 340             615   8
  1785.     Northgate Turbo         42    809   6    36   STnn, RLL, Voice coil
  1786.     Plus Hardcard 40        42    612   4    40   STnn, RLL, Voice coil
  1787.     Priam ID45ATD2        42   1166   5    20   STnn, MFM, Voice coil
  1788.     Priam ID130                130   1224            STnn
  1789.     Priam ID40                 987   5
  1790.     Priam ID60              987   7
  1791.     Priam V130               987   3      STnn
  1792.     Priam V185               1166   7
  1793.     Priam 638                382u           15    18   ESDI, 5¼
  1794.     Priam 676                765u           15    14   ESDI, 5¼
  1795.     Priam 738                382u           15    18   SCSI, 5¼
  1796.     Priam 776                765u           15    14   SCSI, 5¼
  1797.     Quadram Q520          512   4
  1798.     Quadram Q530          512   6
  1799.     Quadram Q540          512   8
  1800.     Rodime RO101          192   2
  1801.     Rodime RO102          192   4
  1802.     Rodime RO103          192   6
  1803.     Rodime RO104          192   8
  1804.     Rodime RO201          320   2
  1805.     Rodime RO202          320   4
  1806.     Rodime RO203          320   6
  1807.     Rodime RO204          320   8
  1808.     Rodime RO201E          640   2
  1809.     Rodime RO202E          640   4
  1810.     Rodime RO203E        33    640   6
  1811.     Rodime RO204E          640   8
  1812.     Rodime RO252        10    306   4
  1813.     Rodime RO352        10    306   4
  1814.     Rodime RO3055        45    872   7      STnn, MFM, Voice coil
  1815.     RMS 503                  153   2
  1816.     RMS 506               153   4
  1817.     RMS 512               153   8
  1818.     Seagate ST125        21    615   4    28   STnn, MFM, Band stepper
  1819.     Seagate ST125N        22    407   4           SCSI, RLL, Band stepper
  1820.     Seagate ST138        32    615   6    28   STnn, MFM, 3½ Band stepper
  1821.     Seagate ST138N        31    615   4    28   SCSI, RLL, Band stepper
  1822.     Seagate ST138R        33    615   4    28   STnn, RLL, Band stepper
  1823.     Seagate ST151        43    977   5      STnn, MFM, Voice Coil
  1824.     Seagate ST157A        49    560   6    28   IDE, 3½
  1825.     Seagate ST157N        49    615   6    28   SCSI, 3½ RLL, Band stepper
  1826.     Seagate ST157R        49    615   6    28   STnn, 3½ RLL, Voice Coil
  1827.     Seagate ST177N        61    921   5      SCSI, RLL, Voice Coil
  1828.     Seagate ST206              306   2      STnn, MFM, Band stepper
  1829.     Seagate ST213        11    615   2      STnn, MFM, Band stepper
  1830.     Seagate ST225        21    615   4    65   STnn, MFM, 5¼ Band stepper
  1831.     Seagate ST225N        21    615   4    65   SCSI, MFM, 5¼ Band stepper
  1832.     Seagate ST225R        21    667   2      STnn, RLL, 5¼ Band stepper
  1833.     Seagate ST238R        31    615   4    65   STnn, RLL, Band Stepper
  1834.     Seagate ST250R        42    667   4      STnn, RLL, Band stepper
  1835.     Seagate ST251        42    820   6    40   STnn, MFM, 5¼ Band stepper
  1836.     Seagate ST251-1         43    820   6    28   STnn, MFM, 5¼ Band stepper
  1837.     Seagate ST251N0         43    820   4    40   SCSI, RLL, 5¼ Band stepper
  1838.     Seagate ST251N1         43    630   4      SCSI, RLL, 5¼ Band stepper
  1839.     Seagate ST251R        43    820   6    40   STnn, RLL, 5¼ Band stepper
  1840.     Seagate ST277        66    820   6      STnn, MFM, 5¼ Band stepper
  1841.     Seagate ST277N0         65    820   6    40   SCSI, RLL, 5¼ Band stepper
  1842.     Seagate ST277N1         65    628   6      SCSI, RLL, 5¼ Band stepper
  1843.     Seagate ST277R        65    820   6    40   STnn, RLL, 5¼ Band stepper
  1844.     Seagate ST280A        72                 29   IDE, 5¼
  1845.     Seagate ST296N        85    820   6    28   SCSI, RLL, 5¼ Band stepper
  1846.     Seagate ST406         5    306   2      STnn, MFM, Band stepper
  1847.     Seagate ST412        10    306   4      STnn, MFM, FH Band stepper
  1848.     Seagate ST419        15    306   6      STnn, MFM, Band stepper
  1849.     Seagate ST425        20    306   8      STnn, MFM, Band stepper
  1850.     Seagate ST506         5    153   4      STnn, MFM, FH Band stepper
  1851.     Seagate ST1096N         84    906   7      SCSI, RLL, Voice coil
  1852.     Seagate ST1102A         89                 29   IDE, 3½
  1853.     Seagate ST1144       125                 19   IDE, 3½
  1854.     Seagate ST1239       211                 15   IDE, 3½
  1855.     Seagate ST4026        21    615   4      STnn, MFM, Voice coil
  1856.     Seagate ST4038        32    733   5    40   STnn, MFM, FH Voice coil
  1857.     Seagate ST4051        43    977   5    40   STnn, MFM, Voice coil
  1858.     Seagate ST4053        44   1024   5    28   STnn, MFM, Voice coil
  1859.     Seagate ST4077R         65   1024   5    28   STnn, MFM, Voice coil
  1860.     Seagate ST4096        80   1024   9    28   STnn, MFM, FH Voice coil
  1861.     Seagate ST4144R        122   1024   9    28   STnn, RLL, FH Voice coil
  1862.     Shugart SA 604              160   4
  1863.     Shugart SA 606          160   6
  1864.     Shugart SA 612          306   4
  1865.     Shugart SA 712          320   4
  1866.     SPC Scorecard 44        44    753   7      STnn, MFM, Voice coil
  1867.     Syquest SQ306RD              306   2
  1868.     Syquest SQ312RD              615   2
  1869.     Syquest SQ325F          612   4
  1870.     Syquest SQ338F          612   6
  1871.     Tandon TM252        10    306   4
  1872.     Tandon TM262        20    615   4
  1873.     Tandon TAN501          306   2
  1874.     Tandon TAN502          306   4
  1875.     Tandon TAN503          306   6
  1876.     Tandon TM602S          153   4
  1877.     Tandon TM603S          153   6
  1878.     Tandon TM603SE          230   6
  1879.     Tandon TM702AT          615   4
  1880.     Tandon TM703          695   5
  1881.     Tandon TM703AT          733   5
  1882.     Tandon TM755          981   5
  1883.     Tandy SCSI                  80    823   6    28   SCSI, RLL, Band stepper
  1884.     Toshiba MK53F          830   5
  1885.     Toshiba MK54F        49    830   7    25   STnn, MFM, 3½ Voice coil
  1886.     Toshiba MK56F        72    830  10    25
  1887.     Toshiba MK134FA               733   7    25   STnn
  1888.     Toshiba MK358FA        765u           15    16   ESDI, FH
  1889.     Toshiba MK358FB        765u           15    16   SCSI, FH
  1890.     Tulin 226                 640   4
  1891.     Tulin 240                  640   6
  1892.     Tulin 326                  20    640   4
  1893.     Tulin 340                  30    640   6
  1894.     WD93024A              21.6                 28   STnn, MFM, 3½ Band stepper
  1895.     WD93024X               21.6                 39   STnn, MFM, 3½ Band stepper
  1896.     WD93028A               21.6                 69   STnn, MFM, 3½ Band stepper
  1897.     WD93028X               21.6                 70   STnn, MFM, 3½ Band stepper
  1898.     WD93034X               32.4                 39   STnn, MFM, 3½ Band stepper
  1899.     WD93038X                 32.4                 70   STnn, MFM, 3½ Band stepper
  1900.     WD93044A               43.2                 28   STnn, MFM, 3½ Band stepper
  1901.     WD93044X               43.2                 39   STnn, MFM, 3½ Band stepper
  1902.     WD93048A               43.2                 69   STnn, MFM, 3½ Band stepper
  1903.     WD93048X               43.2                 70   STnn, MFM, 3½ Band stepper
  1904.     WD95024A                 20                  28   STnn, MFM, 5¼ Band stepper      
  1905.     WD95028AD                 20                  69   STnn, MFM, 5¼ Band stepper      
  1906.     WD95028X                 20                  70   STnn, MFM, 5¼ Band stepper      
  1907.     WD95038X                 30                  70   STnn, MFM, 5¼ Band stepper      
  1908.     WD95044A                 40                  28   STnn, MFM, 5¼ Band stepper      
  1909.     WD95048AD                 40                  69   STnn, MFM, 5¼ Band stepper      
  1910.     WD95048X                 40                  70   STnn, MFM, 5¼ Band stepper
  1911.     WDAC140                42.5                 19   STnn, MFM, 3½ Voice coil
  1912.     WDAC280                85.1                 19   STnn, MFM, 3½ Voice coil
  1913.     WDSC320                 320                       SCSI, 3½
  1914.     WDSC8320                320                       SCSI, 3½
  1915.  
  1916.  
  1917.     - STnn indicates Seagate ST412/ST506 compatible
  1918.     - 3½ indicates 3.5 inch half height drive
  1919.     - 5¼ indicates 5.25 inch half height drive
  1920.     - FH indicates Full Height 5.25 inch drive
  1921.     - 'u' in filesize indicates unformatted spec
  1922.     - formatted capacity is related to BIOS and may vary with different
  1923.       BIOS and OEM versions
  1924.     - read/write heads should normally never touch hard disk media
  1925.     - standard AT hard disk controllers do not use DMA for disk I/O due
  1926.       to the slow speed of the 8 Bit DMA chips used;  Port I/O is used
  1927.       instead for an actual increase in performance
  1928.     - with some XT and ESDI systems it is necessary to use debug to
  1929.       execute the ROM disk format code;  The usual method is to set
  1930.       AH=Drive, AL=Interleave and jump to the code at C800:5 via the
  1931.       G =C800:5 command (some systems locate this code at C600:5, CA00:5
  1932.       and CC00:5)
  1933.     - DOS version and disk size determine cluster size;   DOS 2.x always
  1934.       has cluster size of 8K, while DOS 3.x+ has variable cluster sizes:
  1935.  
  1936.             2 - 16  Mb partitions have a cluster size of 8K
  1937.            16 - 128 Mb partitions have a cluster size of 2K
  1938.           128 - 256 Mb partitions have a cluster size of 4K
  1939.           256 - 512 Mb partitions have a cluster size of 8K
  1940.  
  1941. :Hayes modem info:modem commands
  1942. ^Hayes Command Set / Register Formats
  1943.  
  1944.     +++    standard escape sequence (see S2 below)
  1945.     Comma  standard pause character (see S8 below)
  1946.     AT     standard attention sequence
  1947.  
  1948.     ATA    force immediate answer
  1949.     ATC0   transmitter off
  1950.     ATC1   transmitter on
  1951.  
  1952.     ATD    dial (ATD number)
  1953.     ATDP   pulse dial (ATDP number)
  1954.     ATDT   tone dial (ATDT number)
  1955.  
  1956.     ATE0   disable local character echo
  1957.     ATE1   enable local character echo
  1958.     ATF0   Half Duplex (modem echoes characters)
  1959.     ATF1   Full Duplex (modem does not echo characters)
  1960.  
  1961.     ATH0   force line on hook
  1962.     ATH1   force line off hook
  1963.     ATH2   force line special off hook (used for HAM radio)
  1964.  
  1965.     ATI0   request product code, formatted PPR, PP=prod., R=rev.
  1966.     ATI1   request ROM check sum
  1967.  
  1968.     ATL1   speaker volume low  (modem specific)
  1969.     ATL2   speaker volume medium  (modem specific)
  1970.     ATL3   speaker volume high  (modem specific)
  1971.     ATM0   speaker always off
  1972.     ATM1   speaker on except while carrier present
  1973.     ATM2   speaker always on
  1974.     ATM3   speaker on except while dialing and carrier present
  1975.  
  1976.     ATO    force modem into on-line state
  1977.     ATP    sets modem to default pulse dial
  1978.  
  1979.     ATQ0   modem returns result codes
  1980.     ATQ1   modem does not return result codes
  1981.  
  1982.     ATR    sets modem to answer mode after dialing out
  1983.     ATSn   where Sn is S register number 'n' (see registers below)
  1984.     ATT    sets modem to default tone dial
  1985.  
  1986.     ATV0   send numeric codes
  1987.     ATV1   send word result codes
  1988.  
  1989.     ATX0   basic result code set "CONNECT", no dial tone detect
  1990.     ATX1   extended result code set "CONNECT 1200", no dialtone detect
  1991.     ATX2   wait for dial tone, extended result codes
  1992.     ATX3   detect busy signal, extended result codes
  1993.     ATX4   wait for dial tone, detect busy, extended result codes
  1994.  
  1995.     ATZ    reset to power up condition
  1996.  
  1997. ^Hayes 2400 Compatible Modem Commands
  1998.  
  1999.     ATB0    CCITT V.22 at 1200 bps
  2000.     ATB1    BELL 212A at 1200 bps
  2001.  
  2002.     AT&C    DCD always on
  2003.     AT&C1    DCD on while carrier present
  2004.  
  2005.     AT&D    DTR ignored
  2006.     AT&D1    DTR fail disconnect enabled
  2007.     AT&D2    DTR fail disconnect enabled (auto answer off)
  2008.     AT&D3    DTR fail disconnect enabled (reset modem)
  2009.  
  2010.     AT&F    restore to factory configuration
  2011.  
  2012.     AT&G    no guard tone
  2013.     AT&G1    550 Hz guard tone
  2014.     AT&G2    1800 Hz guard tone
  2015.  
  2016.     AT&J    RJ11/RJ41S/RJ45 jack
  2017.     AT&J2    RJ12/RJ13 jack
  2018.  
  2019.     AT&L    regular phone line
  2020.     AT&L1    leased line
  2021.  
  2022.     AT&M    async operation
  2023.     AT&M1    async/sync operation
  2024.     AT&M2    sync auto dial
  2025.     AT&M3    sync manual dial
  2026.  
  2027.     AT&P    39/61 pulse make/break ratio
  2028.     AT&P1    33/67 pulse make/break ratio
  2029.  
  2030.     AT&T4    grant RDL test request
  2031.     AT&T5    deny RDL test request
  2032.  
  2033.     AT&W    write current registers to non-volatile memory
  2034.  
  2035.     AT&X    sync clock internal
  2036.  
  2037.     AT&X1    sync clock external
  2038.     AT&X2    sync clock slaved
  2039.  
  2040.     AT&Z    store dial command line
  2041.  
  2042. ^Hayes Compatible Modem Registers
  2043.  
  2044.     Not all modems support all of these registers and some modems have
  2045.     registers other than those listed here.  Also note, some are read only.
  2046.  
  2047.     to set a register use:        AT Sr=##  (cr)
  2048.     to read the register:        AT Sr?     (cr)
  2049.  
  2050.     Where "r" is the register and (cr) is a carriage return
  2051.  
  2052.  
  2053. %    The following represent conventions used in the tables below:
  2054.  
  2055.     () indicates defaults for Smartmodem 1200
  2056.     ** indicates possible inconsistencies across modems
  2057.  
  2058.  
  2059. %    Reg  Values       Register function
  2060.  
  2061.     S0   0-255    ring to answer on (0=don't answer)
  2062.     S1   0-255    ring count (clear after 8 sec) (read only)
  2063.     S2   0-255    escape char, normally "+", 128-255 disable escape
  2064.     S3   0-127    end of line character (0x0D/CR)
  2065.     S4   0-127    line feed character (0x0A/LF)
  2066.     S5   0-32,127 backspace character (0x08/BS)
  2067.     S6   2-255    pause before dialing in seconds (2)
  2068.     S7   1-255    wait for carrier in seconds (30)
  2069.     S8   0-255    pause for comma in dial string in seconds (2)
  2070.     S9   1-255    carrier detect response time in 1/10 second (6)
  2071.     S10  1-255    carrier loss delay in 1/10 second, 255=ignore CD (7)
  2072.     S11 50-255    touch tone dial speed, in milliseconds (70)
  2073.     S12 20-255    escape guard time, in 1/50 second,0=no delay (50)
  2074.  
  2075.     │7│6│5│4│3│2│1│0│  S13     power up async data format
  2076.      │ │ │ │ │ │ │ └──── unused
  2077.      │ │ │ │ │ │ └───── result code, 0=basic, 1=extended
  2078.      │ │ │ │ │ └────── parity, 0=disabled, 1=enabled
  2079.      │ │ │ │ └─────── parity, 0=odd ,1=even
  2080.      │ │ │ └──────── data bits, 0=7 bits, 1=8 bits
  2081.      │ │ └───────── undefined
  2082.      │ └────────── buffer ovfw flag, 0=disabled,1=enabled
  2083.      └─────────── 8th bit, 0=space,1=mark (8 bit only)
  2084.  
  2085.     │7│6│5│4│3│2│1│0│  S14     option register status data format
  2086.      │ │ │ │ │ │ │ └──── unused **
  2087.      │ │ │ │ │ │ └───── local echo, 0=disabled, 1=enabled
  2088.      │ │ │ │ │ └────── result codes, 0=enabled,1=disabled
  2089.      │ │ │ │ └─────── result codes, 0=numeric,1=word
  2090.      │ │ │ └──────── command recognition, 0=enable,1=disable
  2091.      │ │ └───────── dial method, 0=touch tone, 1=pulse
  2092.      │ └────────── unused **
  2093.      └─────────── 0=answer, 1=originate **
  2094.  
  2095.     S15          flag register **
  2096.  
  2097.     │7│6│5│4│3│2│1│0│  S16     test status
  2098.      │ │ │ │ │ │ │ └──── analog loop, 0=inactive, 1=active
  2099.      │ │ │ │ │ │ └───── unused
  2100.      │ │ │ │ │ └────── digital loop, 0=inactive, 1=active
  2101.      │ │ │ │ └─────── remote req digital loop,0=inact.,1=active
  2102.      │ │ │ └──────── remote digital loop,0=inact.,1=active
  2103.      │ │ └───────── self test RDL, 0=inactive, 1=active
  2104.      │ └────────── self test analog loop,0=inactive,1=active
  2105.      └─────────── unused
  2106.  
  2107.     S18 0-255     remote test timer in seconds
  2108.  
  2109.     │7│6│5│4│3│2│1│0│  S21     option status
  2110.      │ │ │ │ │ │ │ └──── jack type, 0=RJ11,RJ41,RJ45,1=RJ12,RJ13
  2111.      │ │ │ │ │ │ └───── unused
  2112.      │ │ │ │ │ └────── CTS state,  0=follows RTS, 1=forced on
  2113.      │ │ │ └─┴─────── DTR modem behavior (see below)
  2114.      │ │ └────────── DCD, 0=forced on, 1=follows carrier
  2115.      │ └─────────── DSR, 0=forced on, 1=behaves normally
  2116.      └──────────── long space disconnect,0=disabled,1=enabled
  2117.  
  2118. %    Bits
  2119. %     43  DTR Modem Behavior Bits
  2120.      00  ignore DTR
  2121.      01  assume command state when DTR drops
  2122.      10  assume command state and disable auto-answer when DTR drops
  2123.      11  reset when DTR drops
  2124.  
  2125.  
  2126.     │7│6│5│4│3│2│1│0│  S22     option status
  2127.      │ │ │ │ │ │ └─┴──── speaker volume, 01=low,10=med,11=high
  2128.      │ │ │ │ └─┴─────── speaker setting (see below)
  2129.      │ └─┴─┴────────── X command in effect
  2130.      └─────────────── make/break ratio, 0=39/61, 1=33/67
  2131.  
  2132. %    Bits
  2133. %     32  S22 Speaker Setting
  2134.      00  speaker always off
  2135.      01  speaker on until carrier detected
  2136.      10  speaker always on
  2137.      11  speaker off during dialing, then on until CD
  2138.  
  2139. %    Bits
  2140. %    654  S22 X Command in Effect
  2141.     100  X1 command in effect
  2142.     101  X2 command in effect
  2143.     110  X3 command in effect
  2144.     111  X4 command in effect
  2145.  
  2146.  
  2147.     │7│6│5│4│3│2│1│0│  S23     option status
  2148.      │ │ │ │ │ │ │ └──── remote dig.loop request,0=denied,1=ok
  2149.      │ │ │ │ │ └─┴───── baud rate (see table)
  2150.      │ │ │ │ └──────── unused
  2151.      │ │ └─┴───────── parity (see table)
  2152.      └─┴──────────── guard tone setting
  2153.  
  2154. %    Bits
  2155. %     21  S23 Baud Rate Table
  2156.      00  0-300 bps
  2157.      01  600 bps
  2158.      10  1200 bps
  2159.      11  2400 bps
  2160.  
  2161. %    Bits
  2162. %     54  S23 Parity Setting
  2163.      00  even parity
  2164.      01  parity bit always 0
  2165.      10  odd parity
  2166.      11  parity bit always 1
  2167.  
  2168. %    Bits
  2169. %     76  S23 Guard Tone Setting
  2170.      00  no guard tones
  2171.      01  550 hz guard tone
  2172.      10  1800 hz guard tone
  2173.  
  2174.     S25 0-255     DTR detect delay in seconds (5)
  2175.     S26 0-255     RTS to CTS delay in milliseconds (1)
  2176.  
  2177.     │7│6│5│4│3│2│1│0│  S27     option status
  2178.      │ │ │ │ │ │ └─┴──── synch/async mode (see table)
  2179.      │ │ │ │ │ └─────── phone line, 0= public, 1=leased
  2180.      │ │ │ │ └──────── unused
  2181.      │ │ └─┴───────── clock type (see table)
  2182.      │ └──────────── protocol, 0=CCITT V.22, 1=Bell 212A
  2183.      └───────────── unused
  2184.  
  2185. %    Bits
  2186. %     10  S27 Sync/Async mode
  2187.      00  asynchronous mode
  2188.      01  async/sync mode
  2189.      10  sync auto-dial
  2190.      11  sync manual dial
  2191.  
  2192. %    Bits
  2193. %     45  S27 Clock Type
  2194.      00  internal clock used
  2195.      01  external clock used
  2196.      10  slaved clock used
  2197. :game port:joystick
  2198. ^Joystick / Game Port (201h)
  2199.  
  2200.     │7│6│5│4│3│2│1│0│  Port at 201h used with Joysticks
  2201.      │ │ │ │ │ │ │ └──── joystick a, x coord (0 = timing active)
  2202.      │ │ │ │ │ │ └───── joystick a, y coord (0 = timing active)
  2203.      │ │ │ │ │ └────── joystick b, x coord (0 = timing active)
  2204.      │ │ │ │ └─────── joystick b, y coord (0 = timing active)
  2205.      │ │ │ └──────── joystick a, button 1 (0=pressed)
  2206.      │ │ └───────── joystick a, button 2 (0=pressed)
  2207.      │ └────────── joystick b, button 1 (0=pressed)
  2208.      └─────────── joystick b, button 2 (0=pressed)
  2209.  
  2210.     │7│6│5│4│3│2│1│0│  Port at 201h used with Paddles
  2211.      │ │ │ │ │ │ │ └──── paddle a coord (0 = timing active)
  2212.      │ │ │ │ │ │ └───── paddle b coord (0 = timing active)
  2213.      │ │ │ │ │ └────── paddle c coord (0 = timing active)
  2214.      │ │ │ │ └─────── paddle d coord (0 = timing active)
  2215.      │ │ │ └──────── paddle a, button (0=pressed)
  2216.      │ │ └───────── paddle b, button (0=pressed)
  2217.      │ └────────── paddle c, button (0=pressed)
  2218.      └─────────── paddle d, button (0=pressed)
  2219.  
  2220.  
  2221.     - accessed through port 201h
  2222.     - bits 3-0 are resistive inputs with the length of the pulse
  2223.       determined by 0-100K ohm resistive load.   Use this formula:
  2224.  
  2225. %    time = 24.2µ + ( 0.011µ * resistance )
  2226.     or
  2227. %    resistance = ( time - 24.2 ) / 0.011
  2228.  
  2229.  
  2230.     - a read should be immediately preceded by a write (any data)
  2231.       to start timing for the resistive values.
  2232. :Laserjet:HP Laserjet
  2233. ^Hewlett Packard Laserjet Printer Control Codes
  2234.  
  2235. %    Printer Control and Orientation
  2236.     ESC E        Reset printer
  2237.     ESC z        Self Test
  2238.     ESC &l0O    Portrait orientation
  2239.     ESC &l1O    Landscape orientation
  2240.     ESC (s0P    Select fixed space font
  2241.     ESC (s1P    Select proportional font
  2242.     ESC (s0S    Set upright character orientation
  2243.     ESC (s1S    Set Italic character orientation
  2244.     ESC &l#X    Select '#' number of copies
  2245.     ESC &l0H    Eject page
  2246.     ESC &l1H    Feed paper from tray
  2247.     ESC &l2H    Feed paper manually
  2248.     ESC &l3H    Feed envelope
  2249.     ESC &l0T    Default stacking position
  2250.     ESC &l1T    Togglestacking position
  2251.  
  2252. %    8 Bit Symbol Set Selection
  2253.     ESC (8U     Select Roman 8 symbol set
  2254.     ESC (8K     Select Kana 8 symbol set
  2255.     ESC (8M     Select Math 8 symbol set
  2256.  
  2257. %    7 Bit Symbol Set Selection
  2258.     ESC (0U     Select USASCII symbol set
  2259.     ESC (0B     Select Line Draw symbol set
  2260.     ESC (0A     Select Math symbol set
  2261.     ESC (0M     Select Math 7 symbol set
  2262.     ESC (0Q     Select Math 8a symbol set
  2263.     ESC (1Q     Select Math 8b symbol set
  2264.     ESC (1U     Select US Legal symbol set
  2265.     ESC (0E     Select Roman Extension symbol set
  2266.     ESC (0D     Select ISO Denmark/Norway symbol set
  2267.     ESC (1E     Select ISO United Kingdom symbol set
  2268.     ESC (0F     Select ISO France symbol set
  2269.     ESC (0G     Select ISO German symbol set
  2270.     ESC (0I     Select ISO Italy symbol set
  2271.     ESC (0S     Select ISO Sweden/Finland symbol set
  2272.     ESC (1S     Select ISO Spain symbol set
  2273.     ESC (15U    Select PiFont symbol set
  2274.     ESC (2Q     Select PiFonta symbol set
  2275.  
  2276. %    Font Management
  2277.     ESC (s3T     Select Courier font
  2278.     ESC (s0T     Select Line Printer font
  2279.     ESC (s1T     Select Pica font
  2280.     ESC (s2T     Select Elite font
  2281.     ESC (s4T     Select Helvetica font
  2282.     ESC (s5T     Select Times Roman (TMS RMN) font
  2283.     ESC (s6T     Select Gothic font
  2284.     ESC (s7T     Select Script font
  2285.     ESC (s8T     Select Prestige font
  2286.     ESC *c#D     Specify font ID '#'
  2287.     ESC *c#E     Specify character code '#'
  2288.     ESC *c0F     Delete all fonts, including permanent
  2289.     ESC *c1F     Delete all temporary fonts
  2290.     ESC *c2F     Delete last font ID specified
  2291.     ESC *c3F     Delete last character code and font ID specified
  2292.     ESC *c4F     Make last font ID temporary
  2293.     ESC *c5F     Make last font ID permanent
  2294.     ESC *c6F     Copy or assign last font ID specified
  2295.     ESC *c7F     Reestablish ROM
  2296.     ESC *c8F     Set primary font
  2297.     ESC *c9F     Set secondary font
  2298.     ESC *c10F     Set primary and secondary font default
  2299.     ESC )s#W <data>  Create font header
  2300.     ESC (s#W <data>  Download character
  2301.     ESC (#X <data>     Designate downloaded font as primary
  2302.     ESC )#X <data>     Designate downloaded font as secondary
  2303.     ESC (#@      Primary font default (see printer manual)
  2304.     ESC )#@      Secondary font default(see printer manual)
  2305.  
  2306. %    Pitch and Point Selection
  2307.     ESC (s10H    Set 10 pitch
  2308.     ESC (s12H    Set 12 pitch
  2309.     ESC (s16.6H    Set 16.66 pitch
  2310.  
  2311.     ESC (s7V    Set point size to 7
  2312.     ESC (s8V    Set point size to 8
  2313.     ESC (s8.5V    Set point size to 8.5
  2314.     ESC (s10V    Set point size to 10
  2315.     ESC (s12V    Set point size to 12
  2316.     ESC (s14.4V    Set point size to 14.4
  2317.  
  2318. %    Page Dimensions
  2319.     ESC &l#P    Set page length to '#' lines
  2320.     ESC &l#E    Set top margin to '#' lines
  2321.     ESC &l#F    Set text length to '#' lines
  2322.     ESC 9        Clear margins
  2323.     ESC &a#L    Set left margin to column '#'
  2324.     ESC &a#M    Set right margin to column '#'
  2325.     ESC &l#C    Set vertical motion index to '#' 1/48" increments
  2326.     ESC &l#D    Set lines per inch to '#', valid values are:
  2327.             1, 2, 3, 4, 6, 8, 12, 16 or 24
  2328.     ESC &k#H    Set horizontal motion index where # is derived
  2329.             using    # = (120.0 / cpi)     (1/10 precision)
  2330.  
  2331. %    Cursor Positioning
  2332.     ESC &a#R    Move to row '#'
  2333.     ESC &a#C    Move to col '#'
  2334.     ESC &a#H    Move to horizontal position '#' in decipoints
  2335.     ESC &a#V    Move to vertical position '#' in decipoints
  2336.     ESC *p#X    Move to horizontal position '#' in dots
  2337.     ESC *p#Y    Move to vertical position '#' in dots
  2338.     ESC &f0S    Push cursor position
  2339.     ESC &f1     Pop cursor position
  2340.  
  2341. %    Raster Graphics
  2342.     ESC *t75R      Select 75 dots per inch graphics mode
  2343.     ESC *t100R      Select 100 dots per inch graphics mode
  2344.     ESC *t150R      Select 150 dots per inch graphics mode
  2345.     ESC *t300R      Select 300 dots per inch graphics mode
  2346.     ESC *r0A      Start graphics at left most position
  2347.     ESC *r1A      Start graphics at current cursor
  2348.     ESC *b#W <data>   Transfer '#' byte raster image as stream "<data>"
  2349.     ESC *rB       End graphics
  2350.  
  2351. %    Advanced Graphics
  2352.     ESC *c#A      Set horizontal rule/pattern size in dots
  2353.     ESC *c#H      Set horizontal rule/pattern size in decipoints
  2354.     ESC *c#B      Set vertical rule/pattern size in dots
  2355.     ESC *c#V      Set vertical rule/pattern size in decipoints
  2356.     ESC *c0P      Select black rule
  2357.     ESC *c2P      Select gray scale pattern
  2358.     ESC *c3P      Select HP-Defined pattern
  2359.     ESC *c#G      Set grey scale pattern, where # is a value between
  2360.               [0..6] for HP defined patterns and [0..100] to
  2361.               specify percentage gray scaling.  The mode depends
  2362.               on the rule/pattern selected using ESC *c?P
  2363.     ESC *c1G      Vertical lines pattern
  2364.     ESC *c2G      Horizontal lines pattern
  2365.     ESC *c3G      Diagonal lines pattern (upward left to right)
  2366.     ESC *c4G      Diagonal lines pattern (downward left to right)
  2367.     ESC *c5G      Horizontal/vertical grid lines pattern
  2368.     ESC *c6G      Diagonal grid pattern
  2369.     ESC *c#G      Set gray scaling to '#' percent
  2370.  
  2371. %    Macro commands
  2372.     ESC &f#Y      Identify macro as ID "#'
  2373.     ESC &f0X      Start macro definition
  2374.     ESC &f1X      Stop macro definition
  2375.     ESC &f2X      Execute macro 
  2376.     ESC &f3X      Call macro
  2377.     ESC &f4X      Enable auto macro overlay
  2378.     ESC &f5X      Disable auto macro overlay
  2379.     ESC &f6X      Delete all macros
  2380.     ESC &f7X      Delete all temporary macros
  2381.     ESC &f8X      Delete macro ID
  2382.     ESC &f9X      Make macro temporary
  2383.     ESC &f10X      Make macro permanent
  2384.  
  2385. %    Miscellaneous
  2386.     ESC (s#B      Set stroke weight '#'=(7..-7), 7=bold, -7=light
  2387.     ESC &dD       Set underline on
  2388.     ESC &d@       Set underline off
  2389.     ESC =          Half line feed
  2390.     ESC Y          Turn display functions mode on
  2391.     ESC Z          Turn display functions mode off (default)
  2392.     ESC &p#X <data>   Disable command interpretation for the '#' bytes
  2393.               following this command
  2394.     ESC &l0L      Disable perforation skip
  2395.     ESC &l1L      Enable perforation skip
  2396.     ESC &k0G      Set line terminators to CR=CR, LF=LF, FF=FF
  2397.     ESC &k1G      Set line terminators to CR=CR+LF, LF=LF, FF=FF
  2398.     ESC &k2G      Set line terminators to CR=CR, LF=CR+LF, FF=CR+FF
  2399.     ESC &k3G      Set line terminators to CR=CR+LF, LF=CR+LF, FF=CR+FF
  2400.     ESC &s0C      Enable end of line wrap
  2401.     ESC &s1C      Disable end of line wrap
  2402.  
  2403.  
  2404. %    Escape sequence combination rules:
  2405.     
  2406.      1. The first 2 characters following the ESC must be the same.
  2407.      2. The final character in any sequence other than the last must be
  2408.         changed to lower case.
  2409.      3. The last character in the complete sequence must be changed to
  2410.         upper case.
  2411.      4. Escape sequences must be specified in the order in which they
  2412.         should be performed.
  2413.  
  2414.  
  2415.     - the space following ESC is not included in the string
  2416. :keyboard commands
  2417. ^Keyboard Commands & Responses
  2418.  
  2419. ^Commands System Issues to Keyboard (via 8042 port 60h)
  2420.  
  2421.     ED  Set/Reset Mode Indicators, keyboard responds with ACK then
  2422.         waits for a following option byte.    When the option byte is
  2423.         received the keyboard again ACK's and then sets the LED's
  2424.         accordingly.  Scanning is resumed if scanning was enabled.
  2425.         If another command is received instead of the option byte
  2426.         (high bit set on) this command is terminated.  Hardware
  2427.         defaults to these indicators turned off.
  2428.  
  2429.         │7-3│2│1│0│ Keyboard Status Indicator Option Byte
  2430.           │  │ │ └─── Scroll-Lock indicator  (0=off, 1=on)
  2431.           │  │ └──── Num-Lock indicator  (0=off, 1=on)
  2432.           │  └───── Caps-Lock indicator  (0=off, 1=on)
  2433.           └─────── reserved (must be zero)
  2434.  
  2435.     EE  Diagnostic Echo, keyboard echoes the EE byte back to the system
  2436.         without an acknowledgement.
  2437.     F0  PS/2 Select/Read Alternate Scan Code Sets, instructs keyboard
  2438.         to use one of the three make/break scan code sets.     Keyboard
  2439.         responds by clearing the output buffer/typematic key and then
  2440.         transmits an ACK.  The system must follow up by sending an
  2441.         option byte which will again be ACK'ed by the keyboard:
  2442.  
  2443.           00  return byte indicating scan code set in use
  2444.           01  select scan code set 1  (used on PC & XT)
  2445.           02  select scan code set 2
  2446.           03  select scan code set 3
  2447.  
  2448.     F2  PS/2 Read Keyboard ID, keyboard responds with an ACK and a two
  2449.         byte keyboard ID of 83AB.
  2450.     F3  Set Typematic Rate/Delay, keyboard responds with ACK and waits
  2451.         for rate/delay byte.   Upon receipt of the rate/delay byte the
  2452.         keyboard responds with an ACK, then sets the new typematic
  2453.         values and scanning continues if scanning was enabled.
  2454.         
  2455.         │7│6│5│4│3│2│1│0│  Typematic Rate/Delay Option Byte
  2456.          │ │ │ ├─┼─┼─┼─┼──── typematic rate indicator (see ~INT 16,3~)
  2457.          │ │ │ │ │ └─┴─┴─── A in period formula (see below)
  2458.          │ │ │ └─┴──────── B is period formula (see below)
  2459.          │ └─┴─────────── typematic delay
  2460.          └────────────── always zero
  2461.  
  2462.         delay = (rate+1) * 250   (in milliseconds)
  2463.         rate = (8+A) * (2**B) * 4.17  (in seconds, ± 20%)
  2464.  
  2465.         Defaults to 10.9 characters per second and a 500ms delay.  If a
  2466.         command byte (byte with high bit set) is received instead of an
  2467.         option byte this command is cancelled.
  2468.     F4  Enable Keyboard, cause the keyboard to clear its output buffer
  2469.         and last typematic key and then respond with an ACK.  The
  2470.         keyboard then begins scanning.
  2471.     F5  Default w/Disable, resets keyboard to power-on condition by
  2472.         clearing the output buffer, resetting typematic rate/delay,
  2473.         resetting last typematic key and setting default key types.
  2474.         The keyboard responds with an ACK and waits for the next
  2475.         instruction.
  2476.     F6  Set Default, resets to power-on condition by clearing the output
  2477.         buffer, resetting typematic rate/delay and last typematic key
  2478.         and sets default key types.  The keyboard responds with an ACK
  2479.         and continues scanning.
  2480.     F7  PS/2 Set All Keys to Typematic, keyboard responds by sending an
  2481.         ACK, clearing its output buffer and setting the key type to
  2482.         Typematic.     Scanning continues if scanning was enabled.  This
  2483.         command may be sent while using any Scan Code Set but only has
  2484.         effect when Scan Code Set 3 is in use.
  2485.     F8  PS/2 Set All Keys to Make/Break, keyboard responds by sending an
  2486.         ACK, clearing its output buffer and setting the key type to
  2487.         Make/Break.  Scanning continues if scanning was enabled.  This
  2488.         command may be sent while using any Scan Code Set but only has
  2489.         effect when Scan Code Set 3 is in use.
  2490.     F9  PS/2 Set All Keys to Make, keyboard responds by sending an ACK,
  2491.         clearing its output buffer and setting the key type to Make.
  2492.         Scanning continues if scanning was enabled.  This command may
  2493.         be sent while using any Scan Code Set but only has effect when
  2494.         Scan Code Set 3 is in use.
  2495.     FA  PS/2 Set All Keys to Typematic Make/Break, keyboard responds by
  2496.         sending an ACK, clearing its output buffer and setting the key
  2497.         type to Typematic Make/Break.  Scanning continues if scanning
  2498.         was enabled.  This command may be sent while using any Scan Code
  2499.         Set but only has effect when Scan Code Set 3 is in use.
  2500.     FB  PS/2 Set Key Type to Typematic, keyboard responds by sending an
  2501.         ACK, clearing its output buffer and then waiting for the key ID
  2502.         (make code from Scan Code Set 3).  The specified key type is then
  2503.         set to typematic.    This command may be sent while using any
  2504.         Scan Code Set but only has effect when Scan Code Set 3 is in use.
  2505.     FC  PS/2 Set Key Type to Make/Break, keyboard responds by sending an
  2506.         ACK, clearing its output buffer and then waiting for the key ID
  2507.         (make code from Scan Code Set 3).  The specified key type is then
  2508.         set to Make/Break.     This command may be sent while using any Scan
  2509.         Code Set but only has effect when Scan Code Set 3 is in use.
  2510.     FD  PS/2 Set Key Type to Make, keyboard responds by sending an ACK,
  2511.         clearing its output buffer and then waiting for the key ID (make
  2512.         code from Scan Code Set 3).  The specified key type is then set
  2513.         to Make.  This command may be sent while using any Scan Code Set
  2514.         but only has effect when Scan Code Set 3 is in use.
  2515.     FE  Resend, should be sent when a transmission error is detected
  2516.         from the keyboard
  2517.     FF  Reset, Keyboard sends ACK and waits for system to receive it
  2518.         then begins a program reset and Basic Assurance Test (BAT).
  2519.         Keyboard returns a one byte completion code then sets default
  2520.         Scan Code Set 2.
  2521.  
  2522.  
  2523. ^Keyboard Responses to System (via 8042 port 60h)
  2524.  
  2525.     00  Key Detection Error or Overrun Error for Scan Code Set 1,
  2526.         replaces last key in the keyboard buffer if the buffer is full. 
  2527.     AA  BAT Completion Code, keyboard sends this to indicate the keyboard
  2528.         test was successful.
  2529.     EE  Echo Response, response to the Echo command.
  2530.     F0  Break Code Prefix in Scan Code Sets 2 and 3.
  2531.     FA  Acknowledge, keyboard sends this whenever a valid command or
  2532.         data byte is received (except on Echo and Resend commands).
  2533.     FC  BAT Failure Code, keyboard sends this to indicate the keyboard
  2534.         test failed and stops scanning until a response or reset is sent.
  2535.     FE  Resend, keyboard request resend of data when data sent to it is
  2536.         invalid or arrives with invalid parity.
  2537.     FF  Key Detection Error or Overrun Error for Scan Code Set 2 or 3,
  2538.         replaces last key in the keyboard buffer if the buffer is full.
  2539.     id  Keyboard ID Response, keyboard sends a two byte ID after ACK'ing
  2540.         the Read ID command.  The byte stream contains 83AB in LSB, MSB
  2541.         order.  The keyboard then resumes scanning.
  2542.  
  2543.  
  2544.     - command F7 through FD are NOP's on the AT and are ACK'ed but not
  2545.       acted upon
  2546.     - see    ~8042~  ~MAKE CODES~  ~BREAK CODES~  ~INT 16,3~
  2547. :parallel port:printer port
  2548. ^Parallel Printer Port
  2549.  
  2550. %    Port 3BC printer data output  (readable)
  2551.  
  2552.      │7│6│5│4│3│2│1│0│  ports 278, 378, 3BC
  2553.       │ │ │ │ │ │ │ └──── data bit 0, hardware pin 2
  2554.       │ │ │ │ │ │ └───── data bit 1, hardware pin 3
  2555.       │ │ │ │ │ └────── data bit 2, hardware pin 4
  2556.       │ │ │ │ └─────── data bit 3, hardware pin 5
  2557.       │ │ │ └──────── data bit 4, hardware pin 6
  2558.       │ │ └───────── data bit 5, hardware pin 7
  2559.       │ └────────── data bit 6, hardware pin 8
  2560.       └─────────── data bit 7, hardware pin 9
  2561.  
  2562. %    Port 3BD printer status register   (Parallel Printer Port)
  2563.  
  2564.      │7│6│5│4│3│2│1│0│  ports 279, 379, 3BD
  2565.       │ │ │ │ │ │ │ └──── 1 = time-out
  2566.       │ │ │ │ │ └─┴───── unused
  2567.       │ │ │ │ └──────── 1 = error,    pin 15
  2568.       │ │ │ └───────── 1 = on-line,  pin 13
  2569.       │ │ └────────── 1 = out of paper,  pin 12
  2570.       │ └─────────── 0 = Acknowledge,  pin 10
  2571.       └──────────── 0 = busy,  pin 11
  2572.  
  2573. %    Port 3BE printer control register   (Parallel Printer Port)
  2574.  
  2575.      │7│6│5│4│3│2│1│0│  ports 27A, 37A, 3BE
  2576.       │ │ │ │ │ │ │ └──── 1 = output data to printer,  (pin 1)
  2577.       │ │ │ │ │ │ └───── 1 = auto line feed,  (pin 14)
  2578.       │ │ │ │ │ └────── 0 = initialize printer,  (pin 16)
  2579.       │ │ │ │ └─────── 1 = printer reads output,  (pin 17)
  2580.       │ │ │ └──────── 0 = IRQ disable,1=IRQ enable for ACK
  2581.       └─┴─┴───────── unused
  2582.  
  2583. :ports:port addresses:hardware ports
  2584. ^PORTS    Common I/O Port Addresses
  2585.  
  2586.     Port addresses are not always constant across PC, AT and PS/2
  2587.     Unless marked, port addresses are relative to PC and XT only
  2588.  
  2589. %    000-00F  8237 DMA controller
  2590.     000 Channel 0 address register
  2591.     001 Channel 0 word count
  2592.     002 Channel 1 address register
  2593.     003 Channel 1 word count
  2594.     004 Channel 2 address register
  2595.     005 Channel 2 word count
  2596.     006 Channel 3 address register
  2597.     007 Channel 3 word count
  2598.     008 Status/command register
  2599.     009 Request register
  2600.     00A Mask register
  2601.     00B Mode register
  2602.     00C Clear MSB/LSB flip flop
  2603.     00D Master clear temp register
  2604.     00E Clear mask register
  2605.     00F Multiple mask register
  2606.  
  2607. %    010-01F  8237 DMA Controller (PS/2 model 60 & 80), reserved (AT)
  2608.  
  2609. %    020-02F  8259A Master Programmable Interrupt Controller
  2610.     020 8259 Command port  (see ~8259~)
  2611.     021 8259 Interrupt mask register  (see 8259)
  2612.  
  2613. %    030-03F  8259A Slave Programmable Interrupt Controller (AT,PS/2)
  2614.  
  2615. %    040-05F  8253 or 8254 Programmable Interval Timer (PIT, see ~8253~)
  2616.     040 8253 channel 0, counter divisor
  2617.     041 8253 channel 1, RAM refresh counter
  2618.     042 8253 channel 2, Cassette and speaker functions
  2619.     043 8253 mode control  (see ~8253~)
  2620.     044 8254 PS/2 extended timer
  2621.     047 8254 Channel 3 control byte
  2622.  
  2623. %    060-067  8255 Programmable Peripheral Interface  (PC,XT, PCjr)
  2624.     060 8255 Port A keyboard input/output buffer (output PCjr)
  2625.     061 8255 Port B output
  2626.     062 8255 Port C input
  2627.     063 8255 Command/Mode control register
  2628.  
  2629. %    060-06F  8042 Keyboard Controller  (AT,PS/2)
  2630.     060 8042 Keyboard input/output buffer register
  2631.     061 8042 system control port (for compatability with 8255)
  2632.     064 8042 Keyboard command/status register
  2633.  
  2634.     070 CMOS RAM/RTC, also NMI enable/disable (AT,PS/2, see ~RTC~)
  2635.     071 CMOS RAM data  (AT,PS/2)
  2636.  
  2637.     080 Manufacturer systems checkpoint port (used during POST)
  2638. %    080-090  DMA Page Registers
  2639.     081 High order 4 bits of DMA channel 2 address
  2640.     082 High order 4 bits of DMA channel 3 address
  2641.     083 High order 4 bits of DMA channel 1 address
  2642.  
  2643. %    090-097  POS/Programmable Option Select  (PS/2)
  2644.     090 Central arbitration control Port
  2645.     091 Card selection feedback
  2646.     092 System control and status register
  2647.     094 System board enable/setup register
  2648.     095 Reserved
  2649.     096 Adapter enable/setup register
  2650.     097 Reserved
  2651.  
  2652.     0A0 NMI Mask Register (PC,XT) (write 80h to enable NMI, 00h disable)
  2653. %    0A0-0BF  Second 8259 Programmable Interrupt Controller (AT, PS/2)
  2654.     0A0 Second 8259 Command port  (see ~8259~)
  2655.     0A1 Second 8259 Interrupt mask register  (see 8259)
  2656.  
  2657.     0C0 TI SN76496 Programmable Tone/Noise Generator (PCjr)
  2658. %    0C0-0DF  8237 DMA controller 2 (AT)
  2659.     0C2 DMA channel 3 selector  (see ports 6 & 82)
  2660.  
  2661.     0E0-0EF  Reserved
  2662.  
  2663. %    0F0-0FF  Math coprocessor (AT, PS/2)
  2664. %    0F0-0F5  PCjr Disk Controller
  2665.     0F0 Disk Controller
  2666.     0F2 Disk Controller control port
  2667.     0F4 Disk Controller status register
  2668.     0F5 Disk Controller data port
  2669.  
  2670. %    0F8-0FF  Reserved for future microprocessor extensions
  2671.  
  2672. %    100-10F  POS Programmable Option Select (PS/2)
  2673.     100 POS Register 0, Adapter ID byte (LSB)
  2674.     101 POS Register 1, Adapter ID byte (MSB)
  2675.     102 POS Register 2, Option select data byte 1
  2676.         Bit 0 is card enable (CDEN)
  2677.     103 POS Register 3, Option select data byte 2
  2678.     104 POS Register 4, Option select data byte 3
  2679.     105 POS Register 5, Option select data byte 4
  2680.         Bit 7 is (-CHCK)
  2681.         Bit 6 is reserved
  2682.     106 POS Register 6, subaddress extension (LSB)
  2683.     107 POS Register 7, subaddress extension (MSB)
  2684.  
  2685. %    110-1EF  System I/O channel
  2686.  
  2687. %    170-17F  Fixed disk 1 (AT)
  2688.     170 disk 1 data
  2689.     171 disk 1 error
  2690.     172 disk 1 sector count
  2691.     173 disk 1 sector number
  2692.     174 disk 1 cylinder low
  2693.     175 disk 1 cylinder high
  2694.     176 disk 1 drive/head
  2695.     177 disk 1 status
  2696.  
  2697. %    1F0-1FF  Fixed disk 0 (AT)
  2698.     1F0 disk 0 data
  2699.     1F1 disk 0 error
  2700.     1F2 disk 0 sector count
  2701.     1F3 disk 0 sector number
  2702.     1F4 disk 0 cylinder low
  2703.     1F5 disk 0 cylinder high
  2704.     1F6 disk 0 drive/head
  2705.     1F7 disk 0 status
  2706.  
  2707. %    200-20F  Game Adapter (see GAME PORT or ~JOYSTICK~)
  2708.  
  2709. %    210-217  Expansion Card Ports (XT)
  2710.     210 Write: latch expansion bus data
  2711.         read:  verify expansion bus data
  2712.     211 Write: clear wait,test latch
  2713.         Read:  MSB of data address
  2714.     212 Read:  LSB of data address
  2715.     213 Write: 0=enable, 1=/disable expansion unit
  2716.     214-215  Receiver Card Ports
  2717.     214 write: latch data, read: data
  2718.     215 read:  MSB of address, next read: LSB of address
  2719.  
  2720.     21F Reserved
  2721.  
  2722. %    220-26F  Reserved for I/O channel
  2723.  
  2724. %    270-27F  Third parallel port (see ~PARALLEL PORT~)
  2725.     278 data port
  2726.     279 status port
  2727.     27A control port
  2728.  
  2729. %    280-2AF  Reserved for I/O channel
  2730.  
  2731. %    2A2-2A3  MSM58321RS clock
  2732.  
  2733. %    2B0-2DF  Alternate EGA, or 3270 PC video (XT, AT)
  2734.  
  2735.     2E0 Alternate EGA/VGA
  2736.     2E1 GPIB Adapter  (AT)
  2737.  
  2738. %    2E2-2E3  Data acquisition adapter (AT)
  2739.  
  2740. %    2E8-2EF  COM4 non PS/2 UART (Reserved by IBM) (see ~UART~)
  2741.  
  2742. %    2F0-2F7  Reserved
  2743.  
  2744. %    2F8-2FF  COM2 Second Asynchronous Adapter (see UART)
  2745.          Primary Asynchronous Adapter for PCjr
  2746.  
  2747. %    300-31F  Prototype Experimentation Card (except PCjr)
  2748.          Periscope hardware debugger
  2749. %    320-32F  Hard Disk Controller  (XT)
  2750.     320 Read from/Write to controller
  2751.     321 Read: Controller Status, Write: controller reset
  2752.     322 Write: generate controller select pulse
  2753.     323 Write: Pattern to DMA and interrupt mask register
  2754.         (see ports 0F,21,C2)
  2755.     324 disk attention/status
  2756.  
  2757. %    330-33F  Reserved for XT/370
  2758.  
  2759. %    340-35F  Reserved for I/O channel
  2760.  
  2761. %    360-36F  PC Network
  2762.  
  2763. %    370-377  Floppy disk controller (except PCjr)
  2764.     372 Diskette digital output
  2765.     374 Diskette controller status
  2766.     375 Diskette controller data
  2767.     376 Diskette controller data
  2768.     377 Diskette digital input
  2769.  
  2770. %    378-37F  Second Parallel Printer (see ~PARALLEL PORT~)
  2771.          First Parallel Printer (see PARALLEL PORT)
  2772.     378 data port
  2773.     379 status port
  2774.     37A control port
  2775.  
  2776. %    380-38F  Secondary Binary Synchronous Data Link Control (SDLC) adapter
  2777.     380 On board 8255 port A, internal/external sense
  2778.     381 On board 8255 port B, external modem interface
  2779.     382 On board 8255 port C, internal control and gating
  2780.     383 On board 8255 mode register
  2781.     384 On board 8253 channel square wave generator
  2782.     385 On board 8253 channel 1 inactivity time-out
  2783.     386 On board 8253 channel 2 inactivity time-out
  2784.     387 On board 8253 mode register
  2785.     388 On board 8273 read: status; Write: Command
  2786.     389 On board 8273 write: parameter; read: response
  2787.     38A On board 8273 transmit interrupt status
  2788.     38B On board 8273 receiver interrupt status
  2789.     38C On board 8273 data
  2790.  
  2791. %    390-39F  Cluster Adapter
  2792.  
  2793. %    3A0-3AF  Primary Binary Synchronous Data Link Control (SDLC) adapter
  2794.     3A0 On board 8255 port A, internal/external sense
  2795.     3A1 On board 8255 port B, external modem interface
  2796.     3A2 On board 8255 port C, internal control and gating
  2797.     3A3 On board 8255 mode register
  2798.     3A4 On board 8253 counter 0 unused
  2799.     3A5 On board 8253 counter 1 inactivity time-outs
  2800.     3A6 On board 8253 counter 2 inactivity time-outs
  2801.     3A7 On board 8253 mode register
  2802.     3A8 On board 8251 data
  2803.     3A9 On board 8251 command/mode/status register
  2804.  
  2805. %    3B0-3BF Monochrome Display Adapter (write only, see ~6845~)
  2806.     3B0 port address decodes to 3B4
  2807.     3B1 port address decodes to 3B5
  2808.     3B2 port address decodes to 3B4
  2809.     3B3 port address decodes to 3B5
  2810.     3B4 6845 index register, selects which register [0-11h]
  2811.         is to be accessed through port 3B5
  2812.     3B5 6845 data register [0-11h] selected by port 3B4,
  2813.         registers 0C-0F may be read.  If a read occurs without
  2814.         the adapter installed, FFh is returned.  (see 6845)
  2815.     3B6 port address decodes to 3B4
  2816.     3B7 port address decodes to 3B5
  2817.     3B8 6845 Mode control register
  2818.     3B9 reserved for color select register on color adapter
  2819.     3BA status register (read only)
  2820.     3BB reserved for light pen strobe reset
  2821.  
  2822. %    3BC-3BF  Primary Parallel Printer Adapter (see ~PARALLEL PORT~)
  2823.     3BC parallel 1, data port
  2824.     3BD parallel 1, status port
  2825.     3BE parallel 1, control port
  2826.  
  2827. %    3C0-3CF  EGA/VGA
  2828.     3C0 VGA attribute and sequencer register
  2829.     3C1 Other video attributes
  2830.     3C2 EGA, VGA, CGA input status 0
  2831.     3C3 Video subsystem enable
  2832.     3C4 CGA, EGA, VGA sequencer index
  2833.     3C5 CGA, EGA, VGA sequencer
  2834.     3C6 VGA video DAC PEL mask
  2835.     3C7 VGA video DAC state
  2836.     3C8 VGA video DAC PEL address
  2837.     3C9 VGA video DAC
  2838.     3CA VGA graphics 2 position
  2839.     3CC VGA graphics 1 position
  2840.     3CD VGA feature control
  2841.     3CE VGA graphics index
  2842.     3CF Other VGA graphics
  2843.  
  2844. %    3D0-3DF Color Graphics Monitor Adapter (ports 3D0-3DB are
  2845.         write only, see 6845)
  2846.     3D0 port address decodes to 3D4
  2847.     3D1 port address decodes to 3D5
  2848.     3D2 port address decodes to 3D4
  2849.     3D3 port address decodes to 3D5
  2850.     3D4 6845 index register, selects which register [0-11h]
  2851.         is to be accessed through port 3D5
  2852.     3D5 6845 data register [0-11h] selected by port 3D4,
  2853.         registers 0C-0F may be read.  If a read occurs without
  2854.         the adapter installed, FFh is returned.  (see ~6845~)
  2855.     3D6 port address decodes to 3D4
  2856.     3D7 port address decodes to 3D5
  2857.     3D8 6845 Mode control register (CGA, EGA, VGA, except PCjr)
  2858.     3D9 color select palette register (CGA, EGA, VGA, see 6845)
  2859.     3DA status register (read only, see 6845, PCjr VGA access)
  2860.     3DB Clear light pen latch (any write)
  2861.     3DC Preset Light pen latch
  2862.     3DF CRT/CPU page register (PCjr only)
  2863.  
  2864. %    3E8-3EF  COM3 non PS/2 UART (Reserved by IBM) (see ~UART~)
  2865.  
  2866. %    3F0-3F7  Floppy disk controller (except PCjr)
  2867.     3F0 Diskette controller status A
  2868.     3F1 Diskette controller status B
  2869.     3F2 controller control port
  2870.     3F4 controller status register
  2871.     3F5 data register (write 1-9 byte command, see ~INT 13~)
  2872.     3F6 Diskette controller data
  2873.     3F7 Diskette digital input
  2874.  
  2875. %    3F8-3FF  COM1 Primary Asynchronous Adapter  (see ~UART~)
  2876.  
  2877.     3220-3227  PS/2 COM3 (see UART)
  2878.     3228-322F  PS/2 COM4 (see UART)
  2879.     4220-4227  PS/2 COM5 (see UART)
  2880.     4228-422F  PS/2 COM6 (see UART)
  2881.     5220-5227  PS/2 COM7 (see UART)
  2882.     5228-522F  PS/2 COM8 (see UART)
  2883.  
  2884.     - many cards designed for the ISA ~BUS~ only uses the lower 10 bits
  2885.       of the port address but some ISA adapters use addresses beyond
  2886.       3FF.  Any address that matches in the lower 10 bits will decode
  2887.       to the same card.   It is up to the adapters to resolve or ignore
  2888.       the high bits of the port addresses.   An example would be the
  2889.       Cluster adapter that has a port address of 390h.  The second
  2890.       cluster adapter has a port address of 790h which resolves to
  2891.       the same port address with the cards determining which one
  2892.       actually gets the data.
  2893. :diagnostic codes:POST errors
  2894. ^DIAGS    IBM PC Diagnostic Error Codes
  2895.  
  2896. %    Code       Description      (Diagnostic Error Codes)
  2897.  
  2898.      1x   undetermined problem errors
  2899.      2x   power supply errors
  2900.      61   battery error (PS/2)
  2901.      62   configuration changed but no adaptors changed or CRC error
  2902.      63   memory size during POST does not match ~CMOS~ RAM
  2903.      65   card Id's in CMOS do not match system
  2904.  
  2905. %    1xx   System Board Errors
  2906.     101   system board failed
  2907.     102   BIOS ROM checksum error (PC, XT), Timer (AT)
  2908.     103   BASIC ROM checksum error (PC, XT), Timer interrupt (AT)
  2909.     104   interrupt controller (PC, XT), Protected mode (AT)
  2910.     105   timer (PC,XT), Last ~8042~ command not accepted (AT)
  2911.     106   converting logic test failure
  2912.     107   adapter card or math coprocessor (NMI)
  2913.     108   timer bus test
  2914.     109   DMA test error
  2915.     110   system board memory error (PS/2)
  2916.     111   adapter memory
  2917.     112   system unit adapter failure
  2918.     114   system unit and adapter card unit failure (PS/1)
  2919.     121   unexpected hardware interrupt
  2920.     131   cassette wrap test failed
  2921.     151   real-time clock, CMOS RAM or battery
  2922.     152   real-time clock
  2923.     161   system options error, battery failure
  2924.     162   CMOS RAM configuration error
  2925.     163   CMOS time and date not set
  2926.     164   system memory configuration is incorrect
  2927.     165   adapter added/removed
  2928.     199   user indicated configuration not correct
  2929.  
  2930. %    2xx   RAM Errors
  2931.     201   memory test error
  2932.     202   memory address error (Line error    0 - 15)
  2933.     203   memory address error (Line error 16 - 23)
  2934.     216   motherboard memory
  2935.  
  2936. %    3xx   Keyboard Errors
  2937.     301   keyboard did not respond to software reset or a stuck
  2938.           (number preceding 301 is scan code for stuck key)
  2939.     302   user indicated keyboard error or AT system unit is locked
  2940.     303   keyboard or system board error
  2941.     304   keyboard or system board error; CMOS does not match system
  2942.     341   replace keyboard
  2943.     342   replace keyboard interface cable
  2944.     343   replace enhancement card or cable
  2945.     365   keyboard (replace keyboard)
  2946.     366   interface cable (replace cable)
  2947.     367   enhancement card or cable (replace)
  2948.  
  2949. %    4xx   Monochrome Monitor Errors
  2950.     401   monochrome memory test, horizontal sync frequency
  2951.           test, or video test failed
  2952.     408   user indicated display attributes failure
  2953.     416   user indicated character set failure
  2954.     424   user indicated 80x25 mode failure
  2955.     432   parallel port test failed (monochrome adapter)
  2956.  
  2957. %    5xx   Color Monitor Errors
  2958.     501   CGA memory test failed, horizontal sync frequency test, or
  2959.           video test failed
  2960.     508   user indicated display attribute failure
  2961.     516   user indicated character set failure
  2962.     524   user indicated 80x25 mode failure
  2963.     532   user indicated 40x25 mode failure
  2964.     540   user indicated 320x200 graphics mode failure
  2965.     548   user indicated 640x200 graphics mode failure
  2966.     556   light pen test
  2967.     564   user indicated screen paging test
  2968.  
  2969. %    6xx   Diskette Drive/Adapter Errors
  2970.     601   diskette power on diagnostics test failed
  2971.     602   diskette test failed (boot record not valid)
  2972.     603   diskette size error
  2973.     606   diskette verify function failed
  2974.     607   write protected diskette
  2975.     608   bad command diskette status returned
  2976.     610   diskette initialization failed
  2977.     611   time-out - diskette status returned
  2978.     612   bad NEC ~FDC~ - diskette status returned
  2979.     613   bad DMA - diskette status returned
  2980.     614   DMA boundary error
  2981.     621   bad seek - diskette status returned
  2982.     622   bad CRC - diskette status returned
  2983.     623   record not found - diskette status returned
  2984.     624   bad address mark - diskette status returned
  2985.     625   bad NEC seek - diskette status returned
  2986.     626   diskette data compare error
  2987.     627   diskette change line error
  2988.     628   diskette removed
  2989.  
  2990. %    7xx   8087 Math Coprocessor
  2991.     701   coprocessor test failure
  2992.  
  2993. %    9xx   Parallel Printer Adapter Errors
  2994.     901   parallel printer adapter test failed
  2995.  
  2996. %    10xx  Alternate Parallel Printer Adapter
  2997.     1001  alternate printer adapter test failure
  2998.  
  2999. %    11xx  Asynchronous Communications Adapter Errors
  3000.     1101  asynchronous communications adapter test failed
  3001.     1110  modem status register not clear
  3002.     1111  ring-indicate
  3003.     1112  trailing edge ring-indicate
  3004.     1113  receive and delta receive line signal detect
  3005.     1114  receive line signal detect
  3006.     1115  delta receive line signal detect
  3007.     1116  line control register: all bits cannot be set
  3008.     1117  line control register: all bits cannot be reset
  3009.     1118  transmit holding and/or shift register stuck on
  3010.     1119  data ready stuck on
  3011.     1120  interrupt enable register: all bits cannot be set
  3012.     1121  interrupt enable register: all bits cannot be reset
  3013.     1122  interrupt pending stuck on
  3014.     1123  interrupt ID register stuck on
  3015.     1124  modem control register: all bits cannot be set
  3016.     1125  modem control register: all bits cannot be reset
  3017.     1126  modem status register: all bits cannot be set
  3018.     1127  modem status register: all bits cannot be reset
  3019.     1128  interrupt ID
  3020.     1129  cannot force overrun error
  3021.     1130  no modem status interrupt
  3022.     1131  invalid interrupt pending
  3023.     1132  no data ready
  3024.     1133  no data available interrupt
  3025.     1134  no transmit holding interrupt
  3026.     1135  no interrupts
  3027.     1136  no received line status interrupt
  3028.     1137  no receive data available
  3029.     1138  transmit holding register not empty
  3030.     1139  no modem status interrupt
  3031.     1140  transmit holding register not empty
  3032.     1141  no interrupts
  3033.     1142  no IRQ4 interrupt
  3034.     1143  no IRQ3 interrupt
  3035.     1144  no data transferred
  3036.     1145  maximum baud rate
  3037.     1146  minimum baud rate
  3038.     1148  time-out error
  3039.     1149  invalid data returned
  3040.     1150  modem status register error
  3041.     1151  no DSR and delta DSR
  3042.     1152  no DSR
  3043.     1153  no delta DSR
  3044.     1154  modem status register not clear
  3045.     1155  no CTS and delta CTS
  3046.     1156  no CTS
  3047.     1157  no delta CTS
  3048.  
  3049. %    12xx  Alternate Asynchronous Communications Adapter
  3050.     1200-1257 same as 1100-1157
  3051.  
  3052. %    13xx  Game Control Adapter Errors
  3053.     1301  game control adapter test failed
  3054.     1302  joystick test failed
  3055.     1380  audio card and joystick (PS/1)
  3056.  
  3057. %    14xx  Printer Errors
  3058.     1401  printer test failed
  3059.     1404  matrix printer failed
  3060.  
  3061. %    15xx  SDLC Communications Adapter Errors
  3062.     1501  adapter test failure
  3063.     1510  8255 port b failure
  3064.     1511  8255 port a failure
  3065.     1512  8255 port c failure
  3066.     1513  8253 timer 1 did not reach terminal count
  3067.     1514  8253 timer 1 stuck on
  3068.     1515  8253 timer 0 did not reach terminal count
  3069.     1516  8253 timer 0 stuck on
  3070.     1517  8253 timer 2 did not reach terminal count
  3071.     1518  8253 timer 2 stuck on
  3072.     1519  8273 port b error
  3073.     1520  8273 port a error
  3074.     1521  8273 command/read time-out
  3075.     1522  interrupt level 4 failure
  3076.     1523  ring Indicate stuck on
  3077.     1524  receive clock stuck on
  3078.     1525  transmit clock stuck on
  3079.     1526  test indicate stuck on
  3080.     1527  ring indicate not on
  3081.     1528  receive clock not on
  3082.     1529  transmit clock not on
  3083.     1530  test indicate not on
  3084.     1531  DSR not on
  3085.     1532  CD not on
  3086.     1533  CTS not on
  3087.     1534  DSR stuck on
  3088.     1535  CD stuck on
  3089.     1536  CTS stuck on
  3090.     1537  level 3 interrupt failure
  3091.     1538  receive interrupt results error
  3092.     1539  wrap data compare error
  3093.     1540  DMA channel 1 error
  3094.     1541  DMA channel 1 error
  3095.     1542  error in 8273 error checking or status reporting
  3096.     1547  stray interrupt level 4
  3097.     1548  stray interrupt level 3
  3098.     1549  interrupt presentation sequence time-out
  3099.  
  3100. %    16xx  Display Emulation Errors (327x, 5520, 525x)
  3101.  
  3102. %    17xx  Fixed Disk Errors
  3103.     1701  post error
  3104.     1702  adapter error
  3105.     1703  drive error (seek)
  3106.     1704  adapter or drive error
  3107.     1705  no record found
  3108.     1706  write fault error
  3109.     1707  track 0 error
  3110.     1708  head select error
  3111.     1709  defective error check
  3112.     1710  read buffer overrun
  3113.     1711  bad address mark
  3114.     1712  undetermined error
  3115.     1713  data compare error
  3116.     1714  drive not ready
  3117.     1780  disk 0 failure
  3118.     1781  disk 1 failure
  3119.     1782  disk controller failure
  3120.     1790  fixed disk 0 error
  3121.     1791  fixed disk 1 error
  3122.  
  3123. %    18xx  I/O Expansion Unit Errors
  3124.     1801  I/O expansion unit POST error
  3125.     1810  enable/disable failure
  3126.     1811  extender card wrap test failed (disabled)
  3127.     1812  high order address lines failure (disabled)
  3128.     1813  wait state failure (disabled)
  3129.     1814  enable/disable could not be set on
  3130.     1815  wait state failure (enabled)
  3131.     1816  extender card wrap test failed (enabled)
  3132.     1817  high order address lines failure (enabled)
  3133.     1818  disable not functioning
  3134.     1819  wait request switch not set correctly
  3135.     1820  receiver card wrap test failure
  3136.     1821  receiver high order address lines failure
  3137.  
  3138. %    19xx  3270 PC Attachment Card Errors
  3139.  
  3140. %    20xx  Bisync Communications Adapter Errors
  3141.     2010  8255 port a failure
  3142.     2011  8255 port b failure
  3143.     2012  8255 port c failure
  3144.     2013  8253 timer 1 did not reach terminal count
  3145.     2014  8253 timer 1 stuck on
  3146.     2016  8253 timer 2 didn't reach terminal count or timer 2 stuck on
  3147.     2017  8251 DSR failed to come on
  3148.     2018  8251 CTS not sensed
  3149.     2019  8251 DSR stuck on
  3150.     2020  8251 CTS stuck on
  3151.     2021  8251 hardware reset failed
  3152.     2022  8251 software reset failed
  3153.     2023  8251 software error reset failed
  3154.     2024  8251 transmit ready did not come on
  3155.     2025  8251 receive ready did not come on
  3156.     2026  8251 could not force "overrun" error status
  3157.     2027  interrupt failure, no timer interrupt
  3158.     2028  transmit interrupt, card or planar failure
  3159.     2029  transmit interrupt, card failure
  3160.     2030  receive interrupt, card or planar failure
  3161.     2031  receive interrupt, card failure
  3162.     2033  ring indicate stuck on
  3163.     2034  receive clock stuck on
  3164.     2035  transmit clock stuck on
  3165.     2036  test indicate stuck on
  3166.     2037  ring indicate stuck on
  3167.     2038  receive clock not on
  3168.     2039  transmit clock not on
  3169.     2040  test indicate not on
  3170.     2041  DSR not on
  3171.     2042  CD not on
  3172.     2043  CTS not on
  3173.     2044  DSR stuck on
  3174.     2045  CD stuck on
  3175.     2046  CTS stuck on
  3176.     2047  unexpected transmit interrupt
  3177.     2048  unexpected receive interrupt
  3178.     2049  transmit data did not equal receive data
  3179.     2050  8251 detected overrun error
  3180.     2051  lost DSR during data wrap
  3181.     2052  receive time-out during data wrap
  3182.  
  3183. %    21xx  Alternate Bisync Communications Adapter Errors
  3184.     2100-2152 same as 2000-2052
  3185.  
  3186. %    22xx  Cluster Adapter Errors
  3187.  
  3188. %    24xx  EGA Errors
  3189.     2401  adapter test failure
  3190.     2408  user-indicated display attributes
  3191.     2416  user-indicated character set
  3192.     2424  user-indicated 80x25 mode
  3193.     2432  user-indicated 40x25 mode
  3194.     2440  user-indicated 320x200 graphics mode
  3195.     2448  user-indicated 640x200 graphics mode
  3196.     2456  light pen test
  3197.     2464  user-indicated screen paging test
  3198.  
  3199. %    2501  EGA Display Error
  3200.  
  3201. %    28xx  3278/79 Emulator Adapter (PC, XT)
  3202.  
  3203. %    29xx  Color Matrix Printer Errors
  3204.  
  3205. %    30xx  Local Area Network Adapter
  3206.  
  3207. %    31xx  Alternate Local Area Network Adapter
  3208.  
  3209. %    33xx  Compact Printer Errors
  3210.  
  3211. %    36xx  IEEE 488 Adapter
  3212.  
  3213. %    37xx  Reserved for Future Use
  3214.  
  3215. %    38xx  Data Acquisition Adapter
  3216.  
  3217. %    39xx  PGA Display and/or Adapter
  3218.  
  3219. %    48xx  Internal Modem
  3220.  
  3221. %    49xx  Alternate Internal Modem
  3222.  
  3223. %    71xx  Voice Communications Adapter
  3224.  
  3225. %    73xx  3.5 Inch Diskette Drive
  3226.     7301  diskette drive/adapter test failure
  3227.     7306  diskette change line error
  3228.     7307  write-protected diskette
  3229.     7308  bad command
  3230.     7310  track zero error
  3231.     7311  timeout
  3232.     7312  bad NEC7313 bad DMA
  3233.     7314  DMA boundary error
  3234.     7315  bad index
  3235.     7316  speed error
  3236.     7321  bad seek
  3237.     7322  bad CRC
  3238.     7323  record not found
  3239.     7324  bad address mark
  3240.     7325  bad NEC seek
  3241.  
  3242. %    86xx  PS/1 Mouse Error
  3243.  
  3244.  
  3245.     - all error codes for the diagnostic and advanced diagnostic
  3246.       packages for the PC, XT and AT are represented with the device
  3247.       number followed by two digits other than 00.    The device number
  3248.       plus 00 represents successful completion of the test.
  3249.  
  3250. :resistor values
  3251. ^Resistor Color Code Chart
  3252.  
  3253. %         Color     Digit     Multiplier
  3254.  
  3255.          Black     0      1
  3256.          Brown     1      10
  3257.          Red     2      100         Gold      ± 5% tolerance
  3258.          Orange     3      1,000      Silver   ±10% tolerance
  3259.          Yellow     4      10,000
  3260.          Green     5      100,000
  3261.          Blue     6      1,000,000
  3262.          Violet     7      10,000,000
  3263.          Gray     8      100,000,000
  3264.          White     9      1,000,000,000
  3265.  
  3266. %          ╒═████░██▒██▓██░████═╕
  3267. %          ┴            ┴
  3268.             │  │  │  │
  3269.             │  │  │  └────────── tolerance (gold or silver)
  3270.             │  │  └──────────── Ohm value multiplier
  3271.             └──┴────────────── first 2 digits of Ohm value
  3272. :RS232 pins:serial ports
  3273. ^RS232    Communication Configuration
  3274.  
  3275. %        IBM PC                IBM AT
  3276. %    Pin  25-Pin Signal (DTE)     Pin  9-Pin Signal (DTE)
  3277.  
  3278.       1   Chassis Ground  (GND)     1   Carrier Detect (CD)
  3279.       2   Transmit Data (TD)     2   Receive Data (RD)
  3280.       3   Receive Data (RD)      3   Transmit Data (TD)
  3281.       4   Request to Send (RTS)     4   Data Terminal Ready (DTR)
  3282.       5   Clear to Send (CTS)     5   Signal Ground (SG)
  3283.       6   Data Set Ready (DSR)     6   Data Set Ready (DSR)
  3284.       7   Signal Ground (SG)     7   Request to Send (RTS)
  3285.       8   Carrier Detect (CD)     8   Clear to Send (CTS)
  3286.     9-19  (not used)         9   Ring Indicator (RI)
  3287.      20   Data Terminal Ready (DTR)
  3288.      22   Ring Indicator (RI)
  3289.  
  3290.     There are two general cable configurations used with the RS-232C
  3291.     Communications Standard:
  3292.  
  3293.       Data Terminal Equipment (DTE): IBM PC's, printers, plotters, etc
  3294.       Data Communication Equipment (DCE): modems, multiplexors, etc
  3295.  
  3296.     DCE to DTE requires all lines run straight through
  3297.     DTE to DTE usually requires swapping of the following lines
  3298.  
  3299.         RD  and TD        RD  and TD
  3300.         RTS and CTS    or    RTS,CTS and DCD
  3301.         DTR and DSR        DCD and RTS,CTS
  3302.  
  3303. %    Signal Functions
  3304.  
  3305.     GND    Ground            protective safety ground
  3306.     TD     Transmit Data        DTE output data
  3307.     RD     Receive Data        DTE input data
  3308.     RTS    Request To Send        DTE output, DTE would like to transmit
  3309.     CTS    Clear To Send        DTE input, DCE is ready to transmit
  3310.     DSR    Data Set Ready        DTE input, DCE is ready to communicate
  3311.     SG     Signal Ground        provides a Zero reference voltage
  3312.     DCD    Data Carrier Detect  DTE input, data link established, also
  3313.                     known as Receive Line Signal Detect (RLSD)
  3314.     DTR    Data Terminal Ready  DTE output, device ready
  3315.     RI     Ring Indicator        DTE input, announces incoming call
  3316.  
  3317.  
  3318.     - RTS/CTS is used for half duplex line turn around
  3319.     - in half duplex DCD is asserted only by the receiving device
  3320.     - full duplex modems tie CTS & DCD together (no CTS/RTS handshaking)
  3321.     - most modems require DTR to be present to respond to commands
  3322.     - maximum voltages are between -15 volts and +15 volts
  3323.     - binary outputs are between +5 to +15 volts and -5 to -15 volts
  3324.     - binary inputs are between +3 to +15 volts and -3 to -15 volts
  3325.     - input voltages between -3 to +3 are undefined while output voltages
  3326.       between -5 and +5 are undefined
  3327.     - positive voltages indicate ON or SPACE, negative voltages indicate
  3328.       OFF or MARK
  3329.  
  3330.