954,490 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

HELP! File Structure....

hi,

I have a very weird question and since i cant find the answer to it even after surfing ALOT, i HAD to ask for your help...

i have created an OS of my own... everything is complete... the bootstrap loader is done, the kernel (16-bit, monolithic and segmented - real mode) is done and all this was done in x86 assembly language (no inline assembly code) - Emulator8086. The OS is booting perfectly in the emulator...

However, this is not the case when i try to boot a real system with a floppy drive with the image of my OS in it...

i used int 21h to: -
1. display strings
2. create files and directories
3. reading from and writing to files
etc etc

in short, i did everything with int 21h.

the one thing tht i did not do was to create a file structure as when i boot up the OS in the emulator, all the files and directories are created in the virtual drives of tht emulator...

can anyone please help me regarding the creation of the file structure? where, exactly, do i have to begin? where will the directories and files be stored and HOW? kindly help me...

here's my id: [email]shigoel@gmail.com[/email]

thank you so much. looking forward to ur assistance.

SGoel
Newbie Poster
4 posts since Jun 2008
Reputation Points: 10
Solved Threads: 0
 

You can't use Int 21h or any other DOS interrupt service unless DOS (or WinXP or earlier) is running --hence the reason it works in the emulator and not in real-life.

The purpose of the OS is to manage software and provide access to hardware devices (such as disk drives). If you want your OS to work alone, you will have to include code to access the disk drives etc.

I suggest you read up on BIOS HD services you can use to access the hard drive etc.

Some reading on using the BIOS to access disk drives
http://www.pcguide.com/ref/hdd/bios/index.htm

BiosCentral
http://www.bioscentral.com/misc/biosservices.htm

Good luck.

Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229
 

Thank you so much...

i'll read up on this, surely...

Thanks again!

SGoel
Newbie Poster
4 posts since Jun 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You