home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 013.lha / Asm68k.doc < prev    next >
Text File  |  1986-11-10  |  50KB  |  1,310 lines

  1.  
  2.  
  3.  
  4.             Asm68k    68000 Macro Assembler
  5.                 Version 1.0.1
  6.                     Docs
  7.  
  8.                   Date:  20-Jan-87
  9.  
  10. ===============================================================================
  11.  
  12. IMPORTANT:    This is the second beta release of this program. Correct
  13.         object has been verified for correct source, and appears to
  14.         operate well. Please send any bug reports to me promptly,
  15.         either through MMS [(919) 779-6674] or Deep Thought,
  16.         [(919) 471-6436], Compuserve [73277,260], the Mail or at my
  17.         home address. Your help is greatly appreciated.
  18.  
  19. ===============================================================================
  20.  
  21.                 NOTICE:
  22.  
  23.        THIS FILE AND THE PROGRAM IT DESCRIBES ARE COPYRIGHT © 1987,
  24.     W. WESLEY HOWE. ALL RIGHTS RESERVED. A LICENSE FOR USE AND
  25.     DISTRIBUTION WITHOUT PROFIT IS GRANTED TO POSSESSOR OF THIS FILE,
  26.     PROVIDED DISTRIBUTION INCLUDES THE PROGRAM AND THIS FILE. NO
  27.     RIGHT OF ALTERATION OF THE PROGRAM OR DOCUMENTATION IS CONVEYED
  28.     WITH THIS LICENSE.
  29.  
  30.        NO WARRANTY IS EXPRESSED OR IMPLIED HEREIN ON THE SUITABILITY
  31.     OF THIS PROGRAM FOR ANY PURPOSE AT ALL. YOU MUST RELY ON YOUR OWN
  32.     JUDGEMENT AS TO WHETHER THIS PROGRAM WILL OPERATE PROPERLY WITH
  33.     YOUR COMPUTER FOR WHATEVER PURPOSE YOU MAY DESIRE TO USE IT FOR.
  34.  
  35.        ADDRESS ALL QUESTIONS, COMMENTS OR CRITICISM TO:
  36.  
  37.                 W. WESLEY HOWE
  38.                    4800 LAKEMONT DR.
  39.                   RALEIGH,  NC  27609
  40.  
  41.  
  42. =============================================================================
  43.  
  44.                 LIMITS:
  45.  
  46.     Source-line length:        255 bytes (including newline)
  47.     Sub-expression length:         40 bytes
  48.     Parenthesis nesting:         16 levels
  49.     Symbol length:             31 bytes
  50.     Macro Size:          8,190 bytes
  51.     Number of Macros:            Available RAM
  52.     Number of Symbols:            Available RAM
  53.     Available RAM:        270,336 bytes maximum heap utilized
  54.     Macro Nesting:              8 levels
  55.     Include Nesting:          8 levels
  56.     Conditional Nesting:         16 levels
  57.     Macro Parameters:         10 per invocation
  58.     Sections:            255 maximum
  59.     Program size:         91,364 bytes (loaded)
  60.     Minimum free heap:     26,796 bytes
  61.     Total RAM necessary:    118,160 bytes
  62.     Constant size:            255 bytes
  63.     Storage size:         65,535 bytes
  64.     Strings:            255 bytes (or line length limit)
  65.     Minimum stack:          8,192 (recommended)
  66.     Operating System:     V. 1.2 Workbench (CLI Only ) (Release)
  67.  
  68. ==============================================================================
  69.  
  70.    If you are an experienced 68000 Assembly language programmer, you will find
  71. much of this material useful in understanding assembly language programming
  72. on the AMIGA. If you are an experienced AMIGA assembly language programmer,
  73. you may find much of the material boring, and will only want to use this as
  74. a reference document. If you don't know assembly language, then this document
  75. will not teach it, so you may need to buy (What? spend MONEY?) one of a number
  76. of reference books on MC68000 assembly language programming that are available.
  77.  
  78.    In the following sections, Directives, Commands, Expressions and
  79. Mnemonics are referred to. A Directive or Command is an instruction to
  80. the assembler which causes a specific action to be performed. Some of these
  81. add data to the object file, and some only affect the way assembly operations
  82. are performed. A Mnemonic is the Pseudo-English abbreviation for an in-
  83. struction the assembler is to translate into the appropriate numeric sequence
  84. and include in the object file for the MC68000 processor to perform later,
  85. when your program is run. An expression refers to any sequence of items
  86. consisting of numbers, symbols with a numerical value, and the allowable math
  87. operators which can be reduced to a single number value.
  88.  
  89. ==============================================================================
  90.  
  91.             Math & Logic Operators:
  92.  
  93.      +    Addition
  94.  
  95.      -    Subtraction or Negation
  96.  
  97.      ~    Bit-wise NOT
  98.  
  99.     <<    Bit-wise left shift
  100.  
  101.     >>    Bit-wise right shift
  102.  
  103.      &    Bit-wise AND
  104.  
  105.      |    Bit-wise OR
  106.      !    Bit-wise OR  (for compatability)
  107.  
  108.      ^    Bit-wise XOR (Exclusive OR)
  109.  
  110.      /    Integer Division
  111.  
  112.     %%    Integer Modulo (Remainder)
  113.  
  114.      *    Integer Multiplication or
  115.         Current Program Counter Location
  116.  
  117.  
  118.    Like the Rotomola assembler, all expressions evaluate in strict Left-to-
  119. Right order, as divided by parentheses. The Unary operators '-' and '~' need
  120. to be offset from any adjacent operators with parentheses. Symbols and
  121. constants may be mixed, and space or tab characters may be included. No
  122. individual portion of the expression may exceed 40 characters (NOTE: a
  123. 'portion' would be any symbol or number alone.)
  124.  
  125. Some examples:        4+(7*2)            Yields  56
  126.             4 + ( 7 * 2 )        Yields  56
  127.             4+7*2            Yields  22
  128.             -4*6            Yields -24
  129.             6*-4            Error
  130.             4(6*7)            Error
  131.             ('A'+1)            Yields  66
  132.             "A" + 1            Yields 194
  133.             'ASDF'+0        Error
  134.  
  135. ===============================================================================
  136.  
  137.             Numbers and Constants:
  138.  
  139.     Binary:        A binary number is either [1] prefixed with the '%'
  140.             (percent) character, or [2] followed immediately with
  141.             the letter 'B' (UPPER or lower case). It may contain
  142.             only the digits '1' or '0'.
  143.  
  144.     Octal:        An octal number is either [1] prefixed with the '@'
  145.             (at) character, or [2] followed immediately with either
  146.             the letter 'O' or the letter 'Q', in either case.
  147.             Only the digits '0' through '7' are valid.
  148.  
  149.     Decimal:    A decimal number contains only the digits '0' through
  150.             '9', and may be optionally followed immediately with
  151.             the letter 'D' (either case.)
  152.  
  153.     Hexa-Decimal:    HexaDecimal numbers contain the digits '0' through '9',
  154.             and the letters 'A' through 'F' (in either UPPER or
  155.             lower case.) They may be [1] prefixed with the '$'
  156.             (Dollar) character, or [2] they must start with a digit
  157.             and be followed immediately with either the letter 'Q'
  158.             or the letter 'X', in either UPPER or lower case. A
  159.             leading '0' may be prefixed for the post-fix form.
  160.  
  161.    Leading zeros do not affect the value of any of the number forms, although
  162. the 40 character limit applies to them also.
  163.  
  164.     Characters:    An INDIVIDUAL ascii character may be included by
  165.             enclosing it in QUOTES. The single quote will yield
  166.             the ascii value, and the double quote will yield the
  167.             ascii value with bit 7 SET (or'd with 128). Multiple
  168.             byte constants are not evaluated in this version.
  169.  
  170. Some Examples:    The number 1,000 (one thousand) may be represented
  171.         any one of the following ways:
  172.  
  173.         1111101000B    01111101000b    %1111101000
  174.         1750Q        01750o        @1750
  175.         1000D        0001000d    1000
  176.         3e8H        03E8h        $3e8
  177.  
  178. ==============================================================================
  179.  
  180.             Assembly Line Format:
  181.  
  182.    An input assembly line follows the following models:
  183.  
  184. Label    Mnemonic    Operand , MoreOperands ;comment
  185.  Label:    Mnemonic    Operand            Comment
  186.     Mnemonic    Operand
  187. Label:    Mnemonic
  188. * a comment only
  189.  
  190.    Note that the LABEL either starts in the first column, or is followed by
  191. a colon. The Mnemonic field is separated by at least one space or tab, and
  192. never starts in the first column. Operands, where needed, follow, separated
  193. from the Mnemonic by at least one space or tab. Multiple operands are
  194. separated from each other by a comma (the comma flags the assembler that
  195. there is another operand available.) An asterisk in the first position on the
  196. line indicates a comment only line, or comments may follow complete operands
  197. with a space or semicolon separator. Assembler directives occupy the Mnemonic
  198. position, and comments are optional. Labels are allowed on all lines, and are
  199. required for some assembler directives.
  200.  
  201. ==============================================================================
  202.  
  203.                 Constants:
  204.  
  205.    The following Assembler directives cause the inclusion of data in the
  206. Object file:
  207.  
  208.     DB    Yields 8-bit values. Either STRINGS, Symbols, Labels, numbers
  209.         or expressions may be evaluated. Multiple operands need to be
  210.         separated by commas, and generate successive bytes up to
  211.         a limit of 255 bytes (the line-length limit should prevent
  212.         this from ever being reached.)
  213.  
  214.     DW    Yields 16-bit values, in Hi-Lo order. The format is the same
  215.         as the DB directive, except STRINGS will not be evaluated.
  216.         If the address is not a word address, a pad byte will be
  217.         appended to the previous line, and a non-fatal error message
  218.         will be issued.
  219.  
  220.     DL    Yields 32-Bit values. Otherwise equivalent to DW.
  221.  
  222.     DC    This directive is the same as DW. Appending .L or .B (in
  223.         either case) will change the function to be the same as
  224.         DL or DB, respectively.
  225.  
  226.     ASCII    This command yields a sequence of bytes equivalent to the
  227.         ascii value of the operands (delimited by quotes) provided.
  228.         Single quotes will yield the normal value, and double quotes
  229.         will yield values with bit 7 SET. Within the delimited
  230.         STRING, a '\' (backslash) character, followed by up to three
  231.         decimal digits will cause inclusion of a byte with the same
  232.         numerical value, or if followed by any other character will
  233.         allow the inclusion of that character immediately following.
  234.         (This is useful for including quotes and backslashes in the
  235.         string.) A limit of 255 values applies.
  236.  
  237.     CSTRING    This command is the same as ASCII, except an additional byte
  238.         with the value 0 is appended (as in the C language.)
  239.  
  240.     PSTRING    This is the same as ASCII also, except a leading byte with
  241.         a value equal to the number of bytes following is prepended
  242.         (as used in the PASCAL language).
  243.  
  244.     ISTRING This variant of ASCII will cause the final character to have
  245.         it's most significant bit of the opposite (INVERTED) value
  246.         from the rest of the characters in the string (as defined by
  247.         the delimiting quotes). This form is popular among 8-bit
  248.         machines, and some BASIC interpreters. It's usefulness with
  249.         the new international 8-bit standard ASCII is questionable,
  250.         but it may be helpful, so it hasbeen included anyway.
  251.  
  252.     DCB    This command accepts the .B .W and .L size specifiers (or
  253.         defaults to WORD.) It generates as many values as the operand
  254.         expression evaluates to (up to 255 bytes total), of the size
  255.         specified. WORD and LONG sizes are forced to an even address
  256.         alignment.
  257.  
  258. ==============================================================================
  259.  
  260.             Symbol and Labels:
  261.  
  262.    A Label is an address designator. It is placed before a mnemonic or a
  263. data location, and acquires a value equal to the relative program counter
  264. value at that location. A standard Label may only be defined this way once
  265. in a program, but may be referenced as many times as needed. It must start
  266. with a letter, a period or the '_' (underscore) character, and may contain
  267. only these characters, or the digits '0' through '9', without spaces up to
  268. a total of 31 characters. When you define a label, it must appear as the
  269. very first item on a line, or you must append a ':' (colon) character to it.
  270. (You may have the colon in the first case also.) You must not use the colon
  271. on the label other than when you define it, or you may get an erroneous
  272. interpretation of your expression.
  273.  
  274.    A Symbol starts off looking like a label, and follows the same rules, except
  275. the following commands modify it to acquire a new type and value:
  276.  
  277.     EQUATE    Sets a permanent, absolute value equal to the value of the
  278.         expression following this directive. STRING values are not
  279.         allowed.
  280.  
  281.     SETVAL    Sets an absolute value which is retained until a new value is
  282.         set. You may not later use EQUATE on this label, but you can
  283.         EQUATE a different label to the set value.
  284.  
  285.     EQUR    Gives a value to the symbol which may later be used in place
  286.         of a standard data or address register. This is valid only
  287.         for D0-D7 or A0-A7 (SP is a synonym for A7). You cannot use
  288.         this value other than to reference a register in a MC68000
  289.         mnemonic.
  290.  
  291.     REG    Accepts a register-list operand for use with the MOVEM
  292.         mnemonic. A register-list looks like this:
  293.  
  294.             A2-A7/D1/D3-D7
  295.  
  296.         Which defines the registers A2 through A7, D1 and D3 through
  297.         D7. In fact, all the registers except A0, A1, D0 and D2. Only
  298.         the standard address and data registers may be defined in this
  299.         fashion.
  300.  
  301.     MACRO    Assigns a sequence of input lines, with replacable parameters,
  302.         which will later be substituted for any line which uses this
  303.         symbol as a mnemonic or command. More on Macros later.
  304.  
  305.     These Directives must have a Label in the Label Field for assignment.
  306.  
  307.    You must avoid referencing a symbol before giving it a value, or the 
  308. assembler will complain (sometimes), because the forward reference will make
  309. it type the symbol as a label, which is an address, not a number. Labels, of
  310. course, may be referenced before use, and it's value will be substituted on
  311. the second pass. In fact, this is the only reason you need a two-pass
  312. assembler.
  313.  
  314. =============================================================================
  315.  
  316.             Local (Numeric) Labels:
  317.  
  318.    A line may be labeled with a special Local Label which attaches itself to
  319. a specific offset from the last proper line label, as previously described.
  320. A Local Label is a sequence of up to three decimal digits followed by the
  321. '$' (Dollar) character. Like a regular Label, if it does not start at the
  322. beginning of the line, it must be followed by a colon.
  323.  
  324.    A Local Label may be referenced in an operand anywhere a line Label would,
  325. but it's scope is only between one regular Label and the next. Each time a
  326. new regular Label is used, the Local Label may then be redefined and reused
  327. with a different value.
  328.  
  329.    An example:
  330.  
  331. Start    Jsr    Initialize_Data
  332. 001$    Jsr    Initialize_Serial
  333.     Move.b    D1,ChangeFlag
  334.     Cmp.b    #0ffh,D1
  335.     Bne    1$
  336.  
  337.    Note that 001$ and 1$ will evaluate to the same location. You need not
  338. start with one and may use any numbers you desire, as long as their value
  339. does not exceed 999. Also, note that $1 and 1$ are interpreted differently;
  340. the first is an absolute expression, and the second is a relative address.
  341. Local Labels may not be used for Macro names, although they may be used
  342. within Macros, and cannot be used to represent Numbers, EXTERNal or ENTRY
  343. types.
  344.  
  345. ==============================================================================
  346.  
  347.            Conditional Assembly Directives:
  348.  
  349.    The following Commands allow assembly to proceed until a matching ENDIF
  350. Directive is found, or disable assembly until the ENDIF is reached if the
  351. condition is not met:
  352.  
  353.     IFEQ    Expression EQuals zero. (e.g. 4-4)
  354.     IFGE    Expression Greater than or Equal to zero. (e.g. 4-4 or 4-3)
  355.     IFGT    Expression Greater Than zero. (e.g. 4-3)
  356.     IFLE    Expression Less than or Equal to zero. (e.g. 4-4 or 4-5)
  357.     IFLT    Expression Less Than zero. (e.g. 4-5)
  358.     IFNE    Expression is Not Equal to zero. (e.g. 4-5 or 4-3)
  359.  
  360.    The above conditionals are evaluated to 32 bits, but the condition decision
  361. is based on their WORD (16-bit) value.
  362.  
  363.     IFD    Label following was already Defined (not just referenced.)
  364.     IFND    Label following has Not yet been Defined.
  365.  
  366.     IFC    Both STRINGS following Compare (same length and characters.)
  367.     IFNC    Both STRINGS do Not Compare (different length or characters.)
  368.  
  369.    The last two conditional commands need two operands, separated by a comma.
  370. They may be delimited with Quotes (single or double), or by a left bracket
  371. '<' and right bracket '>' pair, or the first string will start at the first
  372. character which is not a space or a tab, and end at the first occurrence of a
  373. comma or space or tab, and the second will start at the next character which
  374. is not a comma or a space or a tab and will end at the first space, tab, semi-
  375. colon or newline character. To enclose spaces in the string, you must use
  376. either the quote or bracket delimiters. To enclose quotes, use the brackets,
  377. and to enclose brackets, use the quotes. Both quotes and brackets cannot be
  378. passed together unless you use the spaces, but then you can't have spaces in
  379. the string. Just shows to go you, everything is a compromise. Any backslash
  380. characters are not expanded before comparison.
  381.  
  382.    Each Conditional command DO level ends with an ENDIF command. DO levels
  383. nest only to 16 levels, or a fatal error will be generated (whether the
  384. assembly is on or off, each IFxx increases the level count, and each ENDIF
  385. decreases the count; exceeding 16 or going below zero are fatal errors.) DO
  386. levels are not active during a macro definition, but will be evaluated during
  387. a macro expansion.
  388.  
  389. ==============================================================================
  390.  
  391.             Other Assembler Directives:
  392.  
  393.     RESERVE    Creates an uninitialized data storage area, with a size equal
  394.         to the expression following it. The size designators .B .W and
  395.         .L (any case) may be used, or WORD is assumed. The expression
  396.         following the Directive is expanded to the size specifier.
  397.         This is the only Directive which is not limited in size to 255
  398.         bytes for the result, but may yield up to 65,535 bytes.
  399.  
  400.     ENDSRC    Shuts off assembly for the current DO level. (See the section
  401.         on conditional assembly for DO level explanation.) If you
  402.         are not in a DO level, the source is read to the end of
  403.         file, but no assembly action will occur.
  404.  
  405.     OPTION    This command accepts the following operands only:
  406.  
  407.              M - Allows macro call lines to print in the
  408.                  assembly listing. (If List is on.) This
  409.                  is the default condition.
  410.  
  411.             NM - Hides macro call lines, showing expansion
  412.                  lines only.
  413.  
  414.              L - Turns on listing. (The default condition).
  415.  
  416.             NL - Shuts off Listing.
  417.  
  418.         (Neither of these commands override the command-line
  419.         switches directly, they only control the flow of data.
  420.         An assembly will still create a list file if not prohibited,
  421.         Option NL will just make it an empty file. If the list
  422.         file was disabled on the command line, Option L will
  423.         not send the listing anywhere. None of the operands are
  424.         case-sensitive.)
  425.  
  426.     TITLE    Accepts a STRING (delimited by quotes) which will label all
  427.         pages, if paging is not disabled. The Maximum title length
  428.         is 40 characters. Also cause pages to be numbered.
  429.  
  430.     ORIGIN    Sets the program counter to the value of the expression
  431.         following the command. Origin remains relative on AMIGA
  432.         output format.
  433.  
  434.     PAGEUP    Causes a page to end if paging is not disabled. A form-feed
  435.         character is sent, and a page heading with the optional
  436.         title (see TITLE) is printed.
  437.  
  438.     SECTION    this command causes a new section, or Hunk, to be created
  439.         in the AMIGA output format. The first operand must be a
  440.         name containing no spaces and having less than 40 total
  441.         characters. The second operand, if given, should be
  442.         separated by a comma and should be either CODE, DATA or
  443.         BSS. If none is given, CODE is assumed. (only the first
  444.         character is checked, however, so DUMMY will yield a
  445.         DATA section definition.) Case is not significant on the
  446.         section type, but case is important for the name. If the
  447.         section name has been used before, assembly will proceed
  448.         at the next location as was previously defined, and the
  449.         resultant code, data or storage space will be coalesced into
  450.         one Hunk. See the AmigaDOS manual for more information
  451.         on Hunks.
  452.  
  453.     IDENTIFY   This command should be followed with a name, which will
  454.         be given to the program unit (a program unit is a hunk or a
  455.         collection of hunks to be fed to the linker.) Only the first
  456.         name given will be used, subsequent uses are ignored. If the
  457.         IDENTIFY command is not used during an assembly, the object
  458.         file will be given a name that has 0 characters in it. (Null
  459.         string.)
  460.  
  461.     EXTERN    Followed by one or more Labels or symbols (separated by commas.)
  462.         These labels must not be defined within the  entire assembly
  463.         source, and cause the assembler to generate the appropriate
  464.         external reference instructions in the object file (AMIGA
  465.         format only) for resolution by the linker.
  466.  
  467.     ENTRY    Followed by one or more Labels or Symbols. These labels, which
  468.         need to be defined somewhere, allow locations within the
  469.         program unit to be visible to the linker to resolve other
  470.         program unit EXTERNal references. A program that consists of
  471.         more than one object file will need to have an ENTRY in one
  472.         unit for every EXTERN in the other units, or the program will
  473.         'BOMB' and probably either lock-up the machine or cause the
  474.         dreaded GURU to appear. References between different sections
  475.         must be to ENTRY labels, since the AMIGA loader will place
  476.         each section wherever it will fit, and resolve all these
  477.         different addresses. If you never use the section command,
  478.         the entire program will have to fit in the same place, and
  479.         might not be able to be loaded if there is not a spot big
  480.         enough for the whole thing (depending on how many tasks might
  481.         also be running, etc.)
  482.  
  483.     EXECUTE    This command will pass the quote delimited string following
  484.         it to AmigaDOS during the second pass. The current window
  485.         is the input and output. A more detailed description of the
  486.         Execute routine is located in the AmigaDOS manual, but
  487.         basically the same things you can do from the CLI may be
  488.         contained within the string and executed from within the
  489.         assembler. The Source, Object and any open Include files
  490.         will be locked, and cannot be accessed at this time. No
  491.         use is made of the return value from the program called.
  492.         This is your hook, let me have some ideas for any uses
  493.         for it (hint: the Macro functions allow some very powerful
  494.         uses, and any valid AmigaDOS device may be used for Source,
  495.         Include and Object file-handles.)
  496.  
  497.     CNOP    This Directive causes null filler bytes to be inserted
  498.         into the object file until the desired alignment is
  499.         reached. There should be two values after the Directive,
  500.         separated a comma. The second value given is the desired
  501.         alignment value you want, and the first value is how
  502.         many more to add beyond this point. There may not be more
  503.         than 255 bytes generated in total to acheive the desired
  504.         alignment, and no restrictions are imposed on what alignment
  505.         values can be used. If you want to set the Program Counter
  506.         5 bytes beyond the next PC location evenly divisible
  507.         by 7 use the command like this:
  508.  
  509.             CNOP    5,7
  510.  
  511.         The predominant reason for using this command would be to
  512.         align data at specific offsets, and to create data structures
  513.         in specific formats.
  514.  
  515. ===============================================================================
  516.  
  517.             Include Files:
  518.  
  519.    Up to 8 levels of include files may be inserted into the assembly with the
  520. INCLUDE Directive. The syntax demands a Filename or Path, delimited by quotes.
  521. Include file directory searches are supported by command-line parameters (De-
  522. tailed in another section.) Include files may be called by Macros, and Macros
  523. may be used by Include files, up to their respective nesting levels (8 each.)
  524. The INCLUDE directive will cause the next source line to be read from the
  525. named file as if the entire contents appeared in the original source file,
  526. except line numbering will start at one again, and the line number will be
  527. followed by a '+' (plus) sign. When the end of the Include file is reached,
  528. the line number will revert to the one following the line which invoked the
  529. INCLUDE Command.
  530.  
  531.    Special provisions have been made to allow automatic and command-line
  532. inclusion of header and/or macro definition files before assembly starts,
  533. and these files do not count in the nesting level limits for Include files.
  534. A later section will describe command-line parameters and the configuration
  535. file.
  536.  
  537. A SPECIAL NOTE: Several of the existing include files from Commodore do not
  538.         Assemble correctly (particularly those in the exec directory.)
  539.         Many of the source lines in these files contain comments
  540.         which are delimited only by spaces and an asterisk. Asm68k
  541.         is not restrictive about spaces within an expression, and
  542.         tries to assemble the asterisk as a multiplication operator
  543.         with the words in the comment being looked at as labels, and
  544.         gives appropriate error messages. Make sure the comments are
  545.         stripped or delimited by a semi-colon (as per the MOTOROLA
  546.         spec.) A few of the files contain Macro error checks using
  547.         an IFC \1,'' which will not assemble correctly with Asm68k.
  548.         Use IFEQ NARG instead. the FUNCDEF file contains an expression
  549.         4*-6, which will not be interpreted correctly as written.
  550.         Change this one to 4*(-6). These changes will make both
  551.         assemblers happy, and the include files more portable between
  552.         applications.
  553.  
  554. ===============================================================================
  555.  
  556.              Macros:    
  557.  
  558.    The best feature of the assembler, and the hardest one to master, is the
  559. use of the MACRO command. A Macro is simply a sequence of source lines which
  560. may be saved and inserted as often as wanted just by using the name you gave
  561. it as a command. A Macro may contain any of the other Directives and Mnemonics
  562. the assembler recognizes except another MACRO definition command, although
  563. you may use the name of a defined Macro in your Macro (up to 8 levels deep.)
  564.  
  565.    A Macro is defined (and it must be before being used) by placing the
  566. MACRO in the Mnemonic Field, either before or after it's name. The name for
  567. the Macro must follow the rules for Labels if it is on the left side, or if
  568. it is on the right side it needs to be separated by at least one space or
  569. tab from the MACRO Directive, and follow all the Label rules except it does
  570. not need to be followed by a colon. All the subsequent lines up to the one
  571. which contains the ENDMAC command will be saved for subsequent use.
  572.  
  573.    The real power of Macros comes from their use with replacable parameters.
  574. When you issue a Macro name as a Command, up to ten parameters (numbered
  575. from one to nine, with zero for ten) may be included in a comma, space or
  576. bracket separated list after the name for use within the Macro text. To make
  577. these parameters appear in the Macro expansion, place a '\' (backslash)
  578. character followed immediately (no spaces) with the digit of the parameter you
  579. want in the definition. When the macro is expanded, the text will include the
  580. parameter placed on the calling line, and will be evaluated just as if the
  581. source had included it as it appears. The parameters are gathered under the
  582. same rules as the IFC and IFNC commands (bracket, quote or space delimiters.)
  583.  
  584.    The backslash character may be passed to the Macro by including two
  585. backslashes in the calling line, and any non-numeric character following
  586. a backslash other than a backslash will pass both the backslash and the
  587. character following it to the Macro.
  588.  
  589.    Conditional Directives are effective within the Macro, under the same rules
  590. as they follow elsewhere. If assembly is enabled, and the Directive MEXIT is
  591. encountered, expansion of the Macro is suspended, and the next source line
  592. will be the one following the Macro invocation line, after the assembler has
  593. examined the remaining Macro text and resolved all the IFxx and ENDIF levels.
  594.  
  595.    To make Macros respond differently with different numbers of passed para-
  596. meters, the special symbol NARG (not case-sensitive) has been reserved. It will
  597. yield a value equal to the number of parameters found on the invocation line
  598. within a Macro expansion, and zero elsewhere.
  599.  
  600.    One additional feature within Macros is the \@ (backslash followed by the
  601. at character). While the Macro is being expanded, this combination is changed
  602. to a period followed by three decimal digits. These digits increment starting
  603. from zero every other time the \@ combination is expanded. This allows pairs
  604. of unique symbol names to be generated within the Macro text, allowing branch
  605. instructions to occur. Local (numeric) Labels are effective within the Macro,
  606. but they do not attach to the Macro name, nor are they canceled by the Macro
  607. invocation (unless the invocation line was labeled.)
  608.  
  609. ==============================================================================
  610.  
  611.             Do Nothing Directives:
  612.  
  613.    The following directives are accepted by the assembler, but cause no action
  614. and generate no code, just as if they were comments. They have been included
  615. to allow use of source code written for other assemblers.
  616.  
  617.     MASK2        FORMAT        SPC        
  618.     NOL        OFFSET
  619.  
  620.  
  621.             Synonym Directives:
  622.  
  623.    The directives in the left column are substitute names for the directives
  624. in the right column, and were included for source compatability:
  625.  
  626.         DS        RESERVE
  627.  
  628.         END        ENDSRC
  629.  
  630.         EQU        EQUATE
  631.  
  632.         SET        SETVAL
  633.  
  634.         TTL        TITLE
  635.  
  636.         ENDC        ENDIF
  637.  
  638.         ENDM        ENDMAC
  639.  
  640.         RORG        ORIGIN
  641.  
  642.         XDEF        EXTERN
  643.  
  644.         XREF        ENTRY
  645.  
  646.         RORIGIN        ORIGIN
  647.  
  648. ===============================================================================
  649.  
  650.             Unimplemented Directives:
  651.  
  652.    The following Directives, found in some other assemblers, have not been
  653. implemented in this version:
  654.  
  655.     IDNT        FAIL        LIST
  656.     LLEN        PAGE        PLEN
  657.     NOOBJ        NOLIST        NOPAGE
  658.  
  659.    A startup Macro file has been included with this package to allow some
  660. compatability if these are needed.
  661.  
  662. ===============================================================================
  663.  
  664.             Startup Configuration:
  665.  
  666.    If a file named Asm68k.cnf is found in the current directory, it is read
  667. and acted on. The current version only looks for two items in this file,
  668. the pagelength (which must be greater than 11) and the name of the startup
  669. file. The format is:
  670.  
  671.     Page Length:    1 byte (11-255), binary
  672.     File Path:    up to 31 bytes, ascii
  673.     Terminator:    1 byte, binary, value 0
  674.  
  675.    Any remaining characters after the null byte are ignored. The assembler
  676. next looks for the filename or path given, and if this file is found, it
  677. is read and assembled as if it was the beginning of the Source file. All
  678. lines from this file are numbered 0, and no warning or error occurs if the
  679. file is not found (unless, of course, you were depending on these definitions
  680. in your program, then you could have lots of error messages.)
  681.  
  682.    Beware when building this file that the null character must be at the end of
  683. the pathname or you may crash the system. You can create a file from the
  684. keyboard using the command:
  685.  
  686.         COPY con: to Asm68k.cnf
  687.  
  688. then typing a character for the pagelength (B is 66, the standard), following
  689. it with the pathname for the startup file, followed with a control@ (CTRL key
  690. and 2 key together), then ending it with a control\ (CTRL and \ keys together.)
  691. If you make a mistake, you cannot edit the file, so do the control\ and start
  692. over.
  693.  
  694. ===============================================================================
  695.  
  696.             Invoking the Assembler:
  697.  
  698.    The assembler is only designed to be run from the CLI interface. If you
  699. don't know how to find the CLI interface, read the manuals that came with
  700. the machine before trying to use this program.
  701.  
  702.    The minimum invocation must be the program name Asm68k followed with a
  703. source filename (separated by at least one space from the program name.)
  704. This will yield an assembly, with an object file output in the AMIGA format,
  705. and a listing file. The filenames for these files will be created by
  706. stripping any extension (period followed by characters) from the source
  707. filename and appending .o for the object filename and .lst for the listing
  708. filename. Any error messages will list to the screen.
  709.  
  710.    Example:
  711.  
  712.         Asm68k MyProgram.a
  713.  
  714.    Outputs:
  715.  
  716.         MyProgram.o    (The relocatable binary object file)
  717.         MyProgram.lst    (A combined source and hex object file)
  718.  
  719.    If this isn't what you want, a wide variety of "switches" are supported
  720. to control the usage of the assembler, and the descriptions follow:
  721.  
  722.    (A switch is a parameter you type after the program name and source
  723. filename, with an intervening space. These switches all start with the
  724. minus sign '-' and may be followed immediately by a letter or letters as
  725. shown below.)
  726.  
  727.     -O    Causes the OBJECT file to be generated (this is a default
  728.         value.) It may be followed immediately with a filename
  729.         containing no spaces, or type a space and then enclose the
  730.         filename in double quotes if it contains spaces. You may also
  731.         use the intervening space without quotes on a filename without
  732.         spaces if you like. A given object filename will be used
  733.         instead of the default filename normally used.
  734.  
  735.     -L    Causes the LISTING file to be generated (also a default.) The
  736.         usage is just like the -O switch.
  737.  
  738.     -E    Causes ERROR messages to list to the named file. Use like
  739.         above. On this switch, if no filename is given, a default
  740.         filename will be formed like the object and listing names,
  741.         using the extension .err
  742.  
  743.     -V    VERIFICATION file. Another name for the -E switch.
  744.  
  745.     -H    HEADER file. Causes a search for the filename given after the
  746.         switch (as above) which will be read as a source file before
  747.         the source file is read (but after the initialization file, if
  748.         enabled.) Just like the initialization file, if the file is not
  749.         found, no warning or error is issued directly. All the source
  750.         from this file will also be numbered as line 0.
  751.  
  752.     -I    An INCLUDE directory search path list should follow this switch
  753.         and should contain directory names (no spaces allowed) separated
  754.         from each other with plus signs '+', commas or spaces. If
  755.         spaces are used, then you must space the list off from the
  756.         switch and enclose the entire list in double quotes. Use of
  757.         this switch will cause the assembler to search for an INCLUDE
  758.         file in each of the named directories if it is not found in
  759.         the current one.
  760.  
  761.     -X    This switch should be followed immediately with up to 6
  762.         characters, and will cause the default object filename to be
  763.         formed by stripping the extension and appending a period and
  764.         the characters following the X.
  765.  
  766.     -C    This switch has been included for compatability. It should
  767.         be followed with only the following characters, as many as
  768.         wanted, with no spaces:
  769.  
  770.             S    Generates a symbol table at the end of the
  771.                 list file (this is a default value.)
  772.  
  773.             D    Does nothing.
  774.  
  775.             C    Causes Case of all Labels and symbols to
  776.                 be ignored. With this switch activated,
  777.                 LABEL, Label and label will all be interpreted
  778.                 as the same name. This is not the default.
  779.  
  780.             X    Does nothing.
  781.  
  782.     -N    This switch turns things off (NO.) Like -C, you should follow
  783.         it with a series of letters from the following list, without
  784.         any spaces:
  785.  
  786.             S    Turns off the SYMBOL table normally produced
  787.                 at the end of the listing file.
  788.  
  789.             L    Stops the LISTING file from being generated.
  790.  
  791.             E    Inhibits the ERROR file, if you turned it on.
  792.  
  793.             V    A synonym for the E switch above.
  794.  
  795.             P    Inhibits the PAGINATION of the listing file.
  796.  
  797.             O    Inhibits the OBJECT file generation.
  798.  
  799.             Q    Inhibits the conversion of mnemonics to QUICK
  800.                 form. The default is to convert allowable
  801.                 values of ADD and SUB to the quick form if it
  802.                 is safe (values already defined.)
  803.  
  804.             X    Keeps the assembler from stripping the eXten-
  805.                 sion from the source filename when forming
  806.                 default filenames.
  807.  
  808.             R    Causes the assembler to generate the object
  809.                 code in a non-RELATIVE format. The format
  810.                 used is the Intel format, and the program
  811.                 counter is only output to 16-bits of
  812.                 significance. No symbol or relocation infor-
  813.                 mation is output, and no linker or loader
  814.                 is available to operate on this format.
  815.  
  816.     >    The right bracket, followed immediately with a filename, will
  817.         cause the signon, progress and all error messages to be
  818.         diverted by AmigaDOS to the named file when it is the first
  819.         parameter after the program name. If it is not the first,
  820.         the assembler will send the error messages to the named file.
  821.  
  822.    All the above switches may be used in either UPPER or lower case, and will
  823. generate the same results. The source filename should be the first parameter
  824. after the program name, but only to avoid confusion. It must be the only
  825. parameter not associated with a switch, and may not be given twice. The source
  826. filename is the only mandantory command-line parameter.
  827.  
  828. ==============================================================================
  829.  
  830.             Other notes on use:
  831.  
  832.    Case is normally significant on Symbols, Labels and Macro names unless the
  833. -CC switch is used. The Directives, Mnemonics and special symbols will be
  834. recognized in any mixture of UPPER and lower case.
  835.  
  836.    The only truly reserved symbols are the following:
  837.  
  838.         NARG    MACRO    ENDMAC    ENDM    A0
  839.         A1    A2    A3    A4    A5
  840.         A6    A7    D0    D1    D2
  841.         D3    D4    D5    D6    D7
  842.         SP    CCR    USP    SR    PC
  843.  
  844.    All the other special Symbols, Mnemonics and Directive names  may be defined
  845. and used as Labels, or may be implemented as Macros, but be careful when doing
  846. this to avoid circular references, which will not be detected until the Macro
  847. nesting level is exceeded, or a write error results from the disk being full.
  848.  
  849.    For example, if you redefine JSR as a Macro, and want to use it in the
  850. Macro definition, don't call the assembler with the -CC switch, and be sure
  851. to use a different case within the Macro text to get the assembler to recog-
  852. nize the Mnemonic, which is case-insensitive, from the Macro name. This allows
  853. the maximum flexibility for the assembler, with only a minimum of care from
  854. the programmer.
  855.  
  856. ==============================================================================
  857.  
  858.             Error Messages:
  859.  
  860.    The assembler uses as much logic as possible to generate a line of code
  861. in spite of erroneous input. If a reliable evaluation can be made, a source
  862. line will be interpreted regardless of errors, however some of these lines
  863. may not be what you meant. Even the little bit of DWIM in this assembler
  864. occupies a lot of code space. Because assembly of erroneous lines is attempted
  865. where possible, you may find multiple error messages referring to the same
  866. line. The listing file will only contain the first error detected, however the
  867. screen list or error file will also list the errors in the order they were
  868. detected. Some errors may generate errors later, especially if typing errors
  869. cause the assembler to find an item it thinks is an undefined symbol in an
  870. expression, and you later used this symbol for another purpose. The following
  871. is a list of error messages, and explanations:
  872.  
  873.       1: Error in Expression Value
  874.  
  875.         The expression being evaluated contained some garbage.
  876.  
  877.       2: Duplicate Line Label
  878.  
  879.         An attempt at defining a Label twice was detected.
  880.  
  881.       3: Undefined Label in Expression
  882.  
  883.         The symbol or label used in the expression was not defined
  884.         anywhere in the source file.
  885.  
  886.       4: Syntax Error
  887.  
  888.         The assembler could make no sense of what you were trying to
  889.         tell it to do.
  890.  
  891.       5: Operand Too Large
  892.  
  893.         The operand was greater than the value allowed for the
  894.         operation being performed.
  895.  
  896.       6: Invalid Register Specified
  897.  
  898.         The register called for in the current operation and what
  899.         was found are not compatable.
  900.  
  901.       7: Undefined Mnemonic or Command
  902.  
  903.         An item in the Mnemonic field is not a defined Macro or
  904.         valid mnemonic or directive. May also be caused by using
  905.         a label outside of column one without a colon following it.
  906.  
  907.       8: Improper use of Unary Operator
  908.  
  909.         A Unary operator ('-' or '~') was found right after another
  910.         math operator. The expression evaluator cannot handle this,
  911.         so it is ignored and this message is output.
  912.  
  913.       9: Operation Involves Division by Zero
  914.         
  915.         A Division or Modulo operation was attempted where the right
  916.         hand value was zero or undefined. The result of this operation
  917.         is set to zero.
  918.  
  919.      10: Too Many Right Parentheses
  920.  
  921.         More right parentheses were found than left parentheses.
  922.  
  923.      11: Missing Right Parenthesis
  924.  
  925.         More left parentheses were used than right parentheses.
  926.  
  927.      12: Too Many Parenthesis Levels
  928.  
  929.         More than 16 levels of parentheses were attempted to
  930.         be opened.
  931.  
  932.      13: Invalid Character in Expression
  933.  
  934.         A character was found in the expression that is not
  935.         any of the defined mathops, numbers, symbol characters
  936.         or newline characters.
  937.  
  938.      14: Closing Quote for Character Constant Absent
  939.  
  940.         No closing quote on a single character constant was found.
  941.         Also caused by attempts to define multiple-character
  942.         constants in an expression.
  943.  
  944.      15: Operand Field Missing
  945.  
  946.         An operand was needed, and was not there.
  947.  
  948.      16: Bit Operand Required
  949.  
  950.         The expression needs a bit operand, and what was found was
  951.         not of the required type.
  952.  
  953.      17: Invalid Bit Specified
  954.  
  955.         The data found cannot be used legally to specify a bit.
  956.  
  957.      18: Immediate (#) Operand Needed
  958.  
  959.         The data given was not preceded by the '#' (pound) sign,
  960.         and needed to be.
  961.  
  962.      19: Branch or Jump Out-of-Range
  963.  
  964.         The address evaluated is outside of the range allowable for
  965.         the branch of jump mnemonic specified.
  966.  
  967.       ** Run from CLI Interface **
  968.  
  969.         The message output when no command-line was used (as from
  970.         the workbench. A Fatal error.
  971.  
  972.       ** Command Line Required **
  973.  
  974.         The message output when no arguments are present on the
  975.         command-line (you need at least the source filename.)
  976.         Also a Fatal error.
  977.  
  978.       ** Unrecognized Switch **
  979.  
  980.         A switch or a character within a switch was not one of
  981.         the valid switches. Not a Fatal error.
  982.  
  983.       ** File Write Error **
  984.  
  985.         An error occurred during a file write, as reported from
  986.         AmigaDOS. A Fatal error. May be caused by a full disk.
  987.  
  988.       ** Source Filename Missing **
  989.  
  990.         The source filename was not present or was corrupt or was
  991.         given twice. A Fatal error.
  992.  
  993.       ** Parameter Too Long **
  994.  
  995.         An Item on the command-line was too long to be evaluated.
  996.         Also Fatal.
  997.  
  998.       ** Insufficient Free Memory **
  999.  
  1000.         This error occurs when the memory pool does not contain
  1001.         enough memory in a size large enough for the request
  1002.         from the assembler to be filled. Execution stops
  1003.         immediately.
  1004.  
  1005.       ** Include Files nested too deep **
  1006.  
  1007.         This error occurs when you try to open the ninth Include
  1008.         file before closing one.
  1009.  
  1010.       ** Couldn't open Source file **
  1011.  
  1012.         AmigaDOS did not return information indicating that the source
  1013.         file was ready to be read from (or it isn't there.) No
  1014.         assembly will take place without a source file.
  1015.  
  1016.       ** Error Closing Source file **
  1017.  
  1018.         Another error was reported when the source file was being 
  1019.         closed.
  1020.  
  1021.       ** Couldn't open Object file **
  1022.  
  1023.         A Dos error occurred trying to open the object file.
  1024.  
  1025.       ** Couldn't open Listing file **
  1026.  
  1027.         Same error from listing file open attempt.
  1028.  
  1029.       ** Couldn't open Error listing file **
  1030.  
  1031.         Like above, but on error file attempt.
  1032.  
  1033.       ** ENDMAC Command missing **
  1034.  
  1035.         The end of the source file was reached, and the assembler
  1036.         was still saving a macro definition.
  1037.  
  1038.      34: Too Many Parameters present
  1039.  
  1040.         More parameters than the assembler has space to store
  1041.         were found.
  1042.  
  1043.      35: Parameter Too Long
  1044.  
  1045.         An item in an expression or an operand was longer than the
  1046.         defined limit.
  1047.  
  1048.      36: Closing Single-Quote Missing
  1049.  
  1050.         A string definition should be bounded on both ends with
  1051.         matching quotes.
  1052.  
  1053.      37: No Label on Line
  1054.  
  1055.         No label was present for the Directive to act upon.
  1056.  
  1057.      38: Macro called using Symbol label
  1058.  
  1059.         A symbol name found in the mnemonic field was attempted
  1060.         to be used as a Macro, and was found to be a Label.
  1061.  
  1062.       ** Too many nested Macros **
  1063.  
  1064.         This Fatal error occurs when the ninth Macro call is
  1065.         issued before any of the previous Macro calls have ended.
  1066.  
  1067.      40: Macro redefinition Error
  1068.  
  1069.         The name used with the MACRO command is already the name
  1070.         of a previously defined Macro.
  1071.  
  1072.      41: ENDMAC command without MACRO definition
  1073.  
  1074.         You didn't use the MACRO command to define your Macro, or
  1075.         you issued the ENDMAC command twice. If you are attempting
  1076.         to get two or more exit points from a macro, use the
  1077.         MEXIT Directive.
  1078.  
  1079.       ** INCLUDE file unable to be opened **
  1080.  
  1081.         This Error occurs when the filename associated with the
  1082.         INCLUDE command was not found after the include directory
  1083.         list was exhausted.
  1084.  
  1085.       ** Source or Include file line too long **
  1086.  
  1087.         An input line read from disk contained more than 255
  1088.         characters in a row without a carriage return or
  1089.         linefeed.
  1090.  
  1091.      44: Insufficient Macro parameters supplied
  1092.  
  1093.         An expansion was attempted and there were not enough
  1094.         parameters on the Macro call line.
  1095.  
  1096.      45: Label Value changed between passes
  1097.  
  1098.         This unusual error occurs when the value of a Line Label
  1099.         is different on the second pass than it was on the first
  1100.         pass. The whole assembly file is probably corrupt, and
  1101.         it is likely that the message will repeat with every
  1102.         subsequent Line Label found. Forward references and
  1103.         absolute references to SETVAL Labels, or conditional
  1104.         compilation based on SETVAL Labels are the likely
  1105.         culprits behind this error.
  1106.  
  1107.      46: Invalid Label - Item was Forward Referenced
  1108.  
  1109.         A Label which was referenced before it was used was later
  1110.         found in a context other than usage as a relative
  1111.         location.
  1112.  
  1113.      47: Local Definition of External Symbol not allowed
  1114.  
  1115.         If you declared a Symbol to be EXTERNal, you cannot define
  1116.         it within the current assembly. Use the ENTRY Directive
  1117.         instead if this is what you want.
  1118.  
  1119.      48: Unavailable Addressing Mode Used
  1120.  
  1121.         The addressing mode used for the Mnemonic on this
  1122.         line is not one which is allowable for that
  1123.         Mnemonic.
  1124.  
  1125.      49: Invalid Item in External Reference Expression
  1126.  
  1127.         An external reference included an item which did not
  1128.         belong there. This also occurs on an attempt to
  1129.         generate PC relative references to external addresses.
  1130.  
  1131.       ** Too Many Section Definitions (Limit = 255) **
  1132.  
  1133.         The message is self-explanatory.
  1134.  
  1135.      51: Invalid Section Type - Section CODE used
  1136.  
  1137.         An item found after the section name was not one of the
  1138.         three valid section types - CODE, DATA or BSS. The
  1139.         type was set to CODE.
  1140.  
  1141.      52: Instruction Alignment Error - Pad Byte Added
  1142.  
  1143.         All the 68000 Mnemonics and WORD and LONG oriented
  1144.         Directives need to be aligned on an even address. The
  1145.         Assembler attempts to correct this by adding a null
  1146.         byte to the previous instruction, and adjust the
  1147.         Program Counter and Label values accordingly.
  1148.  
  1149.       ** Too Many Conditional Levels Attempted
  1150.  
  1151.         The seventeenth conditional Directive was found before an
  1152.         ENDIF Directive was.
  1153.  
  1154.       ** Conditional End without Conditional Statement
  1155.  
  1156.         There are more ENDIF commands than matching conditional
  1157.         Directives.
  1158.  
  1159.      55: Relative Reference Outside of Current Section
  1160.  
  1161.         An attempt to use a PC relative mode to a Line Label that
  1162.         was not declared as an ENTRY label was attempted. Also
  1163.         occurs on Data references to other sections without
  1164.         using the ENTRY type-definition.
  1165.  
  1166.      56: Executable Code not allowed in Data & Bss Sections
  1167.  
  1168.         DATA sections may contain only initialized and uninitialized
  1169.         data locations, and BSS sections may contain only un-
  1170.         initialized (RESERVE) data.
  1171.  
  1172.      57: Redefinition of Equate Label not Allowed
  1173.  
  1174.         You cannot change the value of a Label that has been EQUATEd.
  1175.  
  1176.      58: Equate to previously SET Label Disallowed
  1177.  
  1178.         A Label that was set cannot later be upgraded to an equate
  1179.         in the same assembly. The assembler handles decisions on
  1180.         equated labels, whose value cannot change, differently
  1181.         than set labels, whose value may be redefined. Since the
  1182.         length of 68000 instructions vary with the address mode,
  1183.         a set label is always treated as a LONG value (unless
  1184.         otherwise specified) and an equated label is treated
  1185.         for the value it contains. Since the assembler always
  1186.         attempts to use the shortest instruction length possible,
  1187.         a change in the type of a label can cause bad code to be
  1188.         generated.
  1189.  
  1190. ===============================================================================
  1191.  
  1192.             Addressing Modes:
  1193.  
  1194.    The following models show the valid address modes for the 68000 processor
  1195. as they are recognized by the assembler:
  1196.  
  1197.     ( 'n' represents a digit from 0 to 7, X represents either 'D' or 'A'
  1198.       for an address mode 'ALabel' represents a symbol with an absolute
  1199.       or an external value, 'RLabel' represents a Line Label or an
  1200.       ENTRY typed label, 'number' refers to an actual numerical value, and
  1201.       the other items are what they are. Case is not significant except on
  1202.       Label and Symbol Names. Defined REG Labels of the proper type may be
  1203.       used in place of the register names.)
  1204.  
  1205. IMMEDIATE:
  1206.  
  1207.         #number        #ALabel
  1208.  
  1209. DATA REGISTER DIRECT:
  1210.  
  1211.         Dn
  1212.  
  1213. ADDRESS REGISTER DIRECT:
  1214.  
  1215.         An    SP
  1216.  
  1217. ADDRESS REGISTER INDIRECT:
  1218.  
  1219.         (An)    (SP)
  1220.  
  1221. ADDRESS REGISTER INDIRECT WITH POST INCREMENT:
  1222.  
  1223.         (An)+    (SP)+
  1224.  
  1225. ADDRESS REGISTER INDIRECT WITH PREDECREMENT:
  1226.  
  1227.         -(An)    -(SP)
  1228.  
  1229. ADDRESS REGISTER INDIRECT WITH DISPLACEMENT:
  1230.  
  1231.         number(An)    number(SP)    ALabel(An)
  1232.  
  1233.         ALabel(SP)
  1234.  
  1235. ADDRESS REGISTER INDIRECT WITH DISPLACEMENT AND INDEX:    (say that 50 times)
  1236.  
  1237.         number(An,Xn)    Alabel(An, Xn)    number(SP, Xn)
  1238.  
  1239.         ALabel(SP,Xn)
  1240.  
  1241. PROGRAM COUNTER RELATIVE WITH DISPLACEMENT:
  1242.  
  1243.         RLabel        RLabel(PC)    number(PC)
  1244.  
  1245. PROGRAM COUNTER RELATIVE WITH DISPLACEMENT AND INDEX:
  1246.  
  1247.         RLabel(Xn)    RLabel(PC, Xn)    number(PC, Xn)
  1248.  
  1249. SHORT ABSOLUTE:
  1250.  
  1251.         ALabel        number
  1252.  
  1253. (where the value is less than $007FFF or greater than $FF8000)
  1254.  
  1255. LONG ABSOLUTE:
  1256.  
  1257.         RLabel (to another section)
  1258.  
  1259.         ALabel        number
  1260.  
  1261. (where the value doesn't qualify for short mode)
  1262.  
  1263. SPECIAL:
  1264.  
  1265.         USP        CCR        SR
  1266.  
  1267.  
  1268. ===============================================================================
  1269.  
  1270.             Release History:
  1271.  
  1272.    Version 1.0.1 Alpha1        released 02-Jan-87.
  1273.  
  1274.    Version 1.0.1 Beta1        released 11-Jan-87.
  1275.     Changes:    1. EQUATEd & SETVAL Labels now use their full
  1276.                32-bit value in expressions.
  1277.             2. External 16-bit references are now handled
  1278.                correctly (for those open-library calls.)
  1279.             3. Macro Parameters now parse correctly when
  1280.                separated by commas.
  1281.             4. The REG and EQUR functions were swapped.
  1282.  
  1283.    Version 1.0.1 Beta2        released 20-Jan-87.
  1284.     Changes:    1. Conditional levels were increased to 16.
  1285.             2. The include directory spec switch was changed
  1286.                to handle logical assignments correctly (e.g.
  1287.                INCLUDE: now works.)
  1288.             3. DBcc and Bcc branches to an ENTRY Label no
  1289.                longer generate an error.
  1290.             4. IFD and IFND did not function properly with
  1291.                SET or EQUATED Labels.
  1292.             5. The assembler now passes external reference
  1293.                information for the linker on EXTERN items
  1294.                used as immediate operands.
  1295.             6. Several heavily used routines were rewritten
  1296.                in assembly language and assembled with this
  1297.                program.
  1298.  
  1299. ===============================================================================
  1300.  
  1301. NOTE:    Amiga and AmigaDOS are trademarks of Commodore Business Machines.
  1302.     Intel is a trademark of the Intel Co.
  1303.     MC68000 is a trademark of Motorola Co.
  1304.  
  1305. ===============================================================================
  1306.  
  1307.             <*|=|*>  THE END  <*|=|*>
  1308.  
  1309. ==============================================================================
  1310.