home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 181.img / TASM-101.ZIP / MANUAL.DOC < prev    next >
Text File  |  1988-10-31  |  17KB  |  539 lines

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