Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bits 32
- %include "gdt.inc"
- %include "idt.inc"
- global start
- extern kernelmain
- start:
- mov esp, _sys_stack
- jmp stublet
- SECTION .multiboot
- ALIGN 4
- mboot:
- MULTIBOOT_PAGE_ALIGN equ 1<<0
- MULTIBOOT_MEMORY_INFO equ 1<<1
- MULTIBOOT_AOUT_KLUDGE equ 1<<16
- MULTIBOOT_HEADER_MAGIC equ 0x1BADB002
- MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_AOUT_KLUDGE
- MULTIBOOT_CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
- EXTERN code, bss, end
- dd MULTIBOOT_HEADER_MAGIC
- dd MULTIBOOT_HEADER_FLAGS
- dd MULTIBOOT_CHECKSUM
- call InstallGDT
- call kernelmain
- stublet:
- jmp $
- SECTION .bss
- resb 8192
- _sys_stack:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement