From 8493002072e0d343fc943e457db815556bb2db48 Mon Sep 17 00:00:00 2001 From: josh Date: Thu, 25 Jun 2009 15:16:01 +0000 Subject: [PATCH] removed jump at start symbol since the bootloader starts after the multiboot header anyway; added diagnostic characters "a", "b" git-svn-id: svn://anubis/hos/trunk@16 5b3e749e-e535-0410-8002-a9bb6afbdfca --- kernel/boot.asm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/kernel/boot.asm b/kernel/boot.asm index eaa644a..e05b9fd 100644 --- a/kernel/boot.asm +++ b/kernel/boot.asm @@ -15,12 +15,12 @@ ; Get these symbols from the linker extern _end, _bss +[section .text] ;************************************************************************** -;* Begin execution from the bootloader here * +;* This is the first symbol in the .text section * ;************************************************************************** [global start] start: - jmp multiboot_entry ; jump over the multiboot header block ;************************************************************************** @@ -43,9 +43,13 @@ multiboot_header: ;* Resume execution * ;************************************************************************** multiboot_entry: + mov ax, 0x0700 + 'a' + mov [0xB8000+160*8+0*2], ax + lgdt [gdtr_tmp32-VIRTUAL_OFFSET] ; load temporary GDTR jmp KERNEL_CODE_32_TMP_SEG:segmented_start + ;************************************************************************** ;* At this point address 0xE000_0000 is mapped to physical address 0x0 * ;************************************************************************** @@ -58,8 +62,8 @@ segmented_start: mov fs, cx mov esp, TEMPORARY_STACK_VIRTUAL-4 ; set up temporary stack space - mov ax, 0x0700 + 'J' - mov [VIRTUAL_OFFSET+0xB8000+160*8+4*2], ax + mov ax, 0x0700 + 'b' + mov [VIRTUAL_OFFSET+0xB8000+160*8+1*2], ax idle_loop: hlt