Reading from disk troubles (demo 22)

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator:Moderators

Post Reply
ATXcs1372
Posts:5
Joined:Sat Feb 12, 2011 4:22 am
Reading from disk troubles (demo 22)

Post by ATXcs1372 » Wed Feb 16, 2011 11:09 pm

I am having trouble when opening a file and this problem persists even when i build directly from the Demo 22 project and not my version of the OS.

What happens is i will input the command 'read' and then the filename but no matter how I format it, the OS reports invalid file.
I have just created a file named file.txt in notepad and saved it onto the floppy as we would any other file... is this wrong?
I tried debugging it and it gets to the point in volOpenFile() where it calls the filesystem and I lose it; where is the Open() function referred to by _FileSystems[device - 'a']?

I guess what I'm asking is, has anyone else had this problem or can you please point me in the right direction please?

User avatar
Mike
Site Admin
Posts:465
Joined:Sat Oct 20, 2007 7:58 pm
Contact:

Re: Reading from disk troubles (demo 22)

Post by Mike » Thu Feb 17, 2011 6:33 pm

Hello,

Does "Your version of the OS" not have issues with opening a file? What are the differences between "your version" and the OS provided by the series?

The series OS uses a structure to store function pointers to filesystem specific routines. _FileSystems[device - 'a'] should refer to _FileSystems[0], which will call the FAT12 file system. Please verify if the FAT12 Mount() or Open() routines are being called.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com

ATXcs1372
Posts:5
Joined:Sat Feb 12, 2011 4:22 am

Re: Reading from disk troubles (demo 22)

Post by ATXcs1372 » Sun Mar 06, 2011 5:14 pm

I am doing this as an educational project so I am using the series and demos to actually learn.
I'm an electrical engineering major focusing in system development and wanted to get some insight and knowledge before making this decision. I'm sorry if my post came off as though I am purely copy and pasting. While much of the HAL and filesystem code is almost identical, I have reformatted much of the code as I thought would work best for my implementation and the kernel itself hardly resembles the series'.

Thank you for the reply, for some reason I wasn't getting an error for a misspelled mount().

User avatar
Mike
Site Admin
Posts:465
Joined:Sat Oct 20, 2007 7:58 pm
Contact:

Re: Reading from disk troubles (demo 22)

Post by Mike » Mon Mar 07, 2011 4:40 pm

Hello,

The original post did not imply a copy+paste so please do not concern with that. The terminology used in my reply ("your version of the OS") was used only to reflect the terminology you used in your original post ("my version of your OS") and nothing more.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com

Post Reply