Thread starter
#41

I just used the calculator supplied with Windows..

Set it in Programmer mode (in View), then "word" as the data size option.

Entering the value while hex is selected, then switch to decimal.

For a generic calculator, enter the hex (in hex mode), convert to decimal then if the number is larger than 32767, subtract 65536.

That should give the same results.

Set it in Programmer mode (in View), then "word" as the data size option.

Entering the value while hex is selected, then switch to decimal.

For a generic calculator, enter the hex (in hex mode), convert to decimal then if the number is larger than 32767, subtract 65536.

That should give the same results.

Ok, the above method works as you say, thanks.

Is it possible to not use the HEX route. The DATA shows two BYTEs of DEC and I want to see the end result in DEC?

**EDIT:**I think I've worked it out (HIGH BYTE X 256 + LOW BYTE) [If > 32767 then] -65536 =X

I'll play with this and the results I'm getting so I can get the feel of what happens, when the module is moved around, before using the calculations, within this thread.

C.

Last edited: