Machine code and pseudo-instructions

Source: Internet
Author: User

M the reason for the immediate number of OV is limited: because according to, MOV's machine instruction in the immediate number can have up to 12 bits, of which four bits represent the shift, so immediately the number can be up to 8.

There are two kinds of pseudo-directives: Operation class pseudo-instruction and definition class pseudo-instruction

Defining class pseudo-directives

G Lobal Defining a global variable

D ATA definition Data segment

A Scii defines a string

B Yte defines a byte of data

W Ord defines a Word data

E Qu defining a macro

Example:

Operation class pseudo-directive (actual substitution with other directives)

L Dr Pseudo-directive: the role is to put an immediate number into the register, and the name of the visit to the LDR command, when the substitution can be achieved with MOV or MVN, the priority is to use these two instructions, can not be used when the data into the memory, and then with the real LDR visit. (Don't ask me why the number of addresses on a PC is now 0, I don't know, I think the normal logic should be 8 AH)

N op pseudo-directive: null instruction, its practical is Mov.

Example:



From for notes (Wiz)

Machine code and pseudo-instructions

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.