⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tools.hsc

📁 CC386 is a general-purpose 32-bit C compiler. It is not an optimizing compiler but given that the co
💻 HSC
📖 第 1 页 / 共 5 页
字号:
\par 
\par Files can be a list of files with wildcards.
\par 
\par ITOUCH has the following options:
\par 
\par \pard\ri1460\tx2220\b\fs22 /v\tab verbose mode
\par \tab\b0\fs20 show files as they are being processed\b\f1\fs22 
\par }
230
Scribble230
Grep Command Line




Writing



FALSE
21
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\ri1500\tx2220\cf1\b\fs32 Grep Command Line\cf0\b0\f1\fs20 
\par 
\par \f0 The general format of the grep command line is:
\par 
\par GREP [options] list of files
\par 
\par The files may have wild card characters.
\par 
\par GREP has the following options:
\par 
\par \b\fs22 /c\tab show match count
\par /f\tab load expression from file
\par /h\tab don't print file names
\par /l\tab print file name when only one file
\par /n\tab print line number if /l isn't set
\par /v\tab show nonmatching lines
\par /y\tab case insensitive matching
\par \f1 
\par }
235
Scribble235
CC386 Output Control




Writing



FALSE
39
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\ri1480\tx2220\tx3340\tx3360\tx4500\cf1\b\fs32 Output Control\cf0\b0\f1\fs20 
\par 
\par \f0 This section deals with compiler parameters related to controlling the type of output.
\par \b\f1\fs22 
\par \pard\fi-2200\li2200\ri1460\tx2220\tx3320\tx3360\tx4500\f0 /c\tab generate object file only
\par 
\par \b0\fs20\tab Causes CC386 to not generate an EXE file automatically.  Useful when compiling many files prior to a later link stage.
\par 
\par \tab\cf1 CC386 /c hello.c
\par 
\par \tab\cf0 generates a file hello.obj instead of generating hello.exe\b\fs22 
\par 
\par /o  \tab set output file name
\par 
\par \b0\fs20\tab Causes cc386 to rename the output file. If generating an EXE output, cc386 will rename the exe file.  If generating an object (OBJ) file, cc386 will rename the obj file.  Note that you cannot set the output file name for a group of files unless you are generating an EXE file.
\par 
\par \tab\cf1 CC386 /ohi hello.c
\par 
\par \pard\fi-2180\li2180\ri1440\tx2220\tx3300\tx3360\tx4500\cf0\tab generates an EXE file called HI.EXE.
\par \b\fs22 
\par /W \tab set exe file type
\par 
\par \b0\fs20\tab When CC386 is generating an EXE file, several formats are possible.  These are as follows:
\par 
\par \pard\fi-4620\li4620\ri1440\tx2220\tx3300\tx3360\tx4500\tab\tab\tab /Wd\tab - generate a WIN32 DLL program
\par \tab\tab\tab /Wdc\tab - generate a WIN32 DLL program, use CRTDLL runtime library
\par \tab\tab\tab /Wc\tab - generate a WIN32 console program
\par \tab\tab\tab /Wcc\tab - generate a WIN32 console program, use CRTDLL runtime library
\par \tab\tab\tab /Wg\tab - generate a WIN32 gui program
\par \tab\tab\tab /Wgc\tab - generate a WIN32 gui program, use CRTDLL runtime library
\par \tab\tab\tab /We\tab - generate an MSDOS program (using Tran's PMODE)
\par \tab\tab\tab /Wa\tab - generate an MSDOS program (using DOS32A)
\par \f1 
\par \pard\fi-2180\li2180\ri1440\tx2220\tx3300\tx3360\tx4500\f0\tab\cf1 CC386 /Wcc hello.c
\par 
\par \tab\cf0 generates a win32 console program hello.exe, which will use the CRTDLL runtime library.\f1 
\par }
240
Scribble240
CC386 Warning control




Writing



FALSE
40
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\fi-2220\li2220\ri1500\tx2220\cf1\b\fs32 Error control
\par 
\par \cf0\b0\fs20 This section deals with compiler parameters related to error messages.\f1 
\par 
\par \b\fs22 +e \tab put the compiler errors in a file.  
\par \b0\f0\fs20 
\par \tab For each file processed, CC386 will create a file with the same name as the original source with the extension.  '.err'.  The contents of this file will be a listing of any errors or warnings which occurred during the compile.  For example:
\par 
\par 
\par \cf1\tab CC386 +e myfile.c
\par 
\par \cf0\tab results in myfile.err
\par 
\par \b\f1\fs22 +Q\tab Quiet mode
\par \b0\f0\fs20 
\par \tab Don't display errors or warnings on the console.  Generally this is used in conjunction with the +e switch.  For example:
\par 
\par \cf1\tab CC386 +e +Q myfile.c
\par 
\par \cf0\tab puts the errors in a file, without displaying them on the console.
\par 
\par \b\f1\fs22 /w-xxx\tab disable warnings
\par \b0\f0\fs20 
\par \tab you use this once for each warning you want to disable, xxx is a three character warning code.  These are presently undocumented, except for /W-all which disables all warnings.  For example:
\par 
\par \cf1\tab CC386 /w-all myfile.c
\par 
\par \cf0\tab disables all warnings
\par 
\par \b\f1\fs22 /E[+]nn\tab error control
\par \b0\f0\fs20 
\par \tab nn is the maximum number of errors before the compile fails; if + is specifed extended warnings will be shown that are normally disabled by default.  For example:
\par 
\par \cf1\tab CC386 /E+44 myfile.c
\par 
\par \cf0\tab enables extended warnings and limits the number of errors to 44.  By default only 25 errors will be shown and then the compiler will abort.
\par \pard\fi-1440\li1440 
\par }
250
Scribble250
CC386 List file control




Writing



FALSE
13
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\fi-2220\li2220\ri1460\tx2220\cf1\b\fs32 List file control\cf0\b0\f1\fs20 
\par 
\par \b\fs22 +l\tab create a listing file 
\par 
\par \b0\f0\fs20\tab For each file processed, CC386 will create a file with the same name as the original source with the extension.  '.lst'.  The contents of this file will be various information gathered about the program which was processed.  For example:
\par 
\par \cf1\tab CC386 +l myfile.c
\par 
\par \cf0\tab results in myfile.lst
\par 
\par }
260
Scribble260
CC386 preprocesor control




Writing



FALSE
13
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\fi-2220\li2220\ri1460\tx2240\cf1\b\fs32 Preprocesor file control\cf0\b0\f1\fs20 
\par \b\fs22 
\par +i\tab create a file with preprocessed text.\b0\f0\fs20   
\par 
\par \tab For each file processed, CC386 will create a file with the same name as the original source with the extension.  '.i'.  The contents of this file will be the source code, with each identifier which corresponded to a macro expanded out to its full value.  For example:
\par 
\par \cf1\b\f1\fs22\tab\b0\fs20 CC386 +i myfile.c\b\fs22 
\par 
\par \cf0\b0\f0\fs20\tab results in myfile.i
\par 
\par }
270
Scribble270
CC386 command line files




Writing



FALSE
13
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\fi-2240\li2240\ri1480\tx2240\cf1\b\fs32 Taking arguments from the command line\cf0\b0\f1\fs20 
\par 
\par \b\fs22 /fname\tab  - gather parameters from the file 
\par 
\par \b0\f0\fs20\tab This switch is used to indicate the CC386 should take further command-line options from a file.  Each line of the file is parsed as if it was a command line and the result is cumulative.  For example:
\par 
\par \cf1\tab CC386 /fmyoptions myfile.c
\par 
\par \cf0\tab Will perform the actions defined in the file 'myoptions'
\par \f1 
\par }
280
Scribble280
CC386 environment variables




Writing



FALSE
10
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\fi-920\li920\ri1480\cf1\b\fs32 Environment variables\cf0\b0\f1\fs20 
\par 
\par \f0 CC386 supports two environment variables you may set to default compiler options.  These are:
\par 
\par \pard\fi-1080\li1080\ri1460\tx1100\cf1 CCINCL\tab\cf0 sets a default path for the -I switch.  You may additionall use the -I switch to set further paths
\par \cf1 CC386\cf0\tab CC386 will parse this variable prior to parsing the command line.  Switches in this variable will take effect just as if they were present on the command line or in a command line file.\tab\f1 
\par 
\par }
290
Scribble290
CC386 Debug information




Writing



FALSE
14
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\fi-2220\li2220\ri1480\tx2240\cf1\b\fs32 Debug information\cf0\b0\f1\fs20 
\par 
\par \b\fs22 +v\tab Put debug information in the output file
\par 
\par \b0\f0\fs20\tab The windows version of CC386 comes with an IDE which has a debugger.  If you want to use the debugger, use the +v switch.  Note that if you use this switch you may not use compile via assembly option, as debug information will not be passed through the assembler.  Also, you have to use appropriate linker switches to actually generate the debug image file used by the IDE.  For example:
\par 
\par \tab\cf1 CCIDE +v myfile.c
\par 
\par \cf0\tab Puts debug information in the object file.
\par 
\par \tab The debug file format is similar to the old codeview formats, but not exactly identical.  Other debuggers will not be able to cope with it.\cf1 
\par }
300
Scribble300
CC386 Compilation modes




Writing



FALSE
20
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\fi-2220\li2220\ri1480\tx2240\cf1\b\fs32 Compilation modes\cf0\b0\f1\fs20 
\par 
\par \b\fs22 +A\tab disable non-ansi extensions
\par 
\par \b0\f0\fs20\tab By default the compiler allows several extensions to ansi, to make coding easier.  If you want strict adherance to ansi, use this switch.  For example:
\par 
\par \cf1\tab CC386 +A myfunc.c
\par 
\par \cf0\tab will enable ANSI mode
\par 
\par \b\fs22 +9\tab C99 Compatibility
\par \b0\fs20 
\par \tab By default the compiler compiles for pre-99 standard.  If you want extended features available in the later C99 standard, use this switch.  For example:
\par 
\par \tab\cf1 CC386 /9 myfunc.c\cf0 
\par 
\par \tab Will enable C99 mode.\b\fs22 
\par }
310
Scribble310
CC386 Defining macros




Writing



FALSE
15
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\fi-2220\li2220\ri1460\tx2220\cf1\b\fs32 Defining 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -