When is an operating system created the compilers of ASM, C language, CPP must be created as well or are portable?

Asked

Viewed 185 times

0

1 - AHTAH! Another crazy wanting to re-invent Microsoft - Because this me$#%%$#$ question?

To give a little context to my doubt: I have always programmed in high-level languages, to solve administrative, managerial issues and naturally solve some craving of users and company administrators, but I never stopped digging the bits, take mouse positioning with PEEK in BASIC, do interpreted language in Clipper, futricar in EXE of others in Pctools, these things of curious people.

2 - Reasons (personal, who knows)

For a while now I want to lower the level and I have doubts about what is possible in bit brushing. Thinking of operating systems, naturally in the educational and learning field, I wonder how to base an OS in a way that can support existing compilers (from ASM to C, CPP and even higher level as Pascal and etc).

3 - But, what is the doubt?

Do I need to create an Assembly compatible with my OS? Or will life’s NASM run naturally there? (If yes, Ufa) (If not, what to do?)

4 - But, there is more

After having an ASM running, you could compile a GCC for example?

5 - And we go beyond

For compatibility, can I use existing FAT32, NTFS, and etc file systems on this "pseudoSO"? Thinking about this doubt came to me a question like:, who comes before, the egg or the chicken? Because, if the file system is done in C or CPP, how can the CPP be readable in a media? (little joke)

1 answer

3


The question starts from some wrong premises.

No operating system needs to do anything he doesn’t want to. The reason to create one no matter the purpose is can do what the creator wants and set aside what he does not want, to meet his goals.

There is no such thing as "portable", this concept does not fit in this context, at least not in this way. Portability is something you do, there’s nothing inherent. Portability is not something natural, it’s built, so the answer is that it doesn’t need to be created, but it can, it depends on your goal.

There is another wrong premise because there are no ASM compilers, and the C or C++ compilers exist ready and can be used in your operating system doing diverse adaptations, or you can create a compiler of your own. If you are going to make an operating system, compiler, all, good luck. If you are going to adapt compilers to your operating system that is so different, good luck. If you are going to make your operating system compatible with what exists ready to not have to adapt too much, good luck.

The problem today is always interoperability. It is difficult to say if it is worth it, but for those who do not have many resources in general it is not worth it. It is much easier to do something isolated, but the lack of resources will be limited. There is only one solution to have something complete interoperating or to do everything from scratch, to have many resources. And by means understand in many ways, I’m not just talking about money.

Assembly is a language so do not have to create anything in that sense, Assembly already exists and is universal because it is a specification. Assembler is an assembler to handle Assembly, so you don’t need to create, but can if it’s your goal to do this, an operating system and an Assembler are orthogonal things.

You don’t need an Assembler on your operating system to run GCC, you need to adapt GCC to work on your operating system. Or make your operating system in a way that it is 100% compatible with the way that GCC works today ready. Good luck.

You can use as many file systems as you like, unless one has any legal restrictions, but that doesn’t usually exist. By using understand that you have to reproduce in your system everything they do in other systems.

I don’t know what the last question means, but I don’t see any dichotomy in the idea. Everything you do in this OS will initially be done outside of it and not in it, and then transported to it. Maybe the "secret" you want to know is this.

There is no pseudo OS, or it is an OS or it is not, regardless of whether it is commercial, useful, universal or how you want to categorize.

The fact is that all this is so much more complex than what is dealt with here...

  • Thank you for your contribution. Let me get this straight. If I want to create an OS that is compatible with GCC then, I have to offer it, everything that today it expects from an OS, based on one that exists, of course "Linux" for example. Step 1 of an OS would be this level of compatibilization. I referred to pseudoSO because it does not exist. The correct one would be imaginarySO kk

  • The beginning is right, then not necessarily. I’ve thought about making an OS, but I would never try to bring the existing tools to run in my OS. It borders on insanity to do it alone. It can be in a reasonably sized team with several professionals trained in different disciplines. Or if you’re a super computer genius (I’ve never seen one this big). Without good staff today it is very difficult to try an OS that runs almost everything out there. Go take a look at the GCC source all you need to stir. And don’t think they’ll let you do it there, it’ll be a Fork just yours.

  • Imaginary things can, and are, "easy to do".

  • Without a doubt, making an OS today, which is compatible with GCC for example, as you said, would be virtually impossible, given the amount of existing things. Just in hardware terms already leaves anyone bugged. And, learning about everything requires light years of study and sanity. But playing with it is cool and I’ve been looking at some simplistic OS’s that do the basics and it’s cool. Hardness is that day to day doesn’t leave much time to explore more about these things. I wanted to know if taking mikeOS, for example, and making a C or C++ run inside it would be something very difficult.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.