OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Dec 12, 2017 10:16 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Storing data in Operating System
PostPosted: Mon Nov 13, 2017 7:13 pm 
Offline

Joined: Sat Nov 11, 2017 8:33 pm
Posts: 6
Hello! I am creating a custom operating system and is there any way to store data (almost like a filesystem) in assembly so that if the computer shuts off and turns back on the data will still be there?


Top
 Profile  
 
 Post subject: Re: Storing data in Operating System
PostPosted: Tue Nov 14, 2017 12:37 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 3027
Location: Chichester, UK
Yes.

You write a driver for your storage medium and then implement a filesystem handler in your OS. It's easier, when starting out, to use an existing filesystem rather than designing your own.

It's much easier to do this using a high-level language such as C rather than assembler.


Top
 Profile  
 
 Post subject: Re: Storing data in Operating System
PostPosted: Thu Nov 16, 2017 10:52 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1038
Location: Athens, GA, USA
Fathergorgi1 wrote:
Hello! I am creating a custom operating system and is there any way to store data (almost like a filesystem) in assembly so that if the computer shuts off and turns back on the data will still be there?


As iansjack sort of hinted at, something like this would be, in effect, a rump file system, albeit one with a very rudimentary and fixed format (though 'data storage system' might fit better here, since there would really be no 'files' per se).

Just how you'd do this is going to depend on why you want to do this, and what you want it use it for. Could you give more details on your intentions? I am assuming that there's a reason why you don't want to write a file system driver and use the file system for it, at least at this stage - and there are a number of reasons you might not want to, either early in the project or for some specific need of the system over the long term - and knowing more about that reason would help us give you better advice.

I am particularly concerned because this sounds like it might be an XY Problem (or, as Alex Papadimoulis called it, an 'old shoe or bottle' problem). This kind of fixation on a specific solution rather than on the problem itself is a trap pretty much every programmer falls into at one time or another (I certainly have, more than once), and it is usually something that you don't see until someone else points it out. Unfortunately, the trouble lies in asking a question about the expected solution rather than the actual problem - it is a form of the logical fallacy of 'begging the question', in that you are assuming a specific solution rather than trying to find alternative answers.

I am not saying that this is the case here, but it sounds like it might be, and we'd need to know more of the context of the question to be sure.

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
μή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίαν
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 12 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