Assembly with %include at the top – Printing Outputs Unexpected Result: just an ” S”

You included stuff at the top of your bootloader, where it will executes first. Instead include extra functions where they aren’t in the main path of execution and are only reached by call. This should work, placing the %include directives where it’s safe to put extra function or data, just like if you were writing … Read more

How to load second stage boot loader from first stage?

On x86 you would do the following (simplified): Have the bootloader load the n-th sector of the disk/floppy (wherever you’re booting from) into memory and execute it (i.e. load segment/offset and do retf). A better alternative is to search the filesystem for a certain filename (e.g. KERNEL.BIN) — but you’d need to know the file … Read more

tech