DCPUTeam / DCPUToolchain

[ARCHIVED] The code repository for the DCPU-16 Toolchain.
http://dcputoolcha.in/
MIT License
96 stars 14 forks source link

SBX fails to set EX properly. #233

Closed unbibium closed 11 years ago

unbibium commented 11 years ago

Given the code:

SET EX, -1
SET A, 5
SET B, 8
SBX A, B

The final value of A should be -4, and the value of EX should be -1 (0xFFFF). Instead, the value of EX is 0 (0x0000). This happens if the initial value of EX is anything but 0.

EX is set properly if the initial value of EX is 0.

cassiebeckley commented 11 years ago

The toolchain was treating EX as if it were an unsigned integer. I've fixed this issue, thanks for reporting it!