LoByte Procedure

Version 5

Returns or sets the low byte of a given word. If the last parameter, lValue, is missing, then it returns the low byte of the given word. Otherwise, it sets low byte of given word to (the byte value of) lValue.

Syntax

[ wValue = ] LoByte (w, [lValue])

The LoByte procedure syntax has the following parts:

 

Name

Type

Description

wValue

Word

The low byte of a given word, w if lValue is missing,else input word with given new low 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.

Comments

 

Example

 

print using "X";  LoByte(0x510)      ! prints 10

print using "X"; LoByte(0x500, 0x44) ! prints 544

See Also

 

Bit

HiWord

LoWord

HiByte