-

Changes

Jump to: navigation, search

Operating Details

13 bytes added, 10:00, 26 July 2017
m
no edit summary
-O_�O_�U_�T_�F_�I_�L_�E
:Specify a name for the executable file to be created. By default the name for the executable file is derived from the name of the first source or object file specified to the compiler. This option allows the default to be overridden. If no dot ('.') appears in the given file name, an extension appropriate for the particular operating system will be added, e.g. -O_�F_�R_�E_�D will generate a file _�F_�R_�E_�D._�E_�X_�E on MS-DOS or _�F_�R_�E_�D._�C_�M_�D on CP/M-86.
:For cross compilers this also provides a means for specifying the output format, e.g. specifying an output file _�P_�R_�O_�G._�B_�I_�N will make the compiler generate a binary file, while specifying _�P_�R_�O_�G._�H_�E_�X will make it generate a hexadecimal file.
-V
:This option, for the Z80 only, will cause the compiler to produce an executable program that will, on execution, self-relocate itself to the top of the TPA (Transient Program Area). This allows the writing of programs which may execute other programs under themselves. Note that a program compiled in such a manner will not automatically reset the bdos address at location 6 in order to protect itself. This must be done by the program itself.
:For cross compilers this provides a way of specifying to the linker the addresses that the compiled program is to be linked at. The format of the option is -A_�R_�O_�M_�A_�D_�R,_�R_�A_�M_�A_�D_�R,_�R_�A_�M_�S_�I_�Z_�E. _�R_�O_�M_�A_�D_�R is the address of the ROM in the system, and is where the executable code and initialized data will be placed. _�R_�A_�M_�A_�D_�R is the startaddress of RAM, and is where the bss psect will be placed, i.e. uninitialized data. _�R_�A_�M_�S_�I_�Z_�E is the size of RAM available to the program, and is used to set the top of the stack.
:For the 6801/6301/68HC11 compiler, the -A option takes a fourth value which is the address of a four byte direct page area called ctemp which the compiled code uses as a scratch pad. If the ctemp address is omitted from the -A option, it defaults to address 0. Normally this will be acceptable, however some 6801 variants (like the 6303) have memory mapped I/O ports at address 0 and start their direct page RAM at address $80.
:For the large memory model of the 8051 compiler, the -A option takes the form -A
:�R_�O_�M_�A_�D_�R,_�I_�N_�T_�R_�A_�M,_�E_�X_�T_�R_�A_�M,_�E_�X_�T_�S_�I_�Z_�E. _�R_�O_�M_�A_�D_�R is the address of ROM in the system. _�I_�N_�T_�R_�A_�M is the start address of internal RAM, and is where the rbss psect will be placed. The 8051 internal stack will start after the end of the rbss psect. _�E_�X_�T_�R_�A_�M is the start address of external RAM, and is where the bss psect will be placed. _�E_�X_�T_�S_�I_�Z_�E is the size of external RAM available to the program, and is used to set the top of the external stack.
-6301
:For the 6801/HC11 compiler, this option will request generation of instructions specific to the 6301/6303 processors.
:Some examples of the use of the C command are:
c prog.c
:Upper and lower case has been used in the above examples for emphasis: the compiler does not distinguish between cases, although arguments specifying names, e.g. -D, are inherently case sensitive.
:Taking the above examples in order; the first compiles and links the C source file prog.c with the standard C library. The second example will compile the file prog.c and link it with the object file x.obj and the library libx.lib; a link map will be written to the file link.map.
:The third example compiles the file prog.c, leaving the assembler output in a file prog.as. It does not assemble this file or invoke the linker. The next example compiles both prog.c and prog2.c, invoking the optimizer on both files, but does not perform any linking. A cross reference listing will be left in the file _�p_�r_�o_�g._�c_�r_�f.
:The last example pertains to the 8086 version of the compiler, It runs the compiler with the verbose option, and will cause anfile.c to be compiled without optimization to object code, yielding anfile.obj, then afile.obj and anfile.obj will be linked together with the floating point library (from the -LF option) and the standard library to yield the executable program xfile.exe (assuming this is performed on an MS-DOS system). One would expect this program to use floating point, if it did not then the -LF option would have been required.
:If more than one C or assembler source file is given to the C command, the name of each file will be printed on the console as it is processed. If any fatal errors occur during the compilation or assembly of source files, further source files will be processed, but the linker will not be invoked.
:Other commands which may be issued by the user, rather than automatically by the C command, are:
ZAS
:In general, these commands accept the same type of command line as the C command, i.e. zero or more options (indicated by a leading '-') followed by one or more file arguments. If the linker or the librarian is invoked with no arguments, it wll prompt for a command line. This allows command lines of more than 128 bytes to be entered. Input may also be taken from a file by using the redirection capablities (see _getargs() in the library function listing).
 
See the discussion above of the C command. These commands are described in further detail in their respective manuals.

Navigation menu