skip to Main Content

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.

2

Answers


  1. 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.

    Login or Signup to reply.
  2. Yes. Indeed, this used to be common before Unix which introduced portability of operating systems across architectures. Operating systems like Digital Equipment’s RSX-11 were written in assembler. A somewhat famous academic example is Alexia Massalin’s 1992 Synthesis kernel, a small kernel with a Unix compatibility layer. It was written in Motorola 68020 assembly and represented a minor rebellion against high level language OSes. It was very fast for its time.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search