2010年3月28日 星期日

[pic18net] data-type and keyword

(1) keyword: "static"

MPLAB C18 supports parameters and local variables allocated either on the software stack or directly from global memory. The static keyword places a local variable or a function parameter in global memory instead of on the software stack.[3] In general, stack-based local variables and function parameters require more code to access than static local variables and function parameters (see static Function Arguments). Functions that use stack-based variables are more flexible in that they can be re-entrant and/or recursive.

[3] static parameters are valid only when the compiler is operating in Non-Extended mode.
(see Selecting the Mode).


(2) data-type, BOOL for pic18
allocated 1-byte space


(3) data-type, WORD for pic18
allocated 2-type space

沒有留言: