3

Hello guys I am writing an operating system in Assembly 16 bit NASM windows 10 64 bit (to be specific) and compiled it to 2 binary .bin files:
kernel.bin
boot.bin
as you may guess boot.bin loads kernel.bin and makes a filesystem, thats all ok. but the problem is that I need to test it on a real machine to test how the hardware reacts instead of only virtual! so I got floppys (3.5" 1.44MB) it is more than enough but I tried to write the bootloader (boot.bin) to sector 0 of a floppy with a floppy-usb-drive (drive and floppys are working how they should!) I use the following steps for putting the OS on a floppy in cmd:

format A:
nasm -f bin kernel.asm -o KERNEL.BIN` 
copy KERNEL.BIN A:\KERNEL.BIN  
debug boot.bin  
w 100 0 0 1  
q

it boots... but not correct: it says this:

Please remove all media... press any key to reboot...`

and it reboots to windows 10

QUESTION

how can I fix this? I now use dosbox and debug.exe in dosbox (debug.exe from windows 7 x32), like: I copy the kernel and burn the loader but it actually WORKS! and loads my OS!

Community
  • 1
  • 1
Yoran Jansen
  • 387
  • 5
  • 23

1 Answers1

1

It's quite likely that your system is EFI or uEFI rather than traditional BIOS, especially if it's been made in the last four or five years. You can check the system configuration at boot (Go into BIOS or EFI config) and enable legacy boot mode.

It is also possible that your antivirus software is interfering with you writing to a bootsector silently. Check those logs and make sure that your command line is being run as an administrator.

David Hoelzer
  • 15,862
  • 4
  • 48
  • 67