ZBasic Language Reference
13
ZX Microcontroller Family
is a Byte value that has the binary form 1PPPPnnn where PPPP represents a port index (PortA=0,
PortB=1, etc.) and nnn represents the bit number (0-7). The option is on by default for ZX devices based
on the mega128, mega1280 and mega1281 and off by default for other devices.
Example
Option PortPinEncoding On
Option CodeLimit
Option CodeLimit <limit-value>
Default: none
This option can be used to have the compiler check the size of the generated code and issue an error
message if it exceeds a specified size. The limit value is specified by a decimal number, optionally using
the suffix K or k to denote a multiple of 1024.
Examples
Option CodeLimit 32K
Option CodeLimit 32768
Option SignOn
Option SignOn {On | Off}
Default: On
This option can be used to control the generation of a sign-on message when the ZX begins running after
a reset. The flag to control the sign-on is stored in Persistent Memory of the processor. This is important
to remember because if you download one program to the ZX that, say, turns it off and then you
download another program that has no Option SignOn directive at all, the sign-on will still be in the off
state. In other words, if you want to ensure that it is in particular state for your particular program, be sure
to include this directive. Of course, if youve never turned it off, it will still be in the On state.
Example
Option SignOn Off
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 ZX 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