+ 1
How to build an OS from scratch ? What languages does it need ?
I really interested in knowing how the OS build up occurs , and c , c++ and asembly are the only prog lang that used ?
7 ответов
+ 1
it begins from low-level languages, like assembler and pure C.
from scratch CPU doesn't understand anything but machine codes that you can apply with asm. usually this is a job for bios, that helps to connect hardware, loads a compiler of more high-level language, like C, and gives control to this compiler so it can load and execute some code from HDD.
with possibilities of new language and having access to hardware instructions and hardware itself, you can build a core for OS, and this is really huge work.
if your OS is small and simple like DOS, you can stop here, but there will be not much functionality.
further, having a core you can use more compilers or frameworks (or write them if your OS is completely different from common OS'es like Windows or Linux, hehe). OS will be more usable this way as you can make a GUI and some utilities and programs.
+ 1
making an OS is a vast and very complicated topic. and yes, ASM, C, and C++ are mostly used because they produce native code which is essential for an OS to work at all.
this is a task you will not be able to do with knowledge provided here, in fact, it will require years and years of it to even begin thinking of making an OS.
all i can point you to is google, and there are no "easy to understand" resources out there.
+ 1
in specialised machines you don't have an OS per se,but still some low level code that manages its functions.
and you can try building upon an open-source kernel like Linux, where lots of things are done for you already like basic I/O, but it is still a daunting task requiring lots of very in-depth hardware and software knowledge
+ 1
C/C++ And some asmbeler code
LINKS
https://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-dev.pdf
https://www.tutorialspoint.com/assembly_programming/
+ 1
you can use languages that compile to machine code, like c++. c++ should be a good language for this because of the dynamic memory assignment and such
0
Ok , thank you both Daniels and Demeth .
but does the standalone computerized machines (like automated industerial equipments) need the same or they are not ? and how to custamize an open source OS ? just for knowladge not like i will build one 😁😁
0
nice resources @FinnQ 👍👍