Expression Examples - µVision User's Guide - Keil
Home / µVision User's Guide
C51, C251, C166 Development Tools
Expression ExamplesThe following expressions were entered in the Command page of the Output Window. All applicable output is included with each example. The MEASURE example program were used for all examples.
Constant
>0x1234 /* Simple constant */ 0x1234 /* Output */ >EVAL 0x1234 4660T 11064Q 1234H '...4' /* Output in several number bases */Register
>R1 /* Interrogate value of register R1 */ 0x000A /* Address from ACC = 0xE0, mem type = D: */ >R1 = --R7 /* Set R1 and R7 equal to value R7-1 */Function Symbol
>main /* Get address of main() from MEASURE.C */ 0x00233DA /* Reply, main starts at 0x233DA */ >&main /* Same as before */ 0x00233DA >d main /* Display: address = main */ 0x0233DA: 76 E2 00 04 76 E3 00 04 - 66 E3 FF F7 E6 B6 80 00 v...v...f...... 0x0233EA: E6 B7 00 00 E6 5A 40 00 - E6 D8 11 80 E6 2A 3C F6 .....Z@......*< 0x0233FA: E6 28 3C F6 E6 CE 44 00 - BF 88 E6 A8 40 00 BB D8 .(<...D.....@.. 0x02340A: E6 F8 7A 40 CA 00 CE 39 - E6 F8 18 44 CA 00 CE 39 ..z@...9...D...Address Utilization Examples
>&\measure\main\cmdbuf[0] + 10 /* Address calculation */ 0x23026 >_RBYTE (0x233DA) /* Read byte from code address 0x233DA */ 0x76 /* Reply */Symbol Output Examples
>dir \measure\main /* Output symbols from main() in module MEASURE */ R14 idx . . . uint /* Output */ R13 i . . . uint 0x0002301C cmdbuf . . . array[15] of charProgram Counter Examples
>$ = main /* Set program counter to main() */ >dir /* points to local mem sym. from main() */ R14 idx . . . uint /* Output */ R13 i . . . uint 0x0002301C cmdbuf . . . array[15] of charProgram Variable Examples
>cmdbuf /* Interrogate address from cmdbuf */ 0x0002301C /* Output of address due to aggregate type (Array)*/ >cmdbuf[0] /* Output contents of first array element */ 0x00 >i /* Output contents from i */ 0x00 >idx /* Output contents from idx */ 0x0000 >idx = DPP2 /* Set contents from index equal to register DPP2 */ >idx /* Output contents from idx */ 0x0008Line Number Examples
>\163 /* Address of the line number #104 */ 0x000230DA /* Reply */ >\MCOMMAND\91 /* A line number of module MCOMMAND */ 0x000231F6Operator Examples
>--R5 /* Auto-decrement also for CPU registers */ 0xFE >mdisplay /* Output a PUBLIC bit variable */ 0 >mdisplay = 1 /* Change */ >mdisplay /* Check result */ 1Structure Examples
>save_record[0] /* Address of a record */ 0x002100A >save_record[0].time.hour = DPP3 /* Change struct element of records */ >save_record[0].time.hour /* Interrogation */ 0x03µVision Debug Function Invocation Examples
>printf ("µVision is coming!\n") /* String constant within printf() */ µVision is coming! /* Output */ >_WBYTE(0x20000, _RBYTE(0x20001)) /* Read & Write Memory Byte */ > /* example useful in debug functions */ >interval.min = getint ("enter integer: ");Fully Qualified Symbol Examples
>--\measure\main\idx /* Auto INC/DEC valid for qualified symbol */ 0xFFFFFully Qualified Symbol Examples for Cortex-M
BS \\cpp_template\../../source/RVCT/STM32F10x.s\146, 1 BS \\cpp_template\_numeric.CC\293, 1Từ khóa » C 0x1234
-
Convert 0x1234 To 0x11223344 - C++ - Stack Overflow
-
C Programming Examples | C Source Code | C Problems & Solutions
-
C Programming - Bitwise Operations - C++ Forum
-
Easy Hex String "0x1234" To Integer Conversion? - C# / C Sharp
-
C++ 将 0x1234 转换为 0x11223344 - 无涯教程网
-
Understanding The Pointers In C/C++ - Leon Dong
-
[PDF] CS 11 C Track: Lecture 5
-
Rmsharedstpool Command - IBM
-
Lsaddphysvolcandidate Command - IBM
-
Source - Hackage
-
Binary, Decimal, HEX, And Octal Constants - µVision User's Guide
-
Hexadecimal 0x1234 = 4660
-
Array-bounds Warning For `memcpy((void*)0x1234, P, N)`, Where N Is ...