Assembly Language Learning Notes

Source: Internet
Author: User

1. Who will execute the pseudo-directive?

Pseudo-directives are instructions that are executed by the compiler, and the compiler performs the related compilation according to the pseudo-instructions.

2. Programs: Instructions or data that are ultimately executed and processed by the computer in the source program

3. We can refer to all the content in the source program file as the source program, and the instructions or data in the source program that are ultimately processed by the computer are called programs. The program is first in the form of assembly instructions in the source program, compiled, connected to the machine code, stored in the executable file.

4. The role of the connection:

A. When the source program is large, it can be divided into multiple source program files to compile, each source program compiled into a target file, and then connect them with the connector to generate an executable file

B. A subroutine in a library file is called in the program, and the library file is connected to the target file generated by the program to generate an executable file

C. After compiling a source program, the object file containing the machine code is obtained, and some content in the target file cannot be directly used to generate the executable file, and the program will process the content as the final executable information.

Therefore, in cases where there is only one source program file, and you do not need to call a subroutine in a library, you must also use the connector program to process the target file and generate the executable file. Note that for the connection process, the executable is the final result we want to get

5. In DOS, the program in the executable P1 to run, must have a running program P2, will P1 from the executable file loaded into memory, the CPU control to it, P1 to be able to run. When the P1 is finished running, the control of the CPU should be returned to the program that made it run P2

6.Debug when the program is loaded into memory from an executable file, the length of the program is stored in CX. After the program is loaded, the DS contains the segment address of the memory area of the program, the offset address of this memory area is 0, the address of the memory area where the program resides is: ds:0. The first 256 bytes of this memory area are stored by Psp,dos used to communicate with the program. The program is stored in the backward space at 256 bytes. So, we can get the PSP segment address from DS SA,PSP with an offset address of 0, then the physical address is sax16+0. Because the PSP occupies 100H bytes, the physical address of the program is: sax16+0+256=sax16+16x16= (sa+16) x16+0

The available segment addresses and offset addresses are represented as: sa+10:0.

Assembly Language Learning Notes

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.