To be specific, it maxes out the CPU even when it's not doing anything. Given that it's supposed to emulate low-level hardware, at very slow speeds, and does not have any demanding graphics, I fail to see why it should do that.
(It's something I've seen happening in more games as of late, actually. For example, Desktop Dungeons - a very fun game which has no business demanding anything from my computer since it's turn-based, uses sprites, and barely animated. And yet my laptop heats up as soon as I open the game.)
In fact, it's a bit ironic, given that the whole theme of the game is squeezing out performance out of bare metal hardware, and I admit that I'm more annoyed by it for that somewhat irrational reason.
For desktop dungeons, I'm not aware of the specifics about that game (though I have played it), but generally, if you're using OpenGL or DirectX to render, repainting only part of the screen isn't an option, so if anything is animated (no matter how slight the animation), you have to redraw the screen every frame. There are exceptions to this (like the mouse pointer, although this requires platform specific code), but not many of them.
Regarding DD: first, it's also implemented in Unity, so... but that aside, even if the whole screen gets repainted, it shouldn't max out. The graphics are just not demanding enough for that.
(I get a bunch of errors on OS X unless I change "CC=gcc" to "CC=clang", btw)
(Currently trapped in legal hell. I work for one of those annoying companies that claims ownership of everything I do, even in my personal time, so I have to get it cleared before I can push it to github...)
I added some extensions to allow one node to program another; the PROGRAM <dir> opcode resets the node in that direction, and it can then be fed a series of numbers which form the program. Once complete it starts executing.
With this, it ought to be possible to program an arbitrary network with programs from a boot ROM attached to a single node at the corner. It would have to propagate the distribution program through the network, which would then in turn propagate the program to the right place and reprogram each node in turn. Because a programmed node wouldn't contain the distribution program any more we'd have to start at the outer edge and work inwards.
I do wonder whether it would be possible to get real work done with this. I bet a node could be implemented in a tiny handful of FPGA gates.
Here's my output of `gcc --version` on OS X 10.10:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
edit: also, should've said that's really cool and thanks for posting your source code. gcc: warning: couldn't understand kern.osversion '14.3.0
gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.There are also "stack" cores, which store an arbitrary number of values and allow you to pop them back off.
If you were able to expand the system to have N cores of any type, I could easily imagine someone being able to compile C down to it.