home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_7 / 7.ddi / MANTNT.ZIP / MANUAL.TNT
Encoding:
Text File  |  1991-02-13  |  55.4 KB  |  1,474 lines

  1. /*************************************************************************/
  2.                         TURBO DEBUGGER & TOOLS 2.5
  3.                       MANUAL REFERENCE & CORRECTIONS
  4.  
  5. This file contains information about the Turbo Debugger utilities previously
  6. found in the Turbo Debugger User's Guide.  The contents of this file are as
  7. follows;
  8.  
  9. 1.  Turbo Debugger Utilities
  10. 2.  Hardware Debugger Interface
  11. 3.  Corrections to the Manual
  12.  
  13. 1.  TURBO DEBUGGER UTILITIES
  14. ----------------------------
  15.  
  16. For convenience, when searching for information about a particular utility,
  17. you can search for the name of the utility followed by a colon (i.e. TDUMP:).
  18. This will take you directly to the header for the utility specified.
  19.  
  20. Your Turbo Debugger package comes with several utility programs which are
  21. discussed in the following sections. One utility lets you debug C programs
  22. developed with Microsoft compilers. This is the CodeView to Turbo Debugger
  23. conversion utility, TDCONVRT.EXE.
  24.  
  25. Another utility works in conjunction with remote debugging and lets you issue
  26. basic file-maintenance commands to a remote system. This is the Remote File
  27. Transfer utility, TDRF.EXE.
  28.  
  29. A third program lets you strip the debugging information (the "symbol table")
  30. from your programs without relinking. This is the Symbol Table Stripping
  31. utility, TDSTRIP.EXE.
  32.  
  33. There is also a utility that lets you pack the debugging information and one
  34. that lets you append it from a .MAP file: TDPACK.EXE and TDMAP.EXE.
  35.  
  36. Finally, we provide a generic object module disassembler program called
  37. TDUMP.EXE.
  38.  
  39. Additionally, we give you a small TSR program, TDNMI.COM that resets the
  40. breakout-switch latch if you are using a Periscope I board.
  41.  
  42. Note: For a list of all the command-line options available for TDCONVRT.EXE,
  43. TDRF.EXE, TDSTRIP.EXE, TDPACK.EXE, TDMAP.EXE, and TDUMP.EXE, just type the
  44. program name and press Enter. For example, to see the command-line options
  45. for TDMAP.EXE, you would enter
  46.  
  47.    TDMAP
  48.  
  49. All other utilities use the -? command-line switch for on-line information.
  50.  
  51.  
  52. TDCONVRT: CodeView symbol table converter
  53. -----------------------------------------
  54. The TDCONVRT.EXE utility program converts your C programs linked with Micro-
  55. soft Link into a format suitable for use with Turbo Debugger. Before you use
  56. this utility, you must prepare your program for debugging exactly as if you
  57. were going to use CodeView.
  58.  
  59.  
  60. Running from DOS
  61. ----------------
  62. After you have compiled and linked your program, convert it to Turbo Debugger
  63. format by typing at the DOS prompt:
  64.  
  65. TDCONVRT oldname [newname]
  66.  
  67. where oldname is the name of the executable program you made with Microsoft
  68. Link. You can specify a new name for the Turbo Debugger executable program
  69. by supplying that name after the old name. If you don't specify a new name,
  70. the oldname file is converted to Turbo Debugger format.
  71.  
  72. The utility automatically detects whether your program is in CodeView version
  73. 1 or version 2 format and adjusts its behavior accordingly.
  74.  
  75.  
  76. Error messages
  77.  
  78. The conversion utility sometimes encounters a problem that prevents it from
  79. converting your program to Turbo Debugger format. If that happens, you will
  80. see one of the following error messages:
  81.  
  82. Can't convert CodeView version 1 symbol tables
  83. You have attempted to convert a program that has a symbol table that can only
  84. be used with CodeView version 1. You must recompile and link your program
  85. with later versions of Microsoft tools that produce CodeView version 2 symbol
  86. tables.
  87.  
  88. Can't create file: ___
  89. TDCONVRT couldn't create the indicated file. You probably don't have enough
  90. room on your disk. Delete a few files that you don't need and try again.
  91.  
  92. Can't translate a packed symbol table
  93. You are attempting to convert a symbol table that has been processed by the
  94. CVPACK utility. TDCONVRT can only work on symbol tables that have not been
  95. packed. You will have to relink your program and not run the packing utility,
  96. and then use TDCONVRT.
  97.  
  98. Error reading from file: ___
  99. An error occurred while reading from the indicated file. This usually means
  100. that the file was written on a bad disk sector. Try relinking the program
  101. you want to convert so that it gets written to disk again.
  102.  
  103. Error writing to file: ___
  104. An error occurred while writing to the indicated file. This usually means
  105. your disk has filled up. You will have to delete a few files and try the
  106. conversion again.
  107.  
  108. File not found: ___
  109. TDCONVRT couldn't find the file you are trying to convert. If you don't
  110. supply an extension to the file name you want to convert, TDCONVRT assumes
  111. that you meant it to be .EXE.
  112.  
  113. Not enough memory to perform conversion
  114. TDCONVRT has run out of memory while translating the symbol table to Turbo
  115. Debugger format. You can try unloading any resident utilities that you have
  116. loaded and try the conversion again. If you still don't have enough memory,
  117. you can try reducing the amount of debug information in your program. Do this
  118. by compiling or assembling only some of its modules with debugging information
  119. included.
  120.  
  121. Program does not have a valid symbol table
  122. You have attempted to convert a program that does not have a symbol table
  123. created by MS-LINK. TDCONVRT can only convert symbol tables generated by
  124. MS-LINK.
  125.  
  126. Symbol table contains untranslatable fields
  127. The program you're trying to convert has a symbol table that contains fields
  128. that TDCONVRT can't translate. TDCONVRT works with all Microsoft C programs,
  129. but it may not fully support other Microsoft languages.
  130.  
  131. Symbol table has invalid format
  132. Your program's symbol table is not formatted correctly. It may have become
  133. corrupted or have been generated by an old version of MS-LINK. Make sure that
  134. you are using the latest MS-LINK and then try relinking to create a new .EXE
  135. file and symbol table on disk.
  136.  
  137.  
  138. TDRF:/TDREMOTE: Utilities for remote file transfer and debugging
  139. ----------------------------------------------------------------
  140. The remote file transfer utility (TDRF) works in conjunction with TDREMOTE
  141. or WREMOTE running on another system. With TDRF you can perform most DOS 
  142. file maintenance operations on the remote system. You can
  143.  
  144. * copy files to the remote system
  145.  
  146. * copy files from the remote system
  147.  
  148. * make directories
  149.  
  150. * remove directories
  151.  
  152. * display directories
  153.  
  154. * change directories
  155.  
  156. * rename files
  157.  
  158. * delete files
  159.  
  160.  
  161. Once you have started TDREMOTE or WREMOTE on the remote system, you can 
  162. use TDRF at any time. You can start it directly from the DOS prompt, or you 
  163. can access DOS from inside Turbo Debugger by using the File|DOS Shell
  164. command, and then start TDRF, even while debugging a program on the
  165. remote system. This can be useful if you've forgotten to put some
  166. files on the remote system that are required by the program you're
  167. debugging.
  168.  
  169. When describing TDRF in the following sections, we refer to the system
  170. you are typing at as the "local system" and any files there as "local
  171. files," and the other system connected by a cable as the "remote
  172. system" and any files there as "remote files."
  173.  
  174.  
  175. Starting TDRF from the DOS command line
  176.  
  177. The general form of the command line for TDRF is
  178.  
  179.    TDRF [options] command [arguments]
  180.  
  181. The options control the speed of the remote link and which port it
  182. runs on. They are described in more detail in the next section.
  183.  
  184. Command indicates the operation you wish to perform. The command can
  185. either be typed the way you are used to doing it with DOS--like COPY,
  186. DEL, MD, and so on--or it can be a single-letter abbreviation.
  187.  
  188. For example, to get a directory display of all files starting with ABC
  189. in the current directory on the remote system, you could type:
  190.  
  191.    TDRF DIR ABC*
  192.  
  193. All the commands are described fully after the next section.
  194.  
  195.  
  196. TDRF command-line options
  197.  
  198. You must start an option with either a hyphen (-) or a slash (/). Here
  199. are the possible command-line options for TDRF:
  200.  
  201. -rsN     Sets the remote link speed.
  202.  
  203. The -rs option sets the speed at which the remote link operates. You
  204. must make sure you use the same speed with TDRF that you specified
  205. when you started TDREMOTE on the remote system. N can be 1, 2, or 3,
  206. where 1 signifies a speed of 9600 baud, 2 signifies 19,200 baud, 3
  207. signifies 38,400 baud, and 4 signifies 115,000 baud.
  208.  
  209. In other words, the higher the number, the faster the data transfer
  210. rate across the link. Normally, TDRF defaults to -rs4 (the highest
  211. speed).
  212.  
  213. -rpN     Sets the remote link port.
  214.  
  215. The -rp options specifies which port to use for the remote link. N can
  216. be either 1 or 2, where 1 stands for COM1 and 2 stands for COM2.
  217.  
  218. -w       Writes options to the executable program file.
  219.  
  220. You can make the TDRF command-line options permanent by writing them
  221. back into the TDRF executable program image on disk. Do this by
  222. specifying the -w command-line option along with the other options you
  223. wish to make permanent. You will then be prompted for the name of the
  224. executable program.
  225.  
  226. If you're running on DOS 3.0 or later, the prompt will indicate the
  227. path and file name that you executed TDRF from. You can accept this
  228. name by pressing Enter, or you can enter a new executable file name.
  229. The new name must already exist and be a copy of the TDRF program that
  230. you have already made.
  231.  
  232. If you are running on DOS 2.x, you will have to supply the full path
  233. and file name of the executable program.
  234.  
  235. You can enter a new executable file name that does not have to already
  236. exist. TDRF will create the new executable file.
  237.  
  238.  
  239. TDRF commands
  240.  
  241. Here are the command names you can use with the TDRF utility. The
  242. wildcards * and ? can be used with the COPY, COPYFROM, DEL, and DIR
  243. commands that follow:
  244.  
  245. COPY
  246. Copies files from the local system to the remote system. You can also
  247. type COPYTO instead of COPY. The single letter abbreviation for this
  248. command is T.
  249.  
  250. If you supply a single file name after the COPY command, that file
  251. name will be copied to the current directory on the remote system. If
  252. you supply a second file name after the name of the file on the local
  253. system, the local file will be copied to that destination on the
  254. remote system. You can specify either a new file name, a directory
  255. name, or a drive name on the remote system. For example,
  256.  
  257.    TDRF COPY TEST1 \MYDIR
  258.  
  259. copies file TEST1 from the local system to file MYDIR\TEST1 on the
  260. remote system.
  261.  
  262. COPYFROM
  263. Copies files from the remote system to the local system. The single
  264. letter abbreviation for this command is F.
  265.  
  266. If you supply a single file name after the COPYFROM command, that file
  267. name will be copied from the current directory on the remote system to
  268. the current directory on the local system. If you supply a second file
  269. name after the name of the file on the remote system, the remote file
  270. will be copied to that destination on the local system. You can
  271. specify either a new file name, a directory name, or a drive name on
  272. the local system. For example,
  273.  
  274.    TDRF COPYFROM MYFILE ..
  275.  
  276. copies file MYFILE from the remote system to the parent directory of
  277. the current directory on the local system.
  278.  
  279.    TDRF F TC*.* A:\TCDEMO
  280.  
  281. copies all files beginning with TC on the current directory of the
  282. remote system to the local system's drive A subdirectory, TCDEMO.
  283.  
  284. DEL
  285. Erases a single file from the remote system. The single letter
  286. abbreviation for this command is E.
  287.  
  288. If you just give a file name with no directory or drive, the file is
  289. deleted from the current directory on the remote system. For example,
  290.  
  291.    TDRF DEL \XYZ
  292.  
  293. removes file XYZ from the root directory of the remote system.
  294.  
  295. DIR
  296. Displays a listing of the files in a directory on the remote system.
  297. The single letter abbreviation for this command is D.
  298.  
  299. This command behaves very similarly to the equivalent DOS command. If
  300. you don't specify a wildcard mask, it shows all the files in the
  301. directory; if you do specify a mask, only those files will be listed.
  302. You can interrupt the directory display at any time by pressing
  303. Ctrl-Break.
  304.  
  305. The directory listing is displayed in exactly the same format as that
  306. used by the DOS DIR command. For example,
  307.  
  308.    TDRF DIR \SYS\*.SYS
  309.  
  310. results in a display like:
  311.  
  312. Directory of C:\SYS
  313.  
  314. .            <DIR>      6-08-88   8:01a
  315. ..           <DIR>      6-08-88   8:01a
  316. ANSI     SYS     1678   3-17-87  12:00a
  317. VDISK    SYS     3455   3-17-87  12:00a
  318.  
  319.  
  320. REN
  321. Renames a single file on the remote system. The single letter
  322. abbreviation for this command is R.
  323.  
  324. You must supply two file names with this command: the original file
  325. name and the new file name. The new name can specify a different
  326. directory as part of the name, but not a different drive. For example,
  327.  
  328.    TDRF REN TEST1 \TEST2
  329.  
  330. renames file TEST1 in the current directory in the remote to TEST2 in
  331. the root directory. This effectively "moves" the file from one
  332. directory to another. You can also use this command to simply rename a
  333. file within a directory, without moving it to another directory.
  334.  
  335. MD
  336. Makes a new directory on the remote system. The single letter
  337. abbreviation for this command is M.
  338.  
  339. You must supply the name of the directory to be created. If you don't
  340. supply a directory path as part of the new directory name, the new
  341. directory will be created in the current directory on the remote
  342. system. For example,
  343.  
  344.    TDRF MD TEST
  345.  
  346. creates a directory named TEST in the current directory on the remote
  347. system.
  348.  
  349. RD
  350. Removes an existing directory on the remote system. The single letter
  351. abbreviation for this command is K.
  352.  
  353. You must supply the name of the directory to be removed. If you don't
  354. supply a directory path as part of the new directory name, the
  355. directory will be removed from the current directory on the remote
  356. system. For example,
  357.  
  358.    TDRF RD MYDIR
  359.  
  360. removes a directory named MYDIR from the current directory on the
  361. remote system.
  362.  
  363. CD
  364. Changes to a new directory on the remote system. The single letter
  365. abbreviation for this command is C.
  366.  
  367. You must supply the name of the directory to change to. You can also
  368. supply a new drive to switch to, or even supply a new drive and
  369. directory all at once. For example,
  370.  
  371.    TDRF CD A:ABC
  372.  
  373. makes drive A the current drive on the remote system, and switches to
  374. directory ABC as well.
  375.  
  376.  
  377. TDRF messages
  378.  
  379. Here is a list of the messages you might encounter when working with
  380. TDRF:
  381.  
  382. Can't create file on local system: ___
  383. You were copying a file from the remote system using the COPYFROM command,
  384. and the file could not be created on the local system. This will happen if
  385. the disk is full on the local system, or if the file name on the
  386. remote system is the same as a directory name on the local system.
  387.  
  388. Can't modify exe file
  389. The file name you specified to modify is not a valid copy of the TDRF
  390. utility. You can only modify a copy of the TDRF utility with the -w
  391. option.
  392.  
  393. Can't open exe file to modify
  394. The file name you specified to be modified can't be opened. You have
  395. probably entered an invalid or nonexistent file name.
  396.  
  397. Error opening file: ___
  398. The file you wanted to transfer to the remote system could not be
  399. opened. You probably specified a nonexistent or invalid file name.
  400.  
  401. Error writing file: ___
  402. An error occurred while writing to a file on the local system. This
  403. usually happens when there is no more room on your disk. You will have
  404. to delete some files to make room for the file that you want to copy
  405. from the remote system.
  406.  
  407. Error writing file ___ on remote system
  408. An error occurred while writing a file to the disk on the remote
  409. system. This usually happens if the remote disk is full. You must
  410. delete a few files to make room for the file that you want to
  411. transfer.
  412.  
  413. File name is a directory on remote
  414. You have tried to copy a file from the local to the remote system, but
  415. the local file name exists as a directory on the remote system. You
  416. will have to rename the file by giving a second argument to the COPY
  417. command.
  418.  
  419. Interrupted
  420. You have pressed Ctrl-Break while waiting for communications to be
  421. established with the remote system.
  422.  
  423. Invalid command: ___
  424. You have entered a command that TDRF does not recognize. For each
  425. command, you can use the DOS-style command word or the single letter
  426. abbreviation.
  427.  
  428. Invalid command line option: ___
  429. You have given an invalid command-line option when starting TDRF from
  430. the DOS command line.
  431.  
  432. Invalid destination disk drive
  433. You have specified a nonexistent disk drive letter in your command.
  434. Remember that the remote system might have a different number of disk
  435. drives than the local system.
  436.  
  437. No matching files on remote
  438. You have done a directory command but either there are no files in the
  439. directory on the remote system, or no files match the wildcard
  440. specification that you gave as an argument to the DIR command.
  441.  
  442. No remote command specified
  443. You have not specified any command on the DOS command line; TDRF has
  444. nothing to do.
  445.  
  446. Too few arguments
  447. You have not supplied enough arguments for the command that you
  448. requested. Some commands require an argument, like DEL, MD, CD, RD,
  449. and so on.
  450.  
  451. Too many arguments
  452. You have specified too many arguments for the command that you
  453. requested. No command requires more than two arguments, and some
  454. require only one.
  455.  
  456. Wrong version of TDREMOTE
  457. You are using an incompatible version of TDRF and TDREMOTE. Make sure
  458. that you are using the latest version of each utility.
  459.  
  460.  
  461. TDSTRIP: The symbol table stripping utility
  462. -------------------------------------------
  463. TDSTRIP.EXE, the symbol table stripping utility, lets you remove the
  464. symbol table from an executable program generated by TLINK with the /v
  465. option. This is a faster way of removing the symbol table than
  466. relinking without the /v option. It can also remove debugging
  467. information from an .OBJ file. Just enter
  468.  
  469.    TDSTRIP PROGRAM.OBJ
  470.  
  471. You can also use this utility to remove the symbol table and put it in
  472. a separate file. This is useful when you want to convert the .EXE
  473. format program to a .COM file, and still retain the debugging symbol
  474. table. This utility puts the symbol table in a file with the extension
  475. .TDS. Turbo Debugger looks for this file when it loads a program to
  476. debug that does not have a symbol table.
  477.  
  478.  
  479. TDSTRIP command-line options
  480.  
  481. Here is the general form of the DOS command line used to start the
  482. Symbol Table Stripping utility, TDSTRIP:
  483.  
  484.    TDSTRIP [-s][-c] exename [outputname]
  485.  
  486. If you don't specify the -s option, the symbol table is removed from
  487. the .EXE file exename. If you specify an outputname, the original .EXE
  488. file is left unchanged and a version with no symbol table is created
  489. as outputname.
  490.  
  491. If you do specify the -s option, the symbol table will be put in a
  492. file with the same name as exename but with the extension .TDS. If you
  493. specify an output file, the symbol table will be put in outputname.
  494.  
  495. If you specify the -c option, the input .EXE file is converted into a
  496. .COM file. If you use -c in conjunction with -s, you can convert an
  497. .EXE file with symbols into a .COM file with a separate .TDS symbol
  498. file. This lets you debug .COM files with Turbo Debugger while
  499. retaining full debugging information.
  500.  
  501. You can only convert certain .EXE files into .COM files. The same
  502. restrictions apply to the -c option of TDSTRIP as to the /t option of
  503. TLINK: Your program must start at location 100 hex, and it can't
  504. contain any segment fixups.
  505.  
  506. If you don't supply an extension with exename, .EXE is presumed. If
  507. you don't supply an extension with outputname, .EXE is added when you
  508. don't use -s, and .TDS is added when you do use -s.
  509.  
  510. Here are some sample TDSTRIP command lines:
  511.  
  512.    TDSTRIP MYPROG
  513.  
  514. removes the symbol table from MYPROG.EXE.
  515.  
  516.    TDSTRIP -s MYPROG.OLD
  517.  
  518. removes the symbol table from MYPROG.OLD and places it in MYPROG.TDS.
  519.  
  520.    TDSTRIP MYPROG MYPROG.NEW
  521.  
  522. leaves MYPROG.EXE unchanged but creates another copy of it named
  523. MYPROG.NEW without a symbol table.
  524.  
  525.    TDSTRIP -s MYPROG MYSYMS
  526.  
  527. removes the symbol table from MYPROG.EXE and places it in MYSYMS.TDS
  528.  
  529.  
  530. TDSTRIP error messages
  531.  
  532. Here is a list of the possible error messages you might encounter when
  533. working with TDSTRIP:
  534.  
  535. Can't create file: ___
  536. TDSTRIP could not create the output symbol or .EXE file. Either there
  537. is no more room on your disk, or you specified an invalid output file
  538. name.
  539.  
  540. Can't open file: ___
  541. TDSTRIP could not locate the .EXE file that you wish to remove the
  542. symbol table from.
  543.  
  544. Error reading from input exe file
  545. An error occurred during reading from the input executable program
  546. file. Your disk may be unreadable. Try the operation again.
  547.  
  548. Error writing to output file: ___; disk may be full
  549. TDSTRIP could not write to the output symbol or executable file. This
  550. usually happens when there is no more room on your disk. You will have
  551. to delete some files to make room for the file created by TDSTRIP.
  552.  
  553. Input file is not an .exe file
  554. You have specified an input file name that is not a valid executable
  555. program. You can strip symbols only from .EXE programs, since these
  556. are the only ones that TLINK can put a symbol table on. Programs in
  557. .COM file format do not have symbol tables and cannot be processed by
  558. TDSTRIP.
  559.  
  560. Invalid command-line option: ___
  561. You have given an invalid command-line option when starting TDSTRIP
  562. from the DOS command line.
  563.  
  564. Invalid exe file format
  565. The input file appears to be an .EXE format program file, but
  566. something is wrong with it. You should relink the program with TLINK.
  567.  
  568. Not enough memory
  569. Your system does not have enough free memory for TDSTRIP to load and
  570. process the .EXE file. This only happens in extreme circumstances
  571. (TDSTRIP has very modest memory requirements). You should probably try
  572. rebooting your system and trying again. You may have previously run a
  573. program that allocated some memory that won't be freed until you
  574. reboot.
  575.  
  576. Program does not have a symbol table
  577. You have specified an input file that is a valid .EXE file, but it
  578. does not have a symbol table.
  579.  
  580. Program does not have a valid symbol table
  581. The symbol table at the end of the .EXE file is not a valid TLINK
  582. symbol table. This can happen if you try and use TDSTRIP on a program
  583. created by a linker other than TLINK.
  584.  
  585. Too many arguments
  586. You can supply a maximum of two arguments to TDSTRIP, the first being
  587. the name of the executable program, and the second being the name of
  588. the output file for symbols or the executable program.
  589.  
  590. You must supply an exe file name
  591. You have started TDSTRIP without giving it the name of an .EXE program
  592. file whose symbol table you want to strip.
  593.  
  594.  
  595. TDMAP: The .MAP file utility
  596. ----------------------------
  597. The TDMAP utility takes a .MAP file -- an ASCII file created by the
  598. linker containing all public symbols of a program--and appends it to
  599. the .EXE file in Turbo Debugger format. This lets you debug an
  600. executable program that you compiled with a non-Borland compiler and
  601. linker.
  602.  
  603. The syntax for using TDMAP is
  604.  
  605.    TDMAP filename [/sourceextension]
  606.  
  607. TDMAP reads filename.MAP and adds debugging information to
  608. filename.EXE. For example, if you want to append debugging records to
  609. a program called HELLO.PAS, you could enter
  610.  
  611.    TDMAP hello /Epas
  612.  
  613. Note that the extension, which is preceded with /E, is optional.
  614.  
  615.  
  616. TDPACK: The file packing utility
  617. --------------------------------
  618. The TDPACK utility compresses the debugging information that's
  619. appended to an .EXE file, making the executable file smaller. It does
  620. this by eliminating duplicate information such as strings or data-type
  621. information.
  622.  
  623. The syntax for using TDPACK is
  624.  
  625.    TDPACK filename
  626.  
  627. If no extension is specified, TDPACK assumes the extension is .EXE. If
  628. it cannot find FILENAME.EXE, TDPACK looks for FILENAME.COM and
  629. FILENAME.TDS (a .TDS file contains Turbo Debugger symbols for use with
  630. a .COM file).
  631.  
  632.  
  633. TDUMP: The file dumping utility
  634. -------------------------------
  635. The TDUMP utility program is a generic module disassembler you can use
  636. to examine the structure of any file.
  637.  
  638. TDUMP attempts to break apart a file as intelligently as possible. To
  639. do this, it first looks to the file's extension, and if it recognizes
  640. it, it displays the file's components according to the type. TDUMP
  641. recognizes .EXE, .OBJ, and .LIB files. Any file type other than these
  642. results in a straight hex dump of the file.
  643.  
  644. You can use TDUMP to peek into the inner structure of any file. This
  645. not only shows you what's in a file, but also shows you how files are
  646. constructed. Moreover, because TDUMP verifies that a file's structure
  647. matches its extension, you can also use TDUMP to test file integrity.
  648.  
  649.  
  650. TDUMP syntax
  651.  
  652. The syntax for TDUMP is
  653.  
  654.    TDUMP [options] inputfile [outputfile]
  655.  
  656. Inputfile is the file whose structure you want to display (or "dump").
  657. Outputfile is an optional file name to send the display to (you can
  658. also use the standard DOS redirection command ">"). Options stands for
  659. any of the TDUMP options discussed in the next section.
  660.  
  661.  
  662. TDUMP command-line options
  663.  
  664. You can use several optional "switches" with TDUMP, all of which start
  665. with a hyphen (or you can use a forward slash instead). The following
  666. two examples are equivalent:
  667.  
  668.    TDUMP -el -v demo.exe
  669.  
  670.    TDUMP /el /v demo.exe
  671.  
  672.  
  673. The -a and -a7 options
  674.  
  675. TDUMP automatically adjusts its output display according to the file
  676. type (it shows an unrecognized file type in hex display). You can,
  677. however, force the display to be in ASCII by including the -a or -a7
  678. option.
  679.  
  680. An ASCII file display shows the offset and the contents in displayable
  681. ASCII characters. If a character is not displayable (like any control
  682. character), it appears as a period.
  683.  
  684. The -a7 option works just like the -a except that it converts any
  685. high-ASCII characters to their low-ASCII equivalents. This is handy if
  686. the file you're dumping sets high-ASCII characters as flags (as
  687. WordStar files do).
  688.  
  689.  
  690. The -e, -el, and -er options
  691.  
  692. All three of these options force TDUMP to display the file as if it
  693. were an executable (.EXE) file.
  694.  
  695. An .EXE file display consists of lists of file statistics at the top
  696. of the display, followed by the global symbol table and the module
  697. table.
  698.  
  699. The -el option works just like -e option except that it suppresses
  700. line numbers in the display.
  701.  
  702. The -er option works just like -e option except that it prevents the
  703. the relocation table from displaying.
  704.  
  705. You can suppress both line numbers and the relocation table by using
  706. -elr as an option.
  707.  
  708.  
  709. The -h option
  710.  
  711. The -h option forces TDUMP to display the file in hexadecimal format.
  712. The hex format consists of a column of offset numbers, columns of hex
  713. numbers, and then ASCII equivalents (with periods appearing where
  714. there are no displayable ASCII characters).
  715.  
  716. If TDUMP does not recognize the file extension of the input file, it
  717. defaults to displaying the file in hex format (unless an option forces
  718. it to show it in another format).
  719.  
  720.  
  721. The -l option
  722.  
  723. The -l option forces TDUMP to display the file as if it were a library
  724. (.LIB) file. A library file is a collection of object files (see the
  725. following section for more on object files). A library file dump shows
  726. first some library-specific information, then each of the object
  727. files, then each record in each object file.
  728.  
  729.  
  730. The -o option
  731.  
  732. The -o option forces TDUMP to display the file as if it were an object
  733. (.OBJ) file. An object file contains descriptions of the command
  734. records that pass commands and data to the linker, telling it how to
  735. create an .EXE file. The display format shows each record and its
  736. associated data, on a record-by-record basis.
  737.  
  738.  
  739. The -v option
  740.  
  741. The -v option affects all file formats equally by suppressing any
  742. descriptions TDUMP ordinarily inserts into the dump to improve
  743. readability. If you use the -v option, the display is a verbatim dump
  744. of the file's components--as terse as possible. You need to be an
  745. advanced programmer to interpret a verbatim display.
  746.  
  747.  
  748. TDNMI: The utility to reset the breakout-switch
  749. -----------------------------------------------
  750. Periscope users: Use TDNMI if you have a Periscope I board and want to
  751. use its breakout switch with Turbo Debugger. TDNMI is a small TSR
  752. program that periodically resets the breakout-switch latch on the
  753. Periscope board. Use the /p command-line option to set the board's
  754. base address if it is different from the default address of 300.
  755.  
  756. If you are using a PC clone that disables the NMI interrupt (such as
  757. some PC's limited systems), you can install the TDNMI resident utility
  758. to clear the NMI every half second. You will need to do this if you
  759. are using a breakout switch on such a system.
  760.  
  761. For a list of all the command-line options available for TDINST.EXE,
  762. TDREMOTE.EXE, INSTALL.EXE, and TDNMI.COM, enter the program name
  763. followed by -h:
  764.  
  765.    TDNMI -h
  766.  
  767.  
  768. TDMEM: The memory display utility
  769. ---------------------------------
  770. TDMEM displays the current availability of your computer's memory.
  771. This includes Expanded or Extended memory, if it exists, and conventional 
  772. memory.  This is useful when debugging TSR and device driver programs.  
  773. You can use the File|Table relocate option in Turbo Debugger to specify 
  774. a base segment address for the current symbol table which is shown when 
  775. running TDMEM.
  776.  
  777.  
  778. TDDEV: The device driver display utility
  779. ----------------------------------------
  780. TDDEV produces a report showing the device drivers loaded into the system
  781. as well as how much memory each uses, and what interrupt vectors are taken
  782. over.  This is also useful when debugging device driver applications.
  783.  
  784.  
  785.  
  786. 2.  HARDWARE DEBUGGER INTERFACE
  787. -------------------------------
  788. Hardware debugging boards greatly speed up certain types of break-
  789. points; in particular, those that watch for an area of memory or a
  790. program variable to change. Turbo Debugger has a general interface for
  791. accessing these boards.
  792.  
  793. This appendix describes how to install the device driver supplied with
  794. Turbo Debugger and how to write a device driver that Turbo Debugger
  795. can communicate with in order to make use of the capabilities of a
  796. particular hardware debugger.
  797.  
  798.  
  799. TDH386.SYS: 80386 hardware device driver
  800. ----------------------------------------
  801. This information is intended for vendors of hardware debuggers who
  802. want to make use of their boards with Turbo Debugger. (Note that you
  803. must know the general architecture of DOS device drivers. Refer to the
  804. DOS Technical Reference for more information on how to write device
  805. drivers.)
  806.  
  807. The Turbo Debugger distribution disk contains the file TDH386.SYS,
  808. which is a hardware device driver that lets Turbo Debugger use the
  809. debug registers on the 80386 processor. You can use this driver by
  810. copying it to your DOS disk and putting the following line in your
  811. CONFIG.SYS file:
  812.  
  813.    DEVICE = TDH386.SYS
  814.  
  815. Turbo Debugger will then use the hardware assistance of the 80386
  816. whenever it can to speed up breakpoint processing.
  817.  
  818. This means, of course, that you can only use this device driver if
  819. your system uses the 80386 processor.
  820.  
  821.  
  822. Setting hardware breakpoints
  823. ----------------------------
  824. There are three ways of setting a hardware-assisted breakpoint:
  825.  
  826. Choose Breakpoints|Changed Memory Global. In the input box of the
  827. dialog box that opens, enter a memory address, followed by the number
  828. of bytes to watch to see if your program has changed anything in that
  829. part of memory.
  830.  
  831. From the Breakpoints window local menu choose Set Options to open the
  832. Breakpoint Options dialog box. Set the Condition radio buttons to
  833. Hardware.
  834.  
  835. In the Breakpoint Options dialog box, set the Condition radio buttons
  836. to Changed Memory. Then choose Hardware Options and the options you
  837. want to use in the Hardware Breakpoint Options dialog box.
  838.  
  839. When you set a breakpoint using the Changed Memory Global command,
  840. Turbo Debugger automatically determines whether that breakpoint can
  841. make use of the available hardware. If it can, Turbo Debugger sets a
  842. hardware breakpoint for you, and indicates that the breakpoint is set
  843. in hardware by putting an asterisk (*) after the global breakpoint
  844. number in the left pane of the Breakpoints window.
  845.  
  846. The following two sections describe how to set generalized hardware
  847. breakpoints. First, we'll tell you the types of breakpoints you can
  848. set with the TDH386.SYS device driver, and then we'll tell you about
  849. all the hardware breakpoint options that may work with other hardware
  850. debugger device drivers. Consult the vendor's documentation for more
  851. information about your particular device driver.
  852.  
  853.  
  854. Hardware conditions permitted with TDH386.SYS
  855. ---------------------------------------------
  856. When you are using TDH386.SYS with the ordinary version of Turbo
  857. Debugger, you can set the following types of hardware breakpoints with
  858. the Hardware Options command in the Breakpoints window local menu:
  859.  
  860. * instruction fetch
  861.  
  862. * read from memory
  863.  
  864. * read/write memory
  865.  
  866. You can't set any type of data matching when you use TDH386.SYS; you
  867. must always set the Data Match radio buttons to Match All. You can
  868. also match only a single memory address or range of memory addresses.
  869. A range can encompass from 1 to 16 bytes, depending on how many other
  870. hardware breakpoints you have set and the address of the beginning of
  871. the range.
  872.  
  873. You can use data watching with breakpoints that are not longer than 4
  874. bytes.
  875.  
  876. The other options in the Hardware Breakpoint Options dialog box off
  877. the Breakpoints window local menu are for other hardware debuggers and
  878. device drivers that might support more matching modes.
  879.  
  880. You can also use TDH386.SYS with Turbo Debugger and with the virtual
  881. debugger (TD386). In this case, you can use many more types of
  882. hardware breakpoints, including matching on any size ranges of memory
  883. or I/O access.
  884.  
  885.  
  886. The Hardware Breakpoint Options dialog box
  887. ------------------------------------------
  888.  
  889. This section describes the Hardware Breakpoint Options dialog box that
  890. can be opened with the Hardware Options command in the Breakpoints
  891. window local menu. Remember that your hardware most likely doesn't
  892. support all combinations of matching that you can specify from this
  893. menu. The previous section describes the combinations that are allowed
  894. for the TDH386.SYS device driver supplied with Turbo Debugger.
  895.  
  896. The Hardware Conditions dialog box lets you set the three matching
  897. criteria that make up a hardware breakpoint:
  898.  
  899. * the bus cycle type that will be matched
  900.  
  901. * the range of addresses that will be matched
  902.  
  903. * the range of data values that will be matched
  904.  
  905. For example, a hardware breakpoint might say "Watch for an I/O write
  906. anywhere from address 3F8 to 3FF as long as the data value is equal to
  907. 1." This breakpoint will then be triggered any time a byte of 1 is
  908. written to any of the I/O locations that control the COM1 serial port.
  909.  
  910. Usually, you set far simpler hardware breakpoints than this, such
  911. as "Watch for I/O to address 200."
  912.  
  913. The Cycle Type radio buttons let you make the following settings:
  914.  
  915. Read Memory          Match memory reads
  916. Write Memory         Match memory writes
  917. Access Memory        Match memory read or write
  918. Input I/O            Match I/O input
  919. Output I/O           Match I/O Output
  920. Both I/O             Match I/O input or output
  921. Fetch Instruction    Match instruction fetch
  922.  
  923. The Access Memory option is a combination of the Read Memory and Write
  924. Memory options--it matches either memory reads or writes. Likewise,
  925. the Both I/O option matches I/O reads or writes.
  926.  
  927. Some hardware debuggers are capable of distinguishing between simple
  928. data reads from memory and instruction fetches. In this case, if you
  929. set a breakpoint to match on read memory, an instruction fetch from
  930. that location will not trigger the hardware breakpoint. Instruction
  931. cycles include all the bytes that the processor reads in order to
  932. determine the instruction operation to perform, including prefix
  933. bytes, operand addresses, and immediate values. The actual data read
  934. or written to memory referenced by an operand's address is not
  935. considered to be part of the instruction fetch. For example,
  936.  
  937.    MOV    AX,[1234]
  938.  
  939. fetches 3 instruction bytes from memory and reads 2 data bytes. If you
  940. use instruction fetch matching, remember that the 80x86 processor
  941. family prefetches instructions to be executed, so you may get false
  942. matches, depending on whether your hardware debugger can sort out
  943. prefetched instructions from ones that are really executed.
  944.  
  945. The Address radio buttons let you make the following settings:
  946.  
  947. Above              Match above an address
  948. Below              Match below an address
  949. Range              Match within address range
  950. Not Range          Match outside address range
  951. Less or Equal      Match below or equal to address
  952. Greater or Equal   Match above or equal to address
  953. Equal              Match a single address
  954. Unequal            Match all but a single address
  955. Match All          Match any address
  956.  
  957. The Data Match radio buttons let you make the following settings:
  958.  
  959. Above              Match above a value
  960. Below              Match below a value
  961. Range              Match within value range
  962. Not Range          Match outside value range
  963. Less or Equal      Match below or equal to value
  964. Greater or Equal   Match above or equal to value
  965. Equal              Match a single value
  966. Unequal            Match all but a single value
  967. Match All          Match any value
  968.  
  969. If you turn on a Data or Address option that involves any less-than or
  970. greater-than condition, a single address match range either starts at
  971. zero and extends to the value you specified, or starts at the value
  972. you specified and extends to the highest allowed value for addresses
  973. or data.
  974.  
  975.  
  976. Hardware debugger overview
  977. --------------------------
  978. The device driver interface provides device-independent access to the
  979. capabilities of different hardware debuggers. To accomplish this, the
  980. common features of several hardware debuggers have been combined into
  981. one generic hardware debugger. Turbo Debugger then uses this abstract
  982. model to make requests to the device driver. A particular board may
  983. not be able to support all the operations specified by the abstract
  984. interface. In this case, the device driver can inform Turbo Debugger
  985. that a requested operation cannot be performed. A hardware board may
  986. also offer more capabilities than the abstract interface defines. In
  987. this case, Turbo Debugger can't make use of the added features of the
  988. board.
  989.  
  990. Since we expect the device driver interface to encompass new features
  991. in future releases, we have defined an "implementation level" status
  992. field that the device driver returns when requested. This lets Turbo
  993. Debugger know what the device driver is capable of doing and provides
  994. compatibility with older drivers, while allowing new drivers to take
  995. advantage of capabilities in future releases of the interface.
  996.  
  997. The hardware debugger interface breaks the capabilities of debugger
  998. boards into three main areas of functionality:
  999.  
  1000. * memory and I/O access breakpoints
  1001.  
  1002. * instruction trace-back memory
  1003.  
  1004. * extra onboard memory for symbol tables
  1005.  
  1006. This version of the interface supports only the first category. Future
  1007. releases will define an interface that accesses the other features.
  1008. When you write a device driver, keep in mind that these other
  1009. capabilities will be supported at a later date.
  1010.  
  1011.  
  1012. Device driver interface
  1013. -----------------------
  1014. The device driver is an ordinary character-type device driver named
  1015. TDH386.SYS. You must put the following statement in your CONFIG.SYS
  1016. file in order for the driver to be loaded when you boot the system:
  1017.  
  1018.    DEVICE = drvrname.ext
  1019.  
  1020. drvrname.ext is the name of the device driver file you have created.
  1021.  
  1022.  
  1023. Device driver function calls
  1024. ----------------------------
  1025. The device driver must support the following function calls:
  1026.  
  1027. INIT (command code = 0)
  1028. Called once when the device driver is first loaded. Your code for this
  1029. function must make sure that the hardware board is disabled and in a
  1030. quiescent state.
  1031.  
  1032. READ (command code = 4)
  1033. Called by Turbo Debugger to read the status block from the last
  1034. command sent to the device driver. You should keep the last status in
  1035. a data area inside the driver and return as many bytes as requested.
  1036. Each time a read is issued, you must start sending from the beginning
  1037. of the status block, even if the previous read request was not long
  1038. enough to send the entire block.
  1039.  
  1040. The section "Status blocks returned by the device driver" describes
  1041. the various status blocks the device driver can return in response to
  1042. different command blocks.
  1043.  
  1044. READNOWAIT (command code = 5)
  1045. Returns the first byte of the status block. The busy bit should always
  1046. be set to 0, indicating that data is available at all times.
  1047.  
  1048. READSTATUS (command code = 6)
  1049. Always sets the busy bit to 0, indicating that a subsequent read
  1050. request would complete immediately.
  1051.  
  1052. READFLUSH (command code = 7)
  1053. Simply sets the done bit in the return status.
  1054.  
  1055. WRITE (command code = 8)
  1056. Called by Turbo Debugger to send a command to the device driver. The
  1057. command will have a variable length, depending on the command type.
  1058. You can either copy the data into a work area inside the device
  1059. driver, or you can access it directly using the data pointer that is
  1060. part of the device driver request.
  1061.  
  1062. The next section describes the various command blocks Turbo Debugger
  1063. can send to the device driver.
  1064.  
  1065. WRITEVERIFY (command code = 9)
  1066. Does the same thing as WRITE (command code 8).
  1067.  
  1068. WRITESTATUS (command code = 10)
  1069. Simply sets the done bit in the return status.
  1070.  
  1071. WRITEFLUSH (command code = 11)
  1072. Simply sets the done bit in the return status.
  1073.  
  1074. All other function calls should set the error bit (bit 15) in the
  1075. return status word, and put an "Unknown command" error code (3) in the
  1076. low byte of the status word.
  1077.  
  1078.  
  1079. Command blocks sent to driver
  1080. -----------------------------
  1081. All command blocks sent to the device driver by the WRITE function
  1082. call start with a byte that describes the operation to perform. The
  1083. subsequent bytes provide additional information for the particular
  1084. command.
  1085.  
  1086. When a hardware breakpoint is set, it is the device driver's
  1087. responsibility to check that it has been handed an acceptable
  1088. parameter block. It can't just ignore fields that request an operation
  1089. it can't perform. You must check each field to make sure that the
  1090. hardware can support the requested operation, and if it can't, you
  1091. must set the appropriate return code.
  1092.  
  1093. The first byte can contain one of the following command codes:
  1094.  
  1095. 0   Installs vectors
  1096. 1   Gets hardware capabilities
  1097. 2   Enables the hardware breakpoints
  1098. 3   Disables the hardware breakpoints
  1099. 4   Sets a hardware breakpoint
  1100. 5   Clears a hardware breakpoint
  1101. 6   Sets I/O base address, resets hardware
  1102. 7   Removes vectors
  1103.  
  1104. The following commands send additional data after the command code:
  1105.  
  1106. Install vectors (code 0)
  1107. 4 bytes     Far pointer to vector routine
  1108.  
  1109. This is a 32-bit pointer, the first word being the offset, and the
  1110. second being the segment. You must save this address so that the
  1111. device driver can jump to it when a hardware breakpoint occurs. This
  1112. routine should also install any interrupt vectors that the device
  1113. driver needs. Turbo Debugger calls this routine once when it first
  1114. starts up. The Remove Vectors (code 10) function is called once by
  1115. Turbo Debugger when it no longer needs to use the hardware debugger
  1116. device driver. At this time, you should replace any vectors that you
  1117. took over when function 0 was called and make sure the hardware is
  1118. disabled.
  1119.  
  1120. Set a hardware breakpoint (code 4)
  1121.  
  1122. 1 byte      Breakpoint type
  1123.  
  1124. 0   Memory read
  1125. 1   Memory write
  1126. 2   Memory read or write
  1127. 3   I/O read
  1128. 4   I/O write
  1129. 5   I/O read or write
  1130. 6   Instruction fetch
  1131.  
  1132. 1 byte      Address matching mode
  1133.  
  1134. 0   Match any address, don't care
  1135. 1   Equal to test value
  1136. 2   Not equal to test value
  1137. 3   Above test value
  1138. 4   Below test value
  1139. 5   Below or equal to test value
  1140. 6   Above or equal to test value
  1141. 7   Within inclusive range
  1142. 8   Outside range
  1143.  
  1144. 4 bytes     Low address
  1145.  
  1146. A memory address, in 32-bit linear form. If the address-matching mode
  1147. requires one or more addresses to test against, the only or low value
  1148. comes here.
  1149.  
  1150. 4 bytes     High address
  1151.  
  1152. A memory address, in 32-bit linear form. If the address matching mode
  1153. requires two addresses to test against a range, the second and higher
  1154. value comes here.
  1155.  
  1156. 2 bytes     Pass count
  1157.  
  1158. 1 byte      Data-matching size, 1 = byte, 2 = word, 4 = doubleword
  1159.  
  1160. 1 byte      Source of matched bus cycle:
  1161.  
  1162. 1   CPU
  1163. 2   DMA
  1164. 3   Either CPU or DMA
  1165.  
  1166. 1 byte      Data-matching mode
  1167.  
  1168. 0   Match any data, don't care
  1169. 1   Equal to test value
  1170. 2   Not equal to test value
  1171. 3   Above test value
  1172. 4   Below test value
  1173. 5   Below or equal to test value
  1174. 6   Above or equal to test value
  1175. 7   Within inclusive range
  1176. 8   Outside range
  1177.  
  1178. 4 bytes     Low data value
  1179.  
  1180. If the data-matching mode requires one or more data values, this field
  1181. supplies the first or only value. The data-matching size determines
  1182. how many bytes of this field are significant.
  1183.  
  1184. 4 bytes     High data value
  1185.  
  1186. If the data-matching mode requires two data values, this field
  1187. supplies the second value. The data-matching size determines how many
  1188. bytes of this field are significant.
  1189.  
  1190. 4 bytes     Data mask
  1191.  
  1192. If the hardware supports it, this field controls which bits in the
  1193. data are examined for the match condition.
  1194.  
  1195. Clear a hardware breakpoint (code 5)
  1196.  
  1197. 1 byte      The handle of the breakpoint to clear. The handle was
  1198. given to Turbo Debugger by the Set Hardware Breakpoint command (code
  1199. 4).
  1200.  
  1201. Set I/O board base address (code 6)
  1202.  
  1203. 2 bytes     The base address of the hardware debugger board.
  1204.  
  1205.  
  1206. Status blocks returned by device driver
  1207.  
  1208. The READ function call returns the status block from the device
  1209. driver. Different commands written to the device driver result in
  1210. various status blocks being built to report on what happened. All the
  1211. status blocks start with a single byte that describes the overall
  1212. result of the requested operation. The subsequent bytes return
  1213. additional information particular to the command that generated the
  1214. status block.
  1215.  
  1216. The following status codes can be returned in the first byte:
  1217.  
  1218. 0   Command was successful.
  1219.  
  1220. 1   Invalid handle supplied.
  1221.  
  1222. 2   Full, can't set any more breakpoints.
  1223.  
  1224. 3   Breakpoint was too complex for the hardware.
  1225. The breakpoint could never be set; the hardware is not capable of
  1226. supporting the combination of bus cycle, address, and data-matching
  1227. that Turbo Debugger requested.
  1228.  
  1229. 4   Command can't be performed due to restrictions imposed by a
  1230. previous command.
  1231. The command could have been performed if it weren't for some previous
  1232. operation preventing it. This could happen, for example, if the
  1233. hardware only permits a single data match value, but Turbo Debugger
  1234. tries to set a second hardware breakpoint with a different data match
  1235. value than the first breakpoint.
  1236.  
  1237. 5   The device driver can't find the hardware board.
  1238.  
  1239. 6   A hardware failure has occurred.
  1240.  
  1241. 7   An invalid command code was sent to the driver.
  1242.  
  1243. 8   The driver has not been initialized with function code 0, so
  1244. nothing can be done yet.
  1245.  
  1246. The following commands return additional status information after the
  1247. status code byte:
  1248.  
  1249. Get hardware capabilities (code 1)
  1250.  
  1251. 2 bytes     Device driver interface (this specification) version
  1252. number.
  1253.  
  1254. The current version is 1, subsequent versions will increase this
  1255. number.
  1256.  
  1257. 2 bytes     Device driver software version number.
  1258.  
  1259. For each released version of your device driver that behaves
  1260. differently, this field should contain a different number. This lets
  1261. Turbo Debugger take special measures if necessary, based on this
  1262. field.
  1263.  
  1264. 1 byte      Maximum number of hardware breakpoints that this
  1265. driver/board combination can support.
  1266.  
  1267. 1 byte      Configuration bits
  1268.  
  1269. Bit  Function
  1270.  
  1271. 01   can distinguish between CPU and DMA accesses
  1272. 11   can detect DMA transfers
  1273. 21   has data mask
  1274. 31   breakpoints have hardware pass counter
  1275. 41   can match on data as well as address
  1276.  
  1277. 1 byte      Breakpoint types supported (bit mask)
  1278.  
  1279. Bit  Function
  1280.  
  1281. 0    Memory read
  1282. 1    Memory write
  1283. 2    Memory read or write
  1284. 3    I/O read
  1285. 4    I/O write
  1286. 5    I/O read or write
  1287. 6    Instruction fetch
  1288.  
  1289. 2 bytes     Addressing match modes supported (bit mask)
  1290.  
  1291. Bit  Function
  1292.  
  1293. 0    Match any address, don't care
  1294. 1    Equal to test value
  1295. 2    Not equal to test value
  1296. 3    Above test value
  1297. 4    Below test value
  1298. 5    Below or equal to test value
  1299. 6    Above or equal to test value
  1300. 7    Within inclusive range
  1301. 8    Outside range
  1302.  
  1303. 2 bytes     Data match modes supported (bit mask)
  1304.  
  1305. Bit  Function
  1306.  
  1307. 0    Match any data, don't care
  1308. 1    Equal to test value
  1309. 2    Not equal to test value
  1310. 3    Above test value
  1311. 4    Below test value
  1312. 5    Below or equal to test value
  1313. 6    Above or equal to test value
  1314. 7    Within inclusive range
  1315. 8    Outside range
  1316.  
  1317. 1 byte      Maximum data match length
  1318.  
  1319. Set to 1, 2, or 4 depending on the widest data match or mask that the
  1320. hardware can perform.
  1321.  
  1322. 2 bytes     Size of onboard memory in kilobytes.
  1323.  
  1324. 2 bytes     Maximum number of trace-back events that can be recalled.
  1325.  
  1326. 2 bytes     Address of hardware breakpoint enable byte
  1327.  
  1328. Specifies the segment address where Turbo Debugger must write a byte
  1329. with a value of 1 to enable hardware breakpoints. The field must
  1330. contain 0 if the device driver does not or cannot support this
  1331. capability. If it is supported, this byte lets Turbo Debugger inform
  1332. the device driver that it has finished writing things to the address
  1333. space of the program being debugged, and that subsequent accesses can
  1334. cause hardware breakpoints.
  1335.  
  1336. Set a hardware breakpoint (code 4)
  1337.  
  1338. 1 byte      A handle that Turbo Debugger will use to refer to this
  1339. breakpoint in the future. The device driver also uses this handle when
  1340. calling back into Turbo Debugger after a hardware breakpoint has
  1341. occurred. The handle must be greater than or equal to zero (0).
  1342. Negative values (top bit on) indicate a special condition when the
  1343. device driver calls Turbo Debugger with a hardware breakpoint.
  1344.  
  1345. Recursive entry (code -2)
  1346.  
  1347. 1 byte      The special value FE (hex) can be returned by the hardware
  1348. device driver if it has been recursively entered while processing a
  1349. hardware breakpoint. This can happen if a hardware breakpoint has been
  1350. set in the 6 bytes below the current top of stack in the program being
  1351. debugged. If Turbo Debugger receives this entry code, it displays a
  1352. message that the device driver can't proceed because of a breakpoint
  1353. being set near the top of the stack.
  1354.  
  1355.  
  1356. Device driver call into Turbo Debugger
  1357. --------------------------------------
  1358.  
  1359. When the hardware board and the device driver software have determined
  1360. that a hardware breakpoint has occurred, control must be transferred
  1361. to the address inside Turbo Debugger that was specified with command
  1362. code 0 (set hardware breakpoint vector).
  1363.  
  1364. The vector address must be jumped to with the CPU state exactly as it
  1365. was when the hardware breakpoint occurred, but with the program's AX
  1366. register pushed on the stack and an entry code now in the AH register.
  1367. The entry code can be
  1368.  
  1369. >= 0        The handle of the triggered breakpoint
  1370.  
  1371. -1 (FF)     The breakout button was pressed
  1372.  
  1373. Turbo Debugger will never return to the device driver once it is
  1374. jumped into from a hardware breakpoint.
  1375.  
  1376.  
  1377. 3.  CORRECTIONS TO THE MANUAL
  1378. =============================
  1379.  
  1380. Chapter 17, Turbo Debugger for Windows (TDW)
  1381.  
  1382. Debugging dynamic link libraries (DLLs)
  1383. p. 276    The comment "TDW can load a DLL that doesn't have a symbol 
  1384.         table, but only into a CPU window, and only if you are
  1385.         debugging in a CPU window" is only partially correct.  
  1386.         TDW will load a DLL without symbols, even when you
  1387.         are debugging source code, and you can only view it in a
  1388.         CPU window.  Therefore, the comment should read, "TDW can
  1389.         load a DLL that doesn't have a symbol table, but only 
  1390.         into a CPU window."
  1391. p. 276    "When the DLL routine exits, TDW reloads your application's
  1392.         symbol table and source code and positions the line marker
  1393.         on the next statement after the call to the DLL entry
  1394.         point."  This statement is not entirely correct.  If you are
  1395.         tracing in a DLL using F7 or F8 and you trace to the end,
  1396.         the DLL will not return to your application if it returns
  1397.         through a Windows function call.  Instead your program will
  1398.         run just as though you had pressed F9.  This behavior occurs
  1399.         often if you are tracing through DLL Startup code.  
  1400.  
  1401.         To force a return to your application, set a breakpoint in
  1402.         your application on the line after the call to the DLL. 
  1403.         When debugging DLL Startup code, set the breakpoint on
  1404.         the first line of your program.
  1405. p. 278    "The items at the top of this list, marked on the right with
  1406.         an oval, are your application's .EXE and the DLLs with symbol
  1407.         tables that your application calls.  If you make no changes,
  1408.         TDW automatically loads in the symbol table and source for
  1409.         each marked DLL whenever your application makes a call to
  1410.         that DLL.  In addition, TDW automatically loads the symbol
  1411.         table and source of any DLL your application starts with a
  1412.         LOADLIBRARY call, even though the DLL might not appear on
  1413.         the list at first.  (It will appear there after TDW loads
  1414.         it.)"  This statement is not entirely correct.  The items 
  1415.         at the top of this list, marked on the right with an oval,
  1416.         do not neccessarily have symbol tables.  The oval indicates
  1417.         that TDW automatically attempts to load in the symbol 
  1418.         table and source for each marked .EXE and DLL.  Therefore,
  1419.         this statement should read, "The items at the top of this
  1420.         list, marked on the right with an oval, are your
  1421.         application's .EXE and the DLLs that your application calls.
  1422.         If you make no changes,    TDW automatically attempts to load
  1423.         in the symbol table and source for each marked DLL whenever
  1424.         your application makes a call to that DLL.  In addition,
  1425.         TDW automatically attempts to loads the symbol table and
  1426.         source of any DLL your application starts with a LOADLIBRARY
  1427.         call, even though the DLL might not appear on the list at
  1428.         first.  (It will appear there after TDW loads it.)"
  1429.  
  1430. Table 17.5 DLLs & Programs list dialog box controls
  1431. p. 278    Symbol load:  This button overrides the Load Symbols
  1432.         setting.  When pressed, it loads the symbol table for 
  1433.         the highlighted DLL or application, regardless of the
  1434.         Load Symbols setting.  Also, the Symbol load button
  1435.         applies to both applications and DLLs.  The description
  1436.         should read as follows:  "Load in the symbol table and
  1437.         source files for the DLL or application, regardless of
  1438.         the Load Symbols setting.  This command overrides the
  1439.         Load Symbols setting and changes the contents of the 
  1440.         Module Window so you can set breakpoints, Window messages,
  1441.         and so on for the DLL or application."
  1442.  
  1443.  
  1444. Chapter 18, Debugging a Windows application
  1445.  
  1446. Terminating BCWDEMOA
  1447. p. 288    Step 11 refers to BCWDEMOB.  This reference should be
  1448.         changed    to BCWDEMOA.
  1449.  
  1450. Logging messages
  1451. p. 288    The first paragraph should read, "This time, you'll tell
  1452.         TDW to log all messages before starting the program.
  1453.         Open the Windows messages window by using the View|Windows
  1454.         messages command, then add WndProc to the top left pane,
  1455.         if it is not already there.  You'll see "Log all messages"
  1456.         appear in the top right pane.  Since this is what you want,
  1457.         you're done with this window."
  1458.  
  1459. Finding the bug
  1460. p. 289    The first paragraph should read, "So where do you go from
  1461.         here?  You could start looking through the code to see if
  1462.         there's an area where WM_PAINT is handled.  However, a more
  1463.         attractive alternative is to set a message breakpoint that
  1464.         will break at the right place, then to begin stepping
  1465.         through the program to see where the problem is.
  1466.  
  1467. Terminating BCWDEMOA
  1468. p. 293    Step 5 should read, "Move the cursor to the New Value entry
  1469.         and    enter 0.  Next, choose Modify to change the variable's
  1470.         value, then press ESC to close the window.  Now when you run
  1471.         the    program, the if statement will evaluate to TRUE and the
  1472.         BeginPaint and EndPaint calls will execute on the first pass."
  1473.  
  1474.