18 of 158
12 Example Option TargetDevice ZX24a Option TargetCPU <CPU-type> Default: ZX24 This option is deprecated, use Option TargetDevice instead. Option PortPinEncoding [On | Off] Default: see text When the compiler encounters an I/O port pin designator like C.2 it can convert it to the corresponding physical pin number for the target device or it can convert it to a composite value whose fields specify the port and the pin. This directive controls which of these conversions is performed. When the option is off, the result is a pin number and when it is on the result is the encoded port/pin value. The encoded result 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 <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 {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 you’ve never turned it off, it will still be in the On state. Example Option SignOn Off 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.