g0mb4

loader.S

Nov 13th, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. .section .text
  2. .globl start
  3. .extern _kmain
  4. start:
  5. jmp multiboot_entry
  6. .align 4
  7.  
  8. multiboot_header:
  9. .long 0x1BADB002
  10. .long 0x00000003
  11. .long -(0x1BADB002 + 0x00000003)
  12.  
  13. multiboot_entry:
  14. movl $(stack + 0x4000), %esp
  15. call _kmain
  16.  
  17. ...
  18. GDT stuff
  19. ...
  20. IDT stuff
  21. ...
  22. ISR stuff
  23. ...
  24. IRQ stuff
  25. ...
  26. .section .bss
  27. .comm stack, 8192 # reserves 8K memory
  28. _sys_stack:
Advertisement
Add Comment
Please, Sign In to add comment