home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / SASC6571.LZX / extras / dismem / READ.ME < prev    next >
Encoding:
Text File  |  1996-12-24  |  1.7 KB  |  55 lines

  1. DISMEM - disassemble absolute code
  2.  
  3. ===========================================================================
  4. The programs and documentation in this distribution are 
  5.  
  6.    Copyright (c) 1993, Doug Walker, Cary, NC, USA
  7.    All Rights Reserved
  8.  
  9. This software is freely redistributable on a non-profit basis.  Please
  10. contact the author for appropriate permissions if it is used in commercial
  11. products.
  12.  
  13. THIS SOFTWARE IS PROVIDED ON AN AS-IS BASIS.  USE IT AT YOUR OWN RISK.  The
  14. author will not be liable for any damages, direct or indirect, from the use
  15. of this software.
  16.  
  17. ===========================================================================
  18.  
  19. DISMEM is a utility that lets you get a disassembly of absolute hexadecimal
  20. data.  It uses the ASM and OMD utilities that come with SAS/C Version 6.
  21. It requires AmigaDOS 2.0 or higher.
  22.  
  23. DISMEM takes only a filename;  it disassembles the data in the file and
  24. puts the result in "filename.omd".
  25.  
  26. DISMEM can be used to disassemble data in an ABSLINK output file.  ABSLINK
  27. is provided in the directory SC:EXTRAS/ABSLINK.
  28.  
  29. The following algorithm is used:
  30.  
  31.    1. Open a temporary file.  Write an assemblable header to it, of the
  32.       form
  33.    
  34.          section text,code
  35.    
  36.    2. For each longword of data in the input file, write a statement to
  37.       the temporary file of the form
  38.       
  39.          dc.l $<value>
  40.        
  41.  
  42.    3. Write an END statement, of the form
  43.    
  44.          END
  45.  
  46.    4. Invoke SC:C/ASM on the temporary file
  47.  
  48.    5. Invoke SC:C/OMD on the resulting object file
  49.  
  50. OK, it's pretty hokey, but it gets the job done.  A decent REXX programmer
  51. probably could have done it in REXX, but it only took me 15 minutes to
  52. write and debug in C.
  53.  
  54. --Doug
  55.