mappum/DCPU-16 — pull request #12 by Twisol (2012-04-06 02:13:14+00:00)
Title: Refactorings and cleanups

Spent a while today refactoring and adding comments. Two big things I cleaned up were the PC handling and the cycle counting. I also ensured that any out-of-bounds values would be used modulo-`dcpu.maxSize`, rather than being clamped to the high or low values (which would make it pretty much impossible to implement 32-bit math routines).

A fix for #11 is included, though it ended up not being an assembler issue after all. Argument types 0x1E and 0x1F are also implemented according to spec.