Notch's Specification for the In-Game DCPU-16
Just waiting for the first post about programming this CPU to pop up on Stack Overflow ... :)It's quite an interesting architecture. From an initial perusal, I found these features note-worthy:* Explicit access to PC as a register, makes "computed goto" trivial and very natural.* Because of the above, there is no JMP instruction.* Treating operations on registers as "values" makes the instruction set very orthogonal.* No instructions for bit-manipulation.* Lots of possible NOP instructions, like "SET PC,PC" (which I think should work, depends a bit on exactly when it's incremented but it looks safe).* Word-addressed memory will make string processing interesting to implement. Maybe in space, everyone uses UTF-16.* Single 64 K address space will put quite the limit on the amount of code, I guess the game will show how much code is needed to do anything.* No I/O instructions means I/O must be memory-mapped, further reducing the space available for code. Maybe there will be bank-switching?* No interrupts.