;> The Multiboot header must be contained completely within the first 8192 bytes of the OS ;> image, and must be longword (32-bit) aligned. MULTIBOOT_ALIGN_TO_PAGE: equ 1 << 0 MULTIBOOT_MEMORY_DESCRIBE: equ 1 << 2 MULTIBOOT_MAGIC: equ 0x1BADB002 MULTIBOOT_FLAGS: equ (MULTIBOOT_ALIGN_TO_PAGE | MULTIBOOT_MEMORY_DESCRIBE) MULTIBOOT_CHECKSUM: equ -(MULTIBOOT_MAGIC + MULTIBOOT_FLAGS) section .multiboot_header align 4 dd MULTIBOOT_MAGIC dd MULTIBOOT_FLAGS dd MULTIBOOT_CHECKSUM STACK_SIZE: equ (1 << 14) section .bss align 16 stack_bottom: resb STACK_SIZE stack_top: section .text global _start:function (_start.end - _start) _start: mov esp, stack_top extern cmain call cmain cli jmp $ .end: