Assembly Language Learning Notes (8)--basic problems in data processing

Source: Internet
Author: User

1, only "BX, Si, Di, BP" Four registers can be used in the [...] To address the memory cells in the

2. These four registers can appear either individually or in [By+zi] form, where y=x or p,z = s or D, other formats are incorrect.

3, when using BP, if not explicitly given the segment address, then the segment address by default in the SS segment register.

4, assembly language with three concepts to express the location of data:

Immediate Number (Idata):

"Data" directly contained in the machine instruction (in the "instruction buffer" of the CPU before execution), given directly in the assembly instruction

Register

The "data" in the instruction to be processed is in "register" and the corresponding register name is given in the assembly instruction.

Segment address and offset address

The "data" in the instruction to be processed is in "Memory", the segment address is in a segment register, the offset address is given by [X]

5, when the data in memory, there are multiple addressing methods, is generally in the [...] , the offset address can be a single register in the four registers described in 1th, or a combination of one or two registers and an immediate number in these four registers.

6. Indicate the size of the data to be processed:

(1). indicated by register name, such as Al represents data as one byte, Ax is two bytes
(2). Specify the memory unit length with the operator x ptr, x = Word or byte
(3). Push instruction only for word operation

7, Div in the Assembly for Division instruction

The divisor has 8 bits and 16 bits, which are stored in registers or in memory, if the divisor is 8 bits, the divisor is in Ax, the AL stores the division operation Quotient, AH stores the remainder; if the divisor is 16 bits, then the divisor of the low 16 bits exists in AX, the high 16 bits exist in the DX, the remainder exists in the DX.

8, DB defines "byte" data, DW defines "font" data, DD defines "double-font" data

9, the DUP operator with the DB, DD, DW with the use of data duplication

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Assembly Language Learning Notes (8)--basic problems in data processing

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.