SETHIGH16 v, data

Purpose To assign the upper 16-bit of a 32-bit integer variable v to data. The lower 16-bit of v is unaffected. This can be used to construct the value of a 32-bit integer data using two 16-bit data obtained from either the EEPROM or the DM[n].
Examples A = DM[2]
SETHIGH16 A,DM[1]

Note: If you are constructing the value of a 32-bit variable from two 16-bit data, then SETHIGH16 should be executed only after the lower 16-bit has been assigned to the 32-bit variable, as shown in the above example. If you were to execute A = DM[2] after the SETHIGH16 A, DM[1] statement, the SETHIGH16 operation  would have been lost since the assignment statement itself overwrites all previous operation  (including SETHIGH16) on variable A.

See Also GETHIGH16( )

backbutton.gif (507 bytes)  Basic to TBASIC Reference Manual