Load String                                 

86/88

Y

186

Y

286

Y

386

Y

486

Y

LODS/LODSB/LODSW/LODSD source

Ovfl

N

Dir

N

Int

N

Trap

N

Sign

N

Zero

N

Aux

N

Prty

N

Carry

N

    LODS transfers the value (word or byte) pointed to by DS:SI into AX or
    AL.  It also increments or decrements SI (depending on the state of
    the Direction Flag) to point to the next element.

       Notes:         This instruction is always translated by the
                      assembler into either LODSB, Load String Byte, or
                      LODSW, Load String Word, depending upon whether
                      source-str refers to a string of bytes or words. In
                      either case, however, you must explicitly load the
                      SI register with the offset of the string.

                      Although it is legal to repeat this instruction, it
                      is almost never done since doing so would
                      continually overwrite the value in AL.

------------------------------------ Timing ----------------------------------

OpCode          Instruction             386     286     86
AC              LODS m16                5       5       12
AD              LODS m16                5       5       12
AD              LODS m32                5
AC              LODSB                   5       5       12
AD              LODSW                   5       5       12
AD              LODSD                   5

------------------------------------ Logic -----------------------------------

        AL = (DS:SI)
        If DF = 0 then
                SI = SI + n
        else
                SI = SI - n

See Also CMPS MOVS SCAS STOS REP REPE REPNE CLD STD


Copyright © 1985 to 2022 Beta Systems                            Last modified: Wednesday, January 05, 2022 .