c语言寻找James,[semi-tutorial]某亚里亚写在JamesM边上的OS笔记
該樓層疑似違規已被系統折疊?隱藏此樓查看此樓
順便給好奇的同學放出boot.s:
1 MBOOT_PAGE_ALIGN??? equ 1<<0
2 MBOOT_MEM_INFO????? equ 1<<1
3 MBOOT_HEADER_MAGIC equ 0x1BADB002
4
5
6 MBOOT_HEADER_FLAGS equ MBOOT_PAGE_ALIGN | MBOOT_MEM_INFO
7 MBOOT_CHECKSUM????? equ -(MBOOT_HEADER_MAGIC + MBOOT_HEADER_FLAGS)
8
9
10 [BITS 32]?????????????????????? ; All instructions should be 32-bit.
11
12 [GLOBAL mboot]????????????????? ; Make 'mboot' accessible from C.
13 [EXTERN code]?????????????????? ; Start of the '.text' section.
14 [EXTERN bss]??????????????????? ; Start of the .bss section.
15 [EXTERN end]??????????????????? ; End of the last loadable section.
16
17 mboot:
18?? dd MBOOT_HEADER_MAGIC??????? ; GRUB will search for this value on each
19???????????????????????????????? ; 4-byte boundary in your kernel file
20?? dd MBOOT_HEADER_FLAGS??????? ; How GRUB should load your file / settings
21?? dd MBOOT_CHECKSUM??????????? ; To ensure that the above values are correct
22
23?? dd mboot???????????????????? ; Location of this descriptor
24?? dd code????????????????????? ; Start of kernel '.text' (code) section.
25?? dd bss?????????????????????? ; End of kernel '.data' section.
26?? dd end?????????????????????? ; End of kernel.
27?? dd start???????????????????? ; Kernel entry point (initial EIP).
28
29 [GLOBAL start]????????????????? ; Kernel entry point.
30 [EXTERN main]?????????????????? ; This is the entry point of C code
31
32 start:
33?? push??? ebx?????????????????? ; Load multiboot header location
34
35?? ; Execute the kernel:
總結
以上是生活随笔為你收集整理的c语言寻找James,[semi-tutorial]某亚里亚写在JamesM边上的OS笔记的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c语言数据储存系统,编的学生成绩管理系统
- 下一篇: 蓝桥杯抽卡游戏c语言,取球游戏——第三届