]> Joshua Wise's Git repositories - netwatch.git/commitdiff
Add little multiboot stub
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Wed, 10 Sep 2008 18:34:50 +0000 (14:34 -0400)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Wed, 10 Sep 2008 18:34:50 +0000 (14:34 -0400)
grubload/multiboot.S [new file with mode: 0644]
grubload/multiboot_c.c [new file with mode: 0644]

diff --git a/grubload/multiboot.S b/grubload/multiboot.S
new file mode 100644 (file)
index 0000000..bddd8fd
--- /dev/null
@@ -0,0 +1,21 @@
+.globl _start
+
+_start:
+       jmp multiboot_entry
+
+       .align 4
+multiboot_header:
+       .long 0x1badb002        /* Magic value */
+       .long 0x00000001        /* Flags -- "Please align modules for me" */
+       .long 0xE4524FFD        /* Checksum */
+
+multiboot_entry:
+       mov $_stack_top, %esp
+       pushl %ebx      /* Multiboot info structure */
+       pushl %eax      /* Magic number */
+       jmp c_start
+
+       .align 4
+_stack:
+       .space 16384
+_stack_top:
diff --git a/grubload/multiboot_c.c b/grubload/multiboot_c.c
new file mode 100644 (file)
index 0000000..7c6a4fd
--- /dev/null
@@ -0,0 +1,6 @@
+void c_start(unsigned int magic, void *wee)
+{
+       *(unsigned char *)0xB8000 = 'A';
+       while (1)
+               ;
+}
This page took 0.029017 seconds and 4 git commands to generate.