HiByte Procedure |
Version 5 |
Returns or sets the high byte of a given word. If the last parameter, lValue, is missing, then it returns the high byte of the given word. Otherwise, it sets high byte of given word to (the byte value of) lValue.
[ wValue = ] HiByte (w, [lValue])
The HiByte procedure syntax has the following parts:
Name |
Type |
Description |
wValue |
Word |
The high byte of a given word, w if lValue is missing,else input word with given new high byte. |
w |
Word |
Input value |
lValue |
Long |
If it is not 0x100 (the default value), then the last 8 bit (a byte) of w is replaced by the last 8 bit (a byte) of lValue. |
print using "X"; HiByte(0x500) ! prints 5
print using "X"; HiByte(0x500, 0x10) ! prints 1000