diff options
| author | Alexey Gavrilov <rebovas@yahoo.com> | 2023-08-08 18:38:07 +0700 |
|---|---|---|
| committer | Alexey Gavrilov <rebovas@yahoo.com> | 2023-08-08 18:38:07 +0700 |
| commit | 06d05938cc828901703112b99740c2e90a392b88 (patch) | |
| tree | 665168f9bf0ec29378e954e625bf5dbbf7475371 /kernel/boot.s | |
First commit
Diffstat (limited to 'kernel/boot.s')
| -rw-r--r-- | kernel/boot.s | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/kernel/boot.s b/kernel/boot.s new file mode 100644 index 0000000..2fd1c55 --- /dev/null +++ b/kernel/boot.s @@ -0,0 +1,28 @@ +MBALIGN equ 1 << 0 +MEMINFO equ 1 << 1 +MBFLAGS equ MBALIGN | MEMINFO +MAGIC equ 0x1BADB002 +CHECKSUM equ -(MAGIC + MBFLAGS) + +section .multiboot +align 4 + dd MAGIC + dd MBFLAGS + dd CHECKSUM + +section .bss +align 16 +stack_bottom: +resb 16384 +stack_top: + +section .text +global _start:function (_start.end - _start) +_start: + mov esp, stack_top + extern main + call main + cli +.hang: hlt + jmp .hang +.end: |
