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