📄 crt0.s
字号:
;/** stub.s; **; ** Original Author: Kasper Verdich Lund; ** Date: 10.26.99; **; ** Description:; ** Kernel startup code ; **; ** This program is free software, you can redistribute it and/or; ** modify it under the terms of the GNU General Public License; ** as published by the Free Software Foundation; either version; ** 2 of the License, or (at your option) any later version.; **; ** This program is distributed in the hope that it will be; ** useful, but WITHOUT ANY WARRANTY; without even the implied; ** warranty or MERCHANTABILITY or FITNESS FOR A PARTICULAR; ** PURPOSE. See the GNU General Public License for more; ** details.; **; ** You should have received a copy of the GNU General Public; ** License along with this program; if not, write to the; ** Free Software Foundation, Inc., 59 Temple Place, Suite 330,; ** Boston, MA 02111-1307 USA; **; *********************************************************Apostle OS**/ SECTION .text GLOBAL _start_start: jmp boot_entry ALIGN 4 EXTERN edata EXTERN endboot_hdr: dd 0x1BADB002 dd 0x00010000 dd 0-0x1BADB002-0x00010000 dd boot_hdr dd _start dd edata dd end dd boot_entry EXTERN mainboot_entry: ; ebx holds a pointer to ; the multiboot info block mov esp,boot_stack push dword 0 popf; Clear the BSS mov edi,edata mov ecx,end sub ecx,edi xor eax,eax shr ecx,2 rep stosd push ebx ; save parameter for main call main jmp short $ ; Hang SECTION .bss ALIGNB 4%IFDEF DEBUG RESB 4096%ELSE RESB 1024%ENDIFboot_stack:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -