<i>"The problem is:
You are outputting a VAR that has been declared as BYTE with a resolution of 16 bits, that doesn't make much sense, does it?"</i>

NavMicroSystems, if you mean the output of the HSEROUT statement:

HSEROUT ["0-5=", ~Result+1]

No, I'm outputting the result of a 16bit operation, not a VAR at all (this would likely end up in a terminal full of garbage - not numbers at all). I should have been more clear and typed:

HSEROUT ["0-5+",BIN ~Result+1]
which should yield: 1111111100000101 and I think this corresponds to the incorrect value given above.

However if our friend Mofarngo were to write this value to Result first, the leading word would be truncated, resulting in: 00000101, which is what he wants.