You are here : assembly8086MOVSB

MOVSB - 8086

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

Algorithm:

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


Syntax

MOVSB


Example

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

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


Output / Return Value


Limitations


Alternatives / See Also


Reference