home *** CD-ROM | disk | FTP | other *** search
/ MacGames Sampler / PHT MacGames Bundle.iso / MacSource Folder / Samples from the CD / Assembly / Mac68k / MANUAL / MAN9.DOC < prev   
Encoding:
Text File  |  1985-08-11  |  10.5 KB  |  448 lines  |  [TEXT/Anon]

  1.  
  2.                                                                 MAC.68K
  3.  
  4.  
  5.  
  6.                                OPTION                               OPTION                               OPTION
  7.  
  8.  
  9.  
  10.   PURPOSE         To set or change assembly options.
  11.  
  12.  
  13.  
  14.   FORMAT               OPTION  opt1,opt2,...opt3
  15.  
  16.  
  17.  
  18.   DESCRIPTION     OPTION is an initialization directive. It must
  19.                appear after the IDENT card but before any
  20.                noninitialization operation codes. The option
  21.                parameters are separated by commas, and are processed
  22.                left to right.
  23.  
  24.                    All listed options change the standard MAC.68K
  25.                options. The inverse options are provided for use with
  26.                customized versions.
  27.  
  28.       Option                  Description
  29.     (Inverse Option)
  30.  
  31.      CREF          Generate symbol cross references by page and line
  32.      (NOCREF)      number. Automatically forces SYMBOL option.
  33.  
  34.      LABELS        Allow symbol names longer than eight characters,
  35.                    with only the first eight being significant.
  36.  
  37.      NOLIST        Disable program listing. Overrides any LIST  L cards.
  38.  
  39.      NOOBJ         Do not generate an object file.
  40.  
  41.      NOPAGE        Do not generate page headings on the output file.
  42.  
  43.      NOPAWS        Do not pause for keyboard input on a console page
  44.                    full.
  45.  
  46.      SAM           Use SAM opcode and operand syntax. (Appendix D & E).
  47.  
  48.      SEQ           List sequence numbers on the output file.
  49.      (NOSEQ)
  50.  
  51.      SEQNAM        List source line sequence names on the output file.
  52.  
  53.      SUBTTL        Insert subtitle lines on the output file.
  54.  
  55.      SYMBOLS       List the symbol table on the output file.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. MAC.68K                                  -52-
  64. MAC.68K
  65.  
  66.  
  67.      LOWER         Treat lower case alphabetic characters as unique
  68.      (UPPER)       characters within symbol names.
  69.  
  70.      WRAP          Use two lines to list an 80+ character output line
  71.      (NOWRAP)      to an 80 column output device.
  72.  
  73.      REL           Generate a .O reloactable file.
  74.      (68K)
  75.  
  76.  
  77.  
  78.   EXAMPLE              OPTION  UPPER,CREF
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.                               -53-                              MAC.68K
  126.                                                                 MAC.68K
  127.  
  128.  
  129.                                 ORG                                ORG                                ORG
  130.  
  131.  
  132.  
  133.   PURPOSE         To reset the origin counter.
  134.  
  135.  
  136.  
  137.   FORMAT               ORG    expression
  138.  
  139.  
  140.  
  141.   DESCRIPTION     The origin counter controls where the assembled
  142.                instructions and data are to be stored in the object
  143.                file. The origin counter starts at the load address
  144.                for .68K object files and is automatically advanced
  145.                for each instruction or data field. A programmer
  146.                ordinarily does not need to change this value. Any
  147.                symbols used in the expression must be previously
  148.                defined.
  149.  
  150.                    The origin counter may be set forward or backward.
  151.                It may not be set below the load address (see IDENT).
  152.                Caution should be used in setting the counter backward
  153.                as you may inadvertently overlay (and lose) previously
  154.                generated code.
  155.  
  156.                    The current value of the origin counter may be
  157.                referenced by using *O.  ORG also sets the location
  158.                counter to the new origin address.
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187. MAC.68K                                  -54-
  188. MAC.68K
  189.  
  190.  
  191.                                 PAGE                                PAGE                                PAGE
  192.  
  193.  
  194.   PURPOSE         To advance to the next page on the output list file.
  195.  
  196.                   To change listing page length and/or page width.
  197.  
  198.  
  199.   FORMAT               PAGE   length,width
  200.  
  201.              subhead   PAGE
  202.  
  203.  
  204.   DESCRIPTION     PAGE forces a new page on the list device. The sub
  205.                heading in page heading line 2 is reset with the
  206.                subhead value. Note that a null field blanks out the
  207.                current subhead value.
  208.  
  209.                    The PAGE is ignored if it is in a block of code
  210.                that is not being listed:  e.g., if it appears in a
  211.                macro then macro expansion listing must be enabled for
  212.                the new page to take effect.
  213.  
  214.                    When used as an initialization directive, PAGE can
  215.                set the output line width within a range of 80 to 132,
  216.                and or set the output page length within a range of 14
  217.                to 80.
  218.  
  219.  
  220.   EXAMPLE              PAGE     ,132
  221.  
  222.  
  223.  
  224.  
  225.                                PURGE                               PURGE                               PURGE
  226.  
  227.  
  228.   PURPOSE         To remove a macro definition.
  229.  
  230.  
  231.   FORMAT               PURGE  macroname
  232.  
  233.  
  234.   DESCRIPTION     PURGE logically deletes an operation code, a pseudo
  235.                operation code, or a macro name. An attempt to
  236.                redefine a macro without first using PURGE results in
  237.                a warning in the form of a source line error code type
  238.                3. Note that this is a warning only, and that the
  239.                second definition is valid.
  240.  
  241.  
  242.   EXAMPLE              PURGE    TESTMAC
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.                               -55-                              MAC.68K
  250.                                                                 MAC.68K
  251.  
  252.  
  253.                                 QUAL                                QUAL                                QUAL
  254.  
  255.  
  256.  
  257.   PURPOSE         To change the default symbol qualifier.
  258.  
  259.  
  260.  
  261.   FORMAT               QUAL   qualname
  262.  
  263.              strname   QUAL   qualname
  264.  
  265.                        QUAL   *
  266.  
  267.  
  268.  
  269.   DESCRIPTION     Symbol names are by default unqualified and may be
  270.                referenced globally simply by using their name. QUAL
  271.                establishes for a block of code a qualname by which
  272.                all symbols within the QUAL block are qualified.
  273.                Outside of this block the qualified symbols are
  274.                referenced by using /qualname/symbol.  Within the
  275.                block the qualified symbol names can be used without
  276.                the /qualname/ prefix. A symbol referenced within the
  277.                block is first sought in the list of names with the
  278.                same qualifier and then among the global symbol names.
  279.                To force a reference to a global symbol from within a
  280.                QUAL block use // (the global symbol qualifier) before
  281.                the symbol name. E.g., //symbol.
  282.  
  283.                    Up to 25 unique QUAL names may be used within one
  284.                assembly, and a 20 deep stack is used to store the
  285.                previous qualname whenever a QUAL appears.  This
  286.                allows sections of code using QUALs to be nested
  287.                without any one section having to be aware of the
  288.                order or names of the prior QUALs. At the end of each
  289.                section, a QUAL * restores the prior QUAL level. The
  290.                optional strname in the location field of a QUAL is a
  291.                string name that is assigned the value of the qualname
  292.                in effect at the time of the QAUL.
  293.  
  294.  
  295.  
  296.   EXAMPLES
  297.                 QUAL    RECORDA
  298.                 LOC     0
  299.         STATE   DS      1
  300.         SALES   DS.L    1
  301.         ITEMS   DS.B    //NITEMS
  302.                 LOC     *O
  303.                 QUAL    *
  304.  
  305.                 LEA     BUFFER(PC),A1
  306.                  :
  307.                 MOVE.L  /RECORDA/SALES(A1),D1
  308.  
  309.  
  310.  
  311. MAC.68K                                  -56-
  312. MAC.68K
  313.  
  314.  
  315.                               SECTION                              SECTION                              SECTION
  316.  
  317.  
  318.   PURPOSE         To change the assembly to another segment.
  319.  
  320.  
  321.   FORMAT               SECTION  section number
  322.  
  323.  
  324.   DESCRIPTION     SECTION changes the assembly to another segment.
  325.                Three values are allowed for the section number.
  326.                Section zero is the TEXT segment, section 14 is the
  327.                DATA segment, and section 15 is the BSS segment.
  328.                SECTION is an alternate form of the TEXT, DATA, or BSS
  329.                op codes.
  330.  
  331.  
  332.   EXAMPLE              SECTION    #14
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.                                 SEG                                SEG                                SEG
  341.  
  342.  
  343.   PURPOSE         To write out the current object file buffer.
  344.  
  345.  
  346.   FORMAT               SEG
  347.  
  348.  
  349.   DESCRIPTION     SEG is only allowed when generating a .68K object
  350.                file that does not contain any DATA or BSS sections.
  351.                It is designed to allow very large assemblies on small
  352.                memory machines.  SEG writes out any accumulated
  353.                object data and resets the internal buffer pointers.
  354.                This reduces the pass two table space requirements
  355.                (see section VIII.) for object file space.
  356.  
  357.                    You may not ORG backwards past a SEG address.
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.                               -57-                              MAC.68K
  374.                                                                 MAC.68K
  375.  
  376.  
  377.                                 SET                                SET                                SET
  378.  
  379.  
  380.  
  381.   PURPOSE         To define or change the value of a redefinable
  382.                symbol.
  383.  
  384.  
  385.  
  386.   FORMAT     symbol    SET    expression
  387.  
  388.  
  389.  
  390.   DESCRIPTION     SET defines a new value for its location field
  391.                symbol. SET may only change the value of symbols
  392.                defined by SET, MAX, MIN or STRLEN.  Any symbol used
  393.                in the expression must be previously defined. If an
  394.                error is detected the symbol retains its previous
  395.                value (if any).
  396.  
  397.  
  398.  
  399.   EXAMPLE    ENTRIES   SET    1
  400.              ENTRIES   SET    ENTRIES+1
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435. MAC.68K                                  -58- RIES+1
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.