home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 5-029 turbo debugger and assem / disks.7z / 4 / MANUAL.DOC < prev    next >
Encoding:
Text File  |  1988-08-28  |  16.9 KB  |  537 lines

  1. TURBO ASSEMBLER 1.0: MANUAL ADDITIONS AND CORRECTIONS
  2. -----------------------------------------------------
  3.  
  4.   General note: The casing of the predefined segment symbol names
  5.   (those beginning with the at-sign (@)) are incorrect in the
  6.   manuals. The entire name should be in lowercase. This case is
  7.   significant when you assemble with the /ML option.
  8.  
  9.   The correct names are
  10.  
  11.     @code
  12.     @data
  13.     @fardata
  14.     @fardata?
  15.     @curseg
  16.  
  17.   Turbo Assembler User's Guide
  18.   ----------------------------
  19.  
  20.   For your convenience, many of the examples are provided on the dis-
  21.   tribution diskettes. Consult the files listed at the bottom of the
  22.   README file for their names and the page on which the example appears.
  23.  
  24.   Page
  25.  
  26.   33 - In the last sentence of the first paragraph, change AX
  27.        to CX.
  28.  
  29.   42 - The example at the bottom of the page should be
  30.  
  31.        10000
  32.        + 201
  33.        -----
  34.        10201
  35.  
  36.   47 - In Footnote 2, remove the text in parentheses.
  37.  
  38.   50 - The table in the manual does not include the 80287 and
  39.        80387 instructions. The following table describes them.
  40.  
  41.        Instruction   Processor        Instruction   Processor
  42.        ------------------------------------------------------
  43.        FSETPM         287-387         FCOS             387
  44.        FPREM1         387             FPREMI           387
  45.        FSIN           387             FSINCOS          387
  46.        FUCOM          387             FUCOMP           387
  47.        FUCOMPP        387
  48.  
  49.  
  50.   61 - The first sentence of the second paragraph on the
  51.        page should read: "If you want to assemble multiple files,
  52.        you can separate their names with the plus sign(+):"
  53.  
  54.        Remove the first example following the paragraph.
  55.  
  56.   63 - The syntax description for the /B command-line
  57.        option should read, "/B."
  58.  
  59.   74 - The table in the /W command-line option is missing
  60.        several items; add the following options:
  61.  
  62.          RES - Reserved word warning
  63.          TPI - Turbo Pascal illegal warning
  64.          PQK - Assuming constant for [const] warning
  65.          ALN - Segment alignment
  66.  
  67.   75 - At the top of the page, the first sentence should
  68.        read, "By default, Turbo Assembler first starts assembling
  69.        your file with all warnings enabled except the inefficient
  70.        code-generation (ICG) and the write-to-memory in
  71.        protected-mode (PRO) warnings.
  72.  
  73.   78 - The first paragraph should say...
  74.  
  75.        ...Assembler, it will look for a file called TASM.CFG in
  76.        your current directory. If running on DOS 3.X or later, it
  77.        will also look in the directory that Turbo Assembler was
  78.        loaded from. If Turbo Assembler finds the file ....
  79.  
  80.   85 - On the second line of the page, change "Table 4.2 on page 169"
  81.        to "Table 2.1 page 47."
  82.  
  83.   97 - The following example instructions will only work
  84.        correctly while in Ideal mode:
  85.  
  86.        mov al, [100+8]
  87.           and
  88.        mov al, [108]
  89.  
  90.        The equivalent instructions in MASM mode follow:
  91.  
  92.        mov al, ds:[100+8]
  93.           and
  94.        mov al, ds:[108]
  95.  
  96.  135 - In the first paragraph of the section titled "Named
  97.        Memory Locations," the last sentence should read, "The
  98.        LABEL directive is another handy way to name a memory
  99.        location, without allocating any storage."
  100.  
  101.  142 - The sentence at the end of the fourth paragraph should
  102.        read: "It also matters when you're converting between data
  103.        sizes and when you're executing conditional jumps."
  104.  
  105.  146 - In the second paragraph, "first-in" should be "last-in."
  106.  
  107.  179 - From the first sentence of the fourth paragraph, delete
  108.        this text: "and considerably less flexible than register
  109.        passing."
  110.  
  111.  188 - In the second sentence of the last paragraph on the page,
  112.        change "table" to "label."
  113.  
  114.  212 - Add the following types to the table of EXTRN types in the
  115.        middle of the page:
  116.  
  117.        DATAPTR           A near or far data pointer depending on
  118.                          the current memory model.
  119.  
  120.        UNKNOWN           An unknown type.
  121.  
  122.        <Structure Name>  The name of a user-defined STRUC type.
  123.  
  124.  220 - Delete the second paragraph on the page: "You'll notice
  125.        .... fields that overflow."
  126.  
  127.  227 - Delete the first paragraph on this page: "You should ....
  128.        symbol table."
  129.  
  130.  230 - In the last line of the second paragraph, change the word
  131.        'enabled' to 'disabled.'
  132.  
  133.  232 - The last sentence of the first complete paragraph should
  134.        read, "Normally, fields that overflow are not truncated
  135.        (%NOTRUNC)."
  136.  
  137.  241 - Add the following to the list of conditional error
  138.        directives at the bottom of the page:
  139.  
  140.        .ERRE, .ERRNZ, .ERRDIFI, .ERRIDNI
  141.  
  142.  283,285,287,288,290,298,302,310 - Change the case of -s and -b
  143.        to -S and -B, respectively.
  144.  
  145.  290 - The second line of the last paragraph should read, "80387
  146.        processors, inline assembly that supports the 80286,
  147.        80287, 80386, and 80387."
  148.  
  149.  304 - The comment in the middle of the page should be
  150.  
  151.        ; ?debug L 15
  152.  
  153.  319 - The last line of the third paragraph should be "FILE2.ASM,
  154.        rather than in the FARDATA segment."
  155.  
  156.  328 - The last sentence of the first paragraph should read,
  157.        "Another convenience is that the labels defined with ARG
  158.        are limited in scope to the procedure they're used in when
  159.        you declare them with the local label prefix (see LOCALS
  160.        in the Reference manual), so you need never worry about
  161.        .... "
  162.  
  163.  446 - The second sentence of the first paragraph should read,
  164.        "For example, in the following code, when TestStruc is
  165.        created, the first byte of field A is initialized to 1 and
  166.        the first byte of field B is initialized to 2, while the
  167.        second byte of each field is initialized to 20h (a
  168.        space)."
  169.  
  170.  453 - The word "bytes" in the comments for the example code
  171.        should be "bits."
  172.  
  173.  455 - The second statement "jnz LoopTop" in the example code
  174.        should be "jnz ShortLoopTop."
  175.  
  176.  473 - The statement "mov ax, [InitValue]" should be moved after
  177.        the statement "mov es, ax."
  178.  
  179.  519 - The constant value 800000000h should have one less zero in
  180.        it: 80000000h.
  181.  
  182.  522 - The constant value 100000000h should have one less zero in
  183.        it: 10000000h.
  184.  
  185.  531 - The first line of the second paragraph should read, "FCOS
  186.        calculates the cosine of the ST(0) register; FSIN
  187.        calculates the sine."
  188.  
  189.  543 - The last sentence of the second paragraph should read,
  190.        "The directive works the same in both modes with one
  191.        exception: SYMTYPE will not return a value for an
  192.        undefined identifier. Otherwise, this operator returns the
  193.        types of various symbols."
  194.  
  195.  553 - The last two sentences of the first paragraph, the modes
  196.        Ideal and MASM are reversed. It should read, "In Ideal
  197.        mode, the PUBLIC .... In MASM mode, because ....".
  198.  
  199.  580 - The second entry in the index for T should read
  200.  
  201.        TASM.CFG files 78
  202.  
  203.  
  204.   Turbo Assembler Reference Guide
  205.   -------------------------------
  206.  
  207.   Page
  208.  
  209.    6 - The first paragraph on the page should read, "The
  210.        following rule applies to predefined symbols starting with
  211.        an at-sign(@): The first letter of each word that makes up
  212.        part of a symbol name is an uppercase letter, except for
  213.        segment-name aliases; the rest of the word is lowercase.
  214.        As an example,
  215.  
  216.          @FileName
  217.          @WordSize
  218.          @curseg
  219.          @fardata
  220.  
  221.        Change the predefined symbol entry @Code to @code and the
  222.        example should read:
  223.  
  224.          mov  ax,@code
  225.          mov  dx,ax
  226.          ASSUME ds:@code
  227.  
  228.    8 - Change the predefined symbol entry @Data to @data and the
  229.        example should read:
  230.  
  231.          mov  ax,@data
  232.          mov  ds,ax
  233.          ASSUME ds:@data
  234.  
  235.    9 - In the first sentence of the Remarks section for
  236.        @DataSize, @DataSize is set to 0 for the tiny model also.
  237.  
  238.        The example for ??Date should be:
  239.          ASMDATE db ??Date
  240.  
  241.   10 - Change the predefined symbol entry @FarData to @fardata and the
  242.        example should read:
  243.  
  244.          mov  ax,@fardata
  245.          mov  ds,ax
  246.          ASSUME ds:@fardata
  247.  
  248.        Change the predefined symbol entry @FarData? to @fardata? and the
  249.        example should read:
  250.  
  251.          mov  ax,@fardata?
  252.          mov  ds,ax
  253.          ASSUME ds:@fardata?
  254.  
  255.   15 - In Table 2.2, add the operator SYMTYPE at the end.
  256.  
  257.   16 - Add the following sentence to the Remarks section for the
  258.        * operator: "The * operator can also be used between a
  259.        register and a constant, to support 386 addressing modes.
  260.  
  261.   24 - The example for DWORD should be
  262.  
  263.          call dword fptr
  264.  
  265.   27 - The example for HIGH should be
  266.  
  267.          ; MASM and Ideal modes
  268.          Magic  equ  1234h
  269.                 mov  cl, HIGH Magic
  270.                 Ideal
  271.          ; Ideal mode only
  272.          Big    DD   12345678h
  273.                 mov  ax, [word HIGH Big] ; loads 1234h into AX
  274.  
  275.   30 - The example for LOW should be
  276.  
  277.          ; MASM and Ideal modes
  278.          Magic  equ  1234h
  279.                 mov  bl, LOW Magic
  280.                 Ideal
  281.          ; Ideal mode only
  282.          Big    DD   12345678h
  283.                 mov  ax, [word LOW Big] ; loads 5678h into AX
  284.  
  285.   31 - The example for MASK should be
  286.  
  287.          stat record a:3,b:4,c:5
  288.          newstat stat <0,2,1>
  289.  
  290.          mov al, newstat
  291.          and al, MASK b
  292.          mov al, MASK stat
  293.  
  294.   33 - The example for NEAR should be
  295.  
  296.          Ideal
  297.     proc farp far
  298.     ; body of procedure
  299.          endp farp
  300.  
  301.     ; still in same segment
  302.          push cs
  303.          call NEAR farp
  304.  
  305.   35 - The example for PROC should be
  306.  
  307.          .model large
  308.          .code
  309.          Ideal
  310.     call proc Test1
  311.  
  312.          proc Test1
  313.  
  314.   35 - Add DATAPTR to the list of data types for the PTR
  315.        operator. Also, in MASM mode, the expression to the right
  316.        of PTR can be anything that evaluates to a constant.
  317.  
  318.   39 - The last paragraph in the Remarks section for the SIZE
  319.        operator should read, "In Ideal mode, SIZE returns the
  320.        byte count within a DUP. To get the byte count of the DUP,
  321.        use LENGTH."
  322.  
  323.        In the first line of the Remarks section for SMALL, change
  324.        LARGE to SMALL.
  325.  
  326.   40 - Delete MASM from the Mode description of SYMTYPE.
  327.  
  328.   41 - Add DATAPTR to the list of data types for the THIS
  329.        operator.
  330.  
  331.   42 - The example for the .TYPE operator should be
  332.  
  333.          if (.type ABC) and 3
  334.            assume ds:seg abc
  335.            mov  ax, seg abc
  336.            mov  ds, ax
  337.          endif
  338.  
  339.   49 - In the % operator, add these lines to the end of the
  340.        second paragraph: "The evaluated expression will be
  341.        represented as a numerical string in the CURRENT RADIX.
  342.        Also, a text macro name can be specified after the %,
  343.        causing a full substitution of the text macro body for the
  344.        macro argument."
  345.  
  346.   53 - Add the % directive, which is a one-line macro that uses
  347.        all current text macros as possible arguments.
  348.  
  349.   59 - Add the following sentence to the end of the Remarks
  350.        section for the ALIGN directive: "ALIGN generates a
  351.        warning if the segment alignment is not strict enough."
  352.  
  353.   61 - Add DATAPTR to the list of valid data types in the third
  354.        paragraph.
  355.  
  356.   62 - The example for the ARG directive should be
  357.  
  358.          fp   PROC FAR
  359.               ARG SRC:WORD,DEST:WORD = ARGLEN
  360.               push bp
  361.               mov  bp,sp
  362.               mov  di,DEST
  363.               mov  si,SRC
  364.          ;<Procedure body>
  365.               pop  bp
  366.               ret  ARGLEN
  367.           fp  ENDP
  368.  
  369.   67 - The Syntax description for COMMENT should be
  370.  
  371.          COMMENT delimiter [text]
  372.          [text]
  373.          delimiter
  374.  
  375.   69 - Delete the second paragraph of the Remarks section for the
  376.        .CREF directive; .CREF is not used by default.
  377.  
  378.        The third paragraph should read, "Turbo Assembler includes
  379.        cross-reference information in the listing file as well as
  380.        in a separate .XRF file."
  381.  
  382.   71 - The first sentence in the Remarks section for the %CTLS
  383.        directive should say that listing-control directives are
  384.        normally *not* listed.
  385.  
  386.   75 - Add DATAPTR to list of valid data types in the first
  387.        paragraph on the page.
  388.  
  389.        Change the number in the first bulleted item from
  390.        4,294,967,295 to 2,147,483,647.
  391.  
  392.   76 - Add DATAPTR to list of valid data types in the second
  393.        paragraph of the Remarks section for DF.
  394.  
  395.   77 - The DISPLAY directive is available in both MASM and Ideal
  396.        modes.
  397.  
  398.        You may use the substitute operator inside a string passed
  399.        to the DISPLAY directive. For example,
  400.  
  401.          MAKE_DATA macro VALUE
  402.                    display "Initializing a byte to: &VALUE&"
  403.                    db VALUE
  404.                    endm
  405.  
  406.   79 - DP defines a far 48-bit pointer, not 32.
  407.  
  408.        In DQ, change the numeric range in the first bulleted item
  409.        from -2^64+1 to 2^64-1.
  410.  
  411.   81 - Add DATAPTR to list of valid data types in the first
  412.        paragraph on the page. Also, the number in the first
  413.        bulleted item on the page should be 32,767, not 65,536.
  414.  
  415.   87 - The EQU directive is available in both MASM and Ideal
  416.        modes.
  417.  
  418.   97 - Add the following sentence to the end of the Remarks
  419.        section for the EVEN directive: "A warning is generated
  420.        for the EVEN directive if alignment is not strict enough."
  421.  
  422.   98 - Add to the Remarks section of EVENDATA: "It even-aligns by
  423.        merely advancing the location counter without emitting
  424.        data, which is useful for uninitialized segments. Also, it
  425.        gives a warning if the segment alignment isn't strict
  426.        enough."
  427.  
  428.   99 - Add DATAPTR to the list of types in the Remarks section of
  429.        EXTRN. Also each argument of EXTRN accepts the same syntax
  430.        as an argument of ARG or LOCAL.
  431.  
  432.  103 - Add DATAPTR to the list of types in the Remarks section of
  433.        the GLOBAL directive. Also add to the Remarks section that
  434.        each argument of GLOBAL accepts the same syntax as an
  435.        argument of EXTRN, ARG, or LOCAL.
  436.  
  437.  117 - Add DATAPTR to list of valid data types in the Remarks
  438.        section for LABEL.
  439.  
  440.  120 - In the middle of the page, delete the first part of the
  441.        paragraph that begins, "If you have enabled MASM51..", and
  442.        leave "You can use this alternative syntax for each
  443.        localdef."
  444.  
  445.  121 - Add DATAPTR to the list of valid data types in the first
  446.        paragraph on this page.
  447.  
  448.  124 - Remove the third bulleted item in the Remarks section for
  449.        the MASM51 directive. The last bulleted item should read,
  450.        "Extended model PROCs are all PUBLIC with a leading
  451.        underscore if the language is C."
  452.  
  453.  125 - In the fourth line of the fourth paragraph, add the word
  454.        "DATA" between "and" and "segments." Add this phrase to
  455.        the last sentence in the same paragraph: "...if you want
  456.        16-bit segments."
  457.  
  458.  128 - Add the last three lines in the example for %NEWPAGE to
  459.        MULTERRS.
  460.  
  461.  129 - Delete the last three lines in the example for %NEWPAGE.
  462.  
  463.  137 - You may use the substitute operator inside a string passed
  464.        to the %OUT directive. For example,
  465.  
  466.          MAKE_DATA macro  VALUE
  467.                    %out Initializing a byte to: &VALUE&
  468.                    db VALUE
  469.                    endm
  470.  
  471.  145 - The example for PROC should be
  472.  
  473.           READLINE proc near
  474.             ; Body of procedure
  475.           READLINE endp
  476.  
  477.           call READLINE
  478.  
  479.  146 - In the Remarks section for %PUSHLCTL, change %WCL to %INCL
  480.        and change %NOWCL to %NOINCL.
  481.  
  482.  156 - The example for the STRUC directive should be
  483.  
  484.          Ideal
  485.          model small
  486.          dataseg
  487.          struc B
  488.            B1  DD  0
  489.            B2  DB  ?
  490.          ends
  491.  
  492.          struc A
  493.            A1  DW  ?
  494.            A2  DD  ?
  495.            binst  B  <>
  496.            struc
  497.              D  DB  "XYZ"
  498.              E  DQ  1.0
  499.            ends
  500.          ends
  501.  
  502.          ainst  A  <>
  503.          cinst  A  ?
  504.          dinst  A
  505.  
  506.          codeseg
  507.            mov  al, [ainst.binst.b2]
  508.            mov  al, [ainst.d]
  509.            mov  ax, [word cinst.binst.b1]
  510.          end
  511.  
  512.  160 - Remove the last paragraph in the Remarks section for
  513.        %TRUNC. Note that %NOTRUNC is the default mode when Turbo
  514.        Assembler starts assembling a file.
  515.  
  516.  163 - In the table of 80386 32-bit registers, remove EDS and
  517.        EES.
  518.  
  519.  164 - Add the following to the list of warning identifiers:
  520.  
  521.        RES - Reserved word warning
  522.        TPI - Turbo Pascal illegal warning
  523.        PQK - Assuming constant for [const] warning
  524.        ALN - Segment alignment
  525.  
  526.  171 - In the section for mexpr9, add the following:
  527.  
  528.        o mexpr10
  529.  
  530.  173 - In the section for expr, capitalize the reserved word
  531.        "symtype."
  532.  
  533.  191 - Disregard the 'NOTE.' in the middle of the page.
  534.  
  535.  216 - Remove the second to last paragraph on the page, "By
  536.        default ..."
  537.