I am making a OS on Ubuntu but setting up Cross-Compilers is to difficult (other threads did not help). I was wondering if it was possible to make a OS only in assembly to avoid C or C cross-compilers. Best regards, Markian.
PS if any one knows of any good cross-compiling resources for Ubuntu 64 bit to i836:x86_64 please let me know.
CodePudding user response:
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.
CodePudding user response:
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.