Introduction
The Modulo-10000 (M10K) format breaks a 32-bit value into two 16-bit registers, according to the following relationship:High-Order Register = value 10000
Low-Order Register = value modulus 10000
The 32-bit value can be retrieved by the following calculation:
value = registerhigh x 10000 + registerlow
Example
Value 12345678 is passed in unsigned 32-bit Modulus-10000 format.Registerhigh: 1234 = 04D2 Hex
Registerlow: 5678 = 162E Hex
value = 1234 * 10000 + 5678 = 12345678
Another Example
Value -12345678 is passed in signed 32-bit Modulus-10000 format.Registerhigh: -1234 = FB2E Hex
Registerlow: -5678 = E9D2 Hex
value = -1234 * 10000 + -5678 = -12345678
No comments:
Post a Comment