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

  1.  
  2. MAC.68K
  3.  
  4.  
  5.  
  6.                                SPACE                               SPACE                               SPACE
  7.  
  8.  
  9.  
  10.   PURPOSE         To insert blank lines into the output listing.
  11.  
  12.  
  13.  
  14.   FORMAT               SPACE  linecount
  15.  
  16.              subhead   SPACE  linecount,minpage
  17.  
  18.  
  19.  
  20.   DESCRIPTION     SPACE inserts linecount number of blank lines into
  21.                an output listing. If a new page just began or if a
  22.                page boundary is crossed while inserting blank lines,
  23.                the insertion stops and no blank lines are put on the
  24.                new page. The sub heading field in page heading line 2
  25.                is reset with the subhead value.
  26.  
  27.                    The optional minpage parameter specifies the
  28.                minimum number of lines that must be available on the
  29.                current page after the SPACE takes effect. If there
  30.                are less than minpage lines left a page eject is
  31.                forced.
  32.  
  33.                    The location field of SPACE is used as the new
  34.                subheading field in the second line of the page
  35.                heading.
  36.  
  37.  
  38.  
  39.   EXAMPLES             SPACE   4
  40.                SUBR    SPACE   4,10
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                               -59-                              MAC.68K
  64.                                                                 MAC.68K
  65.  
  66.  
  67.                                STEXT                               STEXT                               STEXT
  68.  
  69.  
  70.   PURPOSE         To specify a macro and symbol definition assembly.
  71.                The object file is generated with a .STX file extension.
  72.  
  73.  
  74.   FORMAT               STEXT
  75.  
  76.  
  77.   DESCRIPTION     STEXT is an initialization directive. It must
  78.                appear after the IDENT card but before any
  79.                noninitialization operation codes. STEXT generates the
  80.                .STX files used with INCLUDES.
  81.  
  82.                    An STEXT assembly reduces symbol and macro
  83.                definitions from text format to a MAC.68K table
  84.                format. In this format the symbols and macros can be
  85.                loaded considerably faster using INCLUDES than by
  86.                loading them in text form with an INCLUDE.
  87.  
  88.                    Local symbols ..0000 to ..FFFF, qualified symbols
  89.                (see QUAL), and any symbols or macros defined by an
  90.                INCLUDES are not written to the .STX file.  DATA and
  91.                BSS may not be used within an STEXT assembly.
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.                               STOPDUP                              STOPDUP                              STOPDUP
  100.  
  101.  
  102.  
  103.   PURPOSE         To cause early termination an ECHO or DUP.
  104.  
  105.  
  106.  
  107.   FORMAT               STOPDUP
  108.  
  109.  
  110.  
  111.   DESCRIPTION     STOPDUP terminates a DUP or ECHO block by setting
  112.                the outstanding duplication count to zero. The current
  113.                DUP/ECHO block finishes and any unfinished
  114.                duplications are cancelled.
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125. MAC.68K                                  -60-
  126. MAC.68K
  127.  
  128.  
  129.                                STRDEC                               STRDEC                               STRDEC
  130.  
  131.  
  132.   PURPOSE         To convert a value into a decimal STRING.
  133.  
  134.  
  135.   FORMAT        stringname   STRDEC  expression,len
  136.  
  137.  
  138.   DESCRIPTION     STRDEC converts expression into a decimal character
  139.                string and assigns the string value to stringname. The
  140.                decimal value may be any positive value less than 64K,
  141.                and the character string will be 1 to 5 characters in
  142.                length with leading zero suppression. The optional
  143.                field len may be used to create a fixed length string
  144.                with leading zero fill.
  145.  
  146.  
  147.   EXAMPLE       LEN    SET      LEN+1
  148.                 LENS   STRDEC   LEN
  149.                 LENMSG DC.B     'LENGTH REACHED "LENS"'
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.                                STRHEX                               STRHEX                               STRHEX
  157.  
  158.  
  159.   PURPOSE         To convert a value into a hex STRING.
  160.  
  161.  
  162.   FORMAT        stringname   STRHEX  expression,len
  163.  
  164.  
  165.   DESCRIPTION     STRHEX converts expression into a hex character
  166.                string and assigns the string value to stringname. The
  167.                character string will be 1 to 8 characters in length
  168.                with leading zero suppression. The optional field len
  169.                may be used to create a fixed length string with
  170.                leading zero fill.
  171.  
  172.  
  173.   EXAMPLE       LEN    SET      LEN+1
  174.                 LENS   STRHEX   LEN
  175.                 LENMSG DC.B     'LENGTH REACHED $"LENS"'
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.                               -61-                              MAC.68K
  188.                                                                 MAC.68K
  189.  
  190.  
  191.                                STRING                               STRING                               STRING
  192.  
  193.  
  194.  
  195.   PURPOSE         To define a character string.
  196.  
  197.  
  198.  
  199.   FORMAT     stringname   STRING   startchar,len,dstringd
  200.  
  201.  
  202.  
  203.   DESCRIPTION     STRING defines or redefines a named character
  204.                string that may be substituted into a source line when
  205.                referenced by "stringname". The parameter startchar is
  206.                an expression that specifies the starting character to
  207.                use in the delimited string dstringd. The parameter
  208.                len is an expression that specifies the length of the
  209.                string. d is the string delimiter character and may be
  210.                any character not occuring in the string other than &
  211.                or ".
  212.  
  213.                    If startchar is null or zero the micro name is
  214.                assigned a null value.  If len is null or zero or
  215.                greater than the available string length, the actual
  216.                string length is used.
  217.  
  218.  
  219.  
  220.   EXAMPLES
  221.            AA    STRING   1,,*ABCD*
  222.                  MOVE.L   #'"AA"',D0     becomes     MOVE.L  #'ABCD',D0
  223.  
  224.            BB    STRING   1,,+"AA"EFGH+
  225.                  DC.L   8H"BB"           becomes     DC.L    8HABCDEFGH
  226.  
  227.            CC    STRING   1,1,@A1+TAG
  228.                  IFS      EQ,*"CC"*@*    becomes     IFS     EQ,*@*@*
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249. MAC.68K                                  -62-
  250. MAC.68K
  251.  
  252.  
  253.                                STRLEN                               STRLEN                               STRLEN
  254.  
  255.  
  256.  
  257.   PURPOSE         To determine a string length and set a redefinable
  258.                symbol to that value.
  259.  
  260.  
  261.  
  262.   FORMAT     symbol    STRLEN  stringname
  263.  
  264.  
  265.  
  266.   DESCRIPTION     STRLEN sets the value of symbol to the current
  267.                length in characters of stringname. If an error is
  268.                encountered, symbol is not (re)defined.
  269.  
  270.  
  271.  
  272.   EXAMPLE
  273.  
  274.           SLEN   MACROL  NAME,P1
  275.           AA     STRING  1,,*P1*
  276.           NAME   STRLEN  AA
  277.                  ENDM
  278.  
  279.           BB     SLEN   A1         sets  BB to 2
  280.           BB     SLEN   (A1)       sets  BB to 4
  281.           BB     SLEN   FOO-10     sets  BB to 6
  282.           BB     SLEN   OOP*S      sets  BB to 3  (string delimiter *
  283.                                          appears in parameter)
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.                               -63-                              MAC.68K
  312.                                                                 MAC.68K
  313.  
  314.  
  315.                                SUBTTL                               SUBTTL                               SUBTTL
  316.  
  317.  
  318.   PURPOSE         To set a program listing subtitle.
  319.  
  320.  
  321.   FORMAT               SUBTTL  subtitle string
  322.  
  323.  
  324.   DESCRIPTION     SUBTTL sets the 32 character subtitle field in the
  325.                optional line 2 of the page heading. The first TITLE
  326.                or SUBTTL in the program also sets the 32 character
  327.                title field in line 1 of the page heading. If listing
  328.                is active, SUBTTL forces a new page.
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.                                 TEXT                                TEXT                                TEXT
  336.  
  337.  
  338.   PURPOSE         To change the assembly to the text segment.
  339.  
  340.  
  341.   FORMAT               TEXT
  342.  
  343.  
  344.   DESCRIPTION     TEXT changes the current assembly segment to the
  345.                text segment.
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.                                TITLE                               TITLE                               TITLE
  353.  
  354.  
  355.   PURPOSE         To set a program listing title.
  356.  
  357.  
  358.   FORMAT               TITLE  title string
  359.  
  360.  
  361.   DESCRIPTION     TITLE sets the 32 character title field in line 1
  362.                of the page heading.
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373. MAC.68K                                  -64-
  374. MAC.68K
  375.  
  376.  
  377.                                 VFD                                VFD                                VFD
  378.  
  379.  
  380.  
  381.   PURPOSE         To generate data in a user selected bit-width field.
  382.  
  383.  
  384.  
  385.   FORMAT          VFD    width1/expression
  386.         symbol    VFD    width1/expression,width2/expression,...
  387.  
  388.  
  389.  
  390.   DESCRIPTION     VFD generates data within fields of 1 to 32 bits.
  391.                If the value of the expression does not fit within the
  392.                field the result is truncated and a source line error
  393.                type 7 occurs.
  394.  
  395.                    VFD is the only data or CPU operation code not
  396.                automatically forced to an even byte or word boundary.
  397.                VFD bit fields are packed left to right within a byte
  398.                and may straddle a byte boundary. Use of the optional
  399.                symbol field advances the assembler to the next byte
  400.                boundary before processing the first bit field.
  401.  
  402.  
  403.  
  404.   EXAMPLES     TABLE   VFD     3/TYPE,15/L*A*
  405.                        VFD     1/0
  406.                        VFD     4/FOO-3,9/BAZ,23/ADDR-TABLE
  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.                               -65-                              MAC.68K 
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.                               -65-