30-Day homemade operating system study notes-1th Day

Source: Internet
Author: User

In order to deepen the understanding of the operating system, I decided to follow the "30 days of homemade operating system" this book practice. The GitHub link for the project is https://github.com/YatesXu/YatesOSASK/

About the Hex editor

The first problem is that the hex editor in the book is Japanese, after opening it on my computer is a garbled, so I compare the use of this hex editor wxmedit, Link is https://wxmedit.github.io/.

In addition, Visual Studio can, but express version is not available, so use free open source software (laughter)

(pseudo) Startup program code

The first program is written by the author in assembly language, should be the startup program, but does not load the function of the operating system, just output a string. Here, I named my Project Yatesosask (because the author osask his system) according to the process in the book, basically no problem (except for the first insane bunch of 0)

I translated the comments (garbled from the Japanese) and added some instructions

;Hello-os;the width of the Tab=4,tab key;for the standard FAT12 format floppy disk code, the FAT format is formatted with Windows or MSDOS floppy disk format. db 0xeb, 0x4e, 0x90 db"HELLOIPL"        ;ScanDisk name, can be any string, IPL is launcher loader, used to load operating systemDw +                ;the size of each sector must be 512 bytesDb1                ;the size of the cluster must be 1 sectorsDw1                ;fat start position, start of first sectorDb2                ;fat number, must be 2Dw224                ;root directory size, typically set to 224 itemsDw2880            ;disk size, must be 2880 sectorsDB 0xf0;disk type, must be 0xf0Dw9                ;fat length, must be 9 sectorsDw -                ;1 tracks have several sectors and must beDw2                ;number of heads, must be 2Dd0                ;do not use partitions, must be 0Dd2880            ;override disk Size onceDb0,0, 0x29;meaning unknown, fixedDD 0xFFFFFFFF;it could be a volume tag number .Db"Hello-os"    ;disk name, 11 bytesDb"FAT12"        ;disk format name, 8 bytesResb -                ;empty 18 bytes First;Program Bodydb 0xb8, 0x00, 0x00, 0x8e, 0xd0, 0XBC, 0x00, 0x7c DB 0x8e, 0xd8, 0x8e, 0xc0, 0xBE, 0x74, 0x7c, 0x8a db 0x04, 0x83, 0xc6, 0x01, 0x3c, 0x00, 0x74, 0x09 DB 0xb4, 0x0e, 0xBB, 0x0f, 0x00, 0xCD, 0x10, 0xeb DB 0xEE, 0xf4, 0xeb, 0xfd;Information Display SectionDB 0x0a, 0x0a;Two line breaksDb"Yatesosask"DB 0x0a;line BreakDb0Resb 0x1fe-$;complete 0x00 until 0x001feDB 0x55, 0xaa;It's the output outside of the ScanDisk.DB 0xf0, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00 resb4600DB 0xf0, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00 resb1469432

Summary and thinking

The first day of the program is basically familiar with the environment, experience the virtual machine, (because the 2016 floppy disk is too rare ha), the production of a pseudo-startup program, but also the operating system at the beginning of a little understanding.

Last year, when we learned the theory of operating systems, they were all concepts that were not understood in practice. Last semester of the operation of the experimental class, just use C simulation of some algorithms (process scheduling communication), this book from 0 to do operating system, should be a good opportunity to apply.

30-Day homemade operating system study notes-1th Day

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.