You are not logged in.
So recently I was trying to make a bootable program and I use qemu for virtualization. But when I try this:
qemu-system-i386 -fda build/main_flp.imgThe new windows that my program is supposed to run won't show up. My program does nothing, it's just an endless loop of nothing ( main: jmp main ).
My Makefile basically compiles the main.asm to main.bin and copies it to main_flp.img and
truncate -s 1440k build/main_flp.imgI'm pretty sure that the problem isn't my program so I asked it here.
Any solutions? Thanks
Last edited by teh_misteik (2024-03-16 18:25:03)
Arch Linux newbie here
Thanks for reading my signature, but I'm afraid there is nothing interesting to see over here. So I don't know why are you still reading this. Okay I should admit that you are curious, so if you are still reading this far, congratulations!
Offline
You need to provide a bootable floppy image that includes everything necessary to start an OS .
Typically bootable floppy images for MSDOS, FreeDos, win98, linux etc are used as a base.
What OS are you intending to boot to on main_flp.img ?
Last edited by Lone_Wolf (2024-03-15 11:27:27)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
You need to provide a bootable floppy image that includes everything necessary to start an OS .
Typically bootable floppy images for MSDOS, FreeDos, win98, linux etc are used as a base.
What OS are you intending to boot to on main_flp.img ?
I am making my own os. If it helps, here is the source code and Makefile for the os
src/main.asm
org 0x7C00
bits 16
main:
jmp main
times 510-($-$$) db 0
dw 0xaa55Makefile
ASM=nasm
BUILD=build
SRC=src
$(BUILD)/main_flp.img: $(BUILD)/main.bin
cp $(BUILD)/main.bin $(BUILD)/main_flp.img
truncate -s 1440k $(BUILD)/main_flp.img
$(BUILD)/main.bin: $(SRC)/main.asm
$(ASM) $(SRC)/main.asm -f bin -o $(BUILD)/main.binArch Linux newbie here
Thanks for reading my signature, but I'm afraid there is nothing interesting to see over here. So I don't know why are you still reading this. Okay I should admit that you are curious, so if you are still reading this far, congratulations!
Offline
You will have to use an existing bootloader or write your own so the physical / virtual machine knows how to start to your OS .
Here are some links I think you'll find useful :
https://retrocomputing.stackexchange.co … k-bootable
https://en.wikibooks.org/wiki/X86_Assembly/Bootloaders
https://stackoverflow.com/questions/327 … 6#32705076
P.S. please change the thread title (edit first post) to something like "How to boot assembly code from floppy image using qemu ?"
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline