mirror of
https://github.com/realmicrosoft/windows.git
synced 2024-08-14 22:46:44 +00:00
refactor a ton of code to be multiboot compatible
This commit is contained in:
parent
f2ff9da1fb
commit
3222bcbfe2
20 changed files with 382 additions and 197 deletions
|
@ -1,31 +0,0 @@
|
|||
;; bootstrap code from osdev.org
|
||||
MBALIGN equ 1 << 0
|
||||
MEMINFO equ 1 << 1
|
||||
FLAGS equ MBALIGN | MEMINFO
|
||||
MAGIC equ 0x1BADB002
|
||||
CHECKSUM equ -(MAGIC + FLAGS)
|
||||
|
||||
section .multiboot
|
||||
align 4
|
||||
dd MAGIC
|
||||
dd FLAGS
|
||||
dd CHECKSUM
|
||||
|
||||
section .bss
|
||||
align 16
|
||||
stack_bottom:
|
||||
resb 16384 ; 16 KiB stack
|
||||
stack_top:
|
||||
|
||||
section .text
|
||||
global _start:function (_start.end - _start)
|
||||
_start:
|
||||
mov esp, stack_top
|
||||
|
||||
extern kernel_main
|
||||
call kernel_main
|
||||
|
||||
cli
|
||||
.hang: hlt
|
||||
jmp .hang
|
||||
.end:
|
Loading…
Add table
Add a link
Reference in a new issue