==============================
Filename: Mit2Mot2Mit/README
Autor: Rolf Spalink
==============================



* PURPOSE:
----------

The directory "mit2mot" contains a program to convert Mit-Assembler
files to Motorola-Assembler. If you have questions or problems
with this program, contact:

   rolf@cs.tu-berlin.de       (this is me)





The directory "mot2mit" contains a program to convert Motola-Assembler
files to Mit-Assmbler files. There is no support for this program,
because the author is not intersted in this program anymore.





* MACHINES:
------------

mit2mot(1) have been tested with following systems:

   SunOS 5.x.x
   Sun3 and Sun4, SunOS 4.x.x
   DECstation 5100, Ultrix 4.2
   i486, Linux 1.0






* USAGE for mit2mot(1):
------------------------

USAGE:                                                                         
  mit2mot [-c]                              converts standard input to         
                                            standard output                    
  mit2mot [-c] <filename.s>                 converts `filename.s' and sends the
                                            result to standard output.         
  mit2mot [-c] -a <filename.s>              converts `filename.s'              
                                            to `filename.asm'                  
  mit2mot [-c] <input-file> <output-file>   converts `input-file' to           
                                            to `output-file'                   
  mit2mot -h                                prints usage text                  
                                                                               
OPTIONS:                                                                       
  The option -c changes the syntax for immediate addresses                     
  in the output (prints `-2(a0)' instead of `(-2,a0)'.                         
  The option -h prints a usage text.                                           





* EXMAPLE for mit2mot(1):
-------------------------

Converting something "by hand".

  $ cd mit2mot                  enter the director mit2mot
  $ make                        translate everything
  $ cd test                     enter the test directory
  $ ../mit2mot mit2mot.main.s   test the program
  $

Converting something automatically with a makefile

  $ cd mit2mot/test
  $ make clean
  /bin/rm *.asm
  $ make
  ../mit2mot -a bitfield.s
  mit2mot: converting bitfield.s to bitfield.asm.
  mit2mot: ERRORS <stderr>: 0
  ../mit2mot -a mit2mot.main.s
  mit2mot: converting mit2mot.main.s to mit2mot.main.asm.
  mit2mot: ERRORS <stderr>: 0
  ../mit2mot -a problem.s
  mit2mot: converting problem.s to problem.asm.
  mit2mot: ERRORS <stderr>: 0
  $





* FAQ's for mit2mot(1):
-----------------------


Q: Can't ".stabs" directives be converted by mit2mot(1)

R: .stabs-, .stabn-, .stabd-directives generate symbol table entries.
   These directives are very useful, if one wants to use a source
   level debugger like gdb(1) and the "-g" option of the gcc(1).
   The problem is: I have no idea how to convert ".stabs" correctly,
   but I suppose Motorloa Assembler simply does not support directives
   for symbol table entries.
   If someone knows how to support the conversion .stabs-, .stabn- and
   .stabd directives I could try to make this part of a next release
   of mit2mot(1).

Q: Would'nt it be easy to ignore ".stabs-" directives?

R: This is relativly easy to implement, but it probaly doesn't
   make sense. Ignoring these directive could confuse
   users. Someone might want to debbug his programm with a source level
   debugger and uses the "-g" option. If this would not result in an
   error message, it would be hard to find out the reason why the
   debbuger does not find symbol table entries. Simply
   ignoring the directives for symbol table entries would
   rather be a bug than a feature.
   Anyway, if one really need these directives to be ignored, egrep(1)
   can be used. Example for Unix-Systems:

        egrep -v '^[ 	]*\.stab' input.s  |  mit2mot

   Note: "[ 	]" contains a tab. The quotes ("'") are quotes of a
   (Unix-) Bourne Shell.





* RELEASE-HISTORY for mit2mot(1):
---------------------------------

Version 1.0

First Version, written 1991




Version 1.1, written 1994

Changes:
o  The programs mit2mot(1) and mot2mit(1) were devided into
   seperate directories
o  ported mit2mot(1) to SunOS 5.x.x
o  added this README and mit2mot/COPYRIGTH
o  ported mit2mot(1) to DECstation 51000 by reimplementing the
   functions log2(3) and strdup(3).



Version 1.2, written July 21st, 1994

Changes:
o  Translated text to english (I hope there are not to many mistakes)
o  Support of the conversion of instructions like
     "bfextu d1{#28:#1},d0"
o  better error messages




