Bootloader crashes when switching from 16-bit real mode to 32-bit protected mode

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Bence
Posts: 1
Joined: Mon Feb 09, 2026 3:49 pm
Libera.chat IRC: Bence

Bootloader crashes when switching from 16-bit real mode to 32-bit protected mode

Post by Bence »

I am writing a my OS, bootloader. My 16-bit bootloader runs, but when I switch to 32-bit protected mode and jump to my kernel at 0x00100000, it crashes or returns to BIOS. I attached the assembly code. I'm using NASM and QEMU.
Attachments
boot.asm
(709 Bytes) Downloaded 98 times
Octocontrabass
Member
Member
Posts: 6247
Joined: Mon Mar 25, 2013 7:01 pm

Re: Bootloader crashes when switching from 16-bit real mode to 32-bit protected mode

Post by Octocontrabass »

You need to load your kernel before you can jump to your kernel.
Post Reply