cubeOS / cubeOS-alpha

The cubeOS (in progress) for DCPU-16 (1.7); see for packages

Home Page:http://github.com/cubeOS/cubeOS-packages/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate higher level languages

bshepherdson opened this issue · comments

Several C compilers of varying degrees of suck exist. There's also 12, my Forth implementation, and other options.

I've suggested creating LaMP, a programming language aimed specifically at cubeOS, but I don't have the know-how to bring it into fruition.

@notencore, I have a few questions/thoughts about LaMP. First of all, is it aimed to be a compiled language within CubeOS? And if so, what will it be similar to? I suppose if you were to begin to write it, I would begin with deciding what it would be similar to, and then write the syntax for something very basic.

I have written a compiler for (a dialect of) Go that compiles to CubeOS assembly. It is available at https://github.com/shepheb/go10c and is at an alpha level of usability.

It works, but it's pretty dumb about handling registers for expressions and so isn't terribly efficient. On the other hand, if the code you're writing isn't getting called mutliple times per second, 20 wasted cycles isn't a big deal. I'll be using it to write the upper layer of filesystem code soon, after I finish the scheme for linking to external code.

go10cc scripts have been pulled into the master branch.