You are here : assembly8086MOVSW

MOVSW - 8086

Copy word at DS:[SI] to ES:[DI]. Update SI and DI.

Algorithm:

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


Syntax

MOVSW


Example

ORG 100h
 CLD
 LEA SI, a1
 LEA DI, a2
 MOV CX, 5
 REP MOVSW
 RET

a1 DW 1,2,3,4,5
a2 DW 5 DUP(0)


Output / Return Value


Limitations


Alternatives / See Also


Reference