diff options
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/bootloader.asm | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/src/boot/bootloader.asm b/src/boot/bootloader.asm index fc17af8..eb226a6 100644 --- a/src/boot/bootloader.asm +++ b/src/boot/bootloader.asm @@ -3,6 +3,7 @@ BITS 16 CODE_SEG equ gdt_code - gdt_start ; 0x8 DATA_SEG equ gdt_data - gdt_start ; 0x10 + _start: jmp short start nop @@ -34,7 +35,9 @@ step2: mov eax, cr0 or eax, 0x1 mov cr0, eax - jmp CODE_SEG:start_32 + + jmp $ +; jmp CODE_SEG:start_32 ; GDT table description gdt_start: @@ -71,30 +74,6 @@ gdt_table: dw gdt_end - gdt_start - 1 dd gdt_start - -[BITS 32] - -; No access to BIOS from now on.... -start_32: - ; Set all segments to the same as the DATA_SEG - mov ax, DATA_SEG - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov ss, ax - - ; Set the stack pointer and base pointer further in mem - mov ebp, 0x00200000 - mov esp, ebp - - ; Enable A20 line - in al, 0x92 - or al, 2 - out 0x92, al - - jmp $ - ; Fill in to the end and add bootloader signature times 510 - ($ - $$) db 0 dw 0xAA55 |
