Home
Company Products Tech.Info Notice    Dev.Tools
Uncategorized Document
Variable definning on extra Pages(ex: Page1,2...) in 'C Language'
Description
It is possible to allocate some variables on extra memory-pages with a keyword like 'PAGE1' or 'PAGE2'.
Please be careful when you define some variables on single line with the keyword. The meaning of the code is completely different based on the position of the keyword.


See following examples,
- When the keyword 'PAGE2' is placed before a variable name, following variables are allocated in Page2.
int PAGE2 a,b,c;
  it means, all 'a', 'b', 'c' are allocated in Page2.

int a,PAGE2 b, c;
  it means, 'a' is allocated in Page0 and 'b','c' are allocated in Page2.


- When the keyword 'PAGE2' is placed after a variable name, only one variable is allocated in Page2
int a,b,c PAGE2;
  it means, 'a' and 'b' are allocated in Page0 and 'c' is allocated in Page2.

int a,b PAGE2, c;
  it means, 'a','c' are allocated in Page0 and 'b' is allocated in Page2.