最简memmove代码

不考虑时间效率,直接rep movsb实现:

3BFE    CMP EDI,ESI
72 09    JB $+0Bh
8D740E FF    LEA ESI,[ESI+ECX-1]
8D7C0F FF    LEA EDI,[EDI+ECX-1]
FD    STD
F3:A4    REP MOVSB
FC    CLD

共16字节。

One thought on “最简memmove代码

Leave a Reply

Your email address will not be published. Required fields are marked *

Using REAL email address will help you receive reply notifications.