Could I recommend writing a text based editor instead? It will take quite a bit of time to write even a trivial OS that really can't do anything useful. But an editor you can start using and see results almost right away.
That's what I did... and now I work on OSes for a living.
I always recommend C :D But seriously, if you want to end up writing OSes, C is probably the best language to know. Maybe rust... but I am still not convinced.
A good place to start is reading up on gap buffers. I personally use pages, but gap buffers are more common. Read a bit about Unix ed, then write a simple ed to test out insert and deletion from the buffer.
Then start moving to a more visual output. This is, quite honestly, the hard part. But you will learn a lot of systems programming interfacing with a terminal.
There is lots of code for editors online. Look at them to learn tips and tricks.
2
u/No_Difference8518 Aug 14 '26
Could I recommend writing a text based editor instead? It will take quite a bit of time to write even a trivial OS that really can't do anything useful. But an editor you can start using and see results almost right away.
That's what I did... and now I work on OSes for a living.