dcpu16
dcpu16 copied to clipboard
DIV behavior incorrect - EX
The behavior of the EX register when performing a DIV is incorrect. EX should be set to ((b<<16)/a) & 0xffff as per the spec, rather than (b/a) << 16 & 0xffff, which will always be zero in 16 bit division.