Blame | Last modification | View Log | Download | RSS feed
.TH pbind 1.SH NAME.B pbind \- recombine output files generated by AS.SH SYNTAX.B pbind[ option(s) ] <name(s)> [ further options/names ].SH DESCRIPTIONBIND is a tool to combine code files generated by the AS crossassembler to a single file or to extract records out of a code file..B pbindis the Unix/C implementation of BIND. BIND is.B nota linker; AS does not generate linkable code!Arguments to BIND can be either file name specifications orcommand line parameters; any argument starting with a plus(+), minus(-)or slash(/) is recognized as a parameter; anything else is regarded asa file name. BIND always regards the last name as the target file's namespecification; all other files are regarded as source files. A targetname and no source will yield an empty target file, whereas no file nameat all will result in an error message. File names that do not have anextension will be expanded with '.p', the standard extension for codefiles.The way BIND operates is to process source files in the order they are givenin the command line, reading record by record, and to write records that fitinto the given filtering criteria to the target file. After all source fileshave been processed, BIND will write a new creator entry to the target file..SH COMMAND-LINE PARAMETERSIf a command-line parameter starts with a slash(/) or minus sign(-), itturns an option on; if a command-line parameter starts with a plus sign(+),it turns a specific option off. Numeric arguments to parameters can beeither written in decimal or hexadecimal notation. For hexadecimal notation,prefix the number with a dollar($) sign..B pbindaccepts the following command-line parameters:.TP.B -f <number>[,<further numbers>]Add <number> to the list of record header IDs that allow a record from a sourcefile to be written to the target file. A certain header ID marks code for a certaintarget processor family; thus, this filter allows to distill code for a certainprocessor out of a source file that contains code for different processor families.Negation of this parameter removes certain header IDs from BIND's list. Seethe user manual of AS for a list of all possible header ID values. If BIND's listof header IDs is empty, no filtering will take place, i.e. all records from a sourcefile will make it into the target file..TP.B -q or -quietEnable quiet operation mode, suppressing copyright and purely informativemessages. Only errors will be displayed..SH PRESETTING PARAMETERSParameters need not neccessarily be given in the command line itself. Beforeprocessing of command line parameters starts, BIND will look if the.B BINDCMDenvironment variable is defined. If it exists, its contents will betreated as additional command line paramters whose syntax is absolutelyequal to normal command line parameters. As exception is made if thevariable's contents start with a '@' sign; in such a case, the string afterthe '@' sign is treated as the name of a file that contains the options.Such a file (also called a 'key file') has the advantage that it allowsthe options to be written in different lines, and it does not have a sizelimit. Some operating systems (like MS-DOS) do have a length limit oncommand lines and environment variable contents, so the key file may beyour only option if you have a lot of lengthy parameters for BIND..SH RETURN CODES.B pbindmay return with the following codes:.TP.B 0no errors..TP.B 1incorrect command line parameters..TP.B 2I/O-error..TP.B 3An input file had an incorrect format..SH EXAMPLESTo combine all records of.B src1.pand.B src2.pinto a single file.B dest.p,use:.PP.B pbind src1 src2 dest.PPTo extract all records with MCS-51-code from a file.B mixed.p,use.PP.B pbind -f \e$31 mixed only51,.PPand the record will be written to a file.B only51.p.Notice that the dollar sign in this example had to be protected with a backslashsign, as a UNIX shell uses the dollar character for expansion of variables. Thiswould not have been necessary on an OS/2 or MS-DOS system (it would result inan error)..SH NATIONAL LANGUAGE SUPPORTpbind supports national languages in the same way as AS. See the manualpage for asl(1) for more information about this..SH TIPSCalling BIND without any arguments will print a short helplisting all command line parameters..SH SEE ALSOasl(1), plist(1), p2hex(1), p2bin(1).SH HISTORYBIND originally appeared as an AS tool in 1992, written inBorland-Pascal, and was ported to C and UNIX in 1997..SH BUGSCommand line interpreters of some operating systems reserve somecharacters for their own use, so it might be necessary to givecommand line parameters with certain tricks (e.g., with the helpof escape characters).BIND does not have so far an opportunity to filter records bytarget segment..SH AUTHOR(S)Alfred Arnold (alfred@ccac.rwth-aachen.de)