Page 24 of 229 Start Back Next End ZBasic Language Reference 14 ZBasic Microcontrollers Option CallFunctions Option CallFunctions {On | Off} Default: Off For native mode devices, this option can be used to allow your application code to invoke functions as if they were subroutines (the returned value is discarded). Note that even when CallFunctions is enabled, functions returning user-defined types like structures, unions and class objects are not allowed to be called as if they were subroutines. The presence of this option directive in a module affects only that module; the command line option -- call-functions can be used to affect multiple modules. Example Option CallFunctions On Option TaskStackMargin Option TaskStackMargin <margin-value> Default: 10 When the compiler compares the size of the stack allocated to a task to the estimated task stack usage it pads the estimate with a safety margin. This option can be used to specify a value for that safety margin different from the default of 10 bytes. The safety margin may be any non-negative decimal integral value. Example Option TaskStackMargin 20 Option ExtRamConfig Option ExtRamConfig [On | Off | <constant-expression>] Default: (see text) For ZBasic target devices that support external RAM, you may control whether external RAM is enabled using this directive. Using the keyword On enables external RAM support in the default configuration (16- bit address, no wait states). If you need a different configuration, you may specify a constant expression whose 16-bit value is written to the external RAM configuration registers of the CPU. For ATmega-based devices, the high byte is written to the register XMCRB register and the low byte is written to XMCRA register. (Note that for the mega128 CPU, the high bit of the XMCRA register is undefined but the configuration value must have that bit asserted in order for the external RAM interface to be enabled.) For ATxmega-based target devices, the low byte is written to the EBI_CTRL register while the high byte is written to the EBI_CS1_CTRLB register. For ATmega-based device, the default external RAM configuration value is &H0080. For ATxmega- based devices, the default external RAM configuration value is &H014d. Examples Option ExtRamConfig On Option ExtRamConfig &H0084 ' enable with 1 wait state (ATmega) Option RamSize Option RamSize <c onstant-expression> Default: (see text) The compiler compares the aggregate size of the statically allocated data items to the amount of RAM available in the target device. If the aggregate size is too large, the compiler issues a warning to that