All pastes #375354 Raw Edit

Something

public c v1 · immutable
#375354 ·published 2007-02-28 06:58 UTC
rendered paste body
void kern_main(unsigned long multiboot_pointer, unsigned long multiboot_magic ){	if(multiboot_magic != MB_HEADER_MAGIC ){		prom_printf("Bad Magic Number. Aborting boot...");			}		multiboot_info_t *multiboot_table;	multiboot_table = (multiboot_info_t*) multiboot_pointer;		machine_table_setup(*multiboot_table, 0x500, 0x00007E00);		/* at this point the tables are set up & we can do things like set up	 * paging and so forth.	 *	 * for now though, we'll choke.	 */	}/*$ i386-elf-ld ./boot.o ./kern_main.o ./machine_tables.o ./prom_io.o  -o kernel.bin -Ttext 10000 ./kern_main.o: In function `kern_main':kern_main.c:(.text+0x47): undefined reference to `memcpy'$$ dis kern_main.o disassembly for kern_main.osection .textkern_main()    kern_main:              55                 pushl  %ebp    kern_main+0x1:          89 e5              movl   %esp,%ebp    kern_main+0x3:          83 ec 08           subl   $0x8,%esp <kern_main+0x8>    kern_main+0x6:          81 7d 0c 02 b0 ad  cmpl   $0x1badb002,0xc(%ebp)     <kern_main+0xc>                            1b     kern_main+0xd:          74 12              je     +0x12     <kern_main+0x21>    kern_main+0xf:          83 ec 0c           subl   $0xc,%esp <kern_main+0xc>    kern_main+0x12:         68 00 00 00 00     pushl  $0x0    kern_main+0x17:         e8 fc ff ff ff     call   -0x4      <kern_main+0x18>    kern_main+0x1c:         83 c4 10           addl   $0x10,%esp        <kern_main+0x10>    kern_main+0x1f:         eb 35              jmp    +0x35     <kern_main+0x56>    kern_main+0x21:         8b 45 08           movl   0x8(%ebp),%eax    <kern_main+0x8>    kern_main+0x24:         89 45 fc           movl   %eax,-0x4(%ebp)    kern_main+0x27:         68 00 7e 00 00     pushl  $0x7e00    kern_main+0x2c:         68 00 05 00 00     pushl  $0x500    kern_main+0x31:         8b 55 fc           movl   -0x4(%ebp),%edx    kern_main+0x34:         83 ec 58           subl   $0x58,%esp    kern_main+0x37:         89 e0              movl   %esp,%eax    kern_main+0x39:         89 c1              movl   %eax,%ecx    kern_main+0x3b:         b8 58 00 00 00     movl   $0x58,%eax    kern_main+0x40:         83 ec 04           subl   $0x4,%esp <kern_main+0x4>    kern_main+0x43:         50                 pushl  %eax    kern_main+0x44:         52                 pushl  %edx    kern_main+0x45:         51                 pushl  %ecx    kern_main+0x46:         e8 fc ff ff ff     call   -0x4      <kern_main+0x47>    kern_main+0x4b:         83 c4 10           addl   $0x10,%esp        <kern_main+0x10>    kern_main+0x4e:         e8 fc ff ff ff     call   -0x4      <kern_main+0x4f>    kern_main+0x53:         83 c4 60           addl   $0x60,%esp    kern_main+0x56:         c9                 leave      kern_main+0x57:         c3                 ret*/