Hello,
I want to write a *.bin(Assembly compiled file) to an floppy drive, but i don't know how to do this, remember that i have to write to the cylinder 0, head 0 and sector 1, because it's an boot program, only if needed here is the code:
#Build bin file: nasm loader.asm -f bin -o loader.bin # Write bin file to floppy dd if=loader.bin bs=512 of=/dev/fd0. If you have an image file that you want to write onto a diskette, all you have to do, after selecting the floppy drive is to navigate to the location here it is stored and select it.
Thanks,
Nathan Paulino Campos
- 2 Contributors
- forum2 Replies
- 400 Views
- 10 Hours Discussion Span
- commentLatest PostLatest Postby Nathan Campos
Recommended Answers
Hello, you could read your bare binary file into a segment
of memory and write it out to the disk drive using
interrupt 13h function 03h (write sectors),
get ralf browns interrupt list!
You would need to write it out to head 0,cylinder 0,sector 1.
The last word of the …
All 2 Replies
Hello, you could read your bare binary file into a segment
of memory and write it out to the disk drive using
interrupt 13h function 03h (write sectors),
get ralf browns interrupt list!
You would need to write it out to head 0,cylinder 0,sector 1.
The last word of the sector must contain the signature
0xAA55 at offset 01FE [55] - 01FF [AA] and the boot loader
must fit onto one 512 byte sector.
I used to make a disk image using 16-bit NASM and boot
the 1.44MB floppy images using Bochs x86 emulator,
I used the following directives to use the assembler
to produce a floppy disk image:
This allowed me to quickly debug and test my bootloader.
Page 1 of 1 | [ 5 posts ] |
Hello, you could read your bare binary file into a segment
of memory and write it out to the disk drive using
interrupt 13h function 03h (write sectors),
get ralf browns interrupt list!
You would need to write it out to head 0,cylinder 0,sector 1.
The last word of the …
All 2 Replies
Hello, you could read your bare binary file into a segment
of memory and write it out to the disk drive using
interrupt 13h function 03h (write sectors),
get ralf browns interrupt list!
You would need to write it out to head 0,cylinder 0,sector 1.
The last word of the sector must contain the signature
0xAA55 at offset 01FE [55] - 01FF [AA] and the boot loader
must fit onto one 512 byte sector.
I used to make a disk image using 16-bit NASM and boot
the 1.44MB floppy images using Bochs x86 emulator,
I used the following directives to use the assembler
to produce a floppy disk image:
This allowed me to quickly debug and test my bootloader.
Page 1 of 1 | [ 5 posts ] |
Write Bin Files To Floppy File
|
Author | Message | ||
---|---|---|---|
| |||
Joined: Sun Jul 19, 2009 1:48 pm Posts: 201 Location: Brazil |
| ||
Top |
| |||
Joined: Sat Jan 15, 2005 12:00 am Posts: 8561 Location: At his keyboard! |
| ||
Top |
| |||
Joined: Sun Oct 22, 2006 7:01 am Posts: 2637 Location: Devon, UK |
| ||
Top |
What Is A Bin Files
| |||
Joined: Sun Oct 22, 2006 7:01 am Posts: 2637 Location: Devon, UK |
| ||
Top |
| |||
Joined: Sun Jul 19, 2009 1:48 pm Posts: 201 Location: Brazil |
| ||
Top |
Write Bin Files To Floppy Disk
Page 1 of 1 | [ 5 posts ] |