Bootloader not working

10 views
Skip to first unread message

Ch H

unread,
Nov 30, 2025, 9:13:56 AM (2 days ago) Nov 30
to MikeOS
So I've made this bootloader, and for some reason it isn't working, I'll post a link to my repo here. Would love some feedback, thx.

Daniel Barry

unread,
Nov 30, 2025, 10:18:22 AM (2 days ago) Nov 30
to Ch H, MikeOS
You need to describe what "working" and "not working" are in the context of this bootloader.

On Sun, Nov 30, 2025 at 2:13 PM Ch H <chwam...@gmail.com> wrote:
So I've made this bootloader, and for some reason it isn't working, I'll post a link to my repo here. Would love some feedback, thx.

--
You received this message because you are subscribed to the Google Groups "MikeOS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mikeos+un...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/mikeos/fc3f986d-fa74-430f-b69c-47029e6e4bacn%40googlegroups.com.

Ch H

unread,
Nov 30, 2025, 10:24:37 AM (2 days ago) Nov 30
to MikeOS
By 'not working' I meant that it just isn't loading the kernel, it simply crashes, I do know that is not in the file searching loop, and that
it probably is a bug in the read loop (the loop that reads the kernel into memory that is)

Daniel Barry

unread,
Nov 30, 2025, 10:57:00 AM (2 days ago) Nov 30
to Ch H, MikeOS
For debugging runtime behaviour, it can be useful to print a character to tell you what code is being run and why. Your theory is that it is the read loop, but you should test and prove this.

As the bootloader is quite limited in space, you may want to just print a single character. You could have a function such as:

; print_char()
;
; Print a single character. AX is unmodified.
;
; @param AL The character to be printed.
print_char :
  push ax
  mov ah, 0eh
  int 10h
  pop ax
  ret

Then to use it, you could just run:

mov al, '!' ; Explanation mark to let us know this was run
call print_char

If you need to, you can use `push` and `pop` and `mov` to keep registers unmodified as needed.

Other notes:

1. I highly recommend commits with good messages. There is no way you know what "Update bootsector.asm" (repeated) does from 2024: https://github.com/Computermann8086/floppy_boot/commits/main/

2. An old-old kernel I wrote based on MikeOS where the bootloader is the kernel: https://bitbucket.org/danielbarry/saxoperatingsystem/src/master/KERNEL/KERN.ASM

Reply all
Reply to author
Forward
0 new messages