You are here : assembly8086LODSW

LODSW - 8086

Load word at DS:[SI] into AX. Update SI.

Algorithm:

  •  AX = DS:[SI]
  •  if DF = 0 then
    •  SI = SI + 2
  • else
    •  SI = SI - 2


Syntax

LODSW


Example

.model small
.data
  a1 dw 111h, 222h, 333h, 444h, 555h 
  ...
.code
  ...
  ...
  LEA SI, a1
  MOV CX, 5
  REP LODSW 	; finally there will be 555h in AX.
  ...
  ...
  end


Output / Return Value


Limitations


Alternatives / See Also


Reference