Mikroelektronika MIKROE-350 Fiche De Données

Page de 526
Lo
Hi
Higher
96
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Specifics
mikroBasic PRO for AVR
CHAPTER 3
Prototype
sub function Lo(number as longintas byte
Returns
Lowest 8 bits (byte) of 
number
, bits
7..0
.
Description
Function returns the lowest byte of 
number
. Function does not interpret bit pat-
terns 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.
Requires
Arguments must be variable of scalar type (i.e. Arithmetic Types and Pointers).
Example
d = 0x1AC30F4 
tmp = Lo(d)  ' Equals 0xF4
Prototype
sub function Hi(number as longintas byte
Returns
Returns next to the lowest byte of number, bits 8..15.
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.
Requires
Arguments must be variable of scalar type (i.e. Arithmetic Types and Pointers).
Example
d = 0x1AC30F4
tmp = Hi(d)  ' Equals 0x30
Prototype
sub function Higher(number as longintas byte
Returns
Returns next to the highest byte of 
number
, bits 16..23.
Description
Function returns next to the highest 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.
Requires
Arguments must be variable of scalar type (i.e. Arithmetic Types and Pointers).
Example
d = 0x1AC30F4
tmp = Higher(d)  ' Equals 0xAC