+ 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 ?

21st Nov 2016, 6:33 PM
Bashar
Bashar - avatar
7 Antworten
+ 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.
21st Nov 2016, 7:01 PM
Demeth
Demeth - avatar
+ 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.
21st Nov 2016, 7:03 PM
asdadasdsaczxc
+ 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
21st Nov 2016, 7:41 PM
asdadasdsaczxc
+ 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
21st Nov 2016, 8:40 PM
Nyk
Nyk - avatar
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 😁😁
21st Nov 2016, 7:13 PM
Bashar
Bashar - avatar
0
nice resources @FinnQ 👍👍
22nd Nov 2016, 10:38 AM
Bashar
Bashar - avatar