mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-05 23:58:40 +02:00
74 lines
1.8 KiB
Groff
74 lines
1.8 KiB
Groff
.TH bin2obj 1 "12 November 2004" "Free Pascal" "Binary to include file converter"
|
|
.SH NAME
|
|
bin2obj \- The Free Pascal binary to pascal include file converter.
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B bin2obj [-aeouUz] -c constname infile
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.B bin2obj
|
|
reads a binary file and converts it to a pascal typed constant declaration.
|
|
The constant is an array of bytes (zero based), in which each byte has the
|
|
value of the byte at the offset
|
|
.I index
|
|
in the file. (index is the index in the array).
|
|
|
|
.SH USAGE
|
|
|
|
.B bin2obj
|
|
accepts a filename of a binary file, and needs the name of a constant
|
|
(use the
|
|
.B \-c
|
|
option). The output goes to standard output by default. If no unitname is
|
|
given, the output will be in the form of code which can be written to an
|
|
include file.
|
|
|
|
.SH OPTIONS
|
|
bin2obj has a small number of options to control its behaviour:
|
|
|
|
.TP
|
|
.B \-a
|
|
Write ASCII data instead of bytes. The constant array will be an array of
|
|
char instead of an array of bytes. The bytes will be written as ASCII
|
|
constants.
|
|
.TP
|
|
.B \-e key
|
|
If this option is given, the data will be encrypted with
|
|
.I key
|
|
which is a string of 8 characters long.
|
|
.TP
|
|
.B \-h
|
|
emit a small helptext.
|
|
.TP
|
|
.B \-o filename
|
|
By default, the output goes to standard output (the screen). If this option is given,
|
|
.B bin2obj
|
|
will write the output to a file with name
|
|
.I filename
|
|
instead. This option is mandatory if the
|
|
.B \-U
|
|
option is specified.
|
|
.TP
|
|
.B \-u [unitname]
|
|
This option tells
|
|
.B bin2obj
|
|
to generate a unit. By default the output is just the declaration of the
|
|
constant. If the unitname is not specified,
|
|
.B bin2obj
|
|
tries to determine it from the input filename.
|
|
.TP
|
|
.B \-U [unitname]
|
|
The same as the
|
|
.B -u
|
|
option, only bin2obj will also call the compiler and compile the unit.
|
|
.TP
|
|
.B \-z
|
|
Compress the data before creating the unit. zlib compression is used.
|
|
|
|
.SH SEE ALSO
|
|
.IP
|
|
.BR ppc386 (1)
|
|
.BR data2inc (1)
|