home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
612b.lha
/
DCconvert_v1.1
/
DCconvert.DOC.pp
/
DCconvert.DOC
Wrap
Text File
|
1992-03-01
|
4KB
|
79 lines
=====================================
DCconvert 1.1 - (C) 1992 Arthur Hagen
-------------------------------------
Yet another Binary->Assemby converter
-------------------------------------
Freely Distributable FreeWare
=====================================
Freely Distributable FreeWare:
This means that this program cannot be sold for a profit (even a 5¢
profit), but must be distributed at no charge at all. (Companies sel-
ling PD should keep their hands off this product.) Anyone may freely
use this program to whatever purpose they want, but the author resumes
no responsibilities of the consequences thereof.
Yes, there already is an abundance of programs converting binary
files to assembly source, so why use DCconvert? Well, it has some
interesting features... Read on.
History: I had to convert an excellent protracker music module (by
Bjørn A. Lynne) from binary to assembly (since my Aztec assembler lacks
the "incbin" function), and tried the two I had. Both functioned well,
but one of them just made "dc.b" statements, thus making an assembly
file well over 900k big (too big for a floppy), while the other didn't
have a fixed number of bytes on each line, so I couldn't easily ref-
erence let's say byte 2048. So I made my own program, just for the
purpose...
DCconvert converts any binary file on the Amiga to a 68000 assembly
dump file. Each line will contain 16 bytes worth of data (except at
the very end of the file), and will be as "compressed" as possible
(unless the user has specified otherwise on the command line). This
means that DCconvert will make a file about 10-20% smaller than what
most other Binary->Assembly converters do, and the file is still easily
referenced (multiply the linenumber with 16 to get the byte offset).
Of course there are some drawbacks...
DCconvert will under normal operations run quite slow. Unless the
option FAST is specified on the command line. Then it runs FAST.
DCconvert could make code that your assembler chokes on. It substi-
tutes dcb-statements wherever possible, and inserts ascii strings in
dc.b lines wherever possible. That is why there are two keywords
called NODCB and NOASCII, which will turn off dcb.n statements and
ascii strings (and speed up the operation marginally).
Usage:
DCconvert infile [outfile[.asm]] [NODCB] [NOASCII] [QUIET] [FAST]
DCconvert must be run from the CLI/Shell. It takes the first
argument as the name of the binary file to read (infile). If a second
parameter is given, that will be used as the name of the resulting
assembly file (outfile). If the name of the outfile does not contain
any dot-postfix (like .asm, .i, .s etc.), .asm will be prepended. If
the outfile parameter is omitted, the name of the infile with .asm
prepended will be used. Several switches may be specified after the
file name(s). Here is a brief description of each:
NODCB - By default DCconvert will make "dcb.l" type statements
wherever possible. This switch disables dcb.n statements.
NOASCII - By default DCconvert will make ascii strings of the type
'string' wherever possible. This switch disables ascii strings.
QUIET - DCconvert will by default give you a progress report on-
screen as the file is converted. By specifying QUIET, no output is
given (unless an error has occured). It is better to specify QUIET
than to use "DCconvert >NIL:" because QUIET disables all percentile
calculations as well, thus making the program run a bit faster.
FAST - DCconvert is dead slow when running in standard mode. FAST
mode will speed up things radically, but no optimiwhatevers are per-
formed, and the resulting file will be larger than without specifying
the FAST parameter. In FAST mode, all hex numbers will be in upper
case with leading zeroes, so if your assembler has problems with the
"normal" output, try using FAST mode.
All switches can be used in combination, although FAST will automa-
tically disable DCB and ASCII.
Enjoy,
*Art