Data addressing and transmission

Source: Internet
Author: User

1. ALIGN pseudocommand: Let the address of the variable following it be equal to the address of the previous variable plus the number of bytes specified by ALIGN, and then recursively return.

Var1 byte? The var1 address is 00001000.

ALIGN 4

Var2 byte? The var2 address is 00001004.

Var3 byte? The var3 address is 00001008.

Var4 byte? The var4 address is ike100c.

2. Two Methods for getting array elements

2.1. Address offset

Mov eax, [arrayVar + I]

2.2 subscript Variables

Mov eax, arrayVar [I]

2.3. Variable description

2.3.1. array variable name arrayVar indicates the starting address of the array variable

2.3.2. offset I is an integer multiple of the size of the array element bytes.

3. LOOP commands

3.1 format

Mov ecx, n

L1:

...;

Loop L1

3.2 run the loop command to reduce ecx by 1. If ecx is not equal to 0, the system jumps to the target address specified by the loop. Otherwise, the system executes the next line of code.

3.3 The loopz (or loope) command adds a condition to jump to the target address: ZF = 1;

The loopnz (or loopne) command adds a condition to jump to the target address: ZF = 0

 

 

 

 

 

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.