qa.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
INS/INSB/INSW
   Summary  Detail  Key to Flags
──────────────────────────────────────────────────────────────────────────────
 
Input from Port to String                        Flags:  O D I T S Z A P C
80186/286/386 Only                                       ═════════════════
 
Syntax:  INS dest,src
         INSB
         INSW
 
  Receives a string from a port. The string is considered the destination
  and must be pointed to by ES:DI (even if an operand is given).
  The input port is specified in DX. For each element received, DI
  is adjusted according to the size of the operand and the status of the
  direction flag. DI is increased if the direction flag has been cleared
  with CLD or decreased if the direction flag has been set with STD.
 
  If the INS form of the instruction is used, a destination operand must
  be provided to indicate the size of the data elements to be processed
  and DX must be specified as the source operand containing the port
  number.  A segment override is not allowed.  If INSB (bytes) or INSW
  (words) is used, the instruction determines the size of the data
  elements to be received.  No operands are allowed with INSB or INSW.
 
  INS and its variations are usually used with the REP prefix. Before
  the repeated instruction is executed, CX should contain the number of
  elements to be received.
                                    -♦-