User manual

148
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
Prototype
sub function Lo(dim number as longint) as byte
Description Function returns the lowest byte of number. Function does not interpret bit patterns of number it
merely returns 8 bits as found in register.
This is an “inline” routine; code is generated in the place of the call, so the call doesn’t count against
the nested call limit.
Parameters number: input value
Returns Lowest 8 bits (byte) of number, bits 7..0.
Requires Arguments must be variable of scalar type (i.e. Arithmetic Types and Pointers).
Example
d = 0x12345678
tmp = Lo(d) ‘ Equals 0x78
Lo(d) = 0xAA ‘ d equals 0x123456AA
Notes None.
Prototype
sub function Hi(dim number as longint) as byte
Description Function returns next to the lowest byte of number. Function does not interpret bit patterns of number
– it merely returns 8 bits as found in register.
This is an “inline” routine; code is generated in the place of the call, so the call doesn’t count against
the nested call limit.
Parameters number: input value
Returns Returns next to the lowest byte of number, bits 8..15.
Requires Arguments must be variable of scalar type (i.e. Arithmetic Types and Pointers).
Example
d = 0x12345678
tmp = Hi(d) ‘ Equals 0x56
Hi(d) = 0xAA ‘ d equals 0x1234AA78
Notes None.
Lo
Hi