µVision3 User's GuideµVision3 Overview User Interface Creating Applications Utilities Debugging Using the Debugger CPU Simulation Start Debugging Application Program Execution Debug Windows and Dialogs Breakpoints Code Coverage CPU Registers Disassembly Window Logic Analyzer Setup Setup in Detail Restrictions Memory Window Memory Map Output Window - Command Debug Commands Variables and Registers Debug Functions Execution Profiler Performance Analyzer Serial Window Symbol Window Toolbox Watch Window Expressions Constants System Variables Peripheral Variables I/O Ports Serial Ports Program Variables (Symbols) Line Numbers Bit Addresses Type Specifications Operators Differences Between µVision3 and C Expression Examples Tips and Tricks Review Peripherals and CPU Configuration Simulate I/O Ports Simulate Interrupts and Clock Inputs Simulate external I/O Devices Assign Serial I/O to a PC COM Port Check Illegal Memory Accesses Command Input from File Preset I/O Ports or Memory Contents Write Debug Output to a File Keyboard Shortcuts Debug Commands Debug Functions Simulation Flash Programming Dialogs Example Programs Command Line Appendix
The µVision3 accepts decimal constants, HEX constants, octal constants, binary constants, floating-point constants, character constants, and string constants.
Binary, Decimal, HEX, and Octal Constants
By default, numeric constants are decimal or base ten numbers. When you enter 10, this is the number ten and not the HEX value 10h. The following table shows the prefixes and suffixes that are required to enter constants in base 2 (binary), base 8 (octal), base 10 (decimal), and base 16 (HEX).
Following are a few points to note about numeric constants.
Floating-point constants are entered in one of the following formats.
number . number
number e[+|-] number
number . number [e[+|-] number]
For example, 4.12, 0.1e3, and 12.12e–5. In contrast with the C programming language, floating-point numbers must have a digit before the decimal point. For example, .12 is not allowed. It must be entered as 0.12.
The rules of the C programming language for character constants apply to the µVision3 debugger. For example, the following are all valid character constants.
'a', '1', '\n', '\v', '\x0FE', '\015'
Also escape sequences are supported as listed in the following table:
The rules of the C programming language for string constants also apply to µVision3. For example:
"string\x007\n" "value of %s = %04XH\n"
Nested strings may be required in some cases. For example, double quotes for a nested string must be escaped. For example:
"printf (\"hello world!\n\")"
In contrast with the C programming language, successive strings are not concatenated into a single string. For example, "string1+" "string2" is not combined into a single string.
of your data.