30 days self-made operating system second day, 30 days self-made second day

Source: Internet
Author: User

30 days self-made operating system second day, 30 days self-made second day
The next day, the author mainly explained and optimized the helloworld system source file compiled by the sink.
In the previous section, commands such as db dw dd resb were used.
The new commands in this section:
ORG loads the program to the address specified in the memory.
JMP jump
MOV assignment
ADD Addition
CMP comparison
JE condition jump
INT Software Terminal command, word: interrupt
Hlt cpu standby

Introduction to CPU registers
16-bit registers:
AX
CX
DX
BX
SP
BP
SI
DI
8-bit registers:
AL
CL
DL
BL
AH
CH
DH
BH
32-bit registers:
EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI
16-bit register:
ES, CS, SS, DS, FS, GS
0x00007c00-0x00007dff: Fill address of the content in the startup zone, as agreed by the hardware vendor


Finally, the author used batch files and Makefile files to simplify the development process.
The assembler and make tools nask are used.
Make is a command tool that explains the commands in Makefile (rules should be said ). The Makefile file describes the compilation sequence and rules of all files in the project. Makefile has its own writing format, keywords, and functions. Just as C has its own format, keywords, and functions. In Makefile, you can use any command provided by the system shell to complete the desired work. Makefile (may be another file name on other systems) is used in most IDE development environments and has become a compilation method for projects.

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.