]>
Commit | Line | Data |
---|---|---|
1 | /* mbentry.S | |
2 | * Multiboot header | |
3 | * NetWatch multiboot loader | |
4 | * | |
5 | * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved. | |
6 | * This program is free software; you can redistribute and/or modify it under | |
7 | * the terms found in the file LICENSE in the root of this source tree. | |
8 | * | |
9 | */ | |
10 | ||
11 | .globl _start | |
12 | ||
13 | _start: | |
14 | jmp multiboot_entry | |
15 | ||
16 | .align 4 | |
17 | multiboot_header: | |
18 | .long 0x1badb002 /* Magic value */ | |
19 | .long 0x00000001 /* Flags -- "Please align modules for me" */ | |
20 | .long 0xE4524FFD /* Checksum */ | |
21 | ||
22 | multiboot_entry: | |
23 | mov $_stack_top, %esp | |
24 | pushl %ebx /* Multiboot info structure */ | |
25 | pushl %eax /* Magic number */ | |
26 | call c_start | |
27 | hang: jmp hang | |
28 | ||
29 | .section .bss | |
30 | .align 4 | |
31 | _stack: | |
32 | .space 16384 | |
33 | _stack_top: |