assembly - qemu, get files from host to DOS and also run a bootloader -


i need run .com files , bootloader in qemu. running win xp machine 0.9.0 version of qemu.

for .com files downloaded ms-dos 6.22 img , according tutorial: http://gunkies.org/wiki/installing_ms-dos_on_qemu ran command:

qemu-img create -f qcow msdos.disk 128m 

however creates msdos.disk file of size 1kb.

then ran command:

qemu -hda msdos.disk -m 64 -l . -fda dos622.img -boot 

in guide says sort of installation supposed start, boots ms-dos know. gives me command line in tried dir, , showed .com , .exe files named mouse.exe , such, if sort of drivers.

i have been googling while , found bunch of linux guides.

and first , foremost need compile .asm files start org 100h(.com files) , testrun them in dos. guess compile them produce .o , .bin files. next? how them inside virtual qemu dos machine win xp?

and second thing, how run hand-written bootloader when have asm code ready? compile sort of .img somehow? how qemu run bootloader?

i baffled , thankful if more knowledgeable me in noob friendly manner.

for assembly files, need know assembler written for. if nasm lucky, can directly write com file (it's flat binary, use -f bin).

to qemu, need use tool allows manipulating raw disk images, such mtools. should create , format image (a floppy simplicity), copy com file onto it. can attach second floppy drive in qemu. if have enough space in dos disk, can of course copy com file image.

if have own boot record, can emit flat binary , pass qemu disk image (make sure it's padded multiple of 512 bytes, other qemu isn't terribly picky size). assuming don't want file system, because you'd have replace boot sector somehow. if else fails, can grab windows port of dd.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -