kern

annotate src/mboot.S @ 5:633e35c64772

- added printf family in stdio.c - added atoi/atol in stdlib.c - added nonstandard itoa/utoa in stdlib.c - added strlen/strchr/strrchr in string.c
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 19 Dec 2010 15:07:07 +0200
parents 662ff2170531
children af6f4adc43d6
rev   line source
nuclear@0 1 #define MAGIC 0x1badb002
nuclear@0 2 #define FLAGS 0
nuclear@0 3 #define STACK_SIZE 0x4000
nuclear@0 4
nuclear@0 5 .text
nuclear@0 6 .align 4
nuclear@1 7
nuclear@0 8 /* multiboot header */
nuclear@0 9 .long MAGIC
nuclear@0 10 .long FLAGS
nuclear@0 11 .long -(MAGIC + FLAGS) /* checksum */
nuclear@0 12 .fill 5, 4 /* fill out the rest with zeroes */
nuclear@0 13
nuclear@1 14 .globl kentry
nuclear@0 15 kentry:
nuclear@0 16 /* setup a temporary kernel stack */
nuclear@0 17 movl $(stack + STACK_SIZE), %esp
nuclear@0 18 /* reset eflags register */
nuclear@0 19 pushl $0
nuclear@0 20 popf
nuclear@0 21 /* call the kernel main function */
nuclear@0 22 call kmain
nuclear@0 23 /* we dropped out of main, halt the CPU */
nuclear@0 24 cli
nuclear@0 25 hlt
nuclear@0 26
nuclear@0 27 /* space for the temporary kernel stack */
nuclear@0 28 .comm stack, STACK_SIZE