This project has been on my mind for years but I've gotten a few more Motorola boards in the last few weeks and I'd like to get them up and running for display in my makerspace. So I gathered up my Small C books and searched the internet for the Flex OS (6800 & 6809) and C User groups disks for the source code to existing Small C implementations. I found a few and I've been putting them under git control on Github so I can bash the code into something that will compile under Linux and Windows. Now remember that the Small C compiler was written in the early days of C standards. So some of it is very ugly code. Threre's char * to int conversion that need to be correct for the new larger (64 bit) processors.
Right now I have mangled the Small C code under 6800 into something that seems to work. I need to test the code that gets generated on a board. The code under the 6800 directory outputs p-code in Motorola assembler (FCB 28 etc.). It then links to assembler code that is the interpreter. Very interesting unfortunately it's early v1.1 Small C so it's very limited. We'll see if we can extend it at some future date.
The code under the silifen directory actually generates assembler code so something executable is generated once assembled and linked. This code is in the process of being mangled. I think the code is Small C v2.1 but I'm not certain. The Small C compiler converts the p-code to assembler so no need to link an interpreter library. I'll be concentrating my efforts here for the time being.
The v22 directory contain the MSDOS Small C compiler. I started playing with this but switched to the silifen code when I found it.
I have more links, disks and iso source so expect more. I also have the Small C books and I'm reading the Small C Handbook by James E. Hendrix. That may help with documenting everything.