Bona Fide OS Developer
View unanswered posts | View active topics It is currently Thu Mar 28, 2024 2:01 pm



Post new topic Reply to topic  [ 4 posts ] 
 Gotta small problem... :? 
Author Message

Joined: Sat Nov 21, 2009 5:27 pm
Posts: 2
Post Gotta small problem... :?
Hello. I'm working at a small exokernel os wich is placed in the bootsector. It reads a char, and then it runs <char>.com
I'm using linux. How do i write the a.com to the floppy?
i did
dd if=faty.bin bs=512 of=/dev/fd0 (or tarsier.img)
..now, how can i copy the a.com? Should i first format the floppy to fat12, then copy a.com and then write the bootsector??


Sat Nov 21, 2009 5:37 pm
Profile

Joined: Sat Jul 25, 2009 9:15 am
Posts: 257
Post Re: Gotta small problem... :?
do you want the the floppy to be FAT formatted?? if yes then your bootloader must have the BIOS Parameter Block (BPB), when it does then you can just copy your file over, but your bootloader must be able to read the FAT file system in order to retrieve the file

if you don't care if the floppy is FAT formatted then you can use DD to copy your file the same way you copied your bootloader except you have to add the **seek** parameter to specify a location that you know its not used in the floppy.

this copies a 512 byte file to the floppy at sector 1000
Code:
dd if=faty.bin bs=512 of=/dev/fd0 seek=1000


this retrieves the 512 bytes from the floppy in sector 1000 and saves it into file skinny
Code:
dd if=/dev/fd0 bs=512 of=skinny.bin skip=1000


Sat Nov 21, 2009 6:19 pm
Profile

Joined: Sat Nov 21, 2009 5:27 pm
Posts: 2
Post Re: Gotta small problem... :?
the os reads fat12.
should i first copy programs using copy and paste on a formatted floppy, and then write the bootloader??


Sun Nov 22, 2009 2:32 am
Profile

Joined: Sat Jul 25, 2009 9:15 am
Posts: 257
Post Re: Gotta small problem... :?
the floppy must be formatted first

if the bootloader has a compliant BIOS Parameter Block (BPB) it doesn't matter if the files get copied first or the bootloader...

if the bootloader does not have a compliant BPB then FAT file utilities will probably refuse to work with the floppy.


Sun Nov 22, 2009 9:27 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin and tweaked by the BF Team.