home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 4.ddi / HELPTNT.ZIP / HELPME!.TNT
Encoding:
Text File  |  1991-02-13  |  33.5 KB  |  780 lines

  1. /*************************************************************************/
  2.                         TURBO DEBUGGER & TOOLS 2.5
  3.                       MANUAL REFERENCE & CORRECTIONS
  4.  
  5. CONTENTS:
  6. 1.  Turbo Debugger/Profiler 2.5: Answers to Common Questions
  7. 2.  Turbo Assembler 2.5: Answers to Common Questions  (To get to this
  8.     section directly, search for 'TASM:')
  9.  
  10.  
  11. TURBO DEBUGGER/PROFILER 2.5:  ANSWERS TO COMMON QUESTIONS
  12. ---------------------------------------------------------
  13.   Below is a list of the most commonly asked questions about Turbo Debugger
  14.   and Turbo Profiler.  Following this list is some information on mouse
  15.   features in Turbo Debugger/Profiler 2.5 as well as some information on
  16.   using TDW with Microsoft Windows.
  17.  
  18.   1. How do TD/TPROF handle screen output for graphics- and text-based
  19.      programs?
  20.  
  21.      There are a number of strategies that can be used to control
  22.      how and when the screen gets refreshed. If you are debugging or
  23.      profiling a program that uses a graphics display mode, if
  24.      you want to use a Borland pop-up utilities such as SideKick
  25.      and SideKick Plus while inside Turbo Debugger/Profiler, or if
  26.      you want to run programs from Turbo Debugger's DOS Shell that
  27.      write directly to video memory, you should review the following
  28.      tips.
  29.  
  30.      The default screen-updating mode is "Swap"; this means that
  31.      Turbo Debugger/Profiler use a single display adapter and display
  32.      page, and swap the contents of the User and Turbo Debugger/Profiler
  33.      screens in software.  This is the slowest method of display
  34.      swapping, but it is the most protective and least disruptive.
  35.  
  36.      Pop-up utilities may not appear on the screen if your screen
  37.      updating is set to Flip, even though they are active and proces-
  38.      sing your keystrokes. You must select "Swap" mode for display
  39.      updating in order for these programs to work properly. Use Turbo
  40.      Debugger's/Profiler's -ds command-line option to do this, or use
  41.      the TDINST/TFINST utilities to permanently set this mode. "Swap"
  42.      mode makes screen updating slower, but it makes sure that Turbo
  43.      Debugger's/Profiler's screen does not interfere with either your
  44.      program's or any other program's display.
  45.  
  46.      You may also need to use "Swap" when you use the DOS Shell
  47.      command or run an editor from within TD/TPROF. Most programs
  48.      expect to run on video page 0, and do not check to see what
  49.      the current video page is. TD's/TPROF's DOS Shell and any
  50.      editors that TD/TPROF runs in "Flip" mode do not run from
  51.      video page 0, and the programs may appear to hang, even though
  52.      you will be able to type in keystrokes normally. If this happens,
  53.      use the -ds command-line option when you run TD/TPROF or reinstall
  54.      TD/TPROF to use "Swap" instead of "Flip."
  55.  
  56.      If you are debugging/profiling a graphics mode application,
  57.      you must specify the -ds command-line option ("Swap" contents)
  58.      and you may want to use Turbo Debugger's/Profiler's -vg command-
  59.      line option (Graphics Save). This causes additional memory to be
  60.      set aside for saving the entire graphics image your program produces.
  61.      If you don't use this option, a "red cloud" may appear on your
  62.      program's screen. These options can also be set permanently by
  63.      using the TDINST/TFINST program. The Graphics Save option takes an
  64.      additional 8K of memory and slows screen-swapping.
  65.  
  66.      If you are running a graphics program that changes the EGA
  67.      palette, make sure you use the -vp command-line option to
  68.      save the palette.
  69.  
  70.   2. Can Turbo Debugger/Profiler execute other programs while you are
  71.      still debugging or profiling?
  72.  
  73.      The DOS Shell and Edit commands in the Module and File
  74.      windows can swap the program you are debugging to disk in
  75.      order to make room to run DOS or your editor. The default
  76.      amount of memory to swap is 128K. You can use TDINST/TFINST
  77.      to set a different amount if that's not enough memory to run
  78.      your editor or other programs. Setting the swap size to 0K
  79.      tells Turbo Debugger/Profiler to swap the entire user program
  80.      to disk before running the DOS command processor.
  81.  
  82.      Only your program gets swapped to disk; Turbo Debugger/Profiler
  83.      remain in memory.
  84.  
  85.   3. How can I break out of a program even though interrupts are
  86.      disabled?
  87.  
  88.      If you have an 80386-chip-based computer and are using TD386/TF386,
  89.      the -B option allows a break even when interrupts are disabled. For
  90.      example, this option enables a break from
  91.  
  92.        CLI
  93.        JMP $
  94.  
  95.   4. Why can't I press Ctrl-Break to get out of a program
  96.      running on a remote machine?
  97.  
  98.      The program running in the remote machine has taken control
  99.      of Interrupt 1B (Ctrl-Break). TDREMOTE/TFREMOTE do not take
  100.      back control of Interrupt 1B until you stop execution of the
  101.      running program on the debugger/profiler side by completing the
  102.      program or pressing Ctrl-F2 (Program Reset).
  103.  
  104.  
  105.   5. What are some of the syntactic and parsing differences
  106.      between Turbo Debugger's built-in assembler and the
  107.      standalone Turbo Assembler?
  108.  
  109.      A discussion follows this short example program:
  110.  
  111.               .model small
  112.               .data
  113.  
  114.        abc    struc
  115.        mem1   dd      ?
  116.        mem2   db      ?
  117.        mem3   db      "   "
  118.        abc    ends
  119.  
  120.               align   16
  121.        a      abc     <1,2,"xyz">
  122.  
  123.        msg1   db      "testing 1 2 3", 0
  124.        msg2   db      "hello world", 0
  125.        nmptr  dw      msg1
  126.        fmptr  dd      msg1,msg2
  127.        nfmptr dw      fmptr
  128.        xx     dw      seg a
  129.  
  130.               .code
  131.  
  132.               push   cs
  133.               pop    ds
  134.               mov    bx,offset a
  135.               mov    bx,nmptr
  136.               les    si,fmptr
  137.               mov    ah,4ch
  138.               int    21h
  139.               end
  140.  
  141.      The assembler expression parser does not accept all legal
  142.      TASM instruction operands. This allows TD's assembler
  143.      expressions to be more general and allows multiple levels of
  144.      memory-referencing, more like that used in C and Pascal.
  145.      However, there are a few constructs that you may be used to
  146.      that you'll have to specify differently for the TD assembler
  147.      expression parser to accept them:
  148.  
  149.        a. Size overrides should always appear inside the
  150.           brackets; PTR is optional after the size. Also, when
  151.           referring to a structure, you must use the name of the
  152.           struc, not the name of the variable:
  153.  
  154.             OK:  [byte ptr bx]   [dword si]        [abc bx]
  155.  
  156.             BAD: byte ptr[bx]    [struc abc bx]    [a bx]
  157.  
  158.        b. You must specify a structure name when accessing the
  159.           members of a structure via a register pointer:
  160.  
  161.             OK:  [abc ptr bx].mem1  [abc bx].mem3 + 1
  162.  
  163.             BAD: [bx].mem1
  164.  
  165.        c. You can't use multiple instances of [] unless they are
  166.           adjacent, and you can only follow an [] expression with
  167.           a dot and a structure member name or another []
  168.           expression:
  169.  
  170.             OK:  4[bx][si]    [abc bx].mem2
  171.  
  172.             BAD: [bx]4[si]    [bx]+4
  173.  
  174.        d. If you use a register as part of a memory expression
  175.           and you don't specify a size, WORD is assumed:
  176.  
  177.             [bx] is the same as [word bx]
  178.  
  179.        e. You can use any register you want between [], not just
  180.           the combinations of BX, BP, SI, and DI allowed in
  181.           instruction operands:
  182.  
  183.             OK:  [ax+bx]   [bx+sp]
  184.  
  185.        f. You can use multiple levels of [] to follow chains of
  186.           pointers:
  187.  
  188.             OK:  [byte [[nfmptr]+4]]
  189.  
  190.        g. Be careful using registers to access memory locations.
  191.           You may get unexpected results if your segment
  192.           registers are not set up properly. If you don't
  193.           explicitly specify a segment register, Turbo Debugger
  194.           uses the DS register to reference memory.
  195.  
  196.        h. When you do specify a segment register, make sure you
  197.           follow the same rule for size overrides: put it
  198.           INSIDE the brackets:
  199.  
  200.             OK:  [byte es:di]    [es:fmptr]
  201.  
  202.             BAD: es:[byte di]
  203.  
  204.        i. Use the OFFSET operator to get the address of a
  205.           variable or structure. Turbo Debugger automatically
  206.           supplies the [] around a variable name if you just type
  207.           the variable name alone:
  208.  
  209.             a            contents of structure a
  210.             [a]          contents of structure a
  211.             offset a     address of structure a
  212.  
  213.        j. You can use the type overrides and the format control
  214.           count to examine any area of memory displayed as you
  215.           wish:
  216.  
  217.             [byte es:bx],10  10 bytes pointed to by es:bx
  218.             [dword ds:si],4  4 dwords pointed to by ds:si
  219.  
  220.           This is very useful when specifying watch expressions.
  221.  
  222.        k. Sometimes you use a word memory location or register to
  223.           point to a paragraph in memory that contains a data
  224.           structure. Access the structure with expressions like
  225.  
  226.             [abc [xx]:0].mem1
  227.             [abc es:0].mem3
  228.  
  229.   6. Are there any syntactic or parsing differences between Turbo
  230.      Debugger's C expression evaluation and Turbo C++'s?
  231.  
  232.      You can't pass constant-string arguments when evaluating
  233.      functions.
  234.  
  235.        OK:   myfunc(123)   myfunc(string_variable)
  236.  
  237.        BAD:  myfunc("constant")
  238.  
  239.   7. Are there any syntactic or parsing differences between Turbo
  240.      Debugger's Pascal expression evaluation and Turbo Pascal's?
  241.  
  242.      a. Turbo Debugger does not support expressions for set
  243.         constructors:
  244.  
  245.           OK:   [4..7]
  246.  
  247.           BAD:  [myvar1..myvar2]   [3+4..7+8]
  248.  
  249.      b. You can't pass constant-string arguments when evaluating
  250.         functions or procedures.
  251.  
  252.           OK:   MyFunc(123)   MyFunc(StringVariable)
  253.  
  254.           BAD:  MyFunc('Constant')
  255.  
  256.                 MyFunc(StringConstant), where StringConstant is
  257.                 defined with a "const" declaration and is not a
  258.                 typed constant.
  259.  
  260.      c. You can't evaluate procedures or functions that have
  261.         structure VALUE parameters. You can evaluate procedures or
  262.         functions that have structure VARIABLE parameters, though.
  263.  
  264.   8. What should I be aware of when I am debugging multilanguage
  265.      programs with Turbo Debugger?
  266.  
  267.      Turbo Debugger's default source language is "Source," which
  268.      means it chooses the expression language based on the current
  269.      source module. This can cause some confusion if your program
  270.      has source modules written in different languages (like C
  271.      and assembler). Since you are actually entering a language
  272.      expression any time Turbo Debugger prompts you for a value
  273.      or an address, this can cause some unexpected results:
  274.  
  275.      a. Even if you are in a CPU window or a Dump window, you
  276.         must still enter addresses in the source language,
  277.         despite the fact that the window is displaying in hex.
  278.         For example, to display the contents of memory address
  279.         1234:5678, you must type one of the following
  280.         expressions, depending on your current source language:
  281.  
  282.           C            0x1234:0x5678
  283.           Pascal        $1234:$5678
  284.           Assembler     1234H:5678H
  285.  
  286.      b. When your current language is assembler, you must be
  287.         careful when entering hex numbers, since they are
  288.         interpreted EXACTLY as they would be in an assembler
  289.         source file. This means that if you want to enter a
  290.         number that starts with one of the hex digits A - F, you
  291.         must first precede the letter with a 0 so Turbo Debugger
  292.         knows you are entering a number. Likewise, if your
  293.         number ends in B or D (indicating a binary or decimal
  294.         number), you must add an H to indicate that you really want
  295.         a hex number:
  296.  
  297.           OK:   0aaaa   123dh   89abh
  298.  
  299.           BAD:  aaaa    123d    89ab
  300.  
  301.   9. Why does the text "Cannot be changed" come up when I do an
  302.      assignment in the Data/Evaluate/Modify "New value" pane?
  303.  
  304.      If you use the Data/Evaluate/Modify command (Ctrl-F4) to
  305.      change a variable by direct assignment, the "New value" pane
  306.      will say "Cannot be changed." This doesn't mean the
  307.      assignment didn't take effect. What it does mean is that the
  308.      assignment expression as a whole is not a memory-referencing
  309.      expression whose value you can change by moving to the
  310.      bottom pane. Here are some examples of direct assignment
  311.      expressions:
  312.  
  313.        C              x = 4
  314.        Pascal         ratio := 1.234
  315.        Assembler      wval = 4 shl 2
  316.  
  317.      If you had typed just "x," "ratio," or "wval" into the top
  318.      pane, then you would be able to move to the bottom pane and
  319.      enter a new value. The direct assignment method using the
  320.      "=" or ":=" assignment operator is quicker and more
  321.      convenient if you don't care about examining the value of
  322.      the variable before modifying it.
  323.  
  324.  10. Why does an inspector occasionally display question marks
  325.      when inspecting a Turbo C++ register variable?
  326.  
  327.      If you inspect a register variable that is not in the
  328.      current scope, you'll see ???? for the value. A register
  329.      variable only displays a value if the register is in your
  330.      current scope (valid at the current location in your
  331.      program).
  332.  
  333.  11. What is the most likely reason for Turbo Debugger/Profiler to hang
  334.      when starting up on a PC-compatible computer?
  335.  
  336.      If your computer is a Tandy 1000A, IBM PC Convertible, or
  337.      NEC MultiSpeed, or if TD/TPROF hang when loading on your system,
  338.      run TDINST/TFINST and change an item in the Options\Miscellaneous
  339.      menu so that NMI Intercept is not set. Some computers use the NMI
  340.      (Non-Maskable Interrupt) in ways that conflict with TD/TPROF, so
  341.      you must disable TD's/TPROF's use of this interrupt in order to
  342.      run the program.
  343.  
  344.      Also, if you are using a 80386-based machine and have the
  345.      SuperKey utility loaded, be careful not to press a key when
  346.      TD386/TF386 are loading, since SuperKey may capture the keystroke
  347.      and cause unexpected results.
  348.  
  349.  12. What could happen when global breakpoints are set on local
  350.      variables?
  351.  
  352.      When you set global breakpoints using local variables, make
  353.      sure the breakpoints are cleared before you exit the
  354.      procedure or function that the variables are defined in. The
  355.      best way to do this is to put a breakpoint on the last line
  356.      of the procedure or function. If you do not clear the
  357.      breakpoints, your program will break unexpectedly and may
  358.      even hang on some machines because the breakpoints are being
  359.      set in memory that is not currently being used by the
  360.      procedure or function.
  361.  
  362.  13. How can I save options set in TDINST to TD286.EXE?
  363.  
  364.      If you have a configuration file (tdconfig.td) already made for
  365.      TD.EXE, TD286.EXE will automatically use this configuration file.
  366.      You can save a configuration made in TDINST to TD286.EXE directly
  367.      if you state this on the command line. For instance,
  368.  
  369.        TDINST TD286.EXE
  370.  
  371.      When you want to save this configuration in TDINST, just select
  372.      Save\Modify td.exe.
  373.  
  374.  14. Why is execution slower when tracing (F7) than when stepping
  375.      (F8) through my programs?
  376.  
  377.      Turbo Debugger now has the capability for reverse execution. This
  378.      means that when you are tracing through your program TD is saving
  379.      all the information about the source line you just traced over. If
  380.      you want faster execution you can (F8) step over the instruction or
  381.      toggle the Full History option to 'No' in the Execution History
  382.      window. (Although reverse execution is always available in the CPU
  383.      viewer this option must be toggle to 'Yes' to work in the Module
  384.      viewer.  The default setting is 'No')
  385.  
  386.  
  387. *    Common questions about using mouse support in Turbo Debugger 2.5.
  388.  
  389. Turbo Debugger/Profiler 2.5 provides mouse support that allows you to
  390. manipulate elements within the user interface. The following lists mouse-
  391. related terms to help you become accustomed to using Turbo Debugger's/
  392. Profiler's mouse support.
  393.  
  394. If you have a mouse driver installed by default, The Debugger, Profiler,
  395. and installation utilities will try to use your mouse. If you do not wish
  396. to use your mouse during a debugging session, you can use the command-line
  397. switch '-p-' to turn the mouse off. This can also be set in TDINST/TFINST
  398. in the Options\Input & prompting dialog box.
  399.  
  400. Clicking and Dragging
  401.     Most mice provide two or three buttons that allow for various
  402.     functions inside an application. In Turbo Debugger you can,
  403.     among other things, use the left mouse button to select options,
  404.     move items around on the screen, and set breakpoints. The right
  405.     mouse button has some of the same functionality as the left mouse
  406.     button, but you can also open local menus within windows using
  407.     this button. Double clicking the mouse on options in a list will
  408.     select that item. For instance, in the File|Open dialog box you
  409.     can highlight a file by clicking the mouse once on the file
  410.     name. You can load the file by double clicking on the name.
  411.     The commands shown at the bottom of the screen, like F1-Help,
  412.     can also be selected using the mouse. Dragging the mouse consists
  413.     of depressing the mouse button and moving the mouse cursor to a
  414.     new location.
  415.  
  416. Mouse drivers
  417.     Your mouse driver is the application that you install to make your
  418.     mouse active inside Turbo Debugger and other programs. Most mouse
  419.     drivers will work with Turbo Debugger but may have to be updated
  420.     to a newer version if you are having problems using an older version.
  421.     If you have problems with the mouse once you have loaded TD or
  422.     TDINST, you might try using the Display Swap option that can be
  423.     specified either in TDINST or on the command-line with the -ds
  424.     switch. Consult your mouse manual to ensure proper use of the
  425.     mouse and its driver. Early versions of mouse drivers don't support
  426.     screen display modes larger than 80 columns by 24 lines. As a result,
  427.     your mouse driver might not work correctly when you use Turbo Debugger's
  428.     enhanced display modes EGA 80x43, VGA 80x50, or EGA/VGA graphics modes.
  429.  
  430. Scroll bars
  431.     Scroll bars, located at the right and bottom of all windows, allow you
  432.     to specify a new position within a window by clicking the mouse on an
  433.     indicator on the scroll bar and dragging it to a new location. Arrows
  434.     located at either end of a scroll bar also allow you to scroll through
  435.     the window when you click and hold the mouse on the arrow heads.
  436.  
  437. Icons
  438.     An icon is a window that has been shrunk down to a smaller
  439.     representation of the window. These icons can be moved with the
  440.     mouse by clicking on the border of the icon and dragging it to a
  441.     new location. Arrows located at the top right of each viewer allow
  442.     you to zoom and unzoom the viewer when you click the mouse on the
  443.     arrows. When you iconize a window, it is stored at the bottom right
  444.     side of the screen. If any other windows are currently showing at
  445.     this position the icon will be put behind that window. The global
  446.     Window menu allows you to pick from a list of currently open windows.
  447.     This will also take you to an iconized window.
  448.  
  449. Resize box
  450.     The resize box is located at the bottom right of each window. You can
  451.     click the mouse on the box and drag the mouse to resize the viewer.
  452.     Using the mouse you can also resize the viewer by clicking the mouse
  453.     on the right border of any window and dragging it. Windows and
  454.     inspectors can be moved using the mouse by clicking on the top and
  455.     left borders and dragging the window to a new location. Double clicking
  456.     the mouse on the top border is a short cut to zoom/unzoom the current
  457.     window.
  458.  
  459. Dialog boxes
  460.     Dialog boxes allow you to select options, specify files to save or
  461.     restore, and choose different settings. You can click the mouse to
  462.     make prompts or panes within the dialog box active. Help for the
  463.     current dialog box is available in by clicking on the Help button
  464.     in the box.
  465.  
  466. Close buttons
  467.      A Close button is located at the top left of all windows and dialog
  468.      boxes. It lets you close the current window or dialog box when you
  469.      click the mouse on it. If you have entered any information into a
  470.      dialog box and you use the Close button to close it, the settings
  471.      you specified in the dialog box will not be saved. This is the same
  472.      as clicking the mouse on the Cancel button inside a dialog box. You
  473.      must select the OK button in dialog boxes in order to save these
  474.      settings.
  475.  
  476. Mouse when using Microsoft Windows functions
  477. -    When resetting a program which uses the mouse, mouse clicks
  478.     are not accepted when the program is run until a keyboard
  479.     entry is made.
  480.  
  481. -    When the mouse driver is disabled for Windows, it will be
  482.     disabled for TDW as well.  Starting TDW with the mouse
  483.     support option (-p) has no effect.
  484.  
  485.  
  486.  
  487. *    Common questions about using Turbo Debugger 2.5 with Microsoft
  488.      Windows
  489.  
  490. View|Windows Messages
  491. -    If you set up View|Windows Messages to display messages for
  492.     more than one procedure or handle or both, do not log all
  493.     messages.  Instead, log specific messages for each procedure
  494.     or handle.  If you log all messages, the system might hang, in
  495.     which case you will have to reboot to continue.  This behavior
  496.     is due to the large number of messages being transferred between
  497.     Windows and TDW.
  498.  
  499. -    When setting a break on mouse messages, be aware that a "mouse
  500.     down" message must be followed by a "mouse up" message before the
  501.     keyboard will become active again.  When you return to the
  502.     application, you might have to press the mouse button several
  503.     times to get Windows to receive a "mouse up" messages.  You'll
  504.     know Windows has received the message when you see it in the
  505.     bottom pane of the Windows Message window.
  506.  
  507. -    If you enter a handle name and indicate that it's a procedure,
  508.     TDW will accept your input and will not complain.  However,
  509.     when you run your program, TDW will not log any messages.  If TDW
  510.     is not logging messages when you think you've set a handle, 
  511.     check to see if you've pressed the Handle button.
  512.  
  513. View|Module
  514. -    The Debug Startup radio buttons are used for DLLs only.  To
  515.     debug EXE startup, begin TDW with the Assembler-mode Startup
  516.     command-line option (-l).
  517.  
  518. -    When a program loaded into TDW is reset, the Load symbols radio
  519.     buttons default to YES for all DLLs and applications with symbols. 
  520.     This occurs even if you specified NO for a given DLL or
  521.     application prior to resetting the program.
  522.  
  523.  
  524.  
  525.  
  526. TASM: TURBO ASSEMBLER 2.5: ANSWERS TO COMMON QUESTIONS
  527. ------------------------------------------------------
  528.  
  529.   The following are tips, tricks, and hints you may find useful
  530.   when using Turbo Assembler.
  531.  
  532.  
  533.  Q. How do I install Turbo Assembler?
  534.  A. Run the INSTALL program from the TURBO ASSEMBLER/INSTALLATION
  535.     disk. To start the installation, change your current drive to
  536.     the one that has the install program on it and type INSTALL.
  537.     You will be given instructions in a box at the bottom of the
  538.     screen for each prompt. For example, if you will be
  539.     installing from drive A:, type
  540.  
  541.       A:
  542.       INSTALL
  543.  
  544.     At this point, the INSTALL program will appear with menu
  545.     selections and descriptions to guide you through the
  546.     installation process.
  547.  
  548.  Q. When should I use the different assembly modes TASM provides
  549.     for existing assembly programs?
  550.  A. Mode                   Conditions for Use
  551.     -------------------------------------------------------------
  552.     Normal(MASM)         - Program assembles under MASM 4.00 or
  553.                            MASM 5.00.
  554.     Quirks               - Program assembles under MASM 4.00 or
  555.                            MASM 5.00, but won't assemble under
  556.                            TASM without MASM51 or QUIRKS.
  557.     Masm51               - Program requires MASM 5.1 for assembly.
  558.     Masm51 and Quirks    - Program requires MASM 5.1 for
  559.                            assembly, but will not assemble
  560.                            under TASM with only the MASM51
  561.                            switch set.
  562.  
  563.  Q. Do I have to use MASM51 to assemble files written for MASM
  564.     5.1?
  565.  A. Most files will assemble even without using the MASM51
  566.     directive. However if your assembly code utilizes features
  567.     only found in MASM 5.1, you will need to use the MASM51 mode.
  568.     Check the table in the next Q&A to see which features of MASM51
  569.     emulation are enabled by combinations of MASM51 and QUIRKS
  570.     modes.
  571.  
  572.  Q. What items are controlled by the QUIRKS and MASM51 modes?
  573.  A. The following table lists what the various combinations of
  574.     QUIRKS and MASM51 modes do:
  575.  
  576.     Mode                   Operations
  577.     -------------------------------------------------------------
  578.     Quirks               - Allows FAR jumps to be generated as
  579.                            NEAR or SHORT if CS assumes agree.
  580.                          - Allows all instruction sizes to be
  581.                            determined in a binary operation solely
  582.                            by a register, if present.
  583.                          - Destroys OFFSET, segment override,
  584.                            etc., information on '=' or numeric 'EQU'
  585.                            assignments.
  586.                          - Forces EQU assignments to expressions
  587.                            that contain "PTR" or ":" to be text.
  588.  
  589.     Masm51               - Instr, Catstr, Substr, Sizestr, and
  590.                            "\" line continuation are all enabled.
  591.                          - EQU's to keywords are made TEXT
  592.                            instead of ALIASes.
  593.                          - Leading whitespace is not discarded
  594.                            on %textmacro in macro arguments.
  595.  
  596.     Masm51 and Quirks    - Everything listed under QUIRKS above.
  597.                          - Everything listed under MASM51 above.
  598.                          - @@, @F, and @B local labels are
  599.                            enabled.
  600.                          - Procedure names are PUBLIC'ed
  601.                            automatically in extended MODELs.
  602.                          - Near labels in PROCs are redefinable
  603.                            in other PROCs.
  604.                          - "::" operator is enabled to define
  605.                            symbols that can be reached outside of
  606.                            current proc.
  607.  
  608.     Masm51 and Ideal     - Ideal mode syntax and the Masm51 text
  609.                            macro directives are supported, i.e.,
  610.                            Instr, Catstr, Substr, and Sizestr.
  611.  
  612.   Q. When should I use the DOSSEG or .STACK directives?
  613.   A. When you're developing Turbo Assembler modules to link with
  614.      high-level languages like Turbo C++ and Turbo Pascal, you
  615.      don't need the DOSSEG or .STACK directives because these
  616.      compilers will handle segment-ordering and stack setup.
  617.      These directives define segment names and order that might
  618.      conflict with those used by the high-level language. You
  619.      only need, however, to define these once in any module of a
  620.      standalone assembler program. DOSSEG is only needed if you
  621.      want your segments to be ordered using Microsoft's
  622.      conventions. You can define your own segment-ordering by
  623.      ensuring that your segments are encountered by TLINK in the
  624.      order that you wish. See the TLINK section of the manual for
  625.      a full description of how this works.
  626.  
  627.   Q. What options should I use when I use Turbo Assembler to
  628.      assemble the files that came with the Microsoft C Compiler?
  629.   A. When assembling the assembly language modules provided with the
  630.      Microsoft compilers, make sure to use the MASM51 and QUIRKS
  631.      modes. For example,
  632.  
  633.        tasm /jmasm51 /jquirks filename
  634.  
  635.   Q. How do I create a .COM file?
  636.   A. Your assembler source should be assembled in the tiny model
  637.      (.MODEL TINY) and should include an ORG 100h following the
  638.      opening of the code segment, as shown below:
  639.  
  640.                 .MODEL  TINY
  641.                 .CODE
  642.                 ORG     100h
  643.         start:
  644.                 ....          ; body of program
  645.         END     start         ; defines the entry point as start
  646.  
  647.      Don't include a .STACK directive in a program designed to be
  648.      a .COM.
  649.  
  650.      TLINK will create a .COM file instead of an .EXE file if the /t
  651.      option is specified. For example,
  652.  
  653.         tlink /t SHOW87
  654.  
  655.      will create SHOW87.COM instead of SHOW87.EXE.
  656.  
  657.      There are certain limitations in converting an .EXE file to a
  658.      .COM file. These limitations are documented in the IBM Disk
  659.      Operating System manual under EXE2BIN.
  660.  
  661.   Q. How do I assemble multiple files with Turbo Assembler?
  662.   A. Turbo Assembler will assemble multiple files using wildcard
  663.      characters or separating them by the plus (+) character.
  664.      As an example, the following command line
  665.  
  666.        tasm filt + o*
  667.  
  668.      would assemble the file FILT.ASM, as well as all the .ASM
  669.      files beginning with the letter 'o'.
  670.  
  671.   Q. How can I assemble multiple files if they don't all use the
  672.      same command-line options?
  673.   A. Turbo Assembler uses the semicolon (;) character as a
  674.      command-line separator so that you can actually have
  675.      multiple assembler command lines on a single DOS command
  676.      line. As an example, the following command line
  677.  
  678.        tasm /zi filt; o*
  679.  
  680.      would assemble the file FILT.ASM with debug information
  681.      turned on, then assemble all the .ASM files beginning with
  682.      the letter 'o' without debug information.
  683.  
  684.   Q. Microsoft's Macro Assembler allows me to define environment
  685.      variables so I don't have to enter them on every command
  686.      line. Can I do this with Turbo Assembler as well?
  687.   A. No, but Turbo Assembler provides an even more flexible way
  688.      to eliminate typing in command-line options every time.
  689.      Whenever you run Turbo Assembler, it looks in the current
  690.      directory, then in the directory from which it was started
  691.      (DOS 3.x and greater) for a special file called TASM.CFG.
  692.      This file can contain anything that the command line
  693.      contains. This file is processed first and then the command
  694.      line so that the command-line options take priority over
  695.      those found in the TASM.CFG configuration file. If, for
  696.      instance, your command-line options are always
  697.  
  698.        /t /ml /zi /jJUMPS /jLOCALS
  699.  
  700.      you could create TASM.CFG file containing these lines
  701.  
  702.        /t
  703.        /ml
  704.        /zi
  705.        /jJUMPS
  706.        /jLOCALS
  707.  
  708.      Now, every time you run Turbo Assembler, those will be the
  709.      default options. This means that, if you need to, you can
  710.      have separate TASM.CFG files for each of your projects. If
  711.      you have multiple projects residing in a single subdirectory,
  712.      then you could create a separate configuration file for each
  713.      and use them as Turbo Assembler indirect command files.
  714.  
  715.   Q. What are Turbo Assembler indirect command files?
  716.   A. These are files that contain partial or complete Turbo
  717.      Assembler command lines and are preceded with an at-sign (@)
  718.      on the command line. For example, if you have a file named
  719.      "FILE.CMD" that contains the following,
  720.  
  721.        /t
  722.        /ml
  723.        /zi
  724.        /jJUMPS
  725.        /jLOCALS
  726.        file1 +
  727.        file2 +
  728.        file3 +
  729.        file4
  730.  
  731.      then you could use the command line
  732.  
  733.        tasm @FILE.CMD
  734.  
  735.      instead of the command line
  736.  
  737.        tasm /t /ml /zi /jJUMPS /jLOCALS file1+file2+file3+file4
  738.  
  739.      Note that the at-sign (@) is not actually part of the file's
  740.      name. In fact, if you name a file with an at-sign at the
  741.      beginning, Turbo Assembler will treat it as an indirect
  742.      command file.
  743.  
  744.   Q. I am linking my own assembly language functions with Turbo C.
  745.      Why does the linker report that all of my functions are
  746.      undefined?
  747.   A. Make sure you've put an underbar character (_) in front
  748.      of all assembly language function names to be called
  749.      by Turbo C. If you use simplified segmentation and include
  750.      the C language specifier on the .MODEL directive, Turbo
  751.      Assembler will pre-append the underbar automatically for you.
  752.      Your assembly language program should be assembled with Case
  753.      Sensitivity (/ML or /MX). See Chapter 7, "Interfacing
  754.      Turbo Assembler with Turbo C" in the Turbo Assembler User's
  755.      Guide for details.
  756.  
  757.   Q. Can I use the backslash (\) instead of the slash (/) as a
  758.      option specifier?
  759.   A. NO! Turbo Assembler (and MASM) will treat that as a file
  760.      that resides in the root directory of the default drive.
  761.      Since both assemblers treat the space character ( ) as a
  762.      comma (,) this could result in the loss of files. If you
  763.      accidentally gave this command line,
  764.  
  765.       tasm \zi prid&joy.asm
  766.  
  767.      Turbo Assembler (and MASM) would treat this command line as
  768.      instructions to assemble a file called ZI.ASM that can be
  769.      found in the root directory and create an output file in the
  770.      current directory called PRID&JOY.ASM. (Note that the
  771.      assemblers think the default extension for the object file
  772.      of .OBJ has been explicitly overridden to .ASM.) The file
  773.      PRID&JOY.ASM will either be overwritten with the object file
  774.      or deleted if the file \ZI.ASM can't be found and success-
  775.      fully assembled. In either case, the original contents of
  776.      PRID&JOY.ASM are now lost.
  777.  
  778. /**************************** END OF FILE ********************************/
  779.  
  780.