As the OP said, this occurs for values from 0x8000 to < 0x10000.
I had added a heuristic to test the top hex digit. and add 2^16 is the result was negative when not expected.
However, Alek K.s method works great and is cleaner