"30 days Homemade operating System" paper doll operating system and the loading principle of most operating systems

Source: Internet
Author: User

Recently read the "30 days of homemade operating system" this book, read the "Load operating system from the boot area" section of the time stuck, first of all my question is this: first, the disk image file img 0x2600 This place to store the name of the operating system files (in binary editor see), 0x4200 later store the contents of the operating system (execution code), our boot area code will be loaded into the memory of 0X7C00 this location, that 0X7C00-0X7CFF belongs to ScanDisk code all, and the book said 0x8000-0x81ff belongs to ScanDisk, which part of the address belongs to ScanDisk , this is the question one. We are from the second sector to read the contents of the disk to memory, the first sector left ScanDisk, we will load the contents of the second sector into the memory of 0x8200, then the disk image file img 0x4200 corresponding memory address should be 0x8200+0x4200 instead of 0x8000+ 0X4200, I believe that people who read this book for the first time or do not understand the operating system loading principle will have at least two questions. Here is a detailed explanation for you. First, this map is the Baidu Encyclopedia for reference, I modified a bit:



First, the machine starts, loading the first sector of the disk 512 bytes of content to determine whether it is the startup program. And our disk image file corresponding to the first sector of the Assembly address is 0-0x200, that is, 512 bytes, the start is to read the 512 bytes, this is not the key, the key is that we start from the second sector of the disk to load the contents of the disk into memory 0x8200 after the location, So the disk image file img 0x4200 corresponding memory address is 0x4200-0x0200+0x8200 rather than simple 0x8000+0x4200, although the result is the same, but I do not understand the operating system of scholars caused a misunderstanding. Eh, the key place also has to think seriously, the pit father, originally very simple thing but was the author to 0x8000+0x4200 area and let me sit here motionless thought of 3 hours, lying trough.

"30 days Homemade operating System" paper doll operating system and the loading principle of most operating systems

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.