There appears to be a problem with the way the DCPU rc1 does DIV. The current DCPU RC1 implementation does the following for DIV:
long val = (b << 16) / a;
b = (char)(int)(val >> 16);
this.ex = (char)(int)val;
Given b = 0xFFFF, a = 0x2 the result will be a = 0xFFFF and ex = 0x8000. This is wrong. (0xFFFF << 16) / 0x2 should = 0x7FFF8000. The problem is that given "(b << 16) / a", Java will sign extend it. So, what Java ends up doing is (0xFFFFFFFFFFFF0000 / 0x2) which produces 0xFFFFFFFFFFFF8000 and that's not what is described in the spec.
In order for the DCPU to meet the spec it would need to do: