-

Changes

Jump to: navigation, search

LIBRARIES PUBLIC DOCUMENT BTM

19 bytes removed, 18:01, 19 August 2017
m
no edit summary
I tried to choose short but at the same time clear names for the BTMs. a2b.BTM means "convert an 'a' type file into a 'b' type file", where a and b are: C (C source file), A (assembler source file), X (COM executable file), O (object file) and L (library file, in this case the meaning is not "convert to" but "insert into"). aL.BTM means "perform the operation 'a' on the library", where a is L (list file), X (extract file), D (delete file) or E (relocate file at the end of the library). EDH.BTM means "Edit .H file".
:If you don't like these names you can rename the BTMs as you want. The only one you can't modify is COMUN.BTM, which is directly referred in the other BTMs (if you change its name, search for "comun.btm" string in all the BTMs and replace it by the new name).
:A detailed description of each BTM follows:
:The source file will be searched in the specified path (the current directory if no path is specified), and the target file will be generated in the current directory. If no extension is given, .C is assumed.
;:The libraries scanned for the link process will be LIBC.LIB, the ones specified in the HICDEFL variable as explained in the previous section, and the ones specified as -LXXX (for LIBXXX.LIB) as a part of [options for
C.COM].
;O2X
:This BTM links an object file with the appropriate libraries, generating a .COM executable file. Its syntax is:
O2X [path]file[.ext] [options for LINK.COM]
:The source file will be searched in the specified path (the current directory if no path is specified), and the target file will be generated in the current directory. If no extension is given, .O is assumed.
:The libraries scanned for the link process will be LIBC.LIB, the ones specified in the HICDEFL variable as explained in the previous section, and the ones specified as -LXXX (for LIBXXX.LIB) as a part of [options for LINK.COM].
:Examples: see the ones for C2X, assuming now that the specified file is TEST.O
C2O [path]file[.ext] [options for C.COM]
;:The source file will be searched in the specified path (the current directory if no path is specified), and the target file will be generated in the current directory. If no extension is given, .C is assumed.
:Example:
;A2O
:This BTM assembles an assembler source file, returning an object file. Its syntax is:
A2O [path]file[.ext] [options for C.COM]
;C2L
:This BTM compiles a C source file but does not link it; an object file is generated and inserted into the appropriate library file. Its syntax is:
C2L [path]file[.ext] [library]
O2L [path]file[.ext] [library]
:The object file will be searched in the specified path (the current directory if no path is specified). If no extension is given, .O is assumed.
:Meaning of [library] and examples: see C2L.BTM description.
;VL
:This BTM scans a library file searching for an object file, prompts its name if it is found, and optionally shows all the symbols defined and used in the found file. Its syntax is:
VL [@]file[.ext] [library]
VL [@]* [librer¡a]
:The library specification is done explicity or via HICLIB variable, in the same way as for C2L.BTM
:The specified file is searched into the library file (if no extension is given, .O is assumed). If found, simply its name is prompted; if not found, nothing is prompted. If "@" is added as a prefix to the file name, all the symbols defined and used in the specified file are shown, besides of its name, if it is found.
:If "@" is specified instead of a file name, a list of all the object files contained in the library is shown. "@*" shows all the symbols for all the files.
:Examples:
VL file[.ext] [library]
:The library specification is done explicity or via HICLIB variable, in the same way as for C2L.BTM. If no extension is given, .O is assumed.
:Examples:
:This BTM is only useful for editing header files without having to change to Hitech-C directory nor specify the complete file path in the TED command line. Since the Hitech-C directory is actually the current directory while TED is being executed, you can load any other header file by just typing its name in the disk menu. When exiting TED, the previous directory is restored.
:If you want to use any other text editor instead of TED, search for the string "ted" into EDH.BTM file, and change it by the name of your text editor.
:Example:
*If after aborting a BTM the command interprete does not accept any command, execute ELSE.
*If after aborting a BTM you see that you are placed in the Hitech-C directory, you can return to your original directory by simply executing POPD (you may have to execute it twice).
*If during the BTM execution you obtain "Too many parameters" messages, execute ENDIFF a few times or go BASIC and return DOS, before executing it again.
*After aborting a BTM program execution, execute COMUN without parameters (or any other BTM file without parameters) in order to clear residual temporary variables.

Navigation menu