|
| System VariablesSystem variables allow access to specific functions and may be used anywhere a program variable or other expression is used. The following table lists the available system variables, the data types, and their uses. | Variable | Type | Description |
|---|
| $ | unsigned long | represents the program counter. You may use $ to display and change the program counter. For example, $ = 0x4000sets the program counter to address 0x4000. | | _break_ | unsigned int | lets you stop executing the target program. When you set _break_ to a non-zero value, µVision3 halts target program execution. You may use this variable in user and signal functions to halt program execution. | | _traps_ | unsigned int | when you set _traps_ to a non-zero value, µVision3 display messages for the 166 hardware traps: Undefined Opcode, Protected Instruction Fault, Illegal Word Operand Access, Illegal Instruction Access, Stack Underflow and Stack Overflow. | | states | unsigned long | current value of the CPU instruction state counter; starts counting from 0 when your target program begins execution and increases for each instruction that is executed. Note: - states is a read-only variable.
| | seconds | double | execution time in seconds. Note: - seconds is a read-only variable and is available only for some devices.
| | itrace | unsigned int | indicates whether or not trace recording is performed during target program execution. When itrace is 0, no trace recording is performed. When itrace has a non-zero value, trace information is recorded. Refer to Trace Recording for more information. | | radix | unsigned int | determines the base used for numeric values displayed. radix may be 10 or 16. The default setting is 16 for HEX output. |
|
|