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: shigoel@gmail.com

thank you so much. looking forward to ur assistance.

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.

Thank you so much...

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

Thanks again!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.