Hello,
In some documentation if found the possibility to put some data into zero page. This should be done using the following macros before the definition of the variable:
My problem is, that I did not find any example for this. Is this the right way to do it?
Am I correct that the next definition will be put into common (non-zeropage) RAM? Like this:
And how is the behavior, if I define more than one variable at once? Like this:
Regards
Sebastian
In some documentation if found the possibility to put some data into zero page. This should be done using the following macros before the definition of the variable:
Code:
#pragma bss-name (push,"ZEROPAGE")
#pragma data-name(push,"ZEROPAGE")
#pragma data-name(push,"ZEROPAGE")
My problem is, that I did not find any example for this. Is this the right way to do it?
Code:
#pragma bss-name (push,"ZEROPAGE")
#pragma data-name(push,"ZEROPAGE")
static unsigned char my_tiny_variable;
#pragma data-name(push,"ZEROPAGE")
static unsigned char my_tiny_variable;
Am I correct that the next definition will be put into common (non-zeropage) RAM? Like this:
Code:
#pragma bss-name (push,"ZEROPAGE")
#pragma data-name(push,"ZEROPAGE")
static unsigned char my_variable_in_zero_page;
static unsigned char my_variable_in_common_ram;
#pragma data-name(push,"ZEROPAGE")
static unsigned char my_variable_in_zero_page;
static unsigned char my_variable_in_common_ram;
And how is the behavior, if I define more than one variable at once? Like this:
Code:
#pragma bss-name (push,"ZEROPAGE")
#pragma data-name(push,"ZEROPAGE")
static unsigned char x, y;
#pragma data-name(push,"ZEROPAGE")
static unsigned char x, y;
Regards
Sebastian