12
RAM should be used for the heap. The default heap size is 256 bytes for VM mode devices and 512 for
native mode devices. See the section on setting heap and task stack sizes for more information.
Example
Option HeapSize 500
Option HeapLimit <constant-expression>
Default: n/a
This directive, useful only for native mode devices, provides a different way of allocating RAM between
the string heap and the task stacks. The value provided is interpreted as a RAM address and specifies
the limit beyond which the heap will not grow. This directive is perhaps more useful with ZX devices that
support external RAM. See the section on setting heap and task stack sizes for more information.
Option MainTaskStackSize <constant-expression>
Default: n/a
This directive, useful only for native mode devices, provides a different way of allocating RAM between
the string heap and the task stacks. The value provided is interpreted as the desired size of the task
stack for the Main() task and the heap limit is set at the end of the task stack. See the section on setting
heap and task stack sizes for more information.
Option TxQueueSize <constant-expression>
Default: 25
Option RxQueueSize <constant-expression>
Default: 50
These directives can be used to modify the sizes of the default transmission and reception queues for
Com1. They are effective only for native mode devices such as the ZX-24n.
Example
Option TxQueueSize 100
Option Com1Speed <constant-expression>
Default: 19200
This directive can be used to modify the default speed of the Com1 serial channel. It is effective only for
native mode devices such as the ZX-24n.
Example
Option Com1Speed 9600
2.3.2 The Definitions Section
The definitions section of a ZBasic program may contain constant definitions, variable definitions,
subroutine definitions and function definitions. There may be any number of each of these types of
definitions and the definitions may occur in any order. It is a common practice, however, to place
constant and variable definitions at the top of the definitions section followed by subroutine and function
definitions. On the other hand, some programmers prefer to define the constants and variables closer to
the routine or routines that use them.
BasicX Compatibility Note
In BasicX mode, variables and constants may not be
defined following any subroutine or function.