[Operating system experiment]1, operating system boot

Source: Internet
Author: User

First, the experimental content

Rewrite Bootsect.s and SETUP.S to complete the following main functions:

1, BOOTSECT.S can print a message on the screen "XXX is booting ...", where xxx is the name you give your own operating system, such as Lzjos, Sunix, etc.

2, Bootsect.s can complete setup.s loading, and jump to setup.s start address execution.

3, SETUP.S is able to output a line of information like a screen "Now we is in Setup"

4, SETUP.S can obtain at least one basic hardware parameters (such as memory parameters, video card parameters, hard disk parameters, etc.), store it in the memory of the specific address, and output to the screen.

5, SETUP.S no longer loads the Linux kernel and keeps the above information displayed on the screen

Second, the experimental steps

1, complete the bootsect screen output function

First, the key code to complete the screen display is as follows:

!first read into the cursor position mov ah,#0x03XOR Bh,bhint    0x10! Display string "AXF OS is booting, my name is Aixiangfei ..."mov cx, #50!The string contains a total of 50 characters, so set CX to 50mov bx,#0x0007            mov bp, #msg1mov ax,#0x1301int    0x10inf_loop:jmp Inf_loop!There 's no serious code behind, you gotta jump back.!MSG1 Place string MSG1:.byte  -,Ten! Line Break +Enter. ASCII"Lzjos is running ..."    .byte  -,Ten, -,Ten! Two swap lines +Enter!set boot sector flag 0xaa55. org510boot_flag:. Word0xaa55! Must have it in order to guide

[Operating system experiment]1, operating system boot

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.