Search code examples
ubuntuassemblynasmcross-compilingosdev

Can you make an OS only using assembly language?


I am making an OS on Ubuntu, but setting up cross compilers is to difficult (other questions did not help). Is it possible to make an OS only in assembly to avoid C or C++ cross-compilers?

PS: Is there a good cross-compiling resource for Ubuntu 64 bit to i386:x86_64 please let me know.


Solution

  • The correct but useless answer is - yes, it's possible. Anything C/C++ does, assembly can do, too. If your next question is - how, the only possible answer would be "read a book". This is a small question with a book length answer. Yes, anything you can code in C/C++ you can also code in assembly... but it will take you 10 times longer, especially with debugging.

    That aside, putting together a working OS in assembly will be an order of magnitude more complicated and time consuming than setting up cross compilation. If that is a challenge for you, maybe you shouldn't tackle a whole OS just yet.