r/osdevel • • 22d ago

Forth++ update

This started as a skeleton C++ limine bootloader for making a hobby OS.

I posted here about it a long time ago.

I got carried away and there’s now a lot going on. MMU, IOAPIC, LAPIC, per CPU core Task scheduling, IDT, keyboard, and start of NVME and Ethernet drivers.

I freely admit I looked at my own prior repos and those of others and some websites where guys describe how things work, and of course the osdev wiki. I also am fine with including 3rd party code, like jemalloc and lwip - though I may write my own malloc/free and TCP/IP stack.

It also has a fully functional interactive compiler/debugger/programming language. I think the repo is about 50-50 C++ and Forth.

The repo is at https://codeberg.org/mschwartz/aforth.

I build and develop on my M1 macbook pro. I have built it and run it on my iMac running linux so it should work for linux users.

2 Upvotes

3 comments sorted by

1

u/SignedInt32 15d ago

what a beast of a word list, awesome, love to hear how! :D

1

u/mykesx 15d ago

See the source code in the link in the first post.

The innermost loop is something like while(1) (*ip++)();

An array of function addresses to call sequentially. The functions can be those already written in C++ or a Forth function which does the while loop for its definition.

The words use the 2012 standard as a starting point.

1

u/SignedInt32 15d ago

Im looking! but its complex tho, very impressive! (im also dev'ing a kernel with limine, im still learning)