home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / new / amigalibdisks / disk933 / phxass / phxass.doc < prev    next >
Text File  |  1993-12-21  |  40KB  |  1,147 lines

  1. last change: 93-10-01
  2.  
  3.              ********************************
  4.              *                    *
  5.              *       P h x A s s      V 3.xx    *
  6.              *                    *
  7.              *        MC680x0/68851/6888x     *
  8.              *          Macro Assembler        *
  9.              *                    *
  10.              *      Written by Frank Wille    *
  11.              *                    *
  12.              ********************************
  13.  
  14.  
  15.  
  16. Preface
  17. =======
  18.  
  19. PhxAss V3.xx is SHAREWARE and © copyright 1993 by Frank Wille. Commercial
  20. usage of this program, without a written permission of the author, is strictly
  21. forbidden!
  22.  
  23. PhxAss V3.xx supports all instructions and addressing modes of the following
  24. Motorola processors:  68000,68010,68020,68030,68040,68851,68881,68882
  25. I have completely rewritten huge parts of the source-code, e.g. the whole
  26. addressing mode recognition and the specific code for all instructions.
  27. Because of new searching algorithms the assembling is 15-45% (!) faster as
  28. with version V2.x. On my 7 MHz 68010 A1000 I have measured nearly 25000
  29. lines per minute.
  30. This program is SHAREWARE. So if you like it, please send me 25 DM or 15$ to
  31. become a registered user. In return you will get the newest updates.
  32.  
  33.  
  34.  
  35. Modifications to PhxAss V2.xx
  36. =============================
  37.  
  38. Register symbols (EQUR) must be declared before they are used. This enables a
  39. faster addressing mode recognition.
  40.  
  41. There are some new optimizations possible. The optimize-flags which can be
  42. specified behind the -n option or after the OPT directive have completely
  43. changed (see "Assembler Options").
  44.  
  45. If you have enabled the small-code model, all jumps which are referencing
  46. external symbols are converted to PC-relative instead of long branch.
  47.  
  48. The '*'-symbol contains the current address. For example a 'bra *+10' would
  49. branch to the location 12 bytes behind the 'bra'-opcode.
  50.  
  51. New directives: FPU, PMMU, CODE_C, CODE_F, DATA_C, DATA_F, BSS_C, BSS_F and
  52. INCDIR.
  53.  
  54. Already mentioned above: The instructions and addressing modes of 68020-68040,
  55. 68851(PMMU) and 6888x(FPCP) are completely supported. You can use Motorola's
  56. new addressing mode style even in the 68000 mode (e.g MOVE (4,A5),D0 ).
  57.  
  58. The new addressing mode recognition has no difficulties with parentheses '()'
  59. instead of brackets '[]' to indicate a term. An operand like
  60.  
  61.  -([x|y]*z)+6([addr+2,A4,regxy*QSIZE],[outerdisp+$100<<(1+3)]),((abc-xyz)+2,A3)
  62.  
  63. would cause no problems.
  64.  
  65. PhxAss enables floating-point numbers to be used with the 6888x (FPCP)
  66. instructions. For example:     fmove.d  #3.1415926536,fp7
  67. moves the double-precision number pi to the FPCP register seven.
  68.  
  69. Note: Ensure that your LIBS: directory contains the 'mathieeedoubbas.library'.
  70.  
  71. Since V3.10 PhxAss is able to optimize forward-branches, which are coming
  72. into their 8/16-bit range by optimzation of the subsequent code. As a result,
  73. other forward-branches could come into range and are also optimized, and so
  74. on.
  75.  
  76. V3.30:
  77. o Symbols which are preceded by a '.' will be regarded as local symbols too.
  78. o A special version of PhxAss is available, which is not limited to the
  79.   maximum number of 65535 lines.
  80.  
  81. V3.40:
  82. o Macro parameters may contain 63 characters now.
  83. o The extended addressing mode recognition accepts the register symbols
  84.   ZD0-ZD7 and ZA0-ZA7 to specify a suppressed register.
  85. o Two new escape codes available:
  86.   \e = escape ($1b)  and  \c = control sequence introducer ($9b).
  87.  
  88. V3.42:
  89. o Float constants may be replaced by hex-constants now.
  90. o When branch-optimization is activated, no extension-checking takes place.
  91.   The best-possible code will be generated.
  92.  
  93. V3.47
  94. o New optimization-flag: 'I' forces PhxAss to ignore a 'Too large distance'
  95.   error.
  96.  
  97. V3.50
  98. o '@' is allowed to be the first character of a symbol name, providing the
  99.   second character is non-numeric.
  100. o The RORG directive is implemented.
  101. o Two Devpac-specific directives are also supported now:
  102.   RSRESET and RS.x for faster reading of (Devpac) include files.
  103. o The new option '-c' can be used to switch off the case-sensitivity.
  104.  
  105. V3.51
  106. o RSSET was forgotten in V3.50
  107. o New directives: IDNT, COMMENT, SUBTTL
  108.  
  109. V3.55
  110. o From now on near-data symbols can be accessed not only by Absolute Addressing
  111.   but also by Address Register Indirect mode ( (An) must be the correct near-
  112.   data base register). This will make the assembling of your source much
  113.   faster, because PhxAss has to do less optimizations. As a side effect XREFs
  114.   will be interpreted correctly and must not be replaced by NREFs.
  115. o If no unit name is given (by TTL or IDNT), PhxAss will use the name of the
  116.   source code without extension as the default unit name.
  117. o The OFFSET directive is supported.
  118.  
  119. V3.60
  120. o PhxAss V3.60 is pure! You can use the CLI-command RESIDENT to add it to the
  121.   resident list.
  122.  
  123.  
  124. Bug fixes since V2.11
  125. =====================
  126.  
  127. o Some instructions had generated a wrong error, e.g. TRAP and STOP generated
  128.   'Assembly aborted' instead of 'Out of range'.
  129. o 'move.l  #xxxx,-(a0)' produced an illegal opcode.
  130. o If someone writes a program without first opening a section with CODE/CSEG,
  131.   SECTION or an initial label, all labels got wrong values.
  132. o In some cases the equates file let PhxAss crash.
  133. o A XDEF for a symbol which was already declared in another section would
  134.   add this symbol to the external-hunk of the section currently active.
  135. o Jump to Branch optimization did not check the addressing mode of the
  136.   JMP/JSR instruction. It simply optimized all modes.
  137. o A long branch to the next instruction was incorrectly optimized to $6x00.
  138. o Bcc.B was not recognized as a short branch. PhxAss accepted only Bcc.S.
  139. o The CNOP directive had disabled all optimizing in its section.
  140. o The 'Word at odd address'-error crashed PhxAss sometimes.
  141. o INITNEAR was useless in the absolute mode.
  142.  
  143. Bug fixes since V3.00
  144. =====================
  145.  
  146. o TRACKDISK now really works.
  147. o The 68020 addressing-mode ([Rn]) was assembled with a wrong size in pass one.
  148. o The near-data range was incorrectly limited to 32k in object files.
  149. o The formatted text-output should also work on OS2.xx/3.xx now.
  150. o MOVE USP,An , MOVES and MOVEP produced incorrect code.
  151. o GLOBAL and BSS destroyed the MSW-bits of the BSS-hunk type ($000003eb).
  152. o CNOP definitely bug-free (I hope).
  153. o References on "\@"-labels behind another macro nesting were impossible.
  154. o "\@" only allowed 999 macro calls (now it's unlimited).
  155. o Some extended adressing modes had made some problems:
  156.   ([..],Rn.s|*x,od) and ([PC..    got a wrong size in pass one,
  157.   ([BaseDisp])    generated an error and    (bd,An/PC,Xn) (where bd is outside of
  158.   the normal 8-bit range) crashed PhxAss.
  159. o FETOXM1 was forgotten (in my Reference Manual too).
  160. o TAB-Codes within strings could not be expanded.
  161. o Include paths which are suffixed by a ':' (volume names) were not recognized.
  162. o FMOVEM.L Dn,FPcr got four bytes more in pass one than in pass two.
  163. o Starting with page 100 the listing file became unreadable.
  164. o The 'Out of memory' error was useless, because PhxAss crashed in most cases.
  165. o CPUSHL,CINVL,CPUSHP,CINVP didn't work.
  166. o BTST Dn,#x was missing.
  167. o The new formard-branch optimization destroyed the CNOP-alignments, which
  168.   are located between the branch-instruction and the branch-destination.
  169. o NARG was not zero for a macro call without arguments.
  170. o INCLUDE/INCBIN without quotes caused an error.
  171.  
  172.  
  173.  
  174. Starting PhxAss
  175. ===============
  176.  
  177. Start the assembler by entering the command line:
  178.  
  179.    PhxAss [<-options>] <filename> [<-options>]
  180.  
  181. where [<-options>] specify optional parameters and <filename> is the name of
  182. the file to be assembled. If no extension in <filename> is given, the assembler
  183. assumes ".asm" for being the extension. Some options cannot be specified before
  184. the file name (see "Assembler Options").
  185. <filename> must be the name of an assembler source code file. The source code
  186. must be an ASCII text file where each line ends with a linefeed ($0a) character
  187. (the format, which all Amiga editors generate). TAB-codes ($09) are allowed.
  188. When the assembler is running, it can be stopped at any time with CTRL-C.
  189.  
  190.  
  191.  
  192. Assembler Options
  193. =================
  194.  
  195. The following assembler options are supported by PhxAss V3.xx :
  196.  
  197. -o<filename>        Defines the name of the output file. If not specified,
  198.             PhxAss takes the source code's filename and replaces
  199.             its extension with ".o" .
  200.  
  201. -d            The