User`s manual

208 digi.com Keywords
__lcall__
When used in a function definition, the __lcall__ function prefix forces long call and return (lcall and
lret) instructions to be generated for that function, even if the function is in root. This allows root functions
to be safely called from xmem. In addition to root functions, this prefix also works with function pointers.
The __lcall__ prefix works safely with xmem functions, but has no effect on code generation. Its use
with cofunctions is prohibited and will generate an error if attempted.
root __lcall__ int foo(void) {
return 10; // Generates an lret instruction, even though we are in root
}
main() {
foo(); // This now generates an lcall instruction
}
long
Declares variables, function return values, or array elements to be 32-bit integers. If nothing else is speci-
fied, long implies a signed integer.
long i, j, *k; // 32-bit signed
unsigned long int w; // 32-bit unsigned
long funct ( long arg ){
...
}
main
Identifies the main function. All programs start at the beginning of the main function. (main is actu-
ally not a keyword, but is a function name.)