Wow. Seriously impressive -- both to see the limitations that smart people worked within while taking mankind off this rock, but also hats off to some excellent nerdery.<p>>"Division. Arrgh. The AGC does have hardware division (and multiplication), but it’s strictly limited to only being able to compute x/y when |x|>|y|. Anything else, you get garbage, including in the y=x case. This hit me several times and trying to deal with all the sign issues, combined with the 1s-complement sign issues above, was really painful."<p>Not being expert in slightly outdated processor architectures (1s compliment!), might someone more expert than I be able to tell me _why_ this is the case and was a good design decision? It seems like a potential way for unexpected sensor data to bite you in the arse...
Hello, author here.<p>It's a surprisingly modern-ish system, in many ways, and surprisingly weird in lots of other ways. One thing which really surprised me was a complete lack of pointer support: I managed to bodge the look-up-table instruction (which evaluates its argument and adds the result to the next instruction to be executed) to do pointer dereferences instead (INDEX ptr; TC 0). And, luckily, I found a way to make the assembler emit an address as a literal value, which it really didn't want to do.<p>It's a shame the address space is so small (only 12 bits!) or you could totally port real software to this...
I thought about this myself and it's really cool to see someone follow through on such a whimsical project. One consideration is that the is already a great lunar lander game for this system!