1pbind(1) General Commands Manual pbind(1)
2
3
4
6 pbind - recombine output files generated by AS
7
8
10 pbind [ option(s) ] <name(s)> [ further options/names ]
11
12
14 BIND is a tool to combine code files generated by the AS cross assem‐
15 bler to a single file or to extract records out of a code file. pbind
16 is the Unix/C implementation of BIND. BIND is not a linker; AS does
17 not generate linkable code!
18
19 Arguments to BIND can be either file name specifications or command
20 line parameters; any argument starting with a plus(+), minus(-) or
21 slash(/) is recognized as a parameter; anything else is regarded as a
22 file name. BIND always regards the last name as the target file's name
23 specification; all other files are regarded as source files. A target
24 name and no source will yield an empty target file, whereas no file
25 name at all will result in an error message. File names that do not
26 have an extension will be expanded with '.p', the standard extension
27 for code files.
28
29 The way BIND operates is to process source files in the order they are
30 given in the command line, reading record by record, and to write
31 records that fit into the given filtering criteria to the target file.
32 After all source files have been processed, BIND will write a new cre‐
33 ator entry to the target file.
34
35
37 If a command-line parameter starts with a slash(/) or minus sign(-), it
38 turns an option on; if a command-line parameter starts with a plus
39 sign(+), it turns a specific option off. Numeric arguments to parame‐
40 ters can be either written in decimal or hexadecimal notation. For
41 hexadecimal notation, prefix the number with a dollar($) sign.
42
43 pbind accepts the following command-line parameters:
44
45 -f <number>[,<further numbers>]
46 Add <number> to the list of record header IDs that allow a
47 record from a source file to be written to the target file. A
48 certain header ID marks code for a certain target processor fam‐
49 ily; thus, this filter allows to distill code for a certain pro‐
50 cessor out of a source file that contains code for different
51 processor families. Negation of this parameter removes certain
52 header IDs from BIND's list. See the user manual of AS for a
53 list of all possible header ID values. If BIND's list of header
54 IDs is empty, no filtering will take place, i.e. all records
55 from a source file will make it into the target file.
56
57
59 Parameters need not neccessarily be given in the command line itself.
60 Before processing of command line parameters starts, BIND will look if
61 the BINDCMD environment variable is defined. If it exists, its con‐
62 tents will be treated as additional command line paramters whose syntax
63 is absolutely equal to normal command line parameters. As exception is
64 made if the variable's contents start with a '@' sign; in such a case,
65 the string after the '@' sign is treated as the name of a file that
66 contains the options. Such a file (also called a 'key file') has the
67 advantage that it allows the options to be written in different lines,
68 and it does not have a size limit. Some operating systems (like MS-
69 DOS) do have a length limit on command lines and environment variable
70 contents, so the key file may be your only option if you have a lot of
71 lengthy parameters for BIND.
72
73
75 pbind may return with the following codes:
76
77 0 no errors.
78
79 1 incorrect command line parameters.
80
81 2 I/O-error.
82
83 3 An input file had an incorrect format.
84
85
87 To combine all records of src1.p and src2.p into a single file dest.p,
88 use:
89
90 pbind src1 src2 dest
91
92 To extract all records with MCS-51-code from a file mixed.p, use
93
94 pbind -f \$31 mixed only51,
95
96 and the record will be written to a file only51.p. Notice that the
97 dollar sign in this example had to be protected with a backslash sign,
98 as a UNIX shell uses the dollar character for expansion of variables.
99 This would not have been necessary on an OS/2 or MS-DOS system (it
100 would result in an error).
101
102
104 pbind supports national languages in the same way as AS. See the man‐
105 ual page for asl(1) for more information about this.
106
107
109 Calling BIND without any arguments will print a short help listing all
110 command line parameters.
111
112
114 asl(1), plist(1), p2hex(1), p2bin(1)
115
116
118 BIND originally appeared as an AS tool in 1992, written in Borland-Pas‐
119 cal, and was ported to C and UNIX in 1997.
120
121
123 Command line interpreters of some operating systems reserve some char‐
124 acters for their own use, so it might be necessary to give command line
125 parameters with certain tricks (e.g., with the help of escape charac‐
126 ters).
127
128 BIND does not have so far an opportunity to filter records by target
129 segment.
130
131
133 Alfred Arnold (alfred@ccac.rwth-aachen.de)
134
135
136
137
138 pbind(1)