home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 3 / CDASC03.ISO / sorties / 314 / hardware.txt < prev    next >
Text File  |  1993-04-01  |  132KB  |  3,332 lines

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