Hello everyone!
I've written this boot loader, using NASM:

[BITS 16]
[ORG 0x7c00]

jmp $
times 510 - ($ - $$) db 0
dw 0xaa55

I know, the code is VERY simple, but I just want to know how I could run it on my computer? I've assembled it into boot.bin, and the file is 512 bytes in size, but my question is how can I run it on my computer?

Thanks for your reply, but what I need is some very simple instructions that will tell me exactly what I need to do, in order to turn my current *.bin file into a boot loader that I can test.

Download/install qemu and then use it like

qemu bootimage

How do I convert it into a Qemu boot image?

Well you could try reading the manual....

Seriously, you're flopping around like a fish out of water.

Programming at this level needs far more "go" than you seem to have.
All you can do is throw back pithy 1-line "thanks but..." messages only hours after posting. Just HOW much research and test did you ACTUALLY do in that time. My guess is none.

Do you think that your problems will be over just as soon as you've got the emulator up and running?

Ha!, just wait until you try to write your boot code to actually DO something useful. Then you'll find out what confusion and frustration really mean.

How do I convert it into a Qemu boot image?

If you compiled it correctly then it should be ready to go...I used gcc/Gas, a linker script and a hexeditor/objdump to compile and then strip my bootimage but with Nasm the functionality should be wrapped up in the compile/link lines.
I would check the Nasm docs to make sure your compiling/linking correctly and then download/install qemu. After you accomplished that open a console window go to your working directory(the one with your boot file) and type qemu bootimage..

Note I'm assuming you called your boot file bootimage...

If you compiled it correctly then it should be ready to go...I used gcc/Gas, a linker script and a hexeditor/objdump to compile and then strip my bootimage but with Nasm the functionality should be wrapped up in the compile/link lines.
I would check the Nasm docs to make sure your compiling/linking correctly and then download/install qemu. After you accomplished that open a console window go to your working directory(the one with your boot file) and type qemu bootimage..

Note I'm assuming you called your boot file bootimage...

I already have Microsoft Virtual PC, which I know opens *.iso files. So I downloaded MagicISO to help me convert my *.bin file into an *.iso file, so that I could load it into Microsoft Virtual PC. But, when I try to open my boot.bin file, with MagicISO, I get this dialog popping up saying: "Can't find the file, or file isn't a CD Image File!".
I've created this *.bin file using this command in the Command Prompt: "nasm bootloader.asm -f bin -o boot.bin".
Please help me :).

Edited 6 Years Ago by bd338: n/a

Yes! I got it working. I just used MagicISO a little different. Thanks everyone, for being patient with me :P.

This question has already been answered. Start a new discussion instead.