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