Keil Logo

DIR

The DIR command displays a list of symbols.

Syntax Description
DIR Displays symbol names for the current module (the program counter ($) indicates the address space of the current module).
DIR \module Displays the symbols that are part of module.
DIR \module LINE
DIR \module\func LINE
Displays line number information about the current or specified module. Line number information is bound to module level and is not reduced to function level.
DIR \module\func Displays the symbols of function func contained in module.
DIR BFUNC Displays the names of all predefined functions. These functions are always available and cannot be deleted or redefined.
DIR DEFSYM Displays the symbols created with the DEFINE command.
DIR FUNC Displays the names of all µVision functions. This includes: predefined functions, user-defined functions, and signal functions.
DIR LINE Displays line number information for the current module.
DIR MODULE Displays the module names in the target program. These objects have the attribute PUBLIC in assembly language. Non-static C variables are also included in this group.
DIR PUBLIC Displays the names of all global symbols.
DIR SIGNAL Displays the names of all user-defined signal functions.
DIR UFUNC Displays the names of all user functions.
DIR VTREG Displays the names of all CPU pin registers that are supported by the CPU.
Examples

The following examples were created using the MEASURE application of the C51 compiler package.

DIR MODULE

>DIR MODULE      /* all module names */
  MEASURE
  MCOMMAND
  GETLINE
  ?C_FPADD
  ?C_FPMUL
  ...

DIR \module

>DIR \MEASURE    /* module 'MEASURE' */
 MODULE: MEASURE
    C:0x000000 . . . . _ICE_DUMMY_ . . uint
     FUNCTION: {CvtB} RANGE: 0xFF03B7-0xFF07E5
      C:0x000000 . . . . _ICE_DUMMY_ . . uint
     FUNCTION: {CvtB} RANGE: 0xFF000B-0xFF000D
      C:0x000000 . . . . _ICE_DUMMY_ . . uint
     FUNCTION: SAVE_CURRENT_MEASUREMENTS RANGE: 0xFF000E-0xFF0069
     FUNCTION: TIMER0 RANGE: 0xFF006A-0xFF0135
      D:0x00000F . . . . i . . uchar
     FUNCTION: _READ_INDEX RANGE: 0xFF0136-0xFF01BF
      D:0x00003F . . . . buffer . . ptr to char
      D:0x000042 . . . . index . . int
      D:0x000007 . . . . args . . uchar
     FUNCTION: CLEAR_RECORDS RANGE: 0xFF01C0-0xFF01EE
      D:0x000006 . . . . idx . . uint
     FUNCTION: MAIN RANGE: 0xFF01EF-0xFF03B6
      I:0x000067 . . . . cmdbuf . . array[15] of char
      D:0x00003C . . . . i . . uchar
      D:0x00003D . . . . idx . . uint

DIR /module LINE

>DIR \MEASURE LINE     /* Lines of module 'MEASURE' */
 MODULE: MEASURE
C:0x000E . . . . #87
C:0x000E . . . . #88
C:0x003A . . . . #89
C:0x0049 . . . . #90
...
C:0x03B6 . . . . #291
C:0x03B6 . . . . #292

DIR PUBLIC

>DIR PUBLIC            /* all PUBLIC symbols */
  B:0x000640 . . . . T2I0 . . bit
  B:0x000641 . . . . T2I1 . . bit
  ...
  D:0x000023 . . . . current . . struct mrec
  C:0x0007CD . . . . ERROR . . array[16] of char
  X:0x004000 . . . . save_record . . array[744] of struct mrec
  C:0x00000E . . . . save_current_measurements . . void-function
  C:0x0001EF . . . . main . . void-function
  C:0x00047E . . . . menu . . array[847] of char
  D:0x000030 . . . . setinterval . . struct interval
  ...
  B:0x000601 . . . . IEX2 . . bit
  B:0x000600 . . . . IADC . . bit

DIR VTREG

>DIR VTREG           /* Show Pin-Registers and Values */
    PORT0:  uchar, value = 0xFF
    PORT1:  uchar, value = 0xFF
    PORT2:  uchar, value = 0xFF
    PORT3:  uchar, value = 0xFF
    PORT4:  uchar, value = 0xFF
    PORT5:  uchar, value = 0xFF
    PORT6:  uchar, value = 0xFF
    PORT7:  uchar, value = 0x00
    PORT8:  uchar, value = 0x00
     AIN0:  float, value = 0
     AIN1:  float, value = 0
     AIN2:  float, value = 0
     AIN3:  float, value = 0
     AIN4:  float, value = 0
     AIN5:  float, value = 0
     AIN6:  float, value = 0
     AIN7:  float, value = 0
     AIN8:  float, value = 0
     AIN9:  float, value = 0
    AIN10:  float, value = 0
    AIN11:  float, value = 0
     S0IN:   uint, value = 0x0000
    S0OUT:   uint, value = 0x0000
     S1IN:   uint, value = 0x0000
    S1OUT:   uint, value = 0x0000
    VAGND:  float, value = 0
    VAREF:  float, value = 5
     XTAL:  ulong, value = 0xB71B00
   PE_SWD:  uchar, value = 0x00
    STIME:  uchar, value = 0x00

DIR

>$ = MAIN     /* set current execution point to main() */
>DIR          /* now, the main() symbols are preselected */
 FUNCTION: MAIN RANGE: 0xFF01EF-0xFF03B6
  I:0x000067 . . . . cmdbuf . . array[15] of char
  D:0x00003C . . . . i . . uchar
  D:0x00003D . . . . idx . . uint

DIR DEFSYM

>DIR DEFSYM   /* those created by 'DEFINE 〚type〛 〚name〛' */
            word00:    int, value = 0x0000
            byte00:   char, value = 0x00
           dword00:   long, value = 0x0
           float00:  float, value = 0

DIR FUNC

>DIR FUNC     /* predefined µVision functions */
predefind:   void  MEMSET (ulong, ulong, uchar)
predefind:   void  TWATCH (ulong)
predefind:    int  RAND (uint)
predefind:  float  GETFLOAT (char *)
predefind:   long  GETLONG (char *)
predefind:    int  GETINT (char *)
predefind:   void  EXEC (char *)
predefind:   void  PRINTF (char *, ...)
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.