/* Entrada em 32-bit (GRUB carrega em protected mode) */
.intel_syntax noprefix
.section .text
.code32
.global _start
.extern kernel_main

/* pilha simples */
.section .bss
.align 16
.global _stack_top
_stack_bottom:
  .skip 16384       /* 16 KiB */
_stack_top:

.section .text
_start:
  /* setar a pilha */
  mov esp, offset _stack_top

  /* chamar o C */
  call kernel_main

halt:
  cli
  hlt
  jmp halt
