Assembly Language Rep Movsd The use of detailed _c languages

Source: Internet
Author: User

MOV Esi,offset @s1
MOV Edi,offset @s2
MOV ecx,10
Cld
Rep Movsd

1.Rep Movsd every ecx! =0 executes Movsd, then ecx=ecx-1 movsd move Ds:[si] to Es:[di], in 32-bit assembler can replace the Si,edi with ESI instead of Di

2. at the same time because in general exe DS = ES program starting position so another ESI = offset @s1 can find the variable s1, edi= offset @s2 can find the variable s2

3.Movsd Such directives are of a nature and perform a esi = ESI +1,edi= edi+ 1 when the flag bit d=0

d=1 when performing esi = esi +1,edi= edi+ 1

So the meaning of this instruction is to copy ecx from S1 to S2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.