82 of 208
ZBasic Language Reference 74 ZX Microcontroller Family Caution: modifying this value will probably cause your program to malfunction. Register.SP This UnsignedInteger register contains the value of the hardware stack pointer of the underlying processor at the moment it is referenced. For VM code devices, there are few, if any, practical uses for this value. See, instead, Register.UserSP. For native mode devices, the value of Register.SP is identical to Register.UserSP and indicates the value of the current task’s stack pointer at moment it is referenced. Caution: modifying this value will probably cause your program to malfunction. 3.9 Built-in Constants The compiler has several built-in constants. These constants may be used in conditional directives and they may also be used as if they were constants defined by the normal means. The entries in the table below that begin with Option typically derive their value from the corresponding Option directives, the corresponding compiler command line options or their respective default values. Name Type Description Module.Name String The name of the module being compiled. Module.Number UnsignedInteger The ordinal number of the module being compiled. Option.AllocStr Boolean Indicates if dynamic string allocation is in effect. Option.AtnChar Byte Gives the value of the ATN character (if non-zero). Option.Base Integer Gives the array base value for the current module. Option.CodeLimit UnsignedLong Specifies the code size limit (zero if none is specified). Option.Com1Speed Long Gives the current default Com1 baud rate. Option.CPUFamily String Deprecated. Use Option.TargetFamily. Option.CPUType String Deprecated. Use Option.TargetMCU. Option.ExtRamAble Boolean Indicates if the device supports external RAM use. Option.ExtRamEnabled Boolean Indicates if external RAM use is enabled. Option.HeapLimit UnsignedInteger Indicates the specified heap limit. Option.HeapReserve UnsignedInteger Indicates the default or specified minimum heap size. Option.HeapSize UnsignedInteger Indicates the specified or default heap size. Option.Language String Specifies the language mode that is in effect. Option.MainTaskStackSize UnsignedInteger Indicates the specified size for the main task stack. Option.Objects Boolean Indicates if object-oriented extensions are enabled. Option.Overload Boolean Indicates if procedure overloading is enabled. Option.PortPinEncoding Boolean Indicates port pin encoding is enabled. Option.Strict Boolean Indicates if Strict mode is in effect. Option.StringSize Integer Gives the default string size for static string allocation. Option.TargetCode String The type of code being generated (“ZVM” or “Native”). Option.TargetDevice String The ZX device for which code is being compiled, e.g. “ZX24a”. Option.TargetFamily String The family to which the target device belongs, e.g. “ATmega” or “ATxmega”. Option.TargetMCU String Specifies the MCU used on the target device. Pin.GreenLED Byte Gives the pin designator for the green LED (if available). Pin.RedLED Byte Gives the pin designator for the red LED (if available). Pin.YellowLED Byte Gives the pin designator for the yellow LED (if available). System.JumpBufSize Integer Gives the size required for a buffer used for SetJmp(). System.MinQueueSize Integer Gives the minimum size for an array to be used for a queue. Version.Major Integer Gives the major portion of the compiler version number. Version.Minor Integer Gives the minor portion of the compiler version number. Version.Variant Integer Gives the variant portion of the compiler version number. Version.Value UnsignedLong Gives the composite value of the compiler version number. The value corresponding to v1.2.3 is &H010203. Version.String String Gives the compiler version number as a string, e.g. “1.2.3”.