NASM 2.05 based x86 Instruction Reference[ch201]
A.5.178.1 Pseudo-code examples a16 MOVSB without segment override and with Direction Flag clear (UP) is equal to MOV BYTE [ES:DI], BYTE [SI] LEA SI, [SI + 1] LEA DI, [DI + 1] a16 REP MOVSW without segment override and with Direction Flag clear (UP) is equal to JCXZ @FF @@: MOV WORD [ES:DI], WORD [SI] LEA SI, [SI + 2] LEA DI, [DI + 2] a16 LOOP @B @@: a32 ES MOVSD with Direction Flag set (DN) is equal to MOV DWORD [ES:EDI], DWORD [ES:ESI] LEA ESI, [ESI - 4] LEA EDI, [EDI - 4]