Subversion Repositories pentevo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1186 savelij 1
.TH pbind 1
2
 
3
.SH NAME
4
.B pbind \- recombine output files generated by AS
5
 
6
.SH SYNTAX
7
.B pbind
8
[ option(s) ] <name(s)> [ further options/names ]
9
 
10
.SH DESCRIPTION
11
 
12
BIND is a tool to combine code files generated by the AS cross
13
assembler to a single file or to extract records out of a code file. 
14
.B pbind
15
is the Unix/C implementation of BIND.  BIND is 
16
.B not
17
a linker; AS does not generate linkable code!  
18
 
19
Arguments to BIND can be either file name specifications or
20
command line parameters; any argument starting with a plus(+), minus(-)
21
or slash(/) is recognized as a parameter; anything else is regarded as 
22
a 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 name
25
at all will result in an error message.  File names that do not have an
26
extension will be expanded with '.p', the standard extension for code
27
files.
28
 
29
The way BIND operates is to process source files in the order they are given
30
in the command line, reading record by record, and to write records that fit
31
into the given filtering criteria to the target file.  After all source files
32
have been processed, BIND will write a new creator entry to the target file.
33
 
34
.SH COMMAND-LINE PARAMETERS
35
 
36
If a command-line parameter starts with a slash(/) or minus sign(-), it
37
turns an option on; if a command-line parameter starts with a plus sign(+),
38
it turns a specific option off.  Numeric arguments to parameters can be
39
either written in decimal or hexadecimal notation.  For hexadecimal notation,
40
prefix the number with a dollar($) sign.
41
 
42
.B pbind
43
accepts the following command-line parameters:
44
.TP
45
.B -f <number>[,<further numbers>]
46
Add <number> to the list of record header IDs that allow a record from a source
47
file to be written to the target file.  A certain header ID marks code for a certain
48
target processor family; thus, this filter allows to distill code for a certain
49
processor out of a source file that contains code for different processor families.
50
Negation of this parameter removes certain header IDs from BIND's list.  See
51
the user manual of AS for a list of all possible header ID values.  If BIND's list
52
of header IDs is empty, no filtering will take place, i.e. all records from a source
53
file will make it into the target file.
54
.TP
55
.B -q or -quiet
56
 
57
Enable quiet operation mode, suppressing copyright and purely informative
58
messages.  Only errors will be displayed.
59
 
60
.SH PRESETTING PARAMETERS
61
 
62
Parameters need not neccessarily be given in the command line itself.  Before
63
processing of command line parameters starts, BIND will look if the
64
.B BINDCMD
65
environment variable is defined.  If it exists, its contents will be
66
treated as additional command line paramters whose syntax is absolutely 
67
equal to normal command line parameters.  As exception is made if the 
68
variable's contents start with a '@' sign; in such a case, the string after
69
the '@' sign is treated as the name of a file that contains the options.
70
Such a file (also called a 'key file') has the advantage that it allows
71
the options to be written in different lines, and it does not have a size
72
limit.  Some operating systems (like MS-DOS) do have a length limit on 
73
command lines and environment variable contents, so the key file may be
74
your only option if you have a lot of lengthy parameters for BIND.
75
 
76
.SH RETURN CODES
77
 
78
.B pbind
79
may return with the following codes:
80
.TP
81
.B 0
82
no errors.
83
.TP
84
.B 1
85
incorrect command line parameters.
86
.TP
87
.B 2
88
I/O-error.
89
.TP
90
.B 3
91
An input file had an incorrect format.
92
 
93
.SH EXAMPLES
94
 
95
To combine all records of 
96
.B src1.p
97
and
98
.B src2.p
99
into a single file
100
.B dest.p,
101
use:
102
.PP
103
.B pbind src1 src2 dest
104
.PP
105
To extract all records with MCS-51-code from a file
106
.B mixed.p,
107
use
108
.PP
109
.B pbind -f \e$31 mixed only51,
110
.PP
111
and the record will be written to a file
112
.B only51.p.
113
Notice that the dollar sign in this example had to be protected with a backslash
114
sign, as a UNIX shell uses the dollar character for expansion of variables.  This
115
would not have been necessary on an OS/2 or MS-DOS system (it would result in
116
an error).
117
 
118
.SH NATIONAL LANGUAGE SUPPORT
119
 
120
pbind supports national languages in the same way as AS.  See the manual
121
page for asl(1) for more information about this.
122
 
123
.SH TIPS
124
 
125
Calling BIND without any arguments will print a short help
126
listing all command line parameters.
127
 
128
.SH SEE ALSO
129
 
130
asl(1), plist(1), p2hex(1), p2bin(1)
131
 
132
.SH HISTORY
133
 
134
BIND originally appeared as an AS tool in 1992, written in
135
Borland-Pascal, and was ported to C and UNIX in 1997.
136
 
137
.SH BUGS
138
 
139
Command line interpreters of some operating systems reserve some 
140
characters for their own use, so it might be necessary to give
141
command line parameters with certain tricks (e.g., with the help
142
of escape characters).
143
 
144
BIND does not have so far an opportunity to filter records by
145
target segment.
146
 
147
.SH AUTHOR(S)
148
 
149
Alfred Arnold (alfred@ccac.rwth-aachen.de)
150