How do you write programs on computers without operating system?

Think of an Arduino Or nodemcu sign.These are small computers with only one USB port and no operating system. Or take a bare AVR microcontrollers where you actually have nothing but a processor at all.However, you can program this fine by using another computer. And that’s because you can upload your code to the memory (EEPROM) on the processor via a special loader (built-in on the plates). And when the processor goes on, the hardware is first looking at the memory to load and run the machine code there.

For larger computers, there is usually a BIOS with some basic logic in it that searches for a connected hard drive or other storage medium to load and run the rest of it.

So you write program芒 鈧劉 s in a memory module and then attach the memory to the processor, to make it very simple.With the Arduino/NodeMCU plates and raw processors, this memory is built into the processor but by turning it on in a special way, the processor knows that there is code in the memory and that it does not have to do anything else. When the loading is finished, the processor can restart and run the code.

The only thing you have to figure out is how to put machine code in a memory module for the first time.That is then manual work, the first time. But think of punch cards that used to be a lot of use. You have a piece of paper and there you pin the code you want to run and then let the computer run it. And from there you can continue again.

Be aware that you are dealing with processors and a basic logic is already present within the transistors of the processor itself.A clock regularly sends an electronic signal through the processor and it goes around the whole lot and then comes out sometime. In addition, the stream also controls some circuits (e.g. the holes in the paper) and throws these single electronic circuits so that it can remember values for the next clock-tap. Do that a few trillion keep per second and then you can type behind a keyboard this answer and then post on Quora芒 鈧?娄

You could create a program that communicates directly with the hardware in C/C++, Assembly and other low-level languages.Disadvantage is that everything an operating system would do for you now you have to do EVERYTHING yourself. There are no drivers there is no network stack present, no advanced memory management, no graphical or even text interface as a prompt.

Luckily, you can get a lot through libraries and you don’t have to write everything yourself.

A nice project to watch is Redox-OS.A new UNIX-like open source operating system that is newly developed from the ground up in the relatively new language 芒 鈧?虄Rust芒 鈧劉.

Considering this is re-created from the beginning, here is probably a lot of learning.

Redox-Your Next (Gen) OS-Redox-Your Next (Gen) OS

Leave a Reply