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
Text File  |  1992-03-01  |  4KB  |  79 lines

  1.  
  2.                  =====================================
  3.                  DCconvert 1.1 - (C) 1992 Arthur Hagen
  4.                  -------------------------------------
  5.                  Yet another Binary->Assemby converter
  6.                  -------------------------------------
  7.                      Freely Distributable FreeWare
  8.                  =====================================
  9.  
  10.  
  11.   Freely Distributable FreeWare:
  12.   This means that this program cannot be sold for a profit (even a 5¢
  13. profit), but must be distributed at no charge at all.  (Companies sel-
  14. ling PD should keep their hands off this product.)  Anyone may freely
  15. use this program to whatever purpose they want, but the author resumes
  16. no responsibilities of the consequences thereof.
  17.  
  18.   Yes, there already is an abundance of programs converting binary
  19. files to assembly source, so why use DCconvert?  Well, it has some
  20. interesting features...   Read on.
  21.  
  22.   History:  I had to convert an excellent protracker music module (by
  23. Bjørn A. Lynne) from binary to assembly (since my Aztec assembler lacks
  24. the "incbin" function), and tried the two I had.  Both functioned well,
  25. but one of them just made "dc.b" statements, thus making an assembly
  26. file well over 900k big (too big for a floppy), while the other didn't
  27. have a fixed number of bytes on each line, so I couldn't easily ref-
  28. erence let's say byte 2048.  So I made my own program, just for the
  29. purpose...
  30.  
  31.   DCconvert converts any binary file on the Amiga to a 68000 assembly
  32. dump file.  Each line will contain 16 bytes worth of data (except at
  33. the very end of the file), and will be as "compressed" as possible
  34. (unless the user has specified otherwise on the command line).  This
  35. means that DCconvert will make a file about 10-20% smaller than what
  36. most other Binary->Assembly converters do, and the file is still easily
  37. referenced (multiply the linenumber with 16 to get the byte offset).
  38.   Of course there are some drawbacks...
  39.   DCconvert will under normal operations run quite slow.  Unless the
  40. option FAST is specified on the command line.  Then it runs FAST.
  41.   DCconvert could make code that your assembler chokes on.  It substi-
  42. tutes dcb-statements wherever possible, and inserts ascii strings in
  43. dc.b lines wherever possible.  That is why there are two keywords
  44. called NODCB and NOASCII, which will turn off dcb.n statements and
  45. ascii strings (and speed up the operation marginally).
  46.  
  47.   Usage:
  48.  
  49.   DCconvert infile [outfile[.asm]] [NODCB] [NOASCII] [QUIET] [FAST]
  50.  
  51.   DCconvert must be run from the CLI/Shell.  It takes the first
  52. argument as the name of the binary file to read (infile).  If a second
  53. parameter is given, that will be used as the name of the resulting
  54. assembly file (outfile).  If the name of the outfile does not contain
  55. any dot-postfix (like .asm, .i, .s etc.), .asm will be prepended.  If
  56. the outfile parameter is omitted, the name of the infile with .asm
  57. prepended will be used.  Several switches may be specified after the
  58. file name(s).  Here is a brief description of each:
  59.   NODCB - By default DCconvert will make "dcb.l" type statements
  60. wherever possible.  This switch disables dcb.n statements.
  61.   NOASCII - By default DCconvert will make ascii strings of the type
  62. 'string' wherever possible.  This switch disables ascii strings.
  63.   QUIET - DCconvert will by default give you a progress report on-
  64. screen as the file is converted.  By specifying QUIET, no output is
  65. given (unless an error has occured).  It is better to specify QUIET
  66. than to use "DCconvert >NIL:" because QUIET disables all percentile
  67. calculations as well, thus making the program run a bit faster.
  68.   FAST - DCconvert is dead slow when running in standard mode.  FAST
  69. mode will speed up things radically, but no optimiwhatevers are per-
  70. formed, and the resulting file will be larger than without specifying
  71. the FAST parameter.  In FAST mode, all hex numbers will be in upper
  72. case with leading zeroes, so if your assembler has problems with the
  73. "normal" output, try using FAST mode.
  74.   All switches can be used in combination, although FAST will automa-
  75. tically disable DCB and ASCII.
  76.  
  77. Enjoy,
  78. *Art
  79.