73 of 158
67 Register.CPUFrequency This read-only UnsignedLong value indicates the frequency of the CPU clock, in Hertz. For all ZX models currently available, the CPU frequency is 14,745,600Hz. Register.HeapEnd This read-only UnsignedInteger value indicates the lower bound of the memory allocation heap. The heap grows from the high end of RAM toward the beginning of RAM. As blocks of memory are allocated from the heap (for String variables or to satisfy System.Alloc() requests), the value of Register.HeapEnd will decrease. As blocks of memory are returned to the heap (as String variables change or go out of scope, or due to calls to System.Free()), the value of Register.HeapEnd may or may not increase. The value of Register.HeapEnd will not increase until the allocated block of memory closest to its current value is freed. At that time, Register.HeapEnd will increase to be near the lowest still-allocated block. Register.ExtRamConfig This UnsignedInteger value indicates the current external RAM configuration. Of course, it is only meaningful on ZX models that support external RAM, e.g. the ZX-1281. Although you may change this value during execution, the configuration of the external RAM interface will not be affected until the next time the ZX resets (i.e. following power up, WatchDog reset, download, etc.). Register.FirstTime This read-only Boolean value is identical to that which would be returned by the FirstTime() function. Note, however, that reading the value via Register.FirstTime does not reset the flag like invoking the FirstTime() function does. Register.UserSP This UnsignedInteger register contains the value of the stack pointer for the current task at the moment it is referenced. This value may be useful in estimating the stack usage for a task. For native mode devices (e.g. the ZX-24n) the value of Register.UserSP is identical to Register.SP. 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.