This page describes random notes about a fictitious DCPU-16 instruction set, from Minecraft’s creator Markus Persson.

My Libraries

Too Many NOPs

How many NOPs are out there? Not counting the next word things, we have:

In conclusion, at least 167552 (25.6%) out of 65536 instructions are NOPs, taking 1 to 4 cycles (e.g. MOD 0, [0]). If you allow clobbering O then you have wider choices. This is too much! If you agree you should watch the proposed modification to DCPU-16.

  1. Many other basic instruction does change O register even when the first operand is a literal, which is unacceptable for NOPs. This can be used in interesting ways, however: for example, ADD 0x1234, A will set O to 1 if A is larger than 216 - 0x1234 and 0 otherwise.

  2. As far as I know. I have no spare time to prove the completeness (though I have tried a SMT solver).

ikiwiki를 씁니다.
마지막 수정