-

Difference between revisions of "Cref"

From HI-TECH C for CP/M Fan WIKI(EN)
Jump to: navigation, search
(Created page with " The cross reference list utility CREF is used to format raw cross-reference information produced by the compiler or the assembler into a sorted listing. A raw cross-reference...")
 
 
Line 9: Line 9:
 
(8096 assembler).. The general form of the CREF command is:
 
(8096 assembler).. The general form of the CREF command is:
  
CREF options files
+
CREF options files
  
where _�o_�p_�t_�i_�o_�n_�s is zero or more options as described below and
+
where <strong>options</strong> is zero or more options as described below and
_�f_�i_�l_�e_�s is one or more raw cross-reference files. CREF takes
+
<strong>files</strong> is one or more raw cross-reference files. CREF takes
 
the following options:
 
the following options:
  
-O_�o_�u_�t_�f_�i_�l_�e
+
;-O<strong>outfile</strong>
Allows specification of the output file name. By
+
:Allows specification of the output file name. By default the listing will be written to the standard output and may be redirected in the usual manner. Alternatively using the -O option an output file name may be specified, e.g. -O<strong>xxx.lst</strong>.
default the listing will be written to the standard
 
output and may be redirected in the usual manner.
 
Alternatively using the -O option an output file name
 
may be specified, e.g. -O_�x_�x_�x._�l_�s_�t.
 
  
-P_�w_�i_�d_�t_�h
+
;-P<strong>width</strong>
This option allows the specification of the width to
+
:This option allows the specification of the width to which the listing is to be formatted, e.g. -P<strong>132</strong> will format the listing for a 132 column printer. The default is 80 columns.
which the listing is to be formatted, e.g. -P_�1_�3_�2 will
 
format the listing for a 132 column printer. The
 
default is 80 columns.
 
  
-L_�l_�e_�n_�g_�t_�h
+
;-L<strong>length</strong>
Specify the length of the paper on which the listing is
+
:Specify the length of the paper on which the listing is to be produced, e.g. if the listing is to be printed on 55 line paper you would use a -L<strong>55</strong> option. The default is 66 lines.
to be produced, e.g. if the listing is to be printed
 
on 55 line paper you would use a -L_�5_�5 option. The
 
default is 66 lines.
 
  
-X_�p_�r_�e_�f_�i_�x
+
;-X<strong>prefix</strong>
The -X option allows the exclusion of symbols from the
+
:The -X option allows the exclusion of symbols from the listing, based on a prefix given as argument to -X. For example if it was desired to exclude all symbols starting with the character sequence <strong>xyz</strong> then the option -X<strong>xyz</strong> would be used. If a digit appears in the character sequence then this will match any digit in the symbol, e.g. -XX0 would exclude any symbols starting with the letter <strong>X</strong> followed by a digit.
listing, based on a prefix given as argument to -X. For
 
example if it was desired to exclude all symbols start-
 
ing with the character sequence _�x_�y_�z then the option
 
-X_�x_�y_�z would be used. If a digit appears in the charac-
 
ter sequence then this will match any digit in the sym-
 
bol, e.g. -XX0 would exclude any symbols starting with
 
the letter _�X followed by a digit.
 
  
-F -F will exclude from the listing any references from
+
;-F
files with a full path name. A full path name means
+
:-F will exclude from the listing any references from files with a full path name. A full path name means either: a file name starting with a slash ('/') or backslash ('\') or a file name starting with a CP/M user number/drive letter prefix, e.g. 0:A:. This is intended to force omission from the listing of any symbol references derived from standard header files, e.g. using -F would omit any references from the header file STDIO.H.
either: a file name starting with a slash ('/') or
 
backslash ('\') or a file name starting with a CP/M
 
user number/drive letter prefix, e.g. 0:A:. This is
 
intended to force omission from the listing of any sym-
 
bol references derived from standard header files, e.g.
 
using -F would omit any references from the header file
 
STDIO.H.
 
  
-H_�s_�t_�r_�i_�n_�g
+
;-H<strong>string</strong>
The -H option takes a string as an argument which will
+
:The -H option takes a string as an argument which will be used as a header in the listing. The default heading is the name of the first raw cross-ref information file specified.
be used as a header in the listing. The default heading
 
is the name of the first raw cross-ref information file
 
specified.
 
  
-S_�s_�t_�o_�p_�l_�i_�s_�t
+
;-S<strong>stoplist</strong>
The -S option should have as its argument the name of a
+
:The -S option should have as its argument the name of a file containing a list of symbols not to be listed in the cross-reference. Multiple stoplists may be supplied with multiple -S options.
file containing a list of symbols not to be listed in
 
the cross-reference. Multiple stoplists may be supplied
 
with multiple -S options.
 
  
Cref will accept wild card filenames and I/O redirec-
+
Cref will accept wild card filenames and I/O redirection. Long command lines may be supplied by invoking CREF
tion. Long command lines may be supplied by invoking CREF
 
 
with no arguments and typing the command line in response to
 
with no arguments and typing the command line in response to
the _�c_�r_�e_�f> prompt. A backslash at the end of the line will be
+
the <strong>cref</strong>> prompt. A backslash at the end of the line will be
 
interpreted to mean that more command lines follow.
 
interpreted to mean that more command lines follow.

Latest revision as of 11:37, 31 July 2017

The cross reference list utility CREF is used to format raw cross-reference information produced by the compiler or the assembler into a sorted listing. A raw cross-reference file is produced with the -CR option to the compiler. The assembler will generate a raw cross-reference file with a -C option (Z80 or 8086 assemblers) or by using an OPT CRE directive (6800 series assemblers) or a REF control line (8096 assembler).. The general form of the CREF command is:

CREF options files

where options is zero or more options as described below and files is one or more raw cross-reference files. CREF takes the following options:

-Ooutfile
Allows specification of the output file name. By default the listing will be written to the standard output and may be redirected in the usual manner. Alternatively using the -O option an output file name may be specified, e.g. -Oxxx.lst.
-Pwidth
This option allows the specification of the width to which the listing is to be formatted, e.g. -P132 will format the listing for a 132 column printer. The default is 80 columns.
-Llength
Specify the length of the paper on which the listing is to be produced, e.g. if the listing is to be printed on 55 line paper you would use a -L55 option. The default is 66 lines.
-Xprefix
The -X option allows the exclusion of symbols from the listing, based on a prefix given as argument to -X. For example if it was desired to exclude all symbols starting with the character sequence xyz then the option -Xxyz would be used. If a digit appears in the character sequence then this will match any digit in the symbol, e.g. -XX0 would exclude any symbols starting with the letter X followed by a digit.
-F
-F will exclude from the listing any references from files with a full path name. A full path name means either: a file name starting with a slash ('/') or backslash ('\') or a file name starting with a CP/M user number/drive letter prefix, e.g. 0:A:. This is intended to force omission from the listing of any symbol references derived from standard header files, e.g. using -F would omit any references from the header file STDIO.H.
-Hstring
The -H option takes a string as an argument which will be used as a header in the listing. The default heading is the name of the first raw cross-ref information file specified.
-Sstoplist
The -S option should have as its argument the name of a file containing a list of symbols not to be listed in the cross-reference. Multiple stoplists may be supplied with multiple -S options.

Cref will accept wild card filenames and I/O redirection. Long command lines may be supplied by invoking CREF with no arguments and typing the command line in response to the cref> prompt. A backslash at the end of the line will be interpreted to mean that more command lines follow.