Mikroelektronika MIKROE-350 Data Sheet

Page of 526
io
sfr
register
Note: If none of the memory specifiers are used when declaring a variable, data specifier will be
set as default by the compiler. 
Related topics: AVR Memory Organization, Accessing individual bits, SFRs, Constants, Functions 
108
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
8051 Specifics
mikroBasic PRO for AVR
CHAPTER 4
Description This memory specifier allows user to access the I/O Memory space.
Example
' put io_buff in io memory space
dim io_buff as byte io
Description
This memory specifier in combination with (
rx, io, data
) allows user to
access special function registers. It also instructs compiler to maintain same
identifier in Basic and assembly.
Example
dim io_buff as byte io sfr
' put io_buff in I/O memory space
dim as char rx sfr
' puts y in Rx space
dim temp as byte data sfr and dim temp as byte sfr are equiva-
lent, and put temp in Extended I/O Space.
Description
If no other memory specifier is used (
rx, io, sfr, code
or 
data
), the 
regis-
ter
specifer places variable in Rx space, and instructs compiler to maintain
same identifier in C and assembly.
Example
dim y as char register