Assembly Language Help (alang.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.
LODS Instruction
 Detail Key Example                    Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Title:    Load String Operand                   Flags: O D I T S Z A P C
                                                         ═════════════════
  Syntax:   LODS src                                          -none-
            LODSB
            LODSW
            LODSD (80386/486 Only)
 
  See also: STOS, MOVS, CLD
 
  Description:
 
     Loads accumulator with element from a string from memory. The
     string to be loaded is the source and must be pointed to by DS:SI
     (even if an operand is given). For each source element loaded, SI
     is adjusted according to the size of the operand and the status
     of the direction flag. SI is incremented if the direction flag has
     been cleared with CLD, or decremented if the direction flag has
     been set with STD.
 
     If the LODS form of the instruction is used, an operand must be
     provided to indicate the size of the data elements to be
     processed. A segment override can be given.
 
     If LODSB (bytes), LODSW (words), or LODSD (doublewords) is used,
     the instruction determines the size of the data elements to be
     processed and whether the element will be loaded to AL, AX, or
     EAX.
 
     LODS and its variations are not used with repeat prefixes,
     since there is no reason to repeatedly load memory values to
     a register.
                                    -♦-