2015-10-10 12:59:23 +00:00
|
|
|
.section multiboot
|
|
|
|
#define MB_MAGIC 0x1BADB002
|
|
|
|
#define MB_FLAGS 0x0
|
|
|
|
#define MB_CHECKSUM -(MB_MAGIC + MB_FLAGS)
|
|
|
|
.align 4
|
|
|
|
.int MB_MAGIC
|
|
|
|
.int MB_FLAGS
|
|
|
|
.int MB_CHECKSUM
|
|
|
|
.section .text
|
|
|
|
.extern init
|
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
mov $kernel_stack, %esp
|
2016-02-04 11:57:35 +00:00
|
|
|
push %ebx
|
|
|
|
push %eax
|
2015-10-10 12:59:23 +00:00
|
|
|
call init
|
|
|
|
_stop:
|
|
|
|
cli
|
|
|
|
hlt
|
|
|
|
jmp _stop
|
|
|
|
.section .bss
|
2015-10-10 16:03:53 +00:00
|
|
|
.space 8192
|
2015-10-10 12:59:23 +00:00
|
|
|
kernel_stack:
|