home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / books / cvutil.db < prev    next >
Encoding:
Text File  |  1991-03-01  |  1.1 MB  |  20,509 lines

Text Truncated. Only the first 1MB is shown below. Download the file for the complete contents.
  1. %@1@%Microsoft Codeview and Utilities User's Guide%@EH@%
  2.  
  3.  
  4. ────────────────────────────────────────────────────────────────────────────
  5.  
  6.  
  7. %@AB@%Microsoft(R) CodeView(R) and Utilities User's Guide%@AE@%%@NL@%
  8. %@NL@%
  9. %@AB@%Version 2.3%@AE@%%@NL@%
  10. %@NL@%
  11. %@AB@%for MS(R) OS/2 and MS-DOS(R) Operating Systems%@AE@%%@NL@%
  12. %@NL@%
  13.  
  14. ────────────────────────────────────────────────────────────────────────────
  15.  
  16.  
  17. MICROSOFT CORPORATION%@NL@%
  18. %@NL@%
  19. Information in this document is subject to change without notice and does
  20. not represent a commitment on the part of Microsoft Corporation. The
  21. software described in this document is furnished under a license agreement
  22. or nondisclosure agreement. The software may be used or copied only in
  23. accordance with the terms of the agreement. It is against the law to copy
  24. the software on any medium except as specifically allowed in the license or
  25. nondisclosure agreement. No part of this manual may be reproduced or
  26. transmitted in any form or by any means, electronic or mechanical, including
  27. photocopying and recording, for any purpose without the express written
  28. permission of Microsoft.%@NL@%
  29. %@NL@%
  30. (c)Copyright Microsoft Corporation, 1987, 1989. All rights reserved.
  31. Simultaneously published in the U.S. and Canada.%@NL@%
  32. %@NL@%
  33. Printed and bound in the United States of America.%@NL@%
  34. %@NL@%
  35. Microsoft, MS, MS-DOS, XENIX, and  CodeView are registered trademarks of
  36. Microsoft Corporation.%@NL@%
  37. %@NL@%
  38. AT&T is a registered trademark of American Telephone and Telegraph Company.%@NL@%
  39. %@NL@%
  40. Eagle is a registered trademark of Eagle Computer, Inc.%@NL@%
  41. %@NL@%
  42. IBM is a registered trademark of International Business Machines
  43. Corporation.%@NL@%
  44. %@NL@%
  45. Intel is a registered trademark of Intel Corporation.%@NL@%
  46. %@NL@%
  47. Lotus is a registered trademark of Lotus Development Corporation.%@NL@%
  48. %@NL@%
  49. Tandy is a registered trademark of Tandy Corporation.%@NL@%
  50. %@NL@%
  51. Document No. LN0801A-500-R00-0889
  52. Part No. 07824 10 9 8 7 6 5 4 3 2 1%@NL@%%@NL@%
  53. %@NL@%
  54. %@NL@%
  55. %@CR:MCVTOC00@%%@1@%%@AB@%Table of Contents%@AE@%%@EH@%%@NL@%
  56. ───────────────────────────────────────────────────────────────────────────%@NL@%
  57. %@NL@%
  58. %@AB@%Introduction%@AE@%%@NL@%
  59. New Features of the CodeView(R) Debugger%@BO:    655f@%%@NL@%
  60. About this Manual%@BO:    6d22@%%@NL@%
  61. Document Conventions%@BO:    81a3@%%@NL@%
  62. %@NL@%
  63. %@AB@%Part 1%@BO:    92c3@%  The CodeView Debugger%@AE@%%@NL@%
  64. %@NL@%
  65. %@AB@%Chapter 1%@BO:    9668@%  Getting Started%@AE@%%@NL@%
  66. 1.1%@BO:    9a49@%  Restrictions%@NL@%
  67. 1.2%@BO:    a2d0@%  The CodeView Environment%@NL@%
  68. 1.3%@BO:    a4f5@%  Preparing Programs for the CodeView Debugger%@NL@%
  69.       1.3.1%@BO:    ab8b@%  Programming Considerations%@NL@%
  70.       1.3.2%@BO:    b4af@%  CodeView Compile Options%@NL@%
  71.       1.3.3%@BO:    bf17@%  CodeView Link Options%@NL@%
  72.       1.3.4%@BO:    c3f5@%  Preparing C Programs%@NL@%
  73.       1.3.5%@BO:    d503@%  Preparing FORTRAN Programs%@NL@%
  74.       1.3.6%@BO:    e15f@%  Preparing BASIC Programs%@NL@%
  75.       1.3.7%@BO:    ecfc@%  Preparing Pascal Programs%@NL@%
  76.       1.3.8%@BO:    fbcc@%  Preparing Assembly Programs%@NL@%
  77. 1.4%@BO:   11843@%  Starting the CodeView Debugger%@NL@%
  78. 1.5%@BO:   136bc@%  Using CodeView Options%@NL@%
  79.       1.5.1%@BO:   14c56@%  Using Two Video Adapters%@NL@%
  80.       1.5.2%@BO:   14f4e@%  Using the Enhanced Graphics Adapter's 43-Line Mode%@NL@%
  81.       1.5.3%@BO:   154dc@%  Using 50-Line Mode%@NL@%
  82.       1.5.4%@BO:   1590c@%  Starting with a Black-and-White Display%@NL@%
  83.       1.5.5%@BO:   15ee7@%  Specifying Start-Up Commands%@NL@%
  84.       1.5.6%@BO:   16a80@%  Handling Interrupt Trapping (DOS Only)%@NL@%
  85.       1.5.7%@BO:   16f76@%  Using Expanded Memory (DOS Only)%@NL@%
  86.       1.5.8%@BO:   17480@%  Setting the Screen-Exchange Mode (DOS Only)%@NL@%
  87.       1.5.9%@BO:   1871d@%  Loading Information from Dynamic-Link Libraries (OS/2 Only)%@NL@%
  88.       1.5.10%@BO:   18d58@% Turning Off the Mouse%@NL@%
  89.       1.5.11%@BO:   193ba@% Debugging Multiple Processes (OS/2 only)%@NL@%
  90.       1.5.12%@BO:   19679@% Extending EGA Compatibility%@NL@%
  91.       1.5.13%@BO:   19bb9@% Using Debug Registers (386 Only)%@NL@%
  92.       1.5.14%@BO:   19f30@% Enabling Window or Sequential Mode%@NL@%
  93. 1.6%@BO:   1a79f@%  Debugging Large Programs%@NL@%
  94. 1.7%@BO:   1ab8d@%  Working with Older Versions of the Assembler%@NL@%
  95. %@NL@%
  96. %@AB@%Chapter 2%@BO:   1b3d8@%  The CodeView Display%@AE@%%@NL@%
  97. 2.1%@BO:   1b99f@%  Using Window Mode%@NL@%
  98.       2.1.1%@BO:   1c85a@%  Executing Window Commands with the Keyboard%@NL@%
  99.       2.1.2%@BO:   20854@%  Executing Window Commands with the Mouse%@NL@%
  100.       2.1.3%@BO:   23f2f@%  Using Menu Selections%@NL@%
  101.       2.1.4%@BO:   2bcdf@%  Using On-Line Help%@NL@%
  102. 2.2%@BO:   2c28f@%  Using Sequential Mode%@NL@%
  103. %@NL@%
  104. %@AB@%Chapter 3%@BO:   2d605@%  Using Dialog Commands%@AE@%%@NL@%
  105. 3.1%@BO:   2dade@%  Entering Commands and Arguments%@NL@%
  106.       3.1.1%@BO:   2dcbd@%  Using Special Keys%@NL@%
  107.       3.1.2%@BO:   2e430@%  Using the Command Buffer%@NL@%
  108. 3.2%@BO:   2ea51@%  Format for CodeView Commands and Arguments%@NL@%
  109. 3.3%@BO:   2f609@%  Selecting Text for Use with Commands%@NL@%
  110. %@NL@%
  111. %@AB@%Chapter 4%@BO:   2faf9@%  CodeView Expressions%@AE@%%@NL@%
  112. 4.1%@BO:   30301@%  C Expressions%@NL@%
  113.       4.1.1%@BO:   311e5@%  C Symbols%@NL@%
  114.       4.1.2%@BO:   3174b@%  C Constants%@NL@%
  115.       4.1.3%@BO:   32144@%  C Strings%@NL@%
  116. 4.2%@BO:   3244c@%  FORTRAN Expressions%@NL@%
  117.       4.2.1%@BO:   33079@%  FORTRAN Symbols%@NL@%
  118.       4.2.2%@BO:   33624@%  FORTRAN Constants%@NL@%
  119.       4.2.3%@BO:   34042@%  FORTRAN Strings%@NL@%
  120.       4.2.4%@BO:   34369@%  FORTRAN Intrinsic Functions%@NL@%
  121. 4.3%@BO:   3515a@%  BASIC Expressions%@NL@%
  122.       4.3.1%@BO:   35f3f@%  BASIC Symbols%@NL@%
  123.       4.3.2%@BO:   3628f@%  BASIC Constants%@NL@%
  124.       4.3.3%@BO:   36fa6@%  BASIC Strings%@NL@%
  125.       4.3.4%@BO:   37305@%  BASIC Intrinsic Functions%@NL@%
  126. 4.4%@BO:   37e4e@%  Assembly Expressions%@NL@%
  127. 4.5%@BO:   3924f@%  Line Numbers%@NL@%
  128. 4.6%@BO:   39937@%  Registers and Addresses%@NL@%
  129.       4.6.1%@BO:   39b52@%  Registers%@NL@%
  130.       4.6.2%@BO:   3a308@%  Addresses%@NL@%
  131.       4.6.3%@BO:   3ac1e@%  Address Ranges%@NL@%
  132. 4.7%@BO:   3b6ea@%  Memory Operators%@NL@%
  133.       4.7.1%@BO:   3bb32@%  Accessing Bytes (BY)%@NL@%
  134.       4.7.2%@BO:   3c108@%  Accessing Words (WO)%@NL@%
  135.       4.7.3%@BO:   3c569@%  Accessing Double Words (DW)%@NL@%
  136. 4.8%@BO:   3cc47@%  Switching Expression Evaluators%@NL@%
  137. %@NL@%
  138. %@AB@%Chapter 5%@BO:   3d63b@%  Executing Code%@AE@%%@NL@%
  139. 5.1%@BO:   3daa3@%  Window and Sequential Mode Commands%@NL@%
  140. 5.2%@BO:   3e3a8@%  Trace Command%@NL@%
  141. 5.3%@BO:   3fb26@%  Program Step Command%@NL@%
  142. 5.4%@BO:   40cd0@%  Go Command%@NL@%
  143. 5.5%@BO:   4296f@%  Execute Command%@NL@%
  144. 5.6%@BO:   4323d@%  Restart Command%@NL@%
  145. %@NL@%
  146. %@AB@%Chapter 6%@BO:   43f5c@%  Examining Data and Expressions%@AE@%%@NL@%
  147. 6.1%@BO:   44676@%  Display Expression Command%@NL@%
  148. 6.2%@BO:   48adf@%  The Graphic Display Command%@NL@%
  149.       6.2.1%@BO:   4922e@%  Invoking the Graphic Display Command%@NL@%
  150.       6.2.2%@BO:   49b89@%  Changing the Display%@NL@%
  151. 6.3%@BO:   4a9ef@%  Examine Symbols Command%@NL@%
  152. 6.4%@BO:   4e3b9@%  Dump Commands%@NL@%
  153.       6.4.1%@BO:   4f43b@%  Dump%@NL@%
  154.       6.4.2%@BO:   4f89a@%  Dump Bytes%@NL@%
  155.       6.4.3%@BO:   4ffa8@%  Dump ASCII%@NL@%
  156.       6.4.4%@BO:   505cb@%  Dump Integers%@NL@%
  157.       6.4.5%@BO:   50cc7@%  Dump Unsigned Integers%@NL@%
  158.       6.4.6%@BO:   51252@%  Dump Words%@NL@%
  159.       6.4.7%@BO:   51732@%  Dump Double Words%@NL@%
  160.       6.4.8%@BO:   51cac@%  Dump Short Reals%@NL@%
  161.       6.4.9%@BO:   523d8@%  Dump Long Reals%@NL@%
  162.       6.4.10%@BO:   52b0f@% Dump 10-Byte Reals%@NL@%
  163. 6.5%@BO:   53254@%  Compare Memory Command%@NL@%
  164. 6.6%@BO:   53cad@%  Search Memory Command%@NL@%
  165. 6.7%@BO:   546bf@%  Port Input Command%@NL@%
  166. 6.8%@BO:   54cca@%  Register Command%@NL@%
  167. 6.9%@BO:   55d8a@%  8087 Command%@NL@%
  168. %@NL@%
  169. %@AB@%Chapter 7%@BO:   579f3@%  Managing Breakpoints%@AE@%%@NL@%
  170. 7.1%@BO:   57fb9@%  Breakpoint Set Command%@NL@%
  171. 7.2%@BO:   59aec@%  Breakpoint Clear Command%@NL@%
  172. 7.3%@BO:   5a420@%  Breakpoint Disable Command%@NL@%
  173. 7.4%@BO:   5ae0f@%  Breakpoint Enable Command%@NL@%
  174. 7.5%@BO:   5b686@%  Breakpoint List Command%@NL@%
  175. %@NL@%
  176. %@AB@%Chapter 8%@BO:   5c045@%  Managing Watch Statements%@AE@%%@NL@%
  177. 8.1%@BO:   5c485@%  Watch Statement Commands%@NL@%
  178. 8.2%@BO:   5ceb8@%  Setting Watch-Expression and Watch-Memory Statements%@NL@%
  179. 8.3%@BO:   5ebff@%  Setting Watchpoints%@NL@%
  180. 8.4%@BO:   6059c@%  Setting Tracepoints%@NL@%
  181. 8.5%@BO:   62b98@%  Deleting Watch Statements%@NL@%
  182. 8.6%@BO:   63917@%  Listing Watchpoints and Tracepoints%@NL@%
  183. 8.7%@BO:   6416b@%  C Examples%@NL@%
  184. 8.8%@BO:   645a6@%  FORTRAN Examples%@NL@%
  185. 8.9%@BO:   64a01@%  Assembly Examples%@NL@%
  186. %@NL@%
  187. %@AB@%Chapter 9%@BO:   6542b@%  Examining Code%@AE@%%@NL@%
  188. 9.1%@BO:   6576d@%  Set Mode Command%@NL@%
  189. 9.2%@BO:   6695d@%  Unassemble Command%@NL@%
  190. 9.3%@BO:   67eda@%  View Command%@NL@%
  191. 9.4%@BO:   69705@%  Current Location Command%@NL@%
  192. 9.5%@BO:   69fb5@%  Stack Trace Command%@NL@%
  193. %@NL@%
  194. %@AB@%Chapter 10%@BO:   6c3f1@%  Modifying Code or Data%@AE@%%@NL@%
  195. 10.1%@BO:   6c86c@%  Assemble Command%@NL@%
  196. 10.2%@BO:   6ea96@%  Enter Commands%@NL@%
  197.        10.2.1%@BO:   707ab@%  Enter Command%@NL@%
  198.        10.2.2%@BO:   70cc7@%  Enter Bytes Command%@NL@%
  199.        10.2.3%@BO:   7124c@%  Enter ASCII Command%@NL@%
  200.        10.2.4%@BO:   7164a@%  Enter Integers Command%@NL@%
  201.        10.2.5%@BO:   71be1@%  Enter Unsigned Integers Command%@NL@%
  202.        10.2.6%@BO:   72159@%  Enter Words Command%@NL@%
  203.        10.2.7%@BO:   7264b@%  Enter Double Words Command%@NL@%
  204.        10.2.8%@BO:   72ce6@%  Enter Short Reals Command%@NL@%
  205.        10.2.9%@BO:   732a0@%  Enter Long Reals Command%@NL@%
  206.        10.2.10%@BO:   73869@% Enter 10-Byte Reals Command%@NL@%
  207. 10.3%@BO:   73e3c@%  Fill Memory Command%@NL@%
  208. 10.4%@BO:   74736@%  Move Memory Command%@NL@%
  209. 10.5%@BO:   75046@%  Port Output Command%@NL@%
  210. 10.6%@BO:   75739@%  Register Command%@NL@%
  211. %@NL@%
  212. %@AB@%Chapter 11%@BO:   76d63@%  CodeView Control Commands%@AE@%%@NL@%
  213. 11.1%@BO:   77201@%  Help Command%@NL@%
  214. 11.2%@BO:   77713@%  Quit Command%@NL@%
  215. 11.3%@BO:   77bd5@%  Radix Command%@NL@%
  216. 11.4%@BO:   78bb2@%  Redraw Comm and%@NL@%
  217. 11.5%@BO:   78f11@%  Screen Exchange Command%@NL@%
  218. 11.6%@BO:   79472@%  Search Command%@NL@%
  219. 11.7%@BO:   7b01d@%  Shell Escape Command%@NL@%
  220. 11.8%@BO:   7c541@%  Tab Set Command%@NL@%
  221. 11.9%@BO:   7cc9c@%  Option Command%@NL@%
  222. 11.10%@BO:   7de27@% Redirection Commands%@NL@%
  223.        11.10.1%@BO:   7e1b9@%  Redirecting CodeView Input%@NL@%
  224.        11.10.2%@BO:   7e758@%  Redirecting CodeView Output%@NL@%
  225.        11.10.3%@BO:   7f0f6@%  Redirecting CodeView Input and Output%@NL@%
  226.        11.10.4%@BO:   7f5cc@%  Commands Used with Redirection%@NL@%
  227. %@NL@%
  228. %@AB@%Chapter 12%@BO:   80899@%  Debugging in Protected Mode%@AE@%%@NL@%
  229. 12.1%@BO:   80e8a@%  Using CodeView in Different Modes%@NL@%
  230. 12.2%@BO:   81470@%  Debugging Dynamic-Link Libraries%@NL@%
  231. 12.3%@BO:   81b5e@%  Debugging Multiple Processes%@NL@%
  232.        12.3.1%@BO:   828e2@%  Viewing Status%@NL@%
  233.        12.3.2%@BO:   82cea@%  Switching to a Child Process%@NL@%
  234. 12.4%@BO:   831dd@%  Debugging Multiple Threads%@NL@%
  235. 12.5%@BO:   83f8a@%  The Thread Command%@NL@%
  236.        12.5.1%@BO:   845f9@%  Legal Values for Specifier%@NL@%
  237.        12.5.2%@BO:   84d1b@%  Legal Values for yCommand%@NL@%
  238.        12.5.3%@BO:   86567@%  Entries to the Thread Command%@NL@%
  239.        12.5.4%@BO:   86f50@%  Effect of Threads on CodeView Commands%@NL@%
  240. %@NL@%
  241. %@AB@%Part 2%@BO:   87cd5@%  Utilities%@AE@%%@NL@%
  242. %@NL@%
  243. %@AB@%Chapter 13%@BO:   8801e@%  Linking Object Files with LINK%@AE@%%@NL@%
  244. 13.1%@BO:   88409@%  Determining Linker Output%@NL@%
  245. 13.2%@BO:   88fe5@%  Specifying Files for Linking%@NL@%
  246.        13.2.1%@BO:   892c3@%  Specifying File Names%@NL@%
  247.        13.2.2%@BO:   89934@%  Linking with the LINK Command Line%@NL@%
  248.        13.2.3%@BO:   8baf9@%  Linking with the LINK Prompts%@NL@%
  249.        13.2.4%@BO:   8c8b2@%  Linking with a Response File%@NL@%
  250.        13.2.5%@BO:   8d60c@%  How LINK Searches for Libraries%@NL@%
  251.        13.2.6%@BO:   8ebda@%  LINK Memory Requirements%@NL@%
  252. 13.3%@BO:   8f69e@%  Specifying Linker Options%@NL@%
  253.        13.3.1%@BO:   900cf@%  Aligning Segment Data (/A)%@NL@%
  254.        13.3.2%@BO:   903ae@%  Running in Batch Mode (/BA)%@NL@%
  255.        13.3.3%@BO:   9093f@%  Producing a .COM File (/BI)%@NL@%
  256.        13.3.4%@BO:   90dce@%  Preparing for Debugging (/CO)%@NL@%
  257.        13.3.5%@BO:   910e0@%  Setting the Maximum Allocation Space (/CP)%@NL@%
  258.        13.3.6%@BO:   91a23@%  Ordering Segments (/DO)%@NL@%
  259.        13.3.7%@BO:   92097@%  Controlling Data Loading (/DS)%@NL@%
  260.        13.3.8%@BO:   92560@%  Packing Executable Files (/E)%@NL@%
  261.        13.3.9%@BO:   92ae0@%  Optimizing Far Calls (/F)%@NL@%
  262.        13.3.10%@BO:   938d1@% Viewing the Options List (/HE)%@NL@%
  263.        13.3.11%@BO:   93a86@% Controlling Executable-File Loading (/HI)%@NL@%
  264.        13.3.12%@BO:   93dca@% Preparing for Incremental Linking (/INC)%@NL@%
  265.        13.3.13%@BO:   94034@% Displaying Linker Process Information (/INF)%@NL@%
  266.        13.3.14%@BO:   94620@% Including Line Numbers in the Map File (/LI)%@NL@%
  267.        13.3.15%@BO:   94a90@% Listing Public Symbols (/M)%@NL@%
  268.        13.3.16%@BO:   94e75@% Ignoring Default Libraries (/NOD)%@NL@%
  269.        13.3.17%@BO:   9516c@% Ignoring Extended Dictionary (/NOE)%@NL@%
  270.        13.3.18%@BO:   95405@% Disabling Far-Call Optimization (/NOF)%@NL@%
  271.        13.3.19%@BO:   95617@% Preserving Compatibility (/NOG)%@NL@%
  272.        13.3.20%@BO:   95967@% Preserving Case Sensitivity (/NOI)%@NL@%
  273.        13.3.21%@BO:   95ce4@% Ordering Segments without Inserting NULL Bytes (/NON)%@NL@%
  274.        13.3.22%@BO:   96061@% Disabling Segment Packing (/NOP)%@NL@%
  275.        13.3.23%@BO:   9624f@% Setting the Overlay Interrupt (/O)%@NL@%
  276.        13.3.24%@BO:   9661b@% Packing Contiguous Data Segments (/PACKC)%@NL@%
  277.        13.3.25%@BO:   97257@% Packing Contiguous Data Segments (/PACKD)%@NL@%
  278.        13.3.26%@BO:   978cc@% Padding Code Segments (/PADC)%@NL@%
  279.        13.3.27%@BO:   97ed1@% Padding Data Segments (/PADD)%@NL@%
  280.        13.3.28%@BO:   98338@% Pausing during Linking (/PAU)%@NL@%
  281.        13.3.29%@BO:   989e6@% Specifying User Libraries for Quick Languages (/Q)%@NL@%
  282.        13.3.30%@BO:   99437@% Setting Maximum Number of Segments (/SE)%@NL@%
  283.        13.3.31%@BO:   99af7@% Controlling Stack Size (/ST)%@NL@%
  284.        13.3.32%@BO:   9a01d@% Issuing Fixup Warnings (/W)%@NL@%
  285. 13.4%@BO:   9a2d0@%  Selecting Options with the LINK Environment Variable%@NL@%
  286. 13.5%@BO:   9aae1@%  Linker Operation%@NL@%
  287.        13.5.1%@BO:   9b071@%  Alignment of Segments%@NL@%
  288.        13.5.2%@BO:   9b3d5@%  Frame Number%@NL@%
  289.        13.5.3%@BO:   9b908@%  Order of Segments%@NL@%
  290.        13.5.4%@BO:   9bb53@%  Combined Segments%@NL@%
  291.        13.5.5%@BO:   9c3d0@%  Groups%@NL@%
  292.        13.5.6%@BO:   9c7e0@%  Fixups%@NL@%
  293. 13.6%@BO:   9d599@%  Using Overlays%@NL@%
  294.        13.6.1%@BO:   9de28@%  Restrictions on Overlays%@NL@%
  295.        13.6.2%@BO:   9e0bd@%  Overlay-Manager Prompts%@NL@%
  296. %@NL@%
  297. %@AB@%Chapter 14%@BO:   9eada@%  Incremental Linking with ILINK%@AE@%%@NL@%
  298. 14.1%@BO:   9f091@%  Definitions%@NL@%
  299. 14.2%@BO:   9fa9a@%  Guidelines for Using ILINK%@NL@%
  300. 14.3%@BO:   a037d@%  The Development Process%@NL@%
  301. 14.4%@BO:   a0a6e@%  Running ILINK%@NL@%
  302.        14.4.1%@BO:   a0bd3@%  Files Required for Using ILINK%@NL@%
  303.        14.4.2%@BO:   a0ebd@%  The ILINK Command Line%@NL@%
  304. 14.5%@BO:   a197b@%  How ILINK Works%@NL@%
  305. 14.6%@BO:   a1dad@%  Incremental Violations%@NL@%
  306.        14.6.1%@BO:   a20bd@%  Changing Libraries%@NL@%
  307.        14.6.2%@BO:   a239b@%  Exceeding Code/Data Padding%@NL@%
  308.        14.6.3%@BO:   a25ce@%  Moving/Deleting Data Symbols%@NL@%
  309.        14.6.4%@BO:   a2719@%  Deleting Code Symbols%@NL@%
  310.        14.6.5%@BO:   a285b@%  Changing Segment Definitions%@NL@%
  311.        14.6.6%@BO:   a2a56@%  Adding CodeView Debugger Information%@NL@%
  312. %@NL@%
  313. %@AB@%Chapter 15%@BO:   a2cc3@%  Managing Libraries with LIB%@AE@%%@NL@%
  314. 15.1%@BO:   a348c@%  Managing Libraries%@NL@%
  315.        15.1.1%@BO:   a39b0@%  Managing Libraries with the LIB Command Line%@NL@%
  316.        15.1.2%@BO:   a74a1@%  Managing Libraries with the LIB Prompts%@NL@%
  317.        15.1.3%@BO:   a8274@%  Managing Libraries with a Response File%@NL@%
  318.        15.1.4%@BO:   a8c44@%  Terminating the LIB Session%@NL@%
  319. 15.2%@BO:   a8e05@%  Performing Library-Management Tasks with LIB%@NL@%
  320.        15.2.1%@BO:   a99e2@%  Creating a Library File%@NL@%
  321.        15.2.2%@BO:   aa066@%  Changing a Library File%@NL@%
  322.        15.2.3%@BO:   aa52d@%  Adding Library Modules%@NL@%
  323.        15.2.4%@BO:   aa89f@%  Deleting Library Modules%@NL@%
  324.        15.2.5%@BO:   aaa81@%  Replacing Library Modules%@NL@%
  325.        15.2.6%@BO:   aad0d@%  Copying Library Modules%@NL@%
  326.        15.2.7%@BO:   aafe3@%  Moving Library Modules (Extracting)%@NL@%
  327.        15.2.8%@BO:   ab138@%  Combining Libraries%@NL@%
  328.        15.2.9%@BO:   ab7b3@%  Creating a Cross-Reference-Listing File%@NL@%
  329.        15.2.10%@BO:   abc5d@% Performing Consistency Checks%@NL@%
  330.        15.2.11%@BO:   abfb6@% Setting the Library-Page Size%@NL@%
  331. %@NL@%
  332. %@AB@%Chapter 16%@BO:   ac80b@%  NMAKE%@AE@%%@NL@%
  333. 16.1%@BO:   acda3@%  Invoking NMAKE%@NL@%
  334.        16.1.1%@BO:   acf89@%  Using a Command Line to Invoke NMAKE%@NL@%
  335.        16.1.2%@BO:   ad98e@%  Using a Command File to Invoke NMAKE%@NL@%
  336. 16.2%@BO:   adfed@%  NMAKE Options%@NL@%
  337. 16.3%@BO:   af1b7@%  Description Files%@NL@%
  338.        16.3.1%@BO:   af441@%  Description Blocks%@NL@%
  339.        16.3.2%@BO:   b1bf8@%  Macros%@NL@%
  340.        16.3.3%@BO:   b4fe0@%  Inference Rules%@NL@%
  341.        16.3.4%@BO:   b66d0@%  Directives%@NL@%
  342.        16.3.5%@BO:   b8373@%  Pseudotargets%@NL@%
  343. 16.4%@BO:   b921d@%  Response-File Generation%@NL@%
  344. 16.5%@BO:   b992f@%  Differences between NMAKE and MAKE%@NL@%
  345. %@NL@%
  346. %@AB@%Chapter 17%@BO:   ba564@%  Using Other Utilities%@AE@%%@NL@%
  347. 17.1%@BO:   ba961@%  Modifying Program Headers with the EXEMOD Utility%@NL@%
  348. 17.2%@BO:   bd180@%  Enlarging the DOS Environment with the SETENV Utility%@NL@%
  349. 17.3%@BO:   bdfa9@%  Saving Memory with the CVPACK Utility%@NL@%
  350. %@NL@%
  351. %@AB@%Chapter 18%@BO:   be41d@%  Linking for Windows and OS/2 Systems%@AE@%%@NL@%
  352. 18.1%@BO:   be78c@%  Dynamic-Link Libraries%@NL@%
  353. 18.2%@BO:   bef80@%  Linking without an Import Library%@NL@%
  354. 18.3%@BO:   bf4f0@%  Linking with an Import Library%@NL@%
  355. 18.4%@BO:   bff48@%  Why Use Import Libraries?%@NL@%
  356. 18.5%@BO:   c05f4@%  Advantages of Dynamic Linking%@NL@%
  357. 18.6%@BO:   c0e10@%  Creating Import Libraries with IMPLIB%@NL@%
  358. %@NL@%
  359. %@AB@%Chapter 19%@BO:   c14f2@%  Using Module-Definition Files%@AE@%%@NL@%
  360. 19.1%@BO:   c16f2@%  Module Statements%@NL@%
  361. 19.2%@BO:   c249b@%  The NAME Statement%@NL@%
  362. 19.3%@BO:   c312c@%  The LIBRARY Statement%@NL@%
  363. 19.4%@BO:   c3a0a@%  The DESCRIPTION Statement%@NL@%
  364. 19.5%@BO:   c3e7c@%  The CODE Statement%@NL@%
  365. 19.6%@BO:   c53df@%  The DATA Statement%@NL@%
  366. 19.7%@BO:   c7332@%  The SEGMENTS Statement%@NL@%
  367. 19.8%@BO:   c914d@%  The STACKSIZE Statement%@NL@%
  368. 19.9%@BO:   c9500@%  The EXPORTS Statement%@NL@%
  369. 19.10%@BO:   ca38e@% The IMPORTS Statement%@NL@%
  370. 19.11%@BO:   cb223@% The STUB Statement%@NL@%
  371. 19.12%@BO:   cb722@% The HEAPSIZE Statement%@NL@%
  372. 19.13%@BO:   cbc65@% The PROTMODE Statement%@NL@%
  373. 19.14%@BO:   cbf52@% The OLD Statement%@NL@%
  374. 19.15%@BO:   cc3a4@% The REALMODE Statement%@NL@%
  375. 19.16%@BO:   cc64c@% The EXETYPE Statement%@NL@%
  376. %@NL@%
  377. %@AB@%Chapter 20%@BO:   ccaeb@%  Creating Dual-Mode Programs with BIND%@AE@%%@NL@%
  378. 20.1%@BO:   cd327@%  Binding Library Routines%@NL@%
  379. 20.2%@BO:   cd791@%  Binding Functions as Protected Mode Only%@NL@%
  380. 20.3%@BO:   cddc2@%  The BIND Command Line%@NL@%
  381. 20.4%@BO:   ceb6c@%  BIND Operation%@NL@%
  382. 20.5%@BO:   cf15a@%  Executable-File Layout%@NL@%
  383. 20.6%@BO:   cf376@%  How to Build a Dual-Mode Application%@NL@%
  384. %@NL@%
  385. %@AB@%Chapter 21%@BO:   cf974@%  Using EXEHDR%@AE@%%@NL@%
  386. 21.1%@BO:   cfd99@%  The EXEHDR Command Line%@NL@%
  387. 21.2%@BO:   d003c@%  EXEHDR Output%@NL@%
  388. 21.3%@BO:   d13d9@%  Output in Verbose Mode%@NL@%
  389. %@NL@%
  390. %@AB@%Appendix A  Regular Expressions%@BO:   d21a7@%%@AE@%%@NL@%
  391. A.1%@BO:   d260f@%  Special Characters in Regular Expressions%@NL@%
  392. A.2%@BO:   d2e49@%  Searching for Special Characters%@NL@%
  393. A.3%@BO:   d3194@%  Using the Period%@NL@%
  394. A.4%@BO:   d3594@%  Using Brackets%@NL@%
  395.       A.4.1%@BO:   d39c0@%  Using the Dash within Brackets%@NL@%
  396.       A.4.2%@BO:   d3f77@%  Using the Caret within Brackets%@NL@%
  397.       A.4.3%@BO:   d425c@%  Matching Brackets within Brackets%@NL@%
  398. A.5%@BO:   d4612@%  Using the Asterisk%@NL@%
  399. A.6%@BO:   d4e5b@%  Matching the Start or End of a Line%@NL@%
  400. %@NL@%
  401. %@AB@%Appendix B  Using Exit Codes%@BO:   d5161@%%@AE@%%@NL@%
  402. B.1%@BO:   d531e@%  Exit Codes with NMAKE%@NL@%
  403. B.2%@BO:   d583b@%  Exit Codes with DOS Batch Files%@NL@%
  404. B.3%@BO:   d5d29@%  Exit Codes for Programs%@NL@%
  405.       B.3.1%@BO:   d5edc@%  LINK Exit Codes%@NL@%
  406.       B.3.2%@BO:   d61d5@%  LIB Exit Codes%@NL@%
  407.       B.3.3%@BO:   d646e@%  NMAKE Exit Codes%@NL@%
  408.       B.3.4%@BO:   d666d@%  EXEMOD and SETENV Exit Codes%@NL@%
  409.       B.3.5%@BO:   d690c@%  CVPACK Exit Codes%@NL@%
  410. %@NL@%
  411. %@AB@%Appendix C  Error Messages%@BO:   d6a72@%%@AE@%%@NL@%
  412. C.1%@BO:   d6b19@%  CodeView Error Messages%@NL@%
  413. C.2%@BO:   ddc92@%  LINK Error Messages%@NL@%
  414.       C.2.1%@BO:   de32b@%  LINK Fatal Error Messages%@NL@%
  415.       C.2.2%@BO:   e43a2@%  LINK Nonfatal Error Messages%@NL@%
  416.       C.2.3%@BO:   e7025@%  LINK Warning Messages%@NL@%
  417. C.3%@BO:   ea5df@%  ILINK Error Messages%@NL@%
  418.       C.3.1%@BO:   eac72@%  ILINK Fatal Errors%@NL@%
  419.       C.3.2%@BO:   edd18@%  Incremental Violations%@NL@%
  420.       C.3.3%@BO:   ef6d9@%  ILINK Warning Messages%@NL@%
  421. C.4%@BO:   efccf@%  LIB Error Messages%@NL@%
  422.       C.4.1%@BO:   f0080@%  Fatal LIB Error Messages%@NL@%
  423.       C.4.2%@BO:   f2164@%  Nonfatal LIB Error Messages%@NL@%
  424.       C.4.3%@BO:   f2727@%  Warning LIB Error Messages%@NL@%
  425. C.5%@BO:   f307a@%  NMAKE Error Messages%@NL@%
  426.       C.5.1%@BO:   f3337@%  Fatal NMAKE Error Messages%@NL@%
  427.       C.5.2%@BO:   f6e78@%  Warning NMAKE Error Messages%@NL@%
  428. C.6%@BO:   f78cf@%  EXEMOD Error Messages%@NL@%
  429.       C.6.1%@BO:   f7c31@%  Fatal EXEMOD Error Messages%@NL@%
  430.       C.6.2%@BO:   f8448@%  Warning EXEMOD Error Messages%@NL@%
  431. C.7%@BO:   f88fb@%  SETENV Error Messages%@NL@%
  432. %@NL@%
  433. %@AB@%Glossary%@BO:   f9323@%%@AE@%%@NL@%
  434. %@NL@%
  435. %@AB@%Index%@BO:  102fa5@%%@AE@%%@NL@%
  436. %@NL@%
  437. %@AB@%Tables%@AE@%
  438. Table 1.1%@BO:   17dc5@%  Default Exchange and Display Modes%@NL@%
  439. Table 4.1%@BO:   3059b@%  CodeView C Expression Operators%@NL@%
  440. Table 4.2%@BO:   31fd3@%  C Radix Examples%@NL@%
  441. Table 4.3%@BO:   32771@%  CodeView FORTRAN Operators%@NL@%
  442. Table 4.4%@BO:   33ebd@%  FORTRAN Radix Examples%@NL@%
  443. Table 4.5%@BO:   345f7@%  FORTRAN Intrinsic Functions Supported by the CodeView Debugger%@NL@%
  444. Table 4.6%@BO:   3530b@%  CodeView BASIC Operators%@NL@%
  445. Table 4.7%@BO:   36e23@%  BASIC Radix Examples%@NL@%
  446. Table 4.8%@BO:   3752b@%  BASIC Intrinsic Functions Supported by the CodeView Debugger%@NL@%
  447. Table 4.9%@BO:   3a08b@%  Registers%@NL@%
  448. Table 6.1%@BO:   44e7b@%  CodeView Format Specifiers%@NL@%
  449. Table 10.1%@BO:   7655d@% Flag-Value Mnemonics%@NL@%
  450. Table 16.1%@BO:   b6044@% Predefined Inference Rules%@NL@%
  451. %@NL@%
  452. %@NL@%
  453. %@CR:MCV00000@%%@1@%%@AB@%Introduction%@AE@%%@EH@%%@NL@%
  454. ───────────────────────────────────────────────────────────────────────────%@NL@%
  455. %@NL@%
  456. %@CR:MCV00001@%%@4@%Welcome to the Microsoft(R) CodeView(R) debugger and development utilities.%@EH@%
  457. These are executable programs that help you develop software written with
  458. the Microsoft BASIC, C, FORTRAN, and Pascal compilers, as well as with the
  459. Microsoft Macro Assembler.%@NL@%
  460. %@NL@%
  461. %@CR:MCV00002@%%@4@%The Microsoft CodeView debugger is a powerful, window-oriented tool that%@EH@%
  462. enables you to track down logical errors in programs; it allows you to
  463. analyze a program as the program is actually running. The CodeView debugger
  464. will display source code or assembly code, indicate which line is about to
  465. be executed, dynamically watch the values of variables (local or global),
  466. switch screens to display program output, and perform many other related
  467. functions. The debugger can be easily learned and used by assembly and
  468. high-level-language programmers alike.%@NL@%
  469. %@NL@%
  470. %@CR:MCV00003@%%@4@%The utilities are important at various stages of software development. After%@EH@%
  471. you use a compiler or assembler to produce one or more object files, use
  472. LINK to produce an executable file. (When a program is made into an
  473. executable file, it is finally in the form that can be loaded and executed
  474. by DOS.) In the process of linking, you may use software libraries. The LIB
  475. utility enables you to create, examine, and maintain these libraries. The
  476. process of compiling and linking can be automated──to a large degree──with
  477. the MAKE utility; MAKE keeps track of which source files have been changed,
  478. and then executes just the commands necessary to update the program.%@NL@%
  479. %@NL@%
  480. %@CR:MCV00004@%%@4@%Other utilities help you maintain executable files once they have been%@EH@%
  481. created. You can use EXEMOD to examine or modify the file's header. The
  482. executable-file header indicates stack size, load size, and other important
  483. items used by DOS each time it executes the file.%@NL@%
  484. %@NL@%
  485. %@CR:MCV00005@%%@4@%Finally, you can use the SETENV and ERROUT utilities to modify the DOS%@EH@%
  486. environment itself.%@NL@%
  487. %@NL@%
  488. ───────────────────────────────────────────────────────────────────────────%@NL@%
  489. %@AI@%NOTE%@AE@%%@NL@%
  490.    Microsoft documentation uses the term "OS/2" to refer to the OS/2
  491.    systems──Microsoft(R) OperatingSystem/2 (MS(R) OS/2) and IBM(R) OS/2.
  492.    Similarly, the term "DOS" refers to both the MS-DOS(R) and IBM Personal
  493.    Computer DOS operating systems. The name of a specific operating system
  494.    is used when it is necessary to note features that are unique to that
  495.    system.%@NL@%
  496. ───────────────────────────────────────────────────────────────────────────%@NL@%
  497. %@NL@%
  498. %@NL@%
  499. %@CR:MCV01000@%%@2@%%@AB@%New Features of the CodeView(R) Debugger%@AE@%%@EH@%%@NL@%
  500. %@NL@%
  501. %@CR:MCV01001@%  ■  Structure, pointer, and array display%@NL@%
  502. %@NL@%
  503.      A new dialog box supports visual display of structures and arrays. Each%@NL@%
  504.      member or element is displayed. You can also use this dialog box to%@NL@%
  505.      examine local variables and nested structures and to trace pointer%@NL@%
  506.      references.%@NL@%
  507. %@NL@%
  508.   ■  Multilanguage expression evaluation%@NL@%
  509. %@NL@%
  510.      The CodeView debugger has a built-in language interpreter that can%@NL@%
  511.      evaluate either C, BASIC, or FORTRAN expressions.%@NL@%
  512. %@NL@%
  513.   ■  386 support%@NL@%
  514. %@NL@%
  515.      The CodeView debugger now supports debugging of code written%@NL@%
  516.      specifically for the 386 processor. You can now decode and assemble 386%@NL@%
  517.      instructions, as well as view 386 registers.%@NL@%
  518. %@NL@%
  519.   ■  Expanded memory support%@NL@%
  520. %@NL@%
  521.      If you have expanded memory, you can substantially reduce the amount of%@NL@%
  522.      main memory required to debug a program. Many programs that were%@NL@%
  523.      previously too large can now be run with the CodeView debugger.%@NL@%
  524. %@NL@%
  525.   ■  8087 emulator support%@NL@%
  526. %@NL@%
  527.      If you do not have an 8087 coprocessor in your machine, you can link to%@NL@%
  528.      a Microsoft emulator library and take advantage of the 7 command. The%@NL@%
  529.      debugger will display pseudo-8087 registers, as if you did have a math%@NL@%
  530.      coprocessor in your machine.%@NL@%
  531. %@NL@%
  532.   ■  Overlays and library modules%@NL@%
  533. %@NL@%
  534.      The debugger is now fully compatible with programs that use overlays.%@NL@%
  535.      You can also debug library modules.%@NL@%
  536. %@NL@%
  537.   ■  New commands%@NL@%
  538. %@NL@%
  539.      The SYMDEB (symbolic debugger) commands──Compare, Fill, Move, Input,%@NL@%
  540.      and Output──have been added to the CodeView debugger's repertoire. The%@NL@%
  541.      Option command provides more power for redirected input and start-up%@NL@%
  542.      commands.%@NL@%
  543. %@NL@%
  544. %@NL@%
  545. %@CR:MCV02000@%%@2@%%@AB@%About this Manual%@AE@%%@EH@%%@NL@%
  546. %@NL@%
  547. %@CR:MCV02001@%%@4@%This manual is intended as a companion volume to Microsoft language manuals.%@EH@%
  548. It is not language specific, except where examples are required; and in
  549. those cases, examples from several languages are typically given.%@NL@%
  550. %@NL@%
  551. %@CR:MCV02002@%%@4@%The manual is divided into two parts, followed by appendixes: Part 1%@EH@%
  552. (chapters 1-12) explains how to use the CodeView debugger to examine and
  553. locate program errors; Part 2 (chapters 13-21) explains how to use each of
  554. the utilities, including LINK, ILINK, LIB, NMAKE, EXEMOD, SETENV, and BIND.
  555. The appendixes at the end of the manual discuss exit codes and error
  556. messages for the CodeView debugger and all the utilities.%@NL@%
  557. %@NL@%
  558. %@CR:MCV02003@%%@4@%The following list indicates where to find different kinds of information in%@EH@%
  559. the manual. The list is by no means exhaustive, but is intended to serve as
  560. a starting place, particularly for the new user of the CodeView debugger.%@NL@%
  561. %@NL@%
  562. %@CR:MCV02004@%%@NL@%
  563. %@TH:   81   3727  2 28 49 @%
  564. %@AB@%Information                 Location%@AE@%%@EH@%
  565.  
  566. Examining and locating      Part 1%@BO:    92c3@% (chapters 1-12), "The CodeView Debugger,"
  567. program errors              describes methods to help you track down errors
  568.                             in a program and analyze it while it runs. Exit
  569.                             codes and error messages are discussed in the
  570.                             appendixes at the back of this manual.
  571.  
  572. Starting a debugging        Chapter 1%@BO:    9668@%, "Getting Started," tells you how
  573. session                     to compile and link programs so that you can run
  574.                             them with the debugger. It also explains each
  575.                             CodeView command-line option.
  576.  
  577. Using the CodeView          Chapter 2%@BO:   1b3d8@%, "The CodeView Display," describes
  578. interface                   how to use the CodeView windows, pop-up menus,
  579.                             and the mouse.
  580.  
  581. Specifying the CodeView     Chapter 3%@BO:   2d605@%, "Using Dialog Commands," presents the
  582. commands                    general form of commands, while Chapter 4%@BO:   2faf9@%,
  583.                             "CodeView Expressions," describes how to build
  584.                             complex expressions for use in commands.
  585.  
  586. Controlling execution       Chapter 5%@BO:   3d63b@%, "Executing Code," explains the basics
  587. of your program             of controlling program execution with the
  588.                             CodeView debugger; Chapter 7%@BO:   579f3@%, "Managing
  589.                             Breakpoints," explains how to use breakpoints to
  590.                             suspend execution.
  591.  
  592. Watching the value of       Chapter 6%@BO:   43f5c@%, "Examining Data and Expressions,"
  593. variables or                shows how to display values; Chapter 8%@BO:   5c045@%,
  594. expressions                 "Managing Watch Statements," shows how to place
  595.                             variables in a window where you can watch their
  596.                             values change as the program runs.
  597.  
  598. Using the utilities         Part 2%@BO:   87cd5@% (chapters 13-21), "Utilities," describes
  599.                             the various utilities for producing and
  600.                             maintaining executable files, and for other
  601.                             tasks. Exit codes and error messages for the
  602.                             utilities are discussed in the appendixes at the
  603.                             back of this manual.
  604.  
  605. Creating executable         Chapter 13%@BO:   8801e@%, "Linking Object Files with LINK."
  606. files
  607.  
  608. Using the incremental       Chapter 14%@BO:   9eada@%, "Incremental Linking with ILINK."
  609. linker for faster
  610. linking
  611.  
  612. Managing software           Chapter 15%@BO:   a2cc3@%, "Managing Libraries with LIB."
  613. libraries
  614.  
  615. Automating projects         Chapter 16%@BO:   ac80b@%, "NMAKE."
  616. that have several
  617. modules
  618.  
  619. Using EXEMOD, SETENV,       Chapter 17%@BO:   ba564@%, "Using Other Utilities."
  620. and CVPACK
  621.  
  622. Dynamic linking under       Chapter 18%@BO:   be41d@%, "Linking for Windows and OS/2
  623. OS/2                        Systems."
  624.  
  625. Module-definition           Chapter 19%@BO:   c14f2@%, "Using Module-Definition Files."
  626. statements
  627.  
  628. Binding programs to run     Chapter 20%@BO:   ccaeb@%, "Creating Dual-Mode Programs with
  629. under both protected        BIND."
  630. mode and real mode
  631.  
  632. Viewing the contents of     Chapter 21%@BO:   cf974@%, "Using EXEHDR."
  633. a segmented .EXE file
  634. header
  635.  
  636. Specifying expressions      Appendix A%@BO:   d21a7@%, "Regular Expressions."
  637. for the CodeView Search
  638. command
  639.  
  640. Codes returned to DOS       Appendix B%@BO:   d5161@%, "Exit Codes."
  641. by each utility
  642.  
  643. A list of error             Appendix C%@BO:   d6a72@%, "Error Messages."
  644. messages
  645. %@TE:   81   3727  2 28 49 @%
  646. %@NL@%
  647. ───────────────────────────────────────────────────────────────────────────%@NL@%
  648. %@AI@%Important%@AE@%%@NL@%
  649.    There may be additional information about the CodeView debugger in the%@NL@%
  650.    %@AB@%README.DOC file.%@AE@% This file will describe changes made to the program%@NL@%
  651.    after the manual was printed.%@NL@%
  652. ───────────────────────────────────────────────────────────────────────────%@NL@%
  653. %@NL@%
  654. %@NL@%
  655. %@CR:MCV03000@%%@2@%%@AB@%Document Conventions%@AE@%%@EH@%%@NL@%
  656. %@NL@%
  657. %@CR:MCV03001@%%@4@%The following document conventions are used throughout this manual and apply%@EH@%
  658. in particular to syntax displays.%@NL@%
  659. %@NL@%
  660. %@CR:MCV03002@%%@NL@%
  661. %@TH:   69   4014  2 28 49 @%
  662. %@AB@%Example                     Description%@AE@%
  663.  
  664. %@AB@%BP%@AE@%                          %@AB@%Boldface type%@AE@% always marks standard features of
  665.                             either programming languages (keywords,
  666.                             operators, and functions) or CodeView
  667.                             sequential-mode commands.
  668.  
  669.                             These terms and punctuation marks must be typed
  670.                             exactly as shown in order to have effect.
  671.                             However, the use of uppercase or lowercase
  672.                             letters is not always significant.
  673.                             Case-sensitive terms are noted in text.
  674.  
  675. %@AI@%number%@AE@%                      %@AI@%Placeholders%@AE@% are words in italics that indicate
  676.                             a general kind of information; you are expected
  677.                             to provide the actual value. For example,
  678.                             consider the syntax display for the CodeView
  679.                             Radix command:
  680.  
  681.                             %@AB@%N%@AE@%%@AI@%number%@AE@%
  682.  
  683.                             This syntax display asks that you enter the
  684.                             Radix command by typing %@AS@%N%@AE@%, immediately followed
  685.                             by some value for %@AI@%number%@AE@%. You could, for
  686.                             example, type in the entry %@AS@%N8%@AE@%; but you could not
  687.                             legally type in the word "number" itself.
  688.  
  689. %@AS@%Word Ptr%@AE@%                    %@AS@%This font%@AE@% is used to indicate all example
  690.                             programs, user input, and screen output.
  691.  
  692. Program . . . Fragment      A column of three dots tells you part of a
  693.                             program has been intentionally omitted.%@AS@%
  694.  
  695. «%@AI@%optional items%@AE@%»            Double brackets enclose optional fields in
  696.                             command-line and option syntax. Consider the
  697.                             following command-line syntax:
  698.  
  699.                             %@AB@%R%@AE@% «%@AI@%register%@AE@%» ««=»%@AI@%value%@AE@%»
  700.  
  701.                             The double brackets around the placeholders
  702.                             indicate that you may enter a %@AI@%register%@AE@% and you
  703.                             may enter a %@AI@%value%@AE@%. The equal sign (=) indicates
  704.                             that you may place an equal sign before the
  705.                             %@AI@%value%@AE@%, but only if you specify a %@AI@%value%@AE@%.
  706.  
  707. «%@AI@%choice1%@AE@% | %@AI@%choice2%@AE@%»         The vertical bar indicates that you may enter
  708.                             one of the entries shown on either side of the
  709.                             bar. The following command-line syntax
  710.                             illustrates the use of a vertical bar:
  711.  
  712.                             %@AB@%DB%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»
  713.  
  714.                             The bar indicates that following the Dump Bytes
  715.                             command (%@AB@%DB%@AE@%), you can specify either an %@AI@%address%@AE@%
  716.                             or %@AI@%range%@AE@%. Since both are in double brackets, you
  717.                             can also give the command with no argument.
  718.  
  719. "Watch point"               The first time a new term is defined, it is
  720.                             enclosed in quotation marks.
  721.  
  722. ALT                         Small capital letters are used for the names of
  723.                             keys and key sequences, such as ENTER, CTRL+C,
  724.                             and ALT+F.
  725.  
  726. Sample screens              Sample screens are shown in black and white.
  727.                             Your screens will look like this if you have a
  728.                             monochrome monitor, or if you use the /B option
  729.                             in the CodeView command line (see Section 1.5.4%@BO:   1590c@%,
  730.                             "Starting with a Black-and-White Display").
  731. %@TE:   69   4014  2 28 49 @%
  732. %@NL@%
  733. %@NL@%
  734. ───────────────────────────────────────────────────────────────────────────%@NL@%
  735. %@CR:MCVP1000@%%@1@%%@AB@%Part 1  The CodeView Debugger%@AE@%%@EH@%%@NL@%
  736. %@NL@%
  737. %@CR:MCVP1003@%%@4@%Part 1 explains the use of the CodeView debugger. Commands, display, and%@EH@%
  738. interface of the debugger are presented here, while other material relevant
  739. to the debugger such as error messages and exit codes is presented in the
  740. Appendixes.%@NL@%
  741. %@NL@%
  742. %@CR:MCVP1004@%%@4@%Chapter 1%@BO:    9668@% explains how to create a C, Fortran, BASIC, Pascal or assembly%@EH@%
  743. program that can be run with CodeView; it also explains how to start the
  744. debugger and select various command-line options.%@NL@%
  745. %@NL@%
  746. %@CR:MCVP1005@%%@4@%Chapter 2%@BO:   1b3d8@% discusses the CodeView display screen and interface, including%@EH@%
  747. function keys, keyboard commands, and the mouse.%@NL@%
  748. %@NL@%
  749. %@CR:MCVP1006@%%@4@%Chapters 3%@BO:   2d605@%-12 of Part 1 describe how to use each of the CodeView commands%@EH@%
  750. and expressions.%@NL@%
  751. %@NL@%
  752. %@NL@%
  753. %@CR:MCV10000@%%@1@%%@AB@%Chapter 1  Getting Started%@AE@%%@EH@%%@NL@%
  754. ───────────────────────────────────────────────────────────────────────────%@NL@%
  755. %@NL@%
  756. %@CR:MCV10001@%%@4@%Getting started with the CodeView debugger requires several simple steps.%@EH@%
  757. First you must prepare a special-format executable file for the program you
  758. wish to debug; then you can invoke the debugger. You may also wish to
  759. specify options that will affect the debugger's operation.%@NL@%
  760. %@NL@%
  761. %@CR:MCV10002@%%@4@%This chapter describes how to produce executable files in the CodeView%@EH@%
  762. format using C, FORTRAN, BASIC, Pascal, or assembly language and describes
  763. how to load a program into the CodeView debugger. The chapter lists
  764. restrictions and programming considerations with regard to the debugger,
  765. which you may want to consult before compiling or assembling. Finally, the
  766. chapter describes how to use the debugger with Microsoft or IBM Macro
  767. Assembler, Versions 1.0 through 4.0.%@NL@%
  768. %@NL@%
  769. %@NL@%
  770. %@CR:MCV11000@%%@2@%%@AB@%1.1  Restrictions%@AE@%%@EH@%%@NL@%
  771. %@NL@%
  772. %@CR:MCV11001@%%@4@%This list describes files that are not directly supported by the debugger.%@EH@%
  773. The following restrictions apply generally to the use of the CodeView
  774. debugger, regardless of the language being used.%@NL@%
  775. %@NL@%
  776. %@AB@%Restriction                 Explanation%@AE@%%@NL@%
  777. %@NL@%
  778. Include files               You will not be able to use the CodeView%@NL@%
  779.                             debugger to debug source code in include files.%@NL@%
  780. %@NL@%
  781. Packed files                CodeView symbolic information cannot be put into%@NL@%
  782.                             a packed file.%@NL@%
  783. %@NL@%
  784. .COM files                  Files with the extension .COM can be debugged in%@NL@%
  785.                             assembly mode only; they can never contain%@NL@%
  786.                             symbolic information.%@NL@%
  787. %@NL@%
  788. Memory-resident             The CodeView debugger can only work with%@NL@%
  789. programs                    disk-resident .EXE and .COM files. Debugging of%@NL@%
  790.                             memory-resident files is not supported.%@NL@%
  791. %@NL@%
  792. Programs that alter the     Programs that run under the CodeView debugger%@NL@%
  793. environment                 can read the DOS environment, but they cannot%@NL@%
  794.                             permanently change it. Upon exit from CodeView,%@NL@%
  795.                             all changes to the environment are lost.%@NL@%
  796. %@NL@%
  797. Program Segment Prefix      The CodeView debugger automatically preprocesses%@NL@%
  798. (PSP)                       a program's PSP the same way a C program does;%@NL@%
  799.                             quote marks are removed, and exactly one space%@NL@%
  800.                             is left between command-line arguments. This%@NL@%
  801.                             preprocessing only creates a problem if you are%@NL@%
  802.                             debugging a program not written in C──one that%@NL@%
  803.                             tries to access command-line arguments.%@NL@%
  804. %@NL@%
  805. %@CR:MCV11003@%%@4@%Some of the features now allowed by CodeView include debugging of library%@EH@%
  806. modules and debugging of overlaid code.%@NL@%
  807. %@NL@%
  808. %@NL@%
  809. %@CR:MCV12000@%%@2@%%@AB@%1.2  The CodeView Environment%@AE@%%@EH@%%@NL@%
  810. %@NL@%
  811. %@CR:MCV12001@%%@4@%Work with CodeView can be optimized in several ways.%@EH@%%@NL@%
  812. %@NL@%
  813. %@CR:MCV12002@%%@4@%The CVPACK utility compresses CodeView information in an executable file.%@EH@%
  814. See Section 17.4%@BO:   bdfa9@% for directions on how to use CVPACK.%@NL@%
  815. %@NL@%
  816. %@CR:MCV12003@%%@4@%In addition, the /E option enables CodeView to take advantage of expanded%@EH@%
  817. memory. Command-line options are described in Section 1.5%@BO:   136bc@%.%@NL@%
  818. %@NL@%
  819. %@NL@%
  820. %@CR:MCV13000@%%@2@%%@AB@%1.3  Preparing Programs for the CodeView Debugger%@AE@%%@EH@%%@NL@%
  821. %@NL@%
  822. %@CR:MCV13001@%%@4@%You must compile and link with the correct options in order to use a program%@EH@%
  823. with the CodeView debugger. These options direct the compiler and the linker
  824. to produce an executable file, which contains line-number information and a
  825. symbol table, in addition to the executable code.%@NL@%
  826. %@NL@%
  827. ───────────────────────────────────────────────────────────────────────────%@NL@%
  828. %@AI@%NOTE%@AE@%%@NL@%
  829.    For the sake of brevity, Sections 1.3.1%@BO:    ab8b@%-1.3.3 use the term "compiling"%@NL@%
  830.    to refer to the process of producing object modules. However, almost%@NL@%
  831.    everything said about compiling in this section applies equally well to%@NL@%
  832.    assembling. Exceptions are noted in Section 1.3.8%@BO:    fbcc@%, "Preparing Assembly%@NL@%
  833.    Programs."%@NL@%
  834. ───────────────────────────────────────────────────────────────────────────%@NL@%
  835. %@NL@%
  836. %@CR:MCV13002@%%@4@%Not all compiler and linker versions support CodeView options. (See the%@EH@%
  837. section on the appropriate language below for information about compiler
  838. versions.) Also, you will need to use the Microsoft Overlay Linker (Version
  839. 3.6 or later) or the Microsoft Segmented-Executable Linker. If you try to
  840. debug an executable file that was not compiled and linked with CodeView
  841. options, or if you use a compiler that does not support these options, then
  842. you will only be able to use the debugger in assembly mode. This means the
  843. CodeView debugger will not be able to display source code or understand
  844. source-level symbols, such as symbols for functions and variables.%@NL@%
  845. %@NL@%
  846. %@NL@%
  847. %@CR:MCV13100@%%@3@%%@AB@%1.3.1  Programming Considerations%@AE@%%@EH@%%@NL@%
  848. %@NL@%
  849. %@CR:MCV13101@%%@4@%Any source code that is legal in C, FORTRAN, BASIC, Pascal, or Microsoft%@EH@%
  850. Macro Assembler can be compiled or assembled to create an executable file
  851. and then debugged with the CodeView debugger. However, some programming
  852. practices make debugging more difficult.%@NL@%
  853. %@NL@%
  854. %@CR:MCV13102@%%@4@%Each of the Microsoft languages listed above permits you to put code in%@EH@%
  855. separate include files and read the files into your source file by using an
  856. include directive. However, you will not be able to use the CodeView
  857. debugger to debug source code in include files. The preferred method of
  858. developing programs is to create separate object modules and then link the
  859. object modules with your program. The CodeView debugger supports the
  860. debugging of separate object modules in the same session.%@NL@%
  861. %@NL@%
  862. %@CR:MCV13103@%%@4@%Also, the CodeView debugger is more effective and easier to use if you put%@EH@%
  863. each source statement on a separate line. A number of languages (C and BASIC
  864. in particular) permit you to place more than one statement on a single line
  865. of the source file. This practice does not prevent the CodeView debugger
  866. from functioning. However, the debugger must treat the line as a single
  867. unit; it cannot break the line down into separate statements. Therefore, if
  868. you have three statements on the same line, you will not be able to put a
  869. breakpoint or freeze execution on the individual statements. The best you
  870. will be able to do is to freeze execution at the beginning of the three
  871. statements or at the beginning of the next line.%@NL@%
  872. %@NL@%
  873. %@CR:MCV13104@%%@4@%Some languages (C and assembly in particular) support a type of macro%@EH@%
  874. expansion. However, the CodeView debugger will not help you debug macros in
  875. source mode. You will need to expand the macros yourself before debugging
  876. them; otherwise, the debugger will treat them as simple statements or
  877. instructions.%@NL@%
  878. %@NL@%
  879. %@CR:MCV13105@%%@4@%Finally, your segments should be declared according to the standard%@EH@%
  880. Microsoft format (as described in the %@AI@%Microsoft Mixed-Language%@AE@% %@AI@%Programming%@AE@%
  881. %@AI@%Guide%@AE@%). This is taken care of for you automatically with each of the
  882. Microsoft high-level languages.%@NL@%
  883. %@NL@%
  884. %@NL@%
  885. %@CR:MCV13200@%%@3@%%@AB@%1.3.2  CodeView Compile Options%@AE@%%@EH@%%@NL@%
  886. %@NL@%
  887. %@CR:MCV13201@%%@4@%Microsoft compilers accept command-line options preceded by either a forward%@EH@%
  888. slash (/) or a dash (-). For brevity, this manual lists only the forward
  889. slash when describing options, but you may use either symbol.%@NL@%
  890. %@NL@%
  891. %@CR:MCV13202@%%@4@%The use of uppercase or lowercase letters is significant for options used%@EH@%
  892. with the C, FORTRAN, BASIC, and Pascal compilers; you must type the letters
  893. exactly as given.%@NL@%
  894. %@NL@%
  895. %@CR:MCV13203@%%@4@%When you compile a source file for a program you want to debug, you must%@EH@%
  896. specify the /Zi option on the command line. The /Zi option instructs the
  897. compiler to include line-number and symbolic information in the object file.%@NL@%
  898. %@NL@%
  899. %@CR:MCV13204@%%@4@%If you do not need complete symbolic information in some modules, you can%@EH@%
  900. compile those modules with the /Zd option instead of /Zi. The /Zd option
  901. writes less symbolic information to the object file, so using this option
  902. will save disk space and memory. For example, if you are working on a
  903. program made up of five modules, but only need to debug one module, you can
  904. compile that module with the /Zi option and the other modules with the /Zd
  905. option. You will be able to examine global variables and see source lines in
  906. modules compiled with the /Zd option, but local variables will be
  907. unavailable.%@NL@%
  908. %@NL@%
  909. %@CR:MCV13205@%%@4@%In addition, if you are working with a high-level language, you will%@EH@%
  910. probably want to use the /Od option, which turns off optimization. Optimized
  911. code may be rearranged for greater efficiency and, as a result, the
  912. instructions in your program may not correspond closely to the source lines.
  913. After debugging, you can compile a final version of the program with the
  914. optimization level you prefer.%@NL@%
  915. %@NL@%
  916. ───────────────────────────────────────────────────────────────────────────%@NL@%
  917. %@AI@%NOTE%@AE@%%@NL@%
  918.    The %@AB@%/Zd%@AE@% option is not available with QuickBASIC. The %@AB@%/Od%@AE@% option is not%@NL@%
  919.    available with QuickBASIC or the Macro Assembler.%@NL@%
  920. ───────────────────────────────────────────────────────────────────────────%@NL@%
  921. %@NL@%
  922. %@CR:MCV13206@%%@4@%You cannot debug a program until you compile it successfully. The CodeView%@EH@%
  923. debugger will not help you correct syntax or compiler errors. Once you
  924. successfully compile your program, you can use the debugger to locate
  925. logical errors in the program.%@NL@%
  926. %@NL@%
  927. %@CR:MCV13207@%%@4@%Compiling examples are given in the sections below on compiling and linking%@EH@%
  928. with specific languages.%@NL@%
  929. %@NL@%
  930. %@NL@%
  931. %@CR:MCV13300@%%@3@%%@AB@%1.3.3  CodeView Link Options%@AE@%%@EH@%%@NL@%
  932. %@NL@%
  933. %@CR:MCV13301@%%@4@%If you use LINK separately to link an object file or files for debugging,%@EH@%
  934. you should specify the /CODEVIEW option (it can be abbreviated as /CO). This
  935. instructs the linker to incorporate addresses for symbols and source lines
  936. into the executable file.%@NL@%
  937. %@NL@%
  938. %@CR:MCV13302@%%@4@%If you use a Microsoft driver program that automatically invokes the linker%@EH@%
  939. (such as CL with C, or FL with FORTRAN), the linker is automatically invoked
  940. with the /CO option whenever you specify /Zi on the command line. You do not
  941. use /CO unless you are invoking the linker directly, by typing LINK.%@NL@%
  942. %@NL@%
  943. %@CR:MCV13303@%%@4@%Although executable files prepared with the /CODEVIEW option can be%@EH@%
  944. executed from the DOS command line like any other executable files, they
  945. are larger because of the extra symbolic information in them. To minimize
  946. program size, you will probably want to recompile and link your final
  947. version without the /Zi option when you finish debugging a program.%@NL@%
  948. %@NL@%
  949. %@CR:MCV13304@%%@4@%Linking examples are given in the sections below on compiling and linking%@EH@%
  950. with specific languages.%@NL@%
  951. %@NL@%
  952. %@NL@%
  953. %@CR:MCV13400@%%@3@%%@AB@%1.3.4  Preparing C Programs%@AE@%%@EH@%%@NL@%
  954. %@NL@%
  955. %@CR:MCV13401@%%@4@%In order to use the CodeView debugger with a program written in C, you need%@EH@%
  956. to compile it with the Microsoft C Compiler, Version 4.0 or later. Earlier
  957. versions of the compiler do not support the CodeView compile options. You
  958. also need to link with the Microsoft Overlay Linker, Version 3.6 or later.%@NL@%
  959. %@NL@%
  960. %@CR:MCV13410@%%@4@%%@AB@%Writing C Source Code%@AE@%%@EH@%%@NL@%
  961. %@NL@%
  962. %@CR:MCV13411@%%@4@%Microsoft C supports the use of include files through the use of the%@EH@%
  963. %@AB@%#include%@AE@% directive. However, you will not be able to debug source code put
  964. into include files. Therefore, you should reserve the use of include files
  965. for %@AB@%#define%@AE@% prototypes, macros, and structure definitions.%@NL@%
  966. %@NL@%
  967. %@CR:MCV13412@%%@4@%The C language permits you to put more than one statement on a line. This%@EH@%
  968. practice makes it difficult for you to debug such lines of code. For
  969. example, the following code is legal in C:%@NL@%
  970. %@NL@%
  971.      code = buffer[count]; if (code == '\n') ++lines;%@NL@%
  972. %@NL@%
  973. %@CR:MCV13413@%%@4@%This code is made up of three separate source statements. When placed on the%@EH@%
  974. same line, the individual statements cannot be accessed during debugging.
  975. You could not, for example, stop program execution at %@AS@%++lines%@AE@%;. The same
  976. code would be easier to debug in the following form:%@NL@%
  977. %@NL@%
  978.      code = buffer[count];%@NL@%
  979.      if (code == '\n')%@NL@%
  980.              ++lines;%@NL@%
  981. %@NL@%
  982. %@CR:MCV13414@%%@4@%This makes code easier to read and corresponds with what is generally%@EH@%
  983. considered good programming practice.%@NL@%
  984. %@NL@%
  985. %@CR:MCV13415@%%@4@%You cannot easily debug macros with the CodeView debugger. The debugger will%@EH@%
  986. not break down the macro for you. Therefore, if you have complex macros with
  987. potential side effects, you may need to write them first as regular source
  988. statements.%@NL@%
  989. %@NL@%
  990. %@CR:MCV13420@%%@4@%%@AB@%Compiling and Linking C Programs%@AE@%%@EH@%%@NL@%
  991. %@NL@%
  992. %@CR:MCV13421@%%@4@%The /Zi, /Zd, and /Od options are all supported by the Microsoft C%@EH@%
  993. Compilers, Versions 4.0 and later. (For a description of these options, see
  994. Section 1.3.2%@BO:    b4af@%, "CodeView Compile Options.") The options are accepted by the
  995. CL driver and the  MSC driver, which was supplied with Version 4.0. Linking
  996. separately with /CO is necessary when you compile with MSC.%@NL@%
  997. %@NL@%
  998. %@CR:MCV13422@%%@4@%The CodeView debugger supports mixed-language programming. For an example of%@EH@%
  999. how to link a C module with modules from other languages, see Section 1.3.8%@BO:    fbcc@%,
  1000. "Preparing Assembly Programs."%@NL@%
  1001. %@NL@%
  1002. %@CR:MCV13423@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  1003. %@NL@%
  1004.      CL /Zi /Od EXAMPLE.C%@NL@%
  1005. %@NL@%
  1006.      CL /Zi /Od /c EXAMPLE.C%@NL@%
  1007.      LINK /CO EXAMPLE;%@NL@%
  1008. %@NL@%
  1009.      CL /Zi /Od /c MOD1.C%@NL@%
  1010.      CL /Zd /Od /c MOD2.C%@NL@%
  1011.      CL /Zi MOD1 MOD2%@NL@%
  1012. %@NL@%
  1013. %@CR:MCV13424@%%@4@%In the first example, CL is used to compile and link EXAMPLE.C, the source%@EH@%
  1014. file. The CL driver creates an object file, EXAMPLE.OBJ, in the CodeView
  1015. format, and then automatically invokes the linker with the /CO option. The
  1016. second example demonstrates how to compile and link source file EXAMPLE.C by
  1017. using the MSC program provided with Version 4.0 of the compiler. Since MSC
  1018. does not invoke the linker, you must invoke the linker directly and specify
  1019. /CO on the command line. Both examples will result in an executable file,
  1020. EXAMPLE.EXE, which has the line-number information, symbol table, and
  1021. unoptimized code required by the CodeView debugger.%@NL@%
  1022. %@NL@%
  1023. %@CR:MCV13425@%%@4@%In the third example, the source module MOD1.C is compiled to produce an%@EH@%
  1024. object file with full symbolic and line information, while MOD2.C is
  1025. compiled to produce an object file with limited information. Then, CL is
  1026. used again to link the resulting object files. (This time, CL does not
  1027. recompile because the arguments have no .C extension.) Typing /Zi on the
  1028. command line causes the linker to be invoked with the /CO option. The result
  1029. is an executable file in which one of the modules, MOD2.C, will be harder to
  1030. debug. However, the executable file will take up less space on disk than it
  1031. would if both modules were compiled with full symbolic information.%@NL@%
  1032. %@NL@%
  1033. %@NL@%
  1034. %@CR:MCV13500@%%@3@%%@AB@%1.3.5  Preparing FORTRAN Programs%@AE@%%@EH@%%@NL@%
  1035. %@NL@%
  1036. %@CR:MCV13501@%%@4@%In order to use the CodeView debugger with a program written in FORTRAN, you%@EH@%
  1037. will need to compile it with the Microsoft FORTRAN Compiler, Version 4.0 or
  1038. later. Earlier versions of the compiler do not support CodeView compile
  1039. options. You will also need to link with the Microsoft Overlay Linker,
  1040. Version 3.6 or later.%@NL@%
  1041. %@NL@%
  1042. %@CR:MCV13510@%%@4@%%@AB@%Writing FORTRAN Source Code%@AE@%%@EH@%%@NL@%
  1043. %@NL@%
  1044. %@CR:MCV13511@%%@4@%The Microsoft FORTRAN Compiler supports the use of include files, through%@EH@%
  1045. use of the %@AB@%$INCLUDE%@AE@% directive. However, you will not be able to debug source
  1046. code in an include file. If you have source code that you wish to put in
  1047. separate files, then you should use the technique of separately compiled
  1048. modules. The CodeView debugger does support this technique by allowing you
  1049. to trace through separate source files in the same session.%@NL@%
  1050. %@NL@%
  1051. %@CR:MCV13520@%%@4@%%@AB@%Compiling and Linking FORTRAN Programs%@AE@%%@EH@%%@NL@%
  1052. %@NL@%
  1053. %@CR:MCV13521@%%@4@%The /Zi, /Zd, and /Od options are all supported by the Microsoft FORTRAN%@EH@%
  1054. Compiler, Version 4.0 or later. For a description of these options, see
  1055. Section 1.3.2%@BO:    b4af@%, "CodeView Compile Options." The CodeView debugger supports
  1056. mixed-language programming. For an example of how to link a FORTRAN module
  1057. with modules from other languages, see Section 1.3.8%@BO:    fbcc@%, "Preparing Assembly
  1058. Programs."%@NL@%
  1059. %@NL@%
  1060. %@CR:MCV13522@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  1061. %@NL@%
  1062.      FL /Zi /Od EXAMPLE.FOR%@NL@%
  1063. %@NL@%
  1064.      FL /Zi /Od /c EXAMPLE.FOR%@NL@%
  1065.      LINK /CO EXAMPLE;%@NL@%
  1066. %@NL@%
  1067.      FL /Zi /Od /c MOD1.FOR%@NL@%
  1068.      FL /Zd /Od /c MOD2.FOR%@NL@%
  1069.      FL /Zi MOD1 MOD2%@NL@%
  1070. %@NL@%
  1071. %@CR:MCV13523@%%@4@%In the first example, the FL driver is used to compile and link the source%@EH@%
  1072. file EXAMPLE.FOR. The FL driver creates an object file in the CodeView
  1073. format, EXAMPLE.OBJ, and then automatically invokes the linker with the /CO
  1074. option. The second example demonstrates how to compile and link the source
  1075. file EXAMPLE.FOR by using separate steps for compiling and linking. In this
  1076. case, the /CO option must be given explicitly to the linker. Both examples
  1077. result in an executable file, EXAMPLE.EXE, which has the line-number
  1078. information, symbol table, and unoptimized code required by the CodeView
  1079. debugger.%@NL@%
  1080. %@NL@%
  1081. %@CR:MCV13524@%%@4@%In the third example, the source module MOD1.FOR is compiled to produce an%@EH@%
  1082. object file with full symbolic and line information, while MOD2.FOR is
  1083. compiled to produce an object file with limited information. Then FL is used
  1084. again to link the object files. (Note that this time, FL does not recompile
  1085. because the arguments have no .FOR extension.) Typing /Zi on the command
  1086. line causes the linker to be invoked with the /CO option. The result is an
  1087. executable file in which one of the modules, MOD2.FOR, will be harder to
  1088. debug. However, the executable file takes up less space on disk than it
  1089. would if both modules were compiled with full symbolic information.%@NL@%
  1090. %@NL@%
  1091. %@NL@%
  1092. %@CR:MCV13600@%%@3@%%@AB@%1.3.6  Preparing BASIC Programs%@AE@%%@EH@%%@NL@%
  1093. %@NL@%
  1094. %@CR:MCV13601@%%@4@%In order to use the CodeView debugger with a program written in BASIC, you%@EH@%
  1095. will need to compile it with Microsoft QuickBASIC, Version 4.0 or later. You
  1096. will also need to link with the Microsoft Overlay Linker, Version 3.6 or
  1097. later.%@NL@%
  1098. %@NL@%
  1099. %@CR:MCV13610@%%@4@%%@AB@%Writing BASIC Source Code%@AE@%%@EH@%%@NL@%
  1100. %@NL@%
  1101. %@CR:MCV13611@%%@4@%Microsoft BASIC supports the use of include files, through the use of the%@EH@%
  1102. %@AB@%$INCLUDE%@AE@% directive. However, you will not be able to debug source code put
  1103. into include files. The preferred practice for developing source code in
  1104. separate files is to use separately compiled modules. The CodeView debugger
  1105. does support this technique by allowing you to trace through separate source
  1106. files in the same session.%@NL@%
  1107. %@NL@%
  1108. %@CR:MCV13612@%%@4@%BASIC also permits you to put more than one statement on a line. This%@EH@%
  1109. practice makes it difficult for you to debug such lines of code. For
  1110. example, the following code is legal, even common, in BASIC:%@NL@%
  1111. %@NL@%
  1112.      SUM=0 : FOR I=1 TO N : SUM=SUM+ARRAY(I) : NEXT I%@NL@%
  1113. %@NL@%
  1114. %@CR:MCV13613@%%@4@%This code is actually made up of four separate BASIC statements. When placed%@EH@%
  1115. on the same line, the individual statements cannot be accessed during
  1116. debugging. You could not, for example, stop program execution at %@AS@%SUM=SUM+%@AE@%
  1117. %@AS@%ARRAY(I)%@AE@%. The same code would be easier to debug if it were written in the
  1118. following form:%@NL@%
  1119. %@NL@%
  1120.      SUM=0%@NL@%
  1121.      FOR I=1 TO N%@NL@%
  1122.          SUM=SUM+ARRAY(I)%@NL@%
  1123.      NEXT I%@NL@%
  1124. %@NL@%
  1125. %@CR:MCV13620@%%@4@%%@AB@%Compiling and Linking BASIC Programs%@AE@%%@EH@%%@NL@%
  1126. %@NL@%
  1127. %@CR:MCV13621@%%@4@%Microsoft QuickBASIC Versions 4.0 and later can prepare BASIC programs for%@EH@%
  1128. use with the CodeView debugger, through the use of the BC command line.%@NL@%
  1129. %@NL@%
  1130. %@CR:MCV13622@%%@4@%You cannot prepare programs for use with CodeView when you are in the%@EH@%
  1131. QuickBASIC editor itself. Instead, compile separately with the BC
  1132. command-line option /Zi. The /Zi option is described in Section 1.3.2%@BO:    b4af@%,
  1133. "CodeView Compile Options." You must also link separately with /CO.%@NL@%
  1134. %@NL@%
  1135. %@CR:MCV13623@%%@4@%The CodeView debugger supports mixed-language programming. For an example of%@EH@%
  1136. how to link a BASIC module with modules from other languages, see Section
  1137. 1.3.8%@BO:    fbcc@%, "Preparing Assembly Programs."%@NL@%
  1138. %@NL@%
  1139. %@CR:MCV13624@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  1140. %@NL@%
  1141.      BC /Zi EXAMPLE;%@NL@%
  1142.      LINK /CO EXAMPLE;%@NL@%
  1143. %@NL@%
  1144. %@CR:MCV13625@%%@4@%The example above compiles the source file EXAMPLE.BAS to produce an object%@EH@%
  1145. file, EXAMPLE.OBJ, which contains the symbol and line-number information
  1146. required by the CodeView debugger. Then the linker is invoked with the /CO
  1147. option to create an executable file that can be used with the debugger.%@NL@%
  1148. %@NL@%
  1149. %@NL@%
  1150. %@CR:MCV13700@%%@3@%%@AB@%1.3.7  Preparing Pascal Programs%@AE@%%@EH@%%@NL@%
  1151. %@NL@%
  1152. %@CR:MCV13701@%%@4@%In order to use the CodeView debugger with a program written in Pascal, you%@EH@%
  1153. need to compile it with the Microsoft Pascal Compiler, Version 4.0 or later.
  1154. Earlier versions of Pascal do not support the CodeView compile options. You
  1155. also need to link with the Microsoft Overlay Linker, Version 3.6 or later.%@NL@%
  1156. %@NL@%
  1157. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1158. %@AI@%NOTE%@AE@%%@NL@%
  1159.    If you have a version of Microsoft Pascal earlier than Version 4.0, you%@NL@%
  1160.    can use the CodeView debugger to a limited extent. However, the debugger%@NL@%
  1161.    will not be able to evaluate program symbols in CodeView commands.%@NL@%
  1162.    Compile a program as you would normally, and then link with the %@AB@%/CO%@AE@%
  1163.    option as explained below. You will then be able to use CodeView to step
  1164.    through your program and set breakpoints.The debugger will also be able
  1165.    to display machine-level code and domemory dumps. This version of Code
  1166.    View does not include a Pascal expression evaluator.%@NL@%
  1167. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1168. %@NL@%
  1169. %@CR:MCV13710@%%@4@%%@AB@%Writing Pascal Source Code%@AE@%%@EH@%%@NL@%
  1170. %@NL@%
  1171. %@CR:MCV13711@%%@4@%Microsoft Pascal supports the use of include files by providing the %@AB@%$include%@AE@%%@EH@%
  1172. metacommand. However, you will not be able to debug source code put into
  1173. include files. You can easily debug code in separately compiled source
  1174. files. Use this technique, rather than that of include files, to debug a
  1175. large program.%@NL@%
  1176. %@NL@%
  1177. %@CR:MCV13712@%%@4@%Pascal allows you to put more than one statement on a line; yet it is%@EH@%
  1178. difficult to debug programs with multiple statements on a single line. For
  1179. example, the following code is legal in Pascal:%@NL@%
  1180. %@NL@%
  1181.      if i = max then begin k := k+1; i = 0 end;%@NL@%
  1182. %@NL@%
  1183. %@CR:MCV13713@%%@4@%This code is actually made up of five separate source statements. When%@EH@%
  1184. placed on the same line, the individual statements cannot be accessed during
  1185. debugging. You could not, for example, stop program execution at %@AS@%k := k+1%@AE@%;.
  1186. The same code would be easier to debug if it were written as the following:%@NL@%
  1187. %@NL@%
  1188.      if i = max then%@NL@%
  1189.            begin%@NL@%
  1190.               k := k+1;%@NL@%
  1191.               i := 0%@NL@%
  1192.            end;%@NL@%
  1193. %@NL@%
  1194. %@CR:MCV13714@%%@4@%Writing only one statement on a line makes code easier to read and%@EH@%
  1195. corresponds with what is generally considered good programming practice.%@NL@%
  1196. %@NL@%
  1197. %@CR:MCV13720@%%@4@%%@AB@%Compiling and Linking Pascal Programs%@AE@%%@EH@%%@NL@%
  1198. %@NL@%
  1199. %@CR:MCV13721@%%@4@%Versions 4.0 and later of Microsoft Pascal support the CodeView options /Zi%@EH@%
  1200. and /Zd when you use the PL driver program. (For a description of these
  1201. options, see Section 1.3.2%@BO:    b4af@%, "CodeView Compile Options.") The CodeView
  1202. compile options are put on the command line when invoking the first pass of
  1203. the Pascal compiler.%@NL@%
  1204. %@NL@%
  1205. %@CR:MCV13722@%%@4@%The /CO option is necessary only when you link separately.%@EH@%%@NL@%
  1206. %@NL@%
  1207. %@CR:MCV13723@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  1208. %@NL@%
  1209.      PL /Zi /c TEST%@NL@%
  1210.      LINK /CO TEST;%@NL@%
  1211. %@NL@%
  1212. %@CR:MCV13724@%%@4@%The example above compiles the source file TEST.PAS to produce an object%@EH@%
  1213. file, TEST.OBJ, which contains the symbol and line-number information
  1214. required by the CodeView debugger. Then the linker is invoked with the /CO
  1215. option.%@NL@%
  1216. %@NL@%
  1217. %@CR:MCV13725@%%@4@%The CodeView debugger supports mixed-language programming. For an example of%@EH@%
  1218. how to link a Pascal module with modules from other languages, see Section
  1219. 1.3.8%@BO:    fbcc@% below.%@NL@%
  1220. %@NL@%
  1221. %@NL@%
  1222. %@CR:MCV13800@%%@3@%%@AB@%1.3.8  Preparing Assembly Programs%@AE@%%@EH@%%@NL@%
  1223. %@NL@%
  1224. %@CR:MCV13801@%%@4@%In order to use all the features of the CodeView debugger with assembly%@EH@%
  1225. programs, you need to assemble with Microsoft Macro Assembler, Version 5.0
  1226. or later. (Section 1.7%@BO:   1ab8d@% discusses how to use earlier versions of Microsoft
  1227. Macro Assembler with the debugger.) No matter what version of the assembler
  1228. you use, you will need to link with the Microsoft Overlay Linker, Version
  1229. 3.6 or later.%@NL@%
  1230. %@NL@%
  1231. %@CR:MCV13810@%%@4@%%@AB@%Writing Assembler Source Code%@AE@%%@EH@%%@NL@%
  1232. %@NL@%
  1233. %@CR:MCV13811@%%@4@%If you have Version 5.0 or later of the Microsoft Macro Assembler, you can%@EH@%
  1234. use the simplified segment directives described in the %@AI@%Microsoft%@AE@% %@AI@%Macro%@AE@%
  1235. %@AI@%Assembler Programmer's Guide.%@AE@% Use of these directives ensures that segments
  1236. are declared in the correct way for use with the CodeView debugger. (These
  1237. directives also aid mixed-language programming.) If you do not use these
  1238. directives, make sure that the class name for the code segment ends with the
  1239. letters %@AS@%CODE%@AE@%.%@NL@%
  1240. %@NL@%
  1241. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1242. %@AI@%NOTE%@AE@%%@NL@%
  1243.    The CodeView debugger correctly recognizes floating-point values only%@NL@%
  1244.    when they are in the IEEE (Institute of Electrical and Electronics%@NL@%
  1245.    Engineers, Inc.) format. You should use the IEEE format with any program%@NL@%
  1246.    that you are going to run with the CodeView debugger if that program uses%@NL@%
  1247.    floating-point variables. The IEEE format is the default for Version 5.0%@NL@%
  1248.    or later of the Microsoft Macro Assembler. You can always specify IEEE%@NL@%
  1249.    format by using the %@AB@%.8087%@AE@% or %@AB@%.287%@AE@% directive, or by assembling with the%@NL@%
  1250.    %@AB@%/R%@AE@% option.%@NL@%
  1251. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1252. %@NL@%
  1253. %@CR:MCV13812@%%@4@%You will not be able to trace through macros while in source mode. Macros%@EH@%
  1254. will be treated as single instructions unless you are in assembly or mixed
  1255. mode, so you will not see comments or directives within macros. Therefore,
  1256. you may want to debug code before putting it into a macro.%@NL@%
  1257. %@NL@%
  1258. %@CR:MCV13813@%%@4@%The Microsoft Macro Assembler also supports include files, but you will not%@EH@%
  1259. be able to debug code in an include file. You are better off reserving
  1260. include files for macro and structure definitions.%@NL@%
  1261. %@NL@%
  1262. %@CR:MCV13814@%%@4@%Because the assembler does not have its own expression evaluator, you will%@EH@%
  1263. have to use either the C, FORTRAN, or BASIC expression evaluator. C is the
  1264. default because it is the closest to assembly language. To make sure the
  1265. expression evaluator recognizes your symbols and labels, you should observe
  1266. the following guidelines when writing assembly modules:%@NL@%
  1267. %@NL@%
  1268. %@CR:MCV13815@%  1. The assembler has no explicit way to declare real numbers. However, it%@NL@%
  1269.      will pass the correct symbolic information for reals and integers if%@NL@%
  1270.      you initialize each real number with a decimal point and each integer%@NL@%
  1271.      without a decimal point. (The default type is integer.) For example,%@NL@%
  1272.      the following statements correctly initialize %@AS@%REALSUM%@AE@% as a real number%@NL@%
  1273.      and %@AS@%COUNTER%@AE@% as an integer:%@NL@%
  1274. %@NL@%
  1275.          %@AS@%REALSUM    DD    0.0%@AE@%%@NL@%
  1276.          %@AS@%COUNTER    DD    0%@AE@%%@NL@%
  1277. %@NL@%
  1278.      You must initialize real number data in data definitions. If you use %@AS@%?%@AE@%,%@NL@%
  1279.      the assembler will consider the variable an integer when it generates%@NL@%
  1280.      symbolic information. The CodeView debugger, in turn, will not properly%@NL@%
  1281.      evaluate the value of the variable.%@NL@%
  1282. %@NL@%
  1283.   2. Avoid the use of special characters in symbol names. The C, FORTRAN,%@NL@%
  1284.      and BASIC expression evaluators each apply their own standards in%@NL@%
  1285.      detemining what is a legal symbol name. Generally, only alphanumeric%@NL@%
  1286.      characters and the underscore (_) are recognized. BASIC accepts certain%@NL@%
  1287.      type-declaration characters at the end of a name, but C and FORTRAN do%@NL@%
  1288.      not.%@NL@%
  1289. %@NL@%
  1290.   3. Assemble with /MX or /ML to avoid conflicts due to case when you do%@NL@%
  1291.      mixed-language programming. By default, the assembler converts all%@NL@%
  1292.      symbols to uppercase when it generates object code. C, however, does%@NL@%
  1293.      not do this conversion. Therefore, the CodeView debugger will not%@NL@%
  1294.      recognize that %@AS@%var%@AE@% in a C program and %@AS@%var%@AE@% in an assembly program are%@NL@%
  1295.      the same variable unless you leave Case Sense off when using the%@NL@%
  1296.      debugger.%@NL@%
  1297. %@NL@%
  1298.   4. If you access command-line data in the Program Segment Prefix (PSP),%@NL@%
  1299.      note that the CodeView debugger changes the PSP; tabs, quote marks, and%@NL@%
  1300.      extra spaces are removed so that exactly one space separates each%@NL@%
  1301.      argument. The debugger retains quote marks (along with any quoted%@NL@%
  1302.      material) for command lines given with the %@AB@%L%@AE@% command.%@NL@%
  1303. %@NL@%
  1304. %@CR:MCV13820@%%@4@%%@AB@%Assembling and Linking%@AE@%%@EH@%%@NL@%
  1305. %@NL@%
  1306. %@CR:MCV13821@%%@4@%The assembler supports the /Zi and /Zd assemble-time options. The /Od option%@EH@%
  1307. does not apply, and so is not supported. Assembler options are not case
  1308. sensitive. You may therefore enter /ZI or /ZD on the assembler command line
  1309. to produce an object file in the CodeView format.%@NL@%
  1310. %@NL@%
  1311. %@CR:MCV13822@%%@4@%If you link your assembly program with a module written in C (which is case%@EH@%
  1312. sensitive), you probably need to assemble with /MX or /ML.%@NL@%
  1313. %@NL@%
  1314. %@CR:MCV13823@%%@4@%After assembling, link with the /CO option to produce an executable file in%@EH@%
  1315. the CodeView format.%@NL@%
  1316. %@NL@%
  1317. %@CR:MCV13824@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  1318. %@NL@%
  1319.      MASM /ZI EXAMPLE;%@NL@%
  1320.      LINK /CO EXAMPLE;%@NL@%
  1321. %@NL@%
  1322.      MASM /ZI MOD1;%@NL@%
  1323.      MASM /ZD MOD2;%@NL@%
  1324.      LINK /CO MOD1 MOD2;%@NL@%
  1325. %@NL@%
  1326.      CL /Zi /Od /c /AL prog.c%@NL@%
  1327.      BC /Zi sub1;%@NL@%
  1328.      MASM /ZI /MX sub2;%@NL@%
  1329.      LINK /CO prog sub1 sub2%@NL@%
  1330. %@NL@%
  1331. %@CR:MCV13825@%%@4@%The first example assembles the source file EXAMPLE.ASM and produces the%@EH@%
  1332. object file EXAMPLE.OBJ, which is in the CodeView format. The linker is then
  1333. invoked with the /CO option and produces an executable file with the symbol
  1334. table and line-number information required by the debugger.%@NL@%
  1335. %@NL@%
  1336. %@CR:MCV13826@%%@4@%The second example produces the object file MOD1.OBJ, which contains symbol%@EH@%
  1337. and line-number information, and the object file MOD2.OBJ, which contains
  1338. line-number information but no symbol table. The object files are then
  1339. linked. The result is an executable file in which the second module will be
  1340. harder to debug. This executable file, however, will be smaller than it
  1341. would be if both modules were assembled with the /ZI option.%@NL@%
  1342. %@NL@%
  1343. %@CR:MCV13827@%%@4@%The last example demonstrates how to create a mixed-language executable file%@EH@%
  1344. that can be used with the CodeView debugger. The debugger is able to trace
  1345. through different source files in the same session, regardless of the
  1346. language.%@NL@%
  1347. %@NL@%
  1348. %@NL@%
  1349. %@CR:MCV14000@%%@2@%%@AB@%1.4  Starting the CodeView Debugger%@AE@%%@EH@%%@NL@%
  1350. %@NL@%
  1351. %@CR:MCV14001@%%@4@%Before starting the debugger, make sure all the files it requires are%@EH@%
  1352. available. The following files are recommended for source-level debugging:%@NL@%
  1353. %@NL@%
  1354. %@CR:MCV14002@%%@AB@%File                        Location%@AE@%%@NL@%
  1355. %@NL@%
  1356. CV.EXE                      The CodeView program file can be in the current%@NL@%
  1357.                             directory or in any directory accessible with%@NL@%
  1358.                             the PATH command. For example, if you are using%@NL@%
  1359.                             a hard disk setup, you might put CV.EXE in the%@NL@%
  1360.                             \BIN directory. If you have an older version of%@NL@%
  1361.                             the debugger, take care to remove any copies of%@NL@%
  1362.                             CV.EXE from directories in your PATH. The%@NL@%
  1363.                             debugger has an overlay manager that reloads the%@NL@%
  1364.                             file CV.EXE from time to time. If it reloads the%@NL@%
  1365.                             wrong version of this file, your machine will%@NL@%
  1366.                             likely crash.%@NL@%
  1367. %@NL@%
  1368. CV.HLP                      If you want to have the on-line help available%@NL@%
  1369.                             during your session, you should have this file%@NL@%
  1370.                             either in the current directory or in any%@NL@%
  1371.                             directory accessible with the PATH command. For%@NL@%
  1372.                             example, if you set up your compiler files on a%@NL@%
  1373.                             hard disk using the SETUP program provided on%@NL@%
  1374.                             the distribution disk, you might put CV.HLP in%@NL@%
  1375.                             the \BIN directory. If the CodeView debugger%@NL@%
  1376.                             cannot find the help file, you can still use the%@NL@%
  1377.                             debugger, but you will see an error message if%@NL@%
  1378.                             you use one of the help commands.%@NL@%
  1379. %@NL@%
  1380. %@AI@%program%@AE@%.EXE                 The executable file for the program you wish to%@NL@%
  1381.                             debug must be in the current directory or in a%@NL@%
  1382.                             drive and directory you specify as part of the%@NL@%
  1383.                             start-up file specification. The CodeView%@NL@%
  1384.                             debugger will display an error message and will%@NL@%
  1385.                             not start unless the executable file is found.%@NL@%
  1386. %@NL@%
  1387. %@AI@%source%@AE@%%@AB@%.%@AE@%%@AI@%ext%@AE@% (extension       Normally, source files should be in the current%@NL@%
  1388. depends on language)        directory. However, if you specify a file%@NL@%
  1389.                             specification for the source file during%@NL@%
  1390.                             compilation, that specification becomes part of%@NL@%
  1391.                             the symbolic information stored in the%@NL@%
  1392.                             executable file. For example, if you compiled%@NL@%
  1393.                             with the command line argument %@AS@%DEMO%@AE@%, the%@NL@%
  1394.                             CodeView debugger expects the source file to be%@NL@%
  1395.                             in the current directory. However, if you%@NL@%
  1396.                             compiled with the command line argument%@NL@%
  1397.                             %@AS@%\SOURCE\DEMO%@AE@%, the debugger expects the source%@NL@%
  1398.                             file to be in the directory %@AS@%%@AE@%%@AS@%\SOURCE%@AE@%. If the%@NL@%
  1399.                             debugger cannot find the source file in the%@NL@%
  1400.                             directory specified in the executable file%@NL@%
  1401.                             (usually the current directory), the program%@NL@%
  1402.                             prompts you for a new directory. You can either%@NL@%
  1403.                             enter a new directory, or you can press ENTER%@NL@%
  1404.                             to indicate that you do not want a source file%@NL@%
  1405.                             to be used for this module. If no source file is%@NL@%
  1406.                             specified, you must debug in assembly mode.%@NL@%
  1407. %@NL@%
  1408. %@CR:MCV14003@%%@4@%If the appropriate files are in the correct directories, you can enter the%@EH@%
  1409. CodeView command line at the DOS command prompt. The command line has the
  1410. following form:%@NL@%
  1411. %@NL@%
  1412.      CV «%@AI@%options%@AE@%» %@AI@%executablefile%@AE@% «%@AI@%arguments%@AE@%»%@NL@%
  1413. %@NL@%
  1414. %@CR:MCV14004@%%@4@%The %@AI@%options%@AE@% are one or more of the options described in Section 1.5.%@BO:   136bc@% The%@EH@%
  1415. %@AI@%executablefile%@AE@% is the name of an executable file to be loaded by the
  1416. debugger. It must have the extension .EXE or .COM. If you try to load a
  1417. nonexecutable file, the following message appears:%@NL@%
  1418. %@NL@%
  1419.      Not an executable file%@NL@%
  1420. %@NL@%
  1421. %@CR:MCV14005@%%@4@%Compiled programs and assembly-language programs containing CodeView%@EH@%
  1422. symbolic information will always have the extension .EXE. Files with the
  1423. extension .COM can be debugged in assembly mode, but they can never contain
  1424. symbolic information.%@NL@%
  1425. %@NL@%
  1426. %@CR:MCV14006@%%@4@%The optional %@AI@%arguments%@AE@% are parameters passed to the %@AI@%executablefile%@AE@%. If the%@EH@%
  1427. program you are debugging does not accept command-line arguments, you do not
  1428. need to pass any arguments.%@NL@%
  1429. %@NL@%
  1430. %@CR:MCV14007@%%@4@%If you specify the %@AI@%executablefile%@AE@% as a file name with no extension, the%@EH@%
  1431. CodeView debugger searches for a file with the given base name and the
  1432. extension .EXE. Therefore, you must specify the .COM extension if you are
  1433. debugging a .COM file. If the file is not in the CodeView format, the
  1434. debugger starts in assembly mode and displays the following message:%@NL@%
  1435. %@NL@%
  1436.      No symbolic information%@NL@%
  1437. %@NL@%
  1438. %@CR:MCV14008@%%@4@%You must specify an executable file when you start the CodeView debugger. If%@EH@%
  1439. you omit the executable file, the debugger displays a message showing the
  1440. correct command-line format.%@NL@%
  1441. %@NL@%
  1442. %@CR:MCV14009@%%@4@%When you give the debugger a valid command line, the executable program and%@EH@%
  1443. the source file are loaded, the address data are processed, and the CodeView
  1444. display appears. The initial display will be in window mode or sequential
  1445. mode, depending on the options you specify and the type of computer you
  1446. have.%@NL@%
  1447. %@NL@%
  1448. %@CR:MCV1400A@%%@4@%For example, if you wanted to debug the program BENCHMRK.EXE, you could%@EH@%
  1449. start the debugger with the following command line:%@NL@%
  1450. %@NL@%
  1451.      CV BENCHMRK%@NL@%
  1452. %@NL@%
  1453. %@CR:MCV1400B@%%@4@%If you give this command line on an IBM Personal Computer, window mode is%@EH@%
  1454. selected automatically. The display will look like Figure 1.1%@FN@%
  1455. Figure 1.1 is found on page 19 of the printed version.%@EF@%.%@NL@%
  1456. %@NL@%
  1457. %@CR:MCV1400C@%%@4@%If you give the same command line on most non-IBM computers, sequential mode%@EH@%
  1458. will be selected. The following lines appear:%@NL@%
  1459. %@NL@%
  1460.      Microsoft (R) CodeView (R)  Version 2.3%@NL@%
  1461.      (C) Copyright Microsoft Corp. 1986-1989. All rights reserved.%@NL@%
  1462. %@NL@%
  1463.      >%@NL@%
  1464. %@NL@%
  1465. %@CR:MCV1400D@%%@4@%You can use CodeView options to override the default start-up mode.%@EH@%%@NL@%
  1466. %@NL@%
  1467. %@CR:MCV1400E@%%@4@%If your program is written in a high-level language, the CodeView debugger%@EH@%
  1468. is now at the beginning of the start-up code that precedes your program. In
  1469. source mode, you can enter an execution command (such as Trace or Program
  1470. Step) to execute automatically through the start-up code to the beginning of
  1471. your program. At this point, you are ready to start debugging your program,
  1472. as described in Chapters 3%@BO:   2d605@%-11.%@NL@%
  1473. %@NL@%
  1474. %@NL@%
  1475. %@CR:MCV15000@%%@2@%%@AB@%1.5  Using CodeView Options%@AE@%%@EH@%%@NL@%
  1476. %@NL@%
  1477. %@CR:MCV15001@%%@4@%You can change the start-up behavior of the debugger by specifying options%@EH@%
  1478. in the command line. An option is a sequence of characters preceded by
  1479. either a forward slash (/) or a dash (-).%@NL@%
  1480. %@NL@%
  1481. %@CR:MCV15002@%%@4@%For brevity, this manual will list only the forward slash when describing%@EH@%
  1482. options, but you may use either. Unlike compiler command-line options,
  1483. CodeView command-line options are not case sensitive.%@NL@%
  1484. %@NL@%
  1485. %@CR:MCV15003@%%@4@%A file whose name begins with a dash must be renamed before you use it with%@EH@%
  1486. the CodeView debugger so the debugger will not interpret the dash as an
  1487. option designator. You can use more than one option in a command line, but
  1488. each option must have its own option designator, and spaces must separate
  1489. each option from other elements of the line.%@NL@%
  1490. %@NL@%
  1491. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1492. %@AI@%NOTE%@AE@%%@NL@%
  1493.    The CodeView debugger's defaults for IBM Personal Computers are different%@NL@%
  1494.    from the defaults it has for other computers. However, the debugger may%@NL@%
  1495.    not always recognize the difference between computers, and defaults may%@NL@%
  1496.    vary accordingly.%@NL@%
  1497. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1498. %@NL@%
  1499. %@CR:MCV15004@%%@4@%The following list suggests some situations in which you might want to use%@EH@%
  1500. an option. If more than one condition applies, you can use more than one
  1501. option (in any order). If none of the conditions applies, you need not use
  1502. any options.%@NL@%
  1503. %@NL@%
  1504. %@CR:MCV15005@%%@AB@%Condition                                               Option%@AE@%%@NL@%
  1505. %@NL@%
  1506. You want to use two monitors with the                   /2%@NL@%
  1507. CodeView debugger.          %@NL@%
  1508. %@NL@%
  1509. You want a 43-line display and you have an              /43%@NL@%
  1510. IBM or IBM-compatible computer with an                  %@NL@%
  1511. enhanced graphics adapter (EGA) and an                  %@NL@%
  1512. enhanced color display.     %@NL@%
  1513. %@NL@%
  1514. You want a 50-line display and you have a               /50%@NL@%
  1515. graphics adapter card that supports 50-line             %@NL@%
  1516. mode. %@NL@%
  1517. %@NL@%
  1518. You have a two-color monitor, a color                   /B%@NL@%
  1519. graphics adapter, and an IBM or                         %@NL@%
  1520. IBM-compatible computer.                                %@NL@%
  1521. %@NL@%
  1522. You want the CodeView debugger to                       /C%@AI@%commands%@AE@%%@NL@%
  1523. automatically execute a series of commands when         %@NL@%
  1524. it starts up.               %@NL@%
  1525. %@NL@%
  1526. You are using an IBM-compatible computer                /D%@NL@%
  1527. that does not support certain IBM-specific              %@NL@%
  1528. interrupt-trapping functions.                           %@NL@%
  1529. %@NL@%
  1530. You have expanded memory and want the                   /E%@NL@%
  1531. CodeView debugger to take advantage of it.              %@NL@%
  1532. %@NL@%
  1533. You are using an IBM-compatible computer                /F%@NL@%
  1534. to debug a program that does not use graphics           %@NL@%
  1535. or multiple video-display pages,                        %@NL@%
  1536. and you want to be able to see the output               %@NL@%
  1537. screen.                     %@NL@%
  1538. %@NL@%
  1539. You are using a non-IBM-compatible                      /I%@NL@%
  1540. computer and want to enable CTRL+C and                  %@NL@%
  1541. CTRL+BREAK.                 %@NL@%
  1542. %@NL@%
  1543. You run CodeView (CVP) in OS/2 protected mode           /L%@NL@%
  1544. and want to debug dynamic-link libraries.               %@NL@%
  1545. %@NL@%
  1546. You have a mouse installed in your                      /M%@NL@%
  1547. system, but do not want to use it during the            %@NL@%
  1548. debugging session.          %@NL@%
  1549. %@NL@%
  1550. You run CodeView (CVP) with OS/2, Version 1.10          /O%@NL@%
  1551. or later, and wish to debug multiple processes.         %@NL@%
  1552. %@NL@%
  1553. You have a non-IBM EGA and have problems                /P%@NL@%
  1554. running the debugger.       %@NL@%
  1555. %@NL@%
  1556. You have a 386 processor and wish to                    /R%@NL@%
  1557. use the debug registers to speed up the                 %@NL@%
  1558. execution of tracepoints.                               %@NL@%
  1559. %@NL@%
  1560. You are debugging a graphics program or a               /S%@NL@%
  1561. program that uses multiple video-display%@NL@%
  1562. pages, and you want to be able to see the%@NL@%
  1563. output screen.%@NL@%
  1564. %@NL@%
  1565. You are using a non-IBM-compatible                      /S%@NL@%
  1566. computer and want to be able to see the output%@NL@%
  1567. screen.%@NL@%
  1568. %@NL@%
  1569. You have an IBM computer, but wish to                   /T%@NL@%
  1570. debug in sequential mode (for example, with
  1571. redirection).
  1572. %@NL@%
  1573. You have an IBM-compatible computer                     /W%@NL@%
  1574. and want to use window mode.
  1575. %@NL@%
  1576. %@CR:MCV15006@%%@4@%For example, assume you are using an IBM-compatible computer with a color%@EH@%
  1577. graphics adapter (CGA) and a two-color monitor. The program you are
  1578. debugging, which you could name GRAPHIX.EXE, plots points in graphics mode.
  1579. You want to be able to see the output screen during the debugging session.
  1580. Finally, you want to be able to start the debugger several times without
  1581. having to remember all the options, and you want to execute the high-level
  1582. language start-up code automatically each time. You could create a batch
  1583. file consisting of the following line:%@NL@%
  1584. %@NL@%
  1585.      CV /W /B /S /CGmain GRAPHIX%@NL@%
  1586. %@NL@%
  1587. %@CR:MCV15007@%%@4@%The CodeView options are described in more detail in Sections 1.5.1%@BO:   14c56@%-1.5.16%@EH@%
  1588. below.%@NL@%
  1589. %@NL@%
  1590. %@NL@%
  1591. %@CR:MCV15100@%%@3@%%@AB@%1.5.1  Using Two Video Adapters%@AE@%%@EH@%%@NL@%
  1592. %@NL@%
  1593. %@CR:MCV15101@%%@AB@%Option%@AE@%%@NL@%
  1594. %@NL@%
  1595.      /2%@NL@%
  1596. %@NL@%
  1597. %@CR:MCV15102@%%@4@%The /2 option permits the use of two monitors with the CodeView debugger.%@EH@%
  1598. The program display will appear on the current default monitor, while the
  1599. CodeView display appears on the other monitor. You must have two monitors
  1600. and two adapters to use the /2 option. For instance, if you have both a
  1601. color graphics adapter and a monochrome adapter, you might want to set the
  1602. CGA up as the default adapter. You could then debug a graphics program with
  1603. the graphics display appearing on the graphics monitor and the debugging
  1604. display appearing on the monochrome monitor.%@NL@%
  1605. %@NL@%
  1606. %@NL@%
  1607. %@CR:MCV15200@%%@3@%%@AB@%1.5.2  Using the Enhanced Graphics Adapter's 43-Line Mode%@AE@%%@EH@%%@NL@%
  1608. %@NL@%
  1609. %@CR:MCV15201@%%@AB@%Option%@AE@%%@NL@%
  1610. %@NL@%
  1611.      /43%@NL@%
  1612. %@NL@%
  1613. %@CR:MCV15202@%%@4@%If you have an enhanced graphics adapter (EGA) and a monochrome monitor or%@EH@%
  1614. an enhanced color display monitor (or a compatible monitor), you can use the
  1615. /43 option to enable a 43-line-by-80-column text mode. You cannot use this
  1616. mode with other monitors, such as a CGA or a monochrome adapter (MA). The
  1617. CodeView debugger will ignore the option if it does not detect an EGA.%@NL@%
  1618. %@NL@%
  1619. %@CR:MCV15203@%%@4@%The EGA's 43-line mode performs the same as the normal 25-line-by-80-column%@EH@%
  1620. mode used by default on the EGA, CGA, and MA. The advantage of the 43-line
  1621. mode is that more text fits on the CodeView display; the disadvantage is
  1622. that the text is smaller and harder to read. If you have an EGA, you can
  1623. experiment to see which size you prefer.%@NL@%
  1624. %@NL@%
  1625. %@CR:MCV15204@%%@4@%The video graphics adapter (VGA) card also supports this option.%@EH@%%@NL@%
  1626. %@NL@%
  1627. %@CR:MCV15205@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  1628. %@NL@%
  1629.      CV /43 CALC CALC.DAT%@NL@%
  1630. %@NL@%
  1631. %@CR:MCV15206@%%@4@%The example above starts the CodeView debugger in 43-line mode if you have%@EH@%
  1632. an EGA video adapter and an enhanced color or monochrome monitor. The option
  1633. will be ignored if you lack the hardware to support it.%@NL@%
  1634. %@NL@%
  1635. %@NL@%
  1636. %@CR:MCV15300@%%@3@%%@AB@%1.5.3  Using 50-Line Mode%@AE@%%@EH@%%@NL@%
  1637. %@NL@%
  1638. %@CR:MCV15301@%%@AB@%Option%@AE@%%@NL@%
  1639. %@NL@%
  1640.      /50%@NL@%
  1641. %@NL@%
  1642. %@CR:MCV15302@%%@4@%If you have a graphics adapter card (such as a VGA) and monitor that support%@EH@%
  1643. 50-line mode, then you can use the /50 option to enable a
  1644. 50-line-by-80-column text mode. You cannot use this mode with most adapters,
  1645. such as a CGA or an MA. The CodeView debugger will ignore the option if your
  1646. hardware does not support 50-line mode.%@NL@%
  1647. %@NL@%
  1648. %@CR:MCV15303@%%@4@%The 50-line mode performs the same as the normal 25-line-by-80-column mode%@EH@%
  1649. used by default on the EGA, VGA, CGA, and MA. The advantage of the 50-line
  1650. mode is that more text fits on the CodeView display; the disadvantage is
  1651. that the text is smaller and harder to read.%@NL@%
  1652. %@NL@%
  1653. %@CR:MCV15304@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  1654. %@NL@%
  1655.      CV /50 CALC CALC.DAT%@NL@%
  1656. %@NL@%
  1657. %@CR:MCV15305@%%@4@%The example above starts the CodeView debugger in 50-line mode if this mode%@EH@%
  1658. is supported by your hardware.%@NL@%
  1659. %@NL@%
  1660. %@NL@%
  1661. %@CR:MCV15400@%%@3@%%@AB@%1.5.4  Starting with a Black-and-White Display%@AE@%%@EH@%%@NL@%
  1662. %@NL@%
  1663. %@CR:MCV15401@%%@AB@%Option%@AE@%%@NL@%
  1664. %@NL@%
  1665.      /B%@NL@%
  1666. %@NL@%
  1667. %@CR:MCV15402@%%@4@%The /B option forces the CodeView debugger to display in two colors even if%@EH@%
  1668. you have a color adapter (CGA, EGA, or compatible). By default, the debugger
  1669. checks on start-up to see what kind of display adapter is attached to your
  1670. computer. If the debugger detects an MA, it displays in two colors. If it
  1671. detects a color adapter, it displays in multiple colors.%@NL@%
  1672. %@NL@%
  1673. %@CR:MCV15403@%%@4@%If you use a two-color monitor with a CGA or EGA, you may want to disable%@EH@%
  1674. color. Monitors that display in only two colors (usually green and black, or
  1675. amber and black) often attempt to show colors with different cross-hatching
  1676. patterns, or in gray-scale shades of the display color. In either case, you
  1677. may find the display easier to read if you use the /B option to force
  1678. black-and-white display. Most two-color monitors still have four color
  1679. distinctions: background (black), normal text, high-intensity text, and
  1680. reverse-video text.%@NL@%
  1681. %@NL@%
  1682. %@CR:MCV15404@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  1683. %@NL@%
  1684.      CV /B CALC CALC.DAT%@NL@%
  1685. %@NL@%
  1686. %@CR:MCV15405@%%@4@%The example above starts the CodeView debugger in black-and-white mode. This%@EH@%
  1687. is the only mode available if you have an MA. The display is usually easier
  1688. to read in this mode if you have a CGA and a two-color monitor.%@NL@%
  1689. %@NL@%
  1690. %@NL@%
  1691. %@CR:MCV15500@%%@3@%%@AB@%1.5.5  Specifying Start-Up Commands%@AE@%%@EH@%%@NL@%
  1692. %@NL@%
  1693. %@CR:MCV15501@%%@AB@%Option%@AE@%%@NL@%
  1694. %@NL@%
  1695.      /C%@AI@%commands%@AE@%%@NL@%
  1696. %@NL@%
  1697. %@CR:MCV15502@%%@4@%The /C option allows you to specify one or more %@AI@%commands%@AE@% that will be%@EH@%
  1698. executed automatically upon start-up. You can use these options to invoke
  1699. the debugger from a batch or MAKE file. Each command is separated from the
  1700. previous command by a semicolon.%@NL@%
  1701. %@NL@%
  1702. %@CR:MCV15503@%%@4@%If one or more of your start-up commands have arguments that require spaces%@EH@%
  1703. between them, you should enclose the entire option in double quotation
  1704. marks. Otherwise, the debugger will interpret each argument as a separate
  1705. CodeView command-line argument rather than as a debugging-command argument.%@NL@%
  1706. %@NL@%
  1707. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1708. %@AI@%WARNING%@AE@%%@NL@%
  1709.    Any start-up option that uses the less-than (<) or greater-than (>)%@NL@%
  1710.    symbol must be enclosed in double quotation marks even if it does not%@NL@%
  1711.    require spaces. This ensures that the redirection command will be%@NL@%
  1712.    interpreted by the CodeView debugger rather than by DOS.%@NL@%
  1713. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1714. %@NL@%
  1715. %@CR:MCV15504@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  1716. %@NL@%
  1717.      CV /CGmain CALC CALC.DAT%@NL@%
  1718. %@NL@%
  1719. %@CR:MCV15505@%%@4@%The example above loads the CodeView debugger with %@AS@%CALC%@AE@% as the executable%@EH@%
  1720. file and %@AS@%CALC.DAT%@AE@% as the argument. Upon start-up, the debugger executes the
  1721. high-level-language start-up code with the command %@AS@%Gmain%@AE@%. Since no space is
  1722. required between the CodeView command %@AS@%(G)%@AE@% and its argument %@AS@%(main)%@AE@%, the
  1723. option is not enclosed in double quotation marks.%@AS@%%@NL@%
  1724. %@NL@%
  1725.      CV "/C;S&;G INTEGRAL;DS ARRAYX L 20" CALC CALC.DAT%@NL@%
  1726. %@NL@%
  1727. %@CR:MCV15506@%%@4@%The example above loads the same file with the same argument as the first%@EH@%
  1728. example, but the command list is more extensive. The debugger starts in
  1729. mixed source/assembly mode ( %@AS@%S&%@AE@%). It executes to the routine %@AS@%INTEGRAL%@AE@%(%@AS@%G%@AE@%
  1730. %@AS@%INTEGRAL%@AE@%), and then dumps 20 short real numbers, starting at the address of
  1731. the variable %@AS@%ARRAYX%@AE@% (%@AS@%DS ARRAYX%@AE@%%@AS@%L 20%@AE@%). Since several of the commands use
  1732. spaces, the entire option is enclosed in double quotation marks.%@NL@%
  1733. %@NL@%
  1734.      CV "/C<INPUT.FIL" CALC CALC.DAT%@NL@%
  1735. %@NL@%
  1736. %@CR:MCV15507@%%@4@%The example above loads the same file and argument as the first example, but%@EH@%
  1737. the start-up command directs the debugger to accept the input from the file
  1738. %@AS@%INPUT.FIL%@AE@% rather than from the keyboard. Although the option does not
  1739. include any spaces, it must be enclosed in double quotation marks so that
  1740. the less-than symbol will be read by the CodeView debugger rather than by
  1741. DOS.%@NL@%
  1742. %@NL@%
  1743. %@NL@%
  1744. %@CR:MCV15600@%%@3@%%@AB@%1.5.6  Handling Interrupt Trapping (DOS Only)%@AE@%%@EH@%%@NL@%
  1745. %@NL@%
  1746. %@CR:MCV15601@%%@4@%%@AB@%Options%@AE@%%@EH@%%@NL@%
  1747. %@NL@%
  1748.      /D%@NL@%
  1749. %@NL@%
  1750. %@CR:MCV15602@%%@4@%The /D option turns off nonmaskable interrupt (NMI) trapping and 8259%@EH@%
  1751. interrupt trapping. If you are using an IBM PC Convertible, Tandy(R) 1000,
  1752. or the AT&T(R) 6300 Plus and you are experiencing system crashes with
  1753. CodeView, try starting with the /D option. To enable window mode, use /W
  1754. with /D; otherwise sequential mode is set automatically. Note that because
  1755. this option turns off interrupt trapping, CTRL+C and CTRL+BREAK will not
  1756. work, and an external interrupt may occur during a trace operation. If this
  1757. happens, you may find yourself tracing the interrupt handler instead of your
  1758. program.%@NL@%
  1759. %@NL@%
  1760. %@CR:MCV15603@%%@4@%The /I option forces the debugger to handle NMI and 8259 interrupt trapping.%@EH@%
  1761. Use this option to enable CTRL+C and CTRL+BREAK on computers not recognized
  1762. as being IBM compatible by the debugger, such as the Eagle(R) PC. Window
  1763. mode is set automatically with the /I option; you don't have to specify /W.
  1764. Using the /I option lets you stop program execution at any point while you
  1765. are using the CodeView debugger.%@NL@%
  1766. %@NL@%
  1767. %@NL@%
  1768. %@CR:MCV15700@%%@3@%%@AB@%1.5.7  Using Expanded Memory (DOS Only)%@AE@%%@EH@%%@NL@%
  1769. %@NL@%
  1770. %@CR:MCV15701@%%@AB@%Option%@AE@%%@NL@%
  1771. %@NL@%
  1772.      /E%@NL@%
  1773. %@NL@%
  1774. %@CR:MCV15702@%%@4@%"Expanded memory" refers to memory made accessible according to the%@EH@%
  1775. Microsoft/Lotus(R)/Intel(R) EMS specification. This access provides your
  1776. system with memory above the 640K MS-DOS limitation on RAM. However, since
  1777. MS-DOS will not recognize this additional memory, programs can make use of
  1778. expanded memory in limited ways.%@NL@%
  1779. %@NL@%
  1780. %@CR:MCV15703@%%@4@%The /E option enables the use of expanded memory. If expanded memory is%@EH@%
  1781. present, the CodeView debugger uses it to store the symbolic information of
  1782. the program. This may be as much as 85% of the size of the executable file
  1783. for the program, and represents space that would otherwise be taken up in
  1784. main memory.%@NL@%
  1785. %@NL@%
  1786. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1787. %@AI@%NOTE%@AE@%%@NL@%
  1788.    This option enables only expanded memory, not %@AI@%extended%@AE@% memory. Extended
  1789.    memory makes use of protected-mode instructions,rather than the
  1790.    Microsoft/Lotus/Intel specification for memory paging.%@NL@%
  1791. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1792. %@NL@%
  1793. %@NL@%
  1794. %@CR:MCV15800@%%@3@%%@AB@%1.5.8  Setting the Screen-Exchange Mode (DOS Only)%@AE@%%@EH@%%@NL@%
  1795. %@NL@%
  1796. %@CR:MCV15801@%%@4@%%@AB@%Options%@AE@%%@EH@%%@NL@%
  1797. %@NL@%
  1798.      /F%@NL@%
  1799.      /S%@NL@%
  1800. %@NL@%
  1801. %@CR:MCV15802@%%@4@%The CodeView debugger allows you to move quickly back and forth between the%@EH@%
  1802. output screen, which contains the output from your program, and the
  1803. debugging screen, which contains the debugging display. The debugger can
  1804. handle this screen exchange in two ways: screen flipping or screen swapping.
  1805. The /F option (screen flipping) and the /S option (screen swapping) allow
  1806. you to choose the method from the command line. If neither method is
  1807. specified (possible only on non-IBM computers), the Screen Exchange command
  1808. will not work. No screen exchange is the default for non-IBM computers.
  1809. Screen flipping is the default for IBM computers with graphics adapters, and
  1810. screen swapping is the default for IBM computers with monochrome adapters.
  1811. Screen flipping uses the video-display pages of the graphics adapter to
  1812. store each screen of text. Video-display pages are a special memory buffer
  1813. reserved for multiple screens of video output. This method is faster and
  1814. uses less memory than screen swapping. However, screen flipping cannot be
  1815. used with an MA, nor to debug programs that produce graphics or use the
  1816. video-display pages. In addition, the CodeView debugger's screen flipping
  1817. works only with IBM and IBM-compatible microcomputers.%@NL@%
  1818. %@NL@%
  1819. %@CR:MCV15803@%%@4@%Screen swapping has none of the limitations of screen flipping, but is%@EH@%
  1820. significantly slower and requires more memory. In the screen-swapping
  1821. method, the CodeView debugger creates a buffer in memory and uses it to
  1822. store the screen that is not being used. When the user requests the other
  1823. screen, the debugger swaps the screen in the display buffer for the one in
  1824. the storage buffer.%@NL@%
  1825. %@NL@%
  1826. %@CR:MCV15804@%%@4@%When you use screen swapping, the buffer size is 16K for all adapters. The%@EH@%
  1827. amount of memory used by the CodeView debugger is increased by the size of
  1828. the buffer.%@NL@%
  1829. %@NL@%
  1830. %@CR:MCV15805@%%@4@%Table 1.1 shows the default exchange mode (swapping or flipping) and the%@EH@%
  1831. default display mode (sequential or window) for various configurations.
  1832. Display modes are discussed in Section 1.5.14%@BO:   19f30@%, "Enabling Window or
  1833. Sequential Mode."%@NL@%
  1834. %@NL@%
  1835. %@CR:MCV1T100@%%@4@%%@AB@%Table 1.1  Default Exchange and Display Modes%@AE@%%@EH@%%@NL@%
  1836. %@TH:   18    980  3 21 16 12 47 @%
  1837.  
  1838. %@AB@%                     Display         Default%@AE@%
  1839. %@AB@%Computer             Adapter         Modes       Alternate Modes%@AE@%
  1840.  
  1841. IBM                  CGA or EGA      /F /W       /S if your program uses video-
  1842.                                                  display pages or graphics; /T for sequential
  1843.                                                  mode
  1844.  
  1845. IBM compatible       CGA or EGA      /T          /W for window mode; /F for screen flipping
  1846.                                                  with text programs; or /S for screen swapping
  1847.                                                  with programs that use video-display pages or
  1848.                                                  graphics
  1849.  
  1850. IBM                  MA              /S /W       /T for sequential mode
  1851.  
  1852. IBM compatible       MA              /T          /W for window mode; /S for screen swapping
  1853.  
  1854. Noncompatible        Any             /T          /S for screen swapping
  1855. %@TE:   18    980  3 21 16 12 47 @%
  1856. %@NL@%
  1857. %@CR:MCV15806@%%@4@%If you are not sure if your computer is completely IBM compatible, you can%@EH@%
  1858. experiment. If the basic input/output system (BIOS) of your computer is not
  1859. compatible enough, the CodeView debugger may not work with the /F option.%@NL@%
  1860. %@NL@%
  1861. %@CR:MCV15807@%%@4@%If you specify the /F option with an MA, the debugger ignores the option%@EH@%
  1862. and uses screen swapping. If you try to use screen flipping to debug a
  1863. program that produces graphics or uses the video-display pages, you may get
  1864. unexpected results and have to start over with the /S option.%@NL@%
  1865. %@NL@%
  1866. %@CR:MCV15808@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  1867. %@NL@%
  1868.      CV /F CALC CALC.DAT%@NL@%
  1869. %@NL@%
  1870. %@CR:MCV15809@%%@4@%The example above starts the CodeView debugger with screen flipping. You%@EH@%
  1871. might use this command line if you have an IBM-compatible computer, and you
  1872. want to override the default screen-exchange mode in order to use less
  1873. memory and switch screens more quickly. The option would not be necessary on
  1874. an IBM computer, since screen flipping is the default.%@NL@%
  1875. %@NL@%
  1876.      CV /S GRAFIX%@NL@%
  1877. %@NL@%
  1878. %@CR:MCV1580A@%%@4@%The example above starts the debugger with screen swapping. You might use%@EH@%
  1879. this command line if your program uses graphics mode.%@NL@%
  1880. %@NL@%
  1881. %@NL@%
  1882. %@CR:MCV15900@%%@3@%%@AB@%1.5.9  Loading Information from Dynamic-Link Libraries (OS/2 Only)%@AE@%%@EH@%%@NL@%
  1883. %@NL@%
  1884. %@CR:MCV15901@%%@AB@%Option%@AE@%%@NL@%
  1885. %@NL@%
  1886.      /L %@AI@%dynlib%@AE@%%@NL@%
  1887. %@NL@%
  1888. %@CR:MCV15902@%%@4@%The /L option directs the protected-mode CodeView debugger (CVP) to search%@EH@%
  1889. %@AI@%dynlib%@AE@% for symbolic information. At least one space must separate /L from
  1890. %@AI@%dynlib%@AE@%.%@NL@%
  1891. %@NL@%
  1892. %@CR:MCV15903@%%@4@%CVP can debug dynamic-link libraries, but only if it is told what libraries%@EH@%
  1893. to search at run time. When you place a module in a dynamic-link library,
  1894. neither code nor symbolic information for that module is stored in an
  1895. application's executable (.EXE) file. Instead, the code and symbols are
  1896. stored in the library and are not brought together with the main program
  1897. until run time.%@NL@%
  1898. %@NL@%
  1899. %@CR:MCV15904@%%@4@%Thus, the protected-mode debugger needs to search the dynamic-link library%@EH@%
  1900. for symbolic information. Because the debugger does not automatically know
  1901. which libraries to look for, use /L to load symbolic information for
  1902. dynamic-link libraries. You should use this option only with libraries that
  1903. you have created and wish to debug.%@NL@%
  1904. %@NL@%
  1905. %@CR:MCV15905@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  1906. %@NL@%
  1907.      CVP /L DLIB1.DLL /L GRAFLIB.DLL PROG%@NL@%
  1908. %@NL@%
  1909. %@CR:MCV15906@%%@4@%In the example above, CVP is invoked to debug the program PROG.EXE. To find%@EH@%
  1910. symbolic information needed for debugging each module, CVP searches
  1911. libraries DLIB1.DLL and DLIB2.DLL, as well as the executable file PROG.EXE.%@NL@%
  1912. %@NL@%
  1913. %@NL@%
  1914. %@CR:MCV15A00@%%@3@%%@AB@%1.5.10  Turning Off the Mouse%@AE@%%@EH@%%@NL@%
  1915. %@NL@%
  1916. %@CR:MCV15A01@%%@AB@%Option%@AE@%%@NL@%
  1917. %@NL@%
  1918.      /M%@NL@%
  1919. %@NL@%
  1920. %@CR:MCV15A02@%%@4@%If you have a mouse installed on your system, you can tell the CodeView%@EH@%
  1921. debugger to ignore it by using the /M option. You may need to use this
  1922. option if you are debugging a program that uses the mouse and your mouse is
  1923. not a Microsoft Mouse. This is due to a conflict between the program's use
  1924. of the mouse and the debugger's use of it. Use of /M may possibly disable
  1925. the program's use of the mouse, as well as CodeView's.%@NL@%
  1926. %@NL@%
  1927. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1928. %@AI@%NOTE%@AE@%%@NL@%
  1929.    The same conflict between program and debugger applies if you are not%@NL@%
  1930.    using the current Microsoft Mouse driver program (%@AB@%MOUSE.SYS%@AE@%), which is%@NL@%
  1931.    included on the distribution disks for certain Microsoft products. You%@NL@%
  1932.    may want to replace your old mouse driver program with the updated%@NL@%
  1933.    version. You will then be able to use the mouse with both the CodeView%@NL@%
  1934.    debugger and the program you are debugging. If you did not install a%@NL@%
  1935.    mouse driver when you set up Version 4.0 of Microsoft FORTRAN, Version%@NL@%
  1936.    5.0 or later of Microsoft C, or Version 5.0 or later of Macro Assembler,%@NL@%
  1937.    see your user's guide for information on installing %@AB@%MOUSE.SYS%@AE@%. These%@AE@%%@NL@%
  1938.    programs may not work with pointing devices from other manufacturers.%@NL@%
  1939. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1940. %@NL@%
  1941. %@NL@%
  1942. %@CR:MCV15B00@%%@3@%%@AB@%1.5.11  Debugging Multiple Processes (OS/2 only)%@AE@%%@EH@%%@NL@%
  1943. %@NL@%
  1944. %@CR:MCV15B01@%%@AB@%Option%@AE@%%@NL@%
  1945. %@NL@%
  1946.      /O%@NL@%
  1947. %@NL@%
  1948. %@CR:MCV15B02@%%@4@%If you are running OS/2, version 1.10 or later, you can use the /O option to%@EH@%
  1949. enable debugging of multiple processes. See Chapter 12%@BO:   80899@%, "Debugging in
  1950. Protected Mode," for more information on how to debug multiple processes.%@NL@%
  1951. %@NL@%
  1952. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1953. %@AI@%NOTE%@AE@%%@NL@%
  1954.    The /O option is incompatible with the /2 option.%@NL@%
  1955. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1956. %@NL@%
  1957. %@NL@%
  1958. %@CR:MCV15C00@%%@3@%%@AB@%1.5.12  Extending EGA Compatibility%@AE@%%@EH@%%@NL@%
  1959. %@NL@%
  1960. %@CR:MCV15C01@%%@AB@%Option%@AE@%%@NL@%
  1961. %@NL@%
  1962.      /P%@NL@%
  1963. %@NL@%
  1964. %@CR:MCV15C02@%%@4@%The use of the /P option may enable the CodeView debugger to run properly in%@EH@%
  1965. window mode on a non-IBM version of the enhanced graphics adapter (EGA).%@NL@%
  1966. %@NL@%
  1967. %@CR:MCV15C03@%%@4@%Normally, the debugger saves and restores the palette registers of an EGA.%@EH@%
  1968. However, although this procedure works perfectly well with an IBM EGA, it
  1969. can create conflicts with other EGAs. The /P option prevents the saving and
  1970. restoring of palette registers, and so may enhance compatibility.%@NL@%
  1971. %@NL@%
  1972. %@CR:MCV15C04@%%@4@%Symptoms that may indicate the need for using /P include the debugging%@EH@%
  1973. screen starting in nonstandard colors and the debugger appearing to crash
  1974. while in window mode.%@NL@%
  1975. %@NL@%
  1976. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1977. %@AI@%NOTE%@AE@%%@NL@%
  1978.    The %@AB@%/P%@AE@% option may cause the program being debugged to lose some colors%@NL@%
  1979.    whenever you switch back and forth between the debugging screen and the%@NL@%
  1980.    output screen. Therefore, do not use the %@AB@%/P%@AE@% option unless necessary.%@NL@%
  1981. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1982. %@NL@%
  1983. %@NL@%
  1984. %@CR:MCV15D00@%%@3@%%@AB@%1.5.13  Using Debug Registers (386 Only)%@AE@%%@EH@%%@NL@%
  1985. %@NL@%
  1986. %@CR:MCV15D01@%%@AB@%Option%@AE@%%@NL@%
  1987. %@NL@%
  1988.      /R%@NL@%
  1989. %@NL@%
  1990. %@CR:MCV15D02@%%@4@%If you have a 386 processor, you can enable the four debug registers by%@EH@%
  1991. giving the /R option. The debug registers can hold up to four tracepoints.
  1992. Normally,   tracepoints slow down execution of the program substantially
  1993. since CodeView must interrupt the program after each instruction and test
  1994. all tracepoints and watchpoints. Use of debug registers lets CodeView
  1995. implement tracepoints through the processor itself. CodeView can therefore
  1996. execute the program at normal speed even though areas of memory are being
  1997. monitored.%@NL@%
  1998. %@NL@%
  1999. %@CR:MCV15D03@%%@4@%If you specify more than four watchpoints or specify any watch expression,%@EH@%
  2000. CodeView does not use the debug registers.%@NL@%
  2001. %@NL@%
  2002. %@NL@%
  2003. %@CR:MCV15E00@%%@3@%%@AB@%1.5.14  Enabling Window or Sequential Mode%@AE@%%@EH@%%@NL@%
  2004. %@NL@%
  2005. %@CR:MCV15E01@%%@4@%%@AB@%Options%@AE@%%@EH@%%@NL@%
  2006. %@NL@%
  2007.      /T%@NL@%
  2008. %@NL@%
  2009. %@CR:MCV15E02@%%@4@%The CodeView debugger can operate in window mode or sequential mode. Window%@EH@%
  2010. mode displays up to four windows, enabling you to see different aspects of
  2011. the debugging-session program simultaneously. You can also use a mouse in
  2012. window mode. Window mode requires an IBM or IBM-compatible microcomputer.
  2013. Sequential mode works with any computer and is useful with redirection
  2014. commands. Debugging information is displayed sequentially on the screen.%@NL@%
  2015. %@NL@%
  2016. %@CR:MCV15E03@%%@4@%The behavior of each mode is discussed in detail in Chapter 2%@BO:   1b3d8@%, "The%@EH@%
  2017. CodeView Display." Refer back to Table 1.1 for the default and alternate
  2018. modes for your computer. If you are not sure if your computer is completely
  2019. IBM compatible, you can experiment with the options. If the BIOS of your
  2020. computer is not compatible enough, you may not be able to use window mode
  2021. (the /W option).%@NL@%
  2022. %@NL@%
  2023. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2024. %@AI@%NOTE%@AE@%%@NL@%
  2025.    Although window mode is more convenient, any debugging operation that can%@NL@%
  2026.    be done in window mode can also be done in sequential mode.%@NL@%
  2027. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2028. %@NL@%
  2029. %@CR:MCV15E04@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  2030. %@NL@%
  2031.      CV /W SIEVE%@NL@%
  2032. %@NL@%
  2033. %@CR:MCV15E05@%%@4@%The example above starts the CodeView debugger in window mode. You will%@EH@%
  2034. probably want to use the /W option if you have an IBM-compatible computer
  2035. since the default sequential mode is less convenient for most debugging
  2036. tasks.%@NL@%
  2037. %@NL@%
  2038.      CV /T SIEVE%@NL@%
  2039. %@NL@%
  2040. %@CR:MCV15E06@%%@4@%The example above starts the debugger in sequential mode. You might want to%@EH@%
  2041. use this option if you have an IBM computer and have a specific reason for
  2042. using sequential mode. For instance, sequential mode usually works better if
  2043. you are redirecting your debugging output to a remote terminal.%@NL@%
  2044. %@NL@%
  2045. %@NL@%
  2046. %@CR:MCV16000@%%@2@%%@AB@%1.6  Debugging Large Programs%@AE@%%@EH@%%@NL@%
  2047. %@NL@%
  2048. %@CR:MCV16001@%%@4@%Because the CodeView debugger must reside in memory along with the program%@EH@%
  2049. you are debugging, there may not be enough room to debug some large programs
  2050. that could otherwise run in memory alone. However, there are at least three
  2051. ways to get around memory limitations:%@NL@%
  2052. %@NL@%
  2053. %@CR:MCV16002@%  1. If you have expanded memory, use the /E option described earlier. This%@NL@%
  2054.      will enable CodeView to put the symbol table in expanded memory, thus%@NL@%
  2055.      freeing up a good deal of main memory.%@NL@%
  2056. %@NL@%
  2057.   2. Since CodeView now supports the debugging of overlaid programs, you can%@NL@%
  2058.      substantially reduce the amount of memory required to run your program%@NL@%
  2059.      by using overlays when you link your program.%@NL@%
  2060. %@NL@%
  2061.   3. Save space by using /Zi with modules you plan to focus on in the%@NL@%
  2062.      debugging session only, using /Zd with other modules.%@NL@%
  2063. %@NL@%
  2064. %@NL@%
  2065. %@CR:MCV17000@%%@2@%%@AB@%1.7  Working with Older Versions of the Assembler%@AE@%%@EH@%%@NL@%
  2066. %@NL@%
  2067. %@CR:MCV17001@%%@4@%You can run the CodeView debugger with files developed using older versions%@EH@%
  2068. of the Microsoft or IBM assemblers (prior to 5.0). Since older versions do
  2069. not write line numbers to object files, some of the CodeView debugger's
  2070. features will not be available when you debug programs developed with the
  2071. older assemblers. The following considerations apply in addition to the
  2072. considerations mentioned in Section 1.3.8%@BO:    fbcc@%, "Preparing Assembly Programs."%@NL@%
  2073. %@NL@%
  2074. %@CR:MCV17002@%%@4@%The procedure for assembling and debugging .EXE files by using older%@EH@%
  2075. versions of the assembler is summarized below. The debugger can be used on
  2076. either .EXE or .COM files, but you can only view symbolic information in
  2077. .EXE files.%@NL@%
  2078. %@NL@%
  2079. %@CR:MCV17003@%  1. In your source file, declare public any symbols, such as labels and%@NL@%
  2080.      variables, that you want to reference in the debugger. If the file is%@NL@%
  2081.      small, you may want to declare all symbols public.%@NL@%
  2082. %@NL@%
  2083.   2. As mentioned earlier, make sure that the code segment class name ends%@NL@%
  2084.      with the letters %@AS@%CODE%@AE@%. (For example: %@AS@%'MYCODE%@AE@%.)%@NL@%
  2085. %@NL@%
  2086.   3. Assemble as usual. No special options are required, and all assembly%@NL@%
  2087.      options are allowed.%@NL@%
  2088. %@NL@%
  2089.   4. Use LINK, Version 3.6 or later. Do not use the linker provided with%@NL@%
  2090.      older assembler versions. Use the /CODEVIEW option when linking.%@NL@%
  2091. %@NL@%
  2092.   5. Debug in assembly mode (this is the start-up default if the debugger%@NL@%
  2093.      fails to find line-number information). You cannot use source mode for%@NL@%
  2094.      debugging, but you can load the source file into the display window and%@NL@%
  2095.      view it in source mode. Any labels or variables that you declared%@NL@%
  2096.      public in the source file can be displayed and referenced by name%@NL@%
  2097.      instead of by address. However, they cannot be used in expressions%@NL@%
  2098.      because type information is not written to the object file.%@NL@%
  2099. %@NL@%
  2100. %@NL@%
  2101. %@CR:MCV20000@%%@1@%%@AB@%Chapter 2  The CodeView Display%@AE@%%@EH@%%@NL@%
  2102. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2103. %@NL@%
  2104. %@CR:MCV20001@%%@4@%The Microsoft CodeView debugger screen display can appear in two different%@EH@%
  2105. modes──window and sequential. Either mode provides a useful debugging
  2106. environment, but window mode is more powerful and convenient. The CodeView
  2107. debugger accepts either window commands or dialog commands. Dialog commands
  2108. are entered as command lines following the CodeView prompt (%@AS@%>%@AE@%) in sequential
  2109. mode. They are discussed in Chapter 3%@BO:   2d605@%, "Using Dialog Commands."%@NL@%
  2110. %@NL@%
  2111. %@CR:MCV20002@%%@4@%You will probably want to use window mode if you have the hardware to%@EH@%
  2112. support it. In window mode, the pull-down menus, function keys, and mouse
  2113. support offer fast access to the most common commands. Different aspects of
  2114. the program and debugging environment can be seen in different windows
  2115. simultaneously. Window mode is described in Section 2.1%@BO:   1b99f@% below.%@NL@%
  2116. %@NL@%
  2117. %@CR:MCV20003@%%@4@%Sequential mode is similar to the display mode of the CodeView debugger's%@EH@%
  2118. forerunner, the Microsoft Symbolic Debug Utility (SYMDEB) and the DOS DEBUG
  2119. utility. This mode is required if you do not have an IBM-compatible
  2120. computer, and it is sometimes useful when redirecting command input or
  2121. output. Sequential mode is described in Section 2.2.%@BO:   2c28f@%%@NL@%
  2122. %@NL@%
  2123. %@NL@%
  2124. %@CR:MCV21000@%%@2@%%@AB@%2.1  Using Window Mode%@AE@%%@EH@%%@NL@%
  2125. %@NL@%
  2126. %@CR:MCV21001@%%@4@%The elements of the CodeView display marked in Figure 2.1%@FN@%
  2127. Figure 2.1 is found on page 34 of the printed version.%@EF@% below include the%@EH@%
  2128. following:%@NL@%
  2129. %@NL@%
  2130. %@CR:MCV21002@%  1. The display window shows the program being debugged. It can contain%@NL@%
  2131.      source code (as in the example), assembly-language instructions, or any%@NL@%
  2132.      specified text file.%@NL@%
  2133. %@NL@%
  2134.   2. The current location line (the next line the program will execute) is%@NL@%
  2135.      displayed in reverse video or in a different color. This line may not%@NL@%
  2136.      always be visible because you can scroll to earlier or later parts of%@NL@%
  2137.      the program.%@NL@%
  2138. %@NL@%
  2139.   3. Lines containing previously set breakpoints are shown in high-intensity%@NL@%
  2140.      text.%@NL@%
  2141. %@NL@%
  2142.   4. The dialog window is where you enter dialog commands. These are the%@NL@%
  2143.      commands with optional arguments that you can enter at the CodeView%@NL@%
  2144.      prompt (%@AS@%>%@AE@%). You can scroll up or down in this window to view previous%@NL@%
  2145.      dialog commands and command output.%@NL@%
  2146. %@NL@%
  2147.   5. The cursor is a thin, blinking line that shows the location at which%@NL@%
  2148.      you can enter commands from the keyboard. You can move the cursor up%@NL@%
  2149.      and down, and place it in either the dialog or display window.%@NL@%
  2150. %@NL@%
  2151.   6. The display/dialog separator line divides the dialog window from the%@NL@%
  2152.      display window.%@NL@%
  2153. %@NL@%
  2154.   7. The register window shows the current status of processor registers and%@NL@%
  2155.      flags. It is an optional window that can be opened or closed with one%@NL@%
  2156.      keystroke or with the mouse. If the 386 option is on, a much wider%@NL@%
  2157.      register window is displayed, with 32-bit registers. The register%@NL@%
  2158.      window also displays the effective address at the bottom; the effective%@NL@%
  2159.      address shows the actual location of an operand in physical memory. It%@NL@%
  2160.      is useful when debugging in assembly mode.%@NL@%
  2161. %@NL@%
  2162.   8. The scroll bars are the vertical bars on the right side of the screen.%@NL@%
  2163.      Each scroll bar has an up arrow and a down arrow you can use to scroll%@NL@%
  2164.      through the display with a mouse.%@NL@%
  2165. %@NL@%
  2166.   9. The optional watch window shows the current status of specified%@NL@%
  2167.      variables or expressions. The watch window appears automatically%@NL@%
  2168.      whenever you create watch statements.%@NL@%
  2169. %@NL@%
  2170.  10. The menu bar shows titles of menus and commands that you can activate%@NL@%
  2171.      with the keyboard or the mouse. "Trace" and "Go" represent commands;%@NL@%
  2172.      the other titles are all menus.%@NL@%
  2173. %@NL@%
  2174.  11. Menus can be opened by specifying the appropriate title on the menu%@NL@%
  2175.      bar. On the sample screen, the Watch menu has been opened.%@NL@%
  2176. %@NL@%
  2177.  12. The menu "highlight" is a reverse-video or colored strip indicating the%@NL@%
  2178.      current selection in a menu. You can move the highlight up or down to%@NL@%
  2179.      change the current selection.%@NL@%
  2180. %@NL@%
  2181.  13. The mouse pointer indicates the current position of the mouse. It is%@NL@%
  2182.      shown only if you have a mouse installed on your system.%@NL@%
  2183. %@NL@%
  2184.  14. Dialog boxes (not shown) appear in the center of the screen when you%@NL@%
  2185.      choose a menu selection that requires a response. The dialog box%@NL@%
  2186.      prompts you for a response and then it disappears when you enter your%@NL@%
  2187.      answer.%@NL@%
  2188. %@NL@%
  2189.  15. Message boxes (not shown) appear in the center of the screen to display%@NL@%
  2190.      errors or other messages.%@NL@%
  2191. %@NL@%
  2192. %@CR:MCV21003@%%@4@%The Microsoft CodeView debugger screen elements are described in greater%@EH@%
  2193. detail in the rest of this chapter.%@NL@%
  2194. %@NL@%
  2195. %@NL@%
  2196. %@CR:MCV21100@%%@3@%%@AB@%2.1.1  Executing Window Commands with the Keyboard%@AE@%%@EH@%%@NL@%
  2197. %@NL@%
  2198. %@CR:MCV21101@%%@4@%The most common CodeView debugging commands, and all the commands for%@EH@%
  2199. managing the CodeView display, are available with window commands. Window
  2200. commands are one-keystroke commands that can be entered with CTRL-key
  2201. combinations, ALT-key combinations, or the direction keys on the numeric
  2202. keypad.%@NL@%
  2203. %@NL@%
  2204. %@CR:MCV21102@%%@4@%Most window commands can also be entered with a mouse, as described in%@EH@%
  2205. Section 2.1.2.1%@BO:   20e91@%, "Changing the Screen with the Mouse." The window commands
  2206. available from the keyboard are described by category in Sections
  2207. 2.1.1.1%@BO:   1cb3e@%-2.1.1.4 below.%@NL@%
  2208. %@NL@%
  2209. %@CR:MCV21110@%%@4@%%@AB@%2.1.1.1  Moving the Cursor with Keyboard Commands%@AE@%%@EH@%%@NL@%
  2210. %@NL@%
  2211. %@CR:MCV21111@%%@4@%The following keys move the cursor or scroll text up or down in the display%@EH@%
  2212. or dialog window.%@NL@%
  2213. %@CR:MCV21112@%%@NL@%
  2214. %@TH:   97   5324  2 28 48 @%
  2215. %@AB@%Key                         Function(Switch Cursor)%@AE@%
  2216.  
  2217. F6                          Moves the cursor between the display and dialog
  2218.                             windows.
  2219.  
  2220.                             If the cursor is in the dialog window when you
  2221.                             press F6, it will move to its previous position
  2222.                             in the display window. If the cursor is in the
  2223.                             display window, it will move to its previous
  2224.                             position in the dialog window.
  2225.  
  2226. CTRL+G                      Makes the size of the dialog window or display
  2227.                             window grow.
  2228.  
  2229.                             This works for whichever window the cursor is
  2230.                             in. If the cursor is in the display window, the
  2231.                             display/dialog separator line will move down
  2232.                             one line. If the cursor is in the dialog window,
  2233.                             the separator line will move up one line.
  2234.  
  2235. CTRL+T                      Makes the size of the dialog or display window
  2236.                             smaller.
  2237.  
  2238.                             This works for whichever window the cursor is
  2239.                             in. If the cursor is in the display window, the
  2240.                             display/dialog separator line will move up one
  2241.                             line. If the cursor is in the dialog window, the
  2242.                             separator line will move down one line.
  2243.  
  2244. UP ARROW                    Moves the cursor up one line in either the
  2245.                             display or dialog window.
  2246.  
  2247. DOWN ARROW                  Moves the cursor down one line in either the
  2248.                             display or dialog window.
  2249.  
  2250. PGUP                        Scrolls up one page.
  2251.  
  2252.                             If the cursor is in the display window, the
  2253.                             source lines or assembly-language instructions
  2254.                             scroll up. If the cursor is in the dialog
  2255.                             window, the buffer of commands entered during
  2256.                             the session scrolls up. The cursor remains at
  2257.                             its current position in the window. The length
  2258.                             of a page is the current number of lines in the
  2259.                             window.
  2260.  
  2261. PGDN                        Scrolls down one page.
  2262.  
  2263.                             If the cursor is in the display window, the
  2264.                             source lines or assembly-language instructions
  2265.                             scroll down. If the cursor is in the dialog
  2266.                             window, the buffer of commands entered during
  2267.                             the session scrolls down. The cursor remains at
  2268.                             its current position in the window. The length
  2269.                             of a page is the current number of lines in the
  2270.                             window.
  2271.  
  2272. HOME                        Scrolls to the top of the file, first local
  2273.                             variable, or beginning of the current command.
  2274.  
  2275.                             If the cursor is in the display or locals
  2276.                             window, the text scrolls to the start of the
  2277.                             source file, program instructions, or local
  2278.                             variables. If the cursor is in the dialog window
  2279.                             and you are currently entering a command, the
  2280.                             cursor moves to the beginning of the line, right
  2281.                             after the prompt.
  2282.  
  2283. CTRL+HOME                   Scrolls to the top of the file, first local
  2284.                             variable, or beginning of the command buffer.
  2285.  
  2286.                             This key produces the same effect that the HOME
  2287.                             key does, except that in the dialog window it
  2288.                             moves the cursor to the beginning of the command
  2289.                             buffer. The top of the command buffer may be
  2290.                             blank if you have not yet entered enough
  2291.                             commands to fill the buffer. The cursor remains
  2292.                             at its current position in the window.
  2293.  
  2294. END                         Scrolls to the bottom of the file, last local
  2295.                             variable, or the end of the current command.
  2296.  
  2297.                             If the cursor is in the display or locals
  2298.                             window, the text scrolls to the end of the
  2299.                             source file, program instructions, or local
  2300.                             variables. If the cursor is in the dialog window
  2301.                             and you are entering a command, the cursor moves
  2302.                             to the end of the command.
  2303.  
  2304. CTRL+END                    Scrolls to the bottom of the file, to the last
  2305.                             local variables, or to the end of the command
  2306.                             buffer.
  2307.  
  2308.                             This key produces the same effect that the END
  2309.                             key does, except that in the dialog window, this
  2310.                             key moves the cursor to the end of the command
  2311.                             buffer.
  2312. %@TE:   97   5324  2 28 48 @%
  2313. %@NL@%
  2314. %@CR:MCV21120@%%@4@%%@AB@%2.1.1.2  Changing the Screen with Keyboard Commands%@AE@%%@EH@%%@NL@%
  2315. %@NL@%
  2316. %@CR:MCV21121@%%@4@%The following keys change the screen or switch to a different screen.%@EH@%%@NL@%
  2317. %@NL@%
  2318. %@CR:MCV21122@%%@NL@%
  2319. %@TH:   30   1576  2 28 48 @%
  2320. %@AB@%Key                         Function%@AE@%
  2321.  
  2322. F1                          Displays initial on-line Help screen.
  2323.  
  2324.                             The Help system is discussed in Section 2.1.4.%@BO:   2bcdf@%
  2325.                             You can also take advantage of the Help system
  2326.                             by using the Help menu, as mentioned in Section
  2327.                             2.1.3.9.%@BO:   2ba10@%
  2328.  
  2329. F2                          Toggles the register window.
  2330.  
  2331.                             The window disappears if present, or appears if
  2332.                             absent. You can also toggle the register window
  2333.                             with the Register selection from the View menu,
  2334.                             as described in Section 2.1.3.2.%@BO:   250d8@%
  2335.  
  2336. F3                          Switches between source, mixed, and asse
  2337.  
  2338.                             Source mode shows source code in the display
  2339.                             window, whereas assembly mode shows
  2340.                             assembly-language instructions. Mixed mode shows
  2341.                             both. You can also change modes with the Source,
  2342.                             Mixed, and Assembly selections from the View
  2343.                             menu, as described in Section 2.1.3.2.%@BO:   250d8@%
  2344.  
  2345. F4                          Switches to the output screen.
  2346.  
  2347.                             The output screen shows the output, if any, from
  2348.                             your program. Press any key to return to the
  2349.                             CodeView screen.
  2350. %@TE:   30   1576  2 28 48 @%
  2351. %@NL@%
  2352. %@CR:MCV21130@%%@4@%%@AB@%2.1.1.3  Controlling Program Execution with Keyboard Commands%@AE@%%@EH@%%@NL@%
  2353. %@NL@%
  2354. %@CR:MCV21131@%%@4@%The following keys set and clear breakpoints, trace through your program, or%@EH@%
  2355. execute to a breakpoint.%@NL@%
  2356. %@CR:MCV21132@%%@NL@%
  2357. %@TH:   54   3123  2 28 48 @%
  2358. %@AB@%Key                         Function%@AE@%
  2359.  
  2360. F5                          Executes to the next breakpoint or to the end of
  2361.                             the program if no breakpoint is encountered.
  2362.  
  2363.                             This keyboard command corresponds to the Go
  2364.                             dialog command when it is given without a
  2365.                             destination breakpoint argument.
  2366.  
  2367. F7                          Sets a temporary breakpoint on the line with the
  2368.                             cursor, and executes to that line (or to a
  2369.                             previously set breakpoint or the end of the
  2370.                             program if either is encountered before the
  2371.                             temporary breakpoint).
  2372.  
  2373.                             In source mode, if the line does not correspond
  2374.                             to code (for example, data declaration or
  2375.                             comment lines), the CodeView debugger sounds a
  2376.                             warning and ignores the command. This window
  2377.                             command corresponds to the Go dialog command
  2378.                             when it is given with a destination breakpoint.
  2379.  
  2380. F8                          Executes a Trace command.
  2381.  
  2382.                             The CodeView debugger executes the next source
  2383.                             line in source mode or the next instruction in
  2384.                             assembly mode. If the source line or instruction
  2385.                             contains a call to a routine or interrupt, the
  2386.                             debugger starts tracing through the call (enters
  2387.                             the call and is ready to execute the first
  2388.                             source line or instruction). This command will
  2389.                             not trace into DOS function calls.
  2390.  
  2391. F9                          Sets a breakpoint or clears a breakpoint on the
  2392.                             line with the cursor.
  2393.  
  2394.                             If the line does not currently have a
  2395.                             breakpoint, one is set on that line. If the line
  2396.                             already has a breakpoint, the breakpoint is
  2397.                             cleared. If the cursor is in the dialog window,
  2398.                             the CodeView debugger sounds a warning and
  2399.                             ignores the command. This window command
  2400.                             corresponds to the Breakpoint Set and Breakpoint
  2401.                             Clear dialog commands.
  2402.  
  2403. F10                         Executes the Program Step command.
  2404.  
  2405.                             The debugger executes the next source line in
  2406.                             source mode or the next instruction in assembly
  2407.                             mode. If the source line or instruction contains
  2408.                             a call to a routine or interrupt, the debugger
  2409.                             steps over the entire call (executes it to the
  2410.                             return) and is ready to execute the line or
  2411.                             instruction after the call.
  2412. %@TE:   54   3123  2 28 48 @%
  2413. %@NL@%
  2414. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2415. %@AI@%NOTE%@AE@%%@NL@%
  2416.    You can usually interrupt program execution by pressing either CTRL+BREAK%@NL@%
  2417.    or CTRL+C. These key combinations can be used to exit endless loops or to%@NL@%
  2418.    interrupt loops slowed by the Watchpoint or Tracepoint commands (see%@NL@%
  2419.    Chapter 8%@BO:   5c045@%, "Managing Watch Statements"). CTRL+BREAK or CTRL+C may not%@NL@%
  2420.    work if your program has a special use for one or both of these key%@NL@%
  2421.    combinations. If you have an IBM Personal Computer AT (or an%@NL@%
  2422.    AT-compatible), you can use the SYSTEM-REQUEST key to interrupt execution%@NL@%
  2423.    regardless of your program's use of CTRL+BREAK and CTRL+C.%@NL@%
  2424. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2425. %@NL@%
  2426. %@CR:MCV21140@%%@4@%%@AB@%2.1.1.4  Selecting from Menus with the Keyboard%@AE@%%@EH@%%@NL@%
  2427. %@NL@%
  2428. %@CR:MCV21141@%%@4@%This section discusses how to make selections from menus with the keyboard.%@EH@%
  2429. The effects of the selections are discussed in Section 2.1.3%@BO:   23f2f@%, "Using Menu
  2430. Selections," below.%@NL@%
  2431. %@NL@%
  2432. %@CR:MCV21142@%%@4@%The menu bar at the top of the screen has eleven titles: File, View, Search,%@EH@%
  2433. Run, Watch, Options, Language, Calls, Help, Trace, and Go. The first nine
  2434. titles are menus, and the last two are commands. The Trace and Go titles are
  2435. provided primarily for mouse users.%@NL@%
  2436. %@NL@%
  2437. %@CR:MCV21143@%%@4@%The four steps for opening a menu and making a selection are described%@EH@%
  2438. below.%@NL@%
  2439. %@NL@%
  2440. %@CR:MCV21144@%  1. To open a menu, press ALT and the mnemonic (the first letter) of the%@NL@%
  2441.      menu title. This can be accomplished either by pressing ALT first,%@NL@%
  2442.      releasing the key, and pressing the letter; or you can hold down ALT%@NL@%
  2443.      and then press the letter. For example, press ALT+S to open the Search%@NL@%
  2444.      menu. The menu title is highlighted, and a menu box listing the%@NL@%
  2445.      selections pops up below the title.%@NL@%
  2446. %@NL@%
  2447.      The mnemonic is a single letter that represents the selection. In color%@NL@%
  2448.      displays, this letter is in red; in black-and-white displays, it is in%@NL@%
  2449.      bold. In most cases, but not all, the letter is simply the first letter%@NL@%
  2450.      of the name of the selection. You can type an uppercase or a lowercase%@NL@%
  2451.      letter for the same selection.%@NL@%
  2452. %@NL@%
  2453.   2. There are two ways to make a selection from an open menu:%@NL@%
  2454. %@NL@%
  2455.      a.   Press the DOWN ARROW key on the numeric keypad to move down the%@NL@%
  2456.           menu. The highlight will follow your movement. When the item you%@NL@%
  2457.           want is highlighted, press ENTER to execute the command.%@NL@%
  2458.           You can also press the UP ARROW key to move up the menu. If you%@NL@%
  2459.           move off the top or bottom of the menu, the highlight wraps around%@NL@%
  2460.           to the other end of the menu.%@NL@%
  2461. %@NL@%
  2462.      b.   Press the key corresponding to the menu-selection mnemonic.%@NL@%
  2463. %@NL@%
  2464.   3. After a selection is made from the menu, one of three things will%@NL@%
  2465.      happen:%@NL@%
  2466. %@NL@%
  2467.      a.   For most menu selections, the choice is executed immediately.%@NL@%
  2468. %@NL@%
  2469.      b.   The items on the View, Options, and Language menus have small%@NL@%
  2470.           double arrows next to them if the option is on, or no arrows if%@NL@%
  2471.           the option is off.  Choosing the item toggles the option.  The%@NL@%
  2472.           status of the arrows will be reversed the next time an option is%@NL@%
  2473.           chosen.%@NL@%
  2474. %@NL@%
  2475.      c.   Some items require a response. In this case, there is another step%@NL@%
  2476.           in the menu-selection process.%@NL@%
  2477. %@NL@%
  2478.   4. If the item you select requires a response, a dialog box opens when you%@NL@%
  2479.      select a menu item. Type your response to the prompt in the box and%@NL@%
  2480.      press ENTER. For example, the Find dialog box asks you to enter a%@NL@%
  2481.      regular expression (see Appendix A%@BO:   d21a7@% for a complete explanation of%@NL@%
  2482.      regular expressions).%@NL@%
  2483. %@NL@%
  2484.      If your response is valid, the command will be executed. If you enter%@NL@%
  2485.      an invalid response, a message box will appear, telling you the problem%@NL@%
  2486.      and asking you to press a key. Press any key to make the message box%@NL@%
  2487.      disappear.%@NL@%
  2488. %@NL@%
  2489. %@CR:MCV21145@%%@4@%At any point during the process of selecting a menu item, you can press%@EH@%
  2490. ESCAPE to cancel the menu. While a menu is open, you can press the LEFT
  2491. ARROW or RIGHT ARROW key to move from one menu to an adjacent menu, or to
  2492. one of the command titles on the menu bar. Pressing ENTER without entering
  2493. any characters in response to a message box will also cancel the menu.%@NL@%
  2494. %@NL@%
  2495. %@NL@%
  2496. %@CR:MCV21200@%%@3@%%@AB@%2.1.2  Executing Window Commands with the Mouse%@AE@%%@EH@%%@NL@%
  2497. %@NL@%
  2498. %@CR:MCV21201@%%@4@%The CodeView debugger is designed to work with the Microsoft Mouse (it also%@EH@%
  2499. works with some compatible pointing devices). By moving the mouse on a flat
  2500. surface, you can move the mouse pointer in a corresponding direction on the
  2501. screen. The following terms refer to the way you select items or execute
  2502. commands with the mouse.%@NL@%
  2503. %@NL@%
  2504. %@CR:MCV21202@%%@NL@%
  2505. %@AB@%Term                        Definition     %@AE@%%@NL@%
  2506. %@NL@%
  2507. Point                       Move the mouse until the mouse pointer rests on%@NL@%
  2508.                             the item you want to select.%@NL@%
  2509. %@NL@%
  2510. Click                       Quickly press and release a mouse button while%@NL@%
  2511.                             pointing at an item you want to select.%@NL@%
  2512. %@NL@%
  2513. Drag                        Press a mouse button while on a selected item,%@NL@%
  2514.                             then hold the button down while moving the%@NL@%
  2515.                             mouse. The item moves in the direction of the%@NL@%
  2516.                             mouse movement. When the item you are moving is%@NL@%
  2517.                             where you want it, release the button; the item%@NL@%
  2518.                             will stay at that place.%@NL@%
  2519. %@NL@%
  2520. %@NL@%
  2521. %@CR:MCV21203@%%@4@%The CodeView debugger uses two mouse buttons. The terms "click Right,"%@EH@%
  2522. "click Left," "click both," and "click either" are sometimes used to
  2523. designate which buttons to use. When dragging, either button can be used.%@NL@%
  2524. %@NL@%
  2525. %@CR:MCV21210@%%@4@%%@AB@%2.1.2.1  Changing the Screen with the Mouse%@AE@%%@EH@%%@NL@%
  2526. %@NL@%
  2527. %@CR:MCV21211@%%@4@%You can change various aspects of the screen display by pointing to one of%@EH@%
  2528. the following elements and then either clicking or dragging.%@NL@%
  2529. %@CR:MCV21212@%%@NL@%
  2530. %@TH:   44   3054  2 28 48 @%
  2531. %@AB@%Item                        Action     %@AE@%%@NL@%
  2532. %@NL@%
  2533. Single line separating      Drag the separator line up to increase the size%@NL@%
  2534. display and dialog          of the dialog window while decreasing the size%@NL@%
  2535. windows                     of the display window, or drag the line down to%@NL@%
  2536.                             increase the size of the display window while%@NL@%
  2537.                             decreasing the size of the dialog window. You%@NL@%
  2538.                             can eliminate either window completely by%@NL@%
  2539.                             dragging the line all the way up or down%@NL@%
  2540.                             (providing the cursor is not in the window you%@NL@%
  2541.                             want to eliminate).%@NL@%
  2542. %@NL@%
  2543. UP ARROW or DOWN ARROW      Point and click Left on one of the four arrows%@NL@%
  2544. on the scroll bar           on the scroll bars to scroll up or down. If you%@NL@%
  2545.                             are in the display window, source code scrolls%@NL@%
  2546.                             up or down. If you are in the dialog window, the%@NL@%
  2547.                             buffer containing dialog commands entered during%@NL@%
  2548.                             the session scrolls up or down.%@NL@%
  2549. %@NL@%
  2550.                             Click Left to scroll up or down just one line at%@NL@%
  2551.                             a time. Press Left and hold it down in order to%@NL@%
  2552.                             scroll continuously. Continuous scrolling is%@NL@%
  2553.                             easier to use when you want to scroll more than%@NL@%
  2554.                             a couple of lines. The scrolling stops as soon%@NL@%
  2555.                             as you release the mouse button.%@NL@%
  2556. %@NL@%
  2557. Scroll bar elevator         Each scroll bar has an "elevator," which is a%@NL@%
  2558.                             highlighted rectangle on the bar that can be%@NL@%
  2559.                             moved up or down with the mouse. In the display%@NL@%
  2560.                             window, the elevator indicates your relative%@NL@%
  2561.                             position in the source file; if you are in mixed%@NL@%
  2562.                             or assembly mode, the elevator indicates your%@NL@%
  2563.                             position in the executable file relative to the%@NL@%
  2564.                             instructions that correspond to the source file.%@NL@%
  2565.                             You can move quickly through the source file by%@NL@%
  2566.                             dragging the display window elevator up or down.%@NL@%
  2567. %@NL@%
  2568.                             In the dialog window, the position of the%@NL@%
  2569.                             elevator does not have any significance.%@NL@%
  2570. %@NL@%
  2571.                             To move up one page (either in the display or%@NL@%
  2572.                             dialog window), click the scroll bar anywhere%@NL@%
  2573.                             above the elevator. To move down a page, click%@NL@%
  2574.                             the scroll bar anywhere below the elevator.%@NL@%
  2575. %@TE:   44   3054  2 28 48 @%
  2576. %@NL@%
  2577. %@CR:MCV21220@%%@4@%%@AB@%2.1.2.2  Controlling Program Execution with the Mouse%@AE@%%@EH@%%@NL@%
  2578. %@NL@%
  2579. %@CR:MCV21221@%%@4@%By clicking the following mouse items, you can set and clear breakpoints,%@EH@%
  2580. trace through your program, execute to a breakpoint, or change flag bits.%@NL@%
  2581. %@CR:MCV21222@%
  2582. %@TH:   80   4887  2 28 48 @%
  2583. %@AB@%Item                        Action%@AE@%
  2584.  
  2585. Source line or              Point and click on a source line in source mode
  2586. instruction                 or on an instruction in assembly mode to take
  2587.                             one of the following actions:
  2588.  
  2589.                             %@AB@%Button        Result%@AE@%
  2590.  
  2591.                             Click Left    If the line under the mouse cursor
  2592.                                           does not have a breakpoint, one is
  2593.                                           set there.  If the line already
  2594.                                           has a breakpoint, the breakpoint
  2595.                                           is removed. Lines with breakpoints
  2596.                                           are shown in high-intensity text.
  2597.  
  2598.                             Click Right   A temporary breakpoint is set on
  2599.                                           the line, and the CodeView
  2600.                                           debugger executes until it reaches
  2601.                                           the line (or until it reaches a
  2602.                                           previously set breakpoint or the
  2603.                                           end of the program if either is
  2604.                                           encountered before the temporary
  2605.                                           breakpoint).
  2606.  
  2607.                             If you click on a line that does not correspond
  2608.                             to code (for example, a declaration or comment),
  2609.                             the CodeView debugger will sound a warning and
  2610.                             ignore the command.
  2611.  
  2612. "Trace" on menu bar         Point and click to trace the next instruction.
  2613.                             The kind of trace is determined by which button
  2614.                             is clicked:
  2615.  
  2616.                             %@AB@%Button        Result%@AE@%
  2617.  
  2618.                             Click Left    The Trace command is executed.
  2619.                                           The CodeView debugger executes
  2620.                                           the next source line in source
  2621.                                           mode or the next instruction in
  2622.                                           assembly mode. If the source line
  2623.                                           or instruction contains a call to
  2624.                                           a routine or interrupt, the
  2625.                                           debugger starts tracing through
  2626.                                           the call (it enters the call and
  2627.                                           is ready to execute the first
  2628.                                           source line or instruction). This
  2629.                                           command will not trace into DOS
  2630.                                           function calls.
  2631.  
  2632.                             Click Right   The Program Step command is
  2633.                                           executed. The debugger executes
  2634.                                           the next source line in source
  2635.                                           mode, or the next instruction in
  2636.                                           assembly mode. If the source line
  2637.                                           or instruction contains a call to
  2638.                                           a routine or interrupt, the
  2639.                                           CodeView debugger steps over the
  2640.                                           entire call (it executes the call
  2641.                                           to the return) and is ready to
  2642.                                           execute the line or instruction
  2643.                                           after the call.
  2644.  
  2645.                             These two commands are different only if the
  2646.                             current location is the start of a procedure, an
  2647.                             interrupt, or a call.
  2648.  
  2649. "Go" on menu bar            Point and click either button to execute to the
  2650.                             next breakpoint, or to the end of the program if
  2651.                             no breakpoints are encountered.
  2652.  
  2653. Flag in register window     Point to a flag name and click either button to
  2654.                             reverse the flag. If the flag bit is set, it
  2655.                             will be cleared; if the flag bit is cleared, it
  2656.                             will be set. The flag name is changed on the
  2657.                             screen to match the new status. If you are using
  2658.                             color mode, the color of the flag mnemonic will
  2659.                             also change. This command can only be used when
  2660.                             the register window is open. Use the command
  2661.                             with caution since changing flag bits can change
  2662.                             program execution at the lowest level.
  2663. %@TE:   80   4887  2 28 48 @%
  2664. %@NL@%
  2665. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2666. %@AI@%NOTE%@AE@%%@NL@%
  2667.    You can usually interrupt program execution by pressing either CTRL+BREAK%@NL@%
  2668.    or CTRL+C. See the note in Section 2.1.1.3%@BO:   1e85f@%, "Controlling Program%@NL@%
  2669.    Execution with Keyboard Commands," for more information.%@NL@%
  2670. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2671. %@NL@%
  2672. %@CR:MCV21230@%%@4@%%@AB@%2.1.2.3  Selecting from Menus with the Mouse%@AE@%%@EH@%%@NL@%
  2673. %@NL@%
  2674. %@CR:MCV21231@%%@4@%This section discusses how to make selections from menus with the mouse. The%@EH@%
  2675. effect of each selection is discussed in Section 2.1.3%@BO:   23f2f@%, "Using Menu
  2676. Selections."%@NL@%
  2677. %@NL@%
  2678. %@CR:MCV21232@%%@4@%The menu bar at the top of the screen has eleven titles: File, View, Search,%@EH@%
  2679. Run, Watch, Options, Language, Calls, Help, Trace, and Go. The first nine
  2680. are menus, and the last two are commands that you can execute by clicking
  2681. with the mouse. The five steps for opening a menu and making a selection are
  2682. described below:%@NL@%
  2683. %@NL@%
  2684. %@CR:MCV21233@%  1. To open a menu, point to the title of the menu you want to select.%@NL@%
  2685. %@NL@%
  2686.   2. With the mouse pointer on the title, press and hold down either mouse%@NL@%
  2687.      button. The selected title is highlighted and a menu box with a list of%@NL@%
  2688.      selections pops up below the title.%@NL@%
  2689. %@NL@%
  2690.   3. Press and drag the mouse toward you. The highlight follows the mouse%@NL@%
  2691.      movement. You can move the highlight up or down in the menu box.%@NL@%
  2692. %@NL@%
  2693.      If you move off the box, the highlight will disappear. However, as long%@NL@%
  2694.      as you do not release the button, you can move the pointer back onto%@NL@%
  2695.      the menu to make the highlight reappear.%@NL@%
  2696. %@NL@%
  2697.   4. When the selection you want is highlighted, release the mouse button.%@NL@%
  2698. %@NL@%
  2699.      When you release the button, the menu selection is executed. One of%@NL@%
  2700.      three things will happen:%@NL@%
  2701. %@NL@%
  2702.      a.   For most menu selections, the choice is executed immediately.%@NL@%
  2703. %@NL@%
  2704.      b.   The items on the View, Options, and Language menus have small%@NL@%
  2705.           double arrows next to them if the option is on, or no arrows if%@NL@%
  2706.           the option is off. Choosing the item toggles the option. The%@NL@%
  2707.           status of the arrows on a chosen item will appear reversed the%@NL@%
  2708.           next time you open the menu.%@NL@%
  2709. %@NL@%
  2710.      c.   Some items require a response. In this case, there is another step%@NL@%
  2711.           in the menu-selection process.%@NL@%
  2712. %@NL@%
  2713.   5. If the item you select requires a response, a dialog box with a prompt%@NL@%
  2714.      appears. Type your response and press ENTER or a mouse button. For%@NL@%
  2715.      example, if you select Find, the prompt will ask you to enter a regular%@NL@%
  2716.      expression (see Section 2.1.3.3%@BO:   25bfd@%, "The Search Menu," or Appendix A%@BO:   d21a7@% for%@NL@%
  2717.      an explanation of regular expressions).%@NL@%
  2718. %@NL@%
  2719.      If your response is valid, the command will be executed. If you enter%@NL@%
  2720.      an invalid response in the dialog box, a message box will appear%@NL@%
  2721.      telling you the problem and asking you to press a key. Press any key or%@NL@%
  2722.      click a mouse button to make the message box disappear.%@NL@%
  2723. %@NL@%
  2724.      Also, if you press ENTER without entering any characters, the message%@NL@%
  2725.      box will disappear.%@NL@%
  2726. %@NL@%
  2727. %@CR:MCV21234@%%@4@%There are several shortcuts you can take when selecting menu items with the%@EH@%
  2728. mouse. If you change your mind and decide not to select an item from a menu,
  2729. just move off the menu and release the mouse button──the menu will
  2730. disappear. You can move from one menu to another by dragging the pointer
  2731. directly from the current menu to the title of the new menu.%@NL@%
  2732. %@NL@%
  2733. %@NL@%
  2734. %@CR:MCV21300@%%@3@%%@AB@%2.1.3  Using Menu Selections%@AE@%%@EH@%%@NL@%
  2735. %@NL@%
  2736. %@CR:MCV21301@%%@4@%This section describes the selections on each of the CodeView menus. These%@EH@%
  2737. selections can be made with the keyboard, as described in Section 2.1.1%@BO:   1c85a@%, or
  2738. with the mouse, as described in Section 2.1.2.%@BO:   20854@%%@NL@%
  2739. %@NL@%
  2740. %@CR:MCV21302@%%@4@%Note that although the Trace and Go commands appear on the menu bar, they%@EH@%
  2741. are not menus. These titles are provided primarily for mouse users.%@NL@%
  2742. %@NL@%
  2743. %@CR:MCV21310@%%@4@%%@AB@%2.1.3.1  The File Menu%@AE@%%@EH@%%@NL@%
  2744. %@NL@%
  2745. %@CR:MCV21311@%%@4@%The File menu includes selections for working on the current source or%@EH@%
  2746. program file. The File menu is shown in Figure 2.2%@FN@%
  2747. Figure 2.2 is found on page 46 of the printed version.%@EF@%, and the selections are
  2748. explained below.%@NL@%
  2749. %@CR:MCV21312@%%@NL@%
  2750. %@TH:   59   3605  2 28 48 @%
  2751. %@AB@%Selection                   Action%@AE@%
  2752.  
  2753. Open                        Opens a new file.
  2754.  
  2755.                             When you make this selection, a dialog box
  2756.                             appears asking for the name of the new file you
  2757.                             want to open. Type the name of a source file, an
  2758.                             include file, or any other text file. The text
  2759.                             of the new file replaces the current contents of
  2760.                             the display window
  2761.  
  2762.                             (if you are in assembly mode, the CodeView
  2763.                             debugger will switch to source mode). When you
  2764.                             finish viewing the file, you can reopen the
  2765.                             original file. The last location and breakpoints
  2766.                             will still be marked when you return.
  2767.  
  2768.                             You may not need to open a new file to see
  2769.                             source files for a different module of your
  2770.                             program. The CodeView debugger automatically
  2771.                             switches to the source file of a module when
  2772.                             program execution enters that module. Although
  2773.                             switching source files is never necessary, it
  2774.                             may be desirable if you want to set breakpoints
  2775.                             or execute to a line in a module not currently
  2776.                             being executed.
  2777.  
  2778.                             Note that if the debugger cannot find the source
  2779.                             file when it switches modules, a dialog box
  2780.                             appears asking for a file specification for the
  2781.                             source file. You can either enter a new file
  2782.                             specification if the file is in another
  2783.                             directory, or press ENTER if no source file
  2784.                             exists. If you press ENTER, the module can only
  2785.                             be debugged in assembly mode.
  2786.  
  2787. DOS Shell                   Exits to a DOS shell. This where you can execute
  2788.                             DOS commands or executable files. To return to
  2789.                             the CodeView debugger, type %@AS@%exit%@AE@% at the DOS
  2790.                             command prompt. The CodeView screen reappears
  2791.                             with the same status it had when you left it.
  2792.  
  2793.                             The Shell Escape command works by saving the
  2794.                             current processes in memory and then executing a
  2795.                             second copy of %@AB@%C%@AE@% OMMAND.COM. This requires more
  2796.                             than 200K of free memory, since the debugger,
  2797.                             COMMAND.COM, symbol tables, and the debugged
  2798.                             program must all be saved in memory. If you do
  2799.                             not have enough memory to execute the Shell
  2800.                             Escape command, an error message appears. Even
  2801.                             if you have enough memory to execute the
  2802.                             command, you may not have enough memory left to
  2803.                             execute large programs from the shell.
  2804.  
  2805.                             The Shell Escape command does not work under
  2806.                             certain conditions. See Section 11.7%@BO:   7b01d@% for
  2807.                             additional information.
  2808.  
  2809. Exit                        Terminates the debugger and returns to DOS.
  2810. %@TE:   59   3605  2 28 48 @%
  2811. %@CR:MCV21320@%%@4@%%@AB@%2.1.3.2  The View Menu%@AE@%%@EH@%%@NL@%
  2812. %@NL@%
  2813. %@CR:MCV21321@%%@4@%The View menu includes selections for switching between source and assembly%@EH@%
  2814. modes, and for switching between the debugging screen and the output screen.
  2815. The corresponding function keys for menu selection are shown on the right
  2816. side of the menu where appropriate. The View menu is shown in Figure 2.3%@FN@%
  2817. Figure 2.3 is found on page 48 of the printed version.%@EF@%,
  2818. and the selections are explained below.%@NL@%
  2819. %@NL@%
  2820. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2821. %@AI@%NOTE%@AE@%%@NL@%
  2822.    The terms "source mode" and "assembly mode" apply to Microsoft Macro%@NL@%
  2823.    Assembler programs as well as to high-level-language programs. Source%@NL@%
  2824.    mode used with assembler programs shows the source code as originally%@NL@%
  2825.    written, including comments and directives. Assembly mode displays%@NL@%
  2826.    unassembled machine code, without symbolic information.%@NL@%
  2827. %@NL@%
  2828.    The use of one mode or another affects Trace and Program Step commands,%@NL@%
  2829.    as explained in Chapter 5%@BO:   3d63b@%, "Executing Code."%@NL@%
  2830. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2831. %@NL@%
  2832. %@CR:MCV21322@%%@4@%At all times exactly one of the following selections will have a small%@EH@%
  2833. double arrow to the left of the name: Source, Mixed, and Assembly. This
  2834. arrow indicates which of the three display modes is in use. If you select a
  2835. mode when you are already in that mode, the selection will be ignored. The
  2836. Registers selection may or may not have a double arrow to the left,
  2837. depending on whether or not the register window is being displayed.%@AB@%%@NL@%
  2838. %@CR:MCV21323@%%@NL@%
  2839. %@AB@%Selection                   Action     %@AE@%%@EH@%%@NL@%
  2840. %@NL@%
  2841. Source                      Changes to source mode (showing source lines%@NL@%
  2842.                             only).%@NL@%
  2843. %@NL@%
  2844. Mixed                       Changes to mixed mode (showing both unassembled%@NL@%
  2845.                             machine code and source lines).%@NL@%
  2846. %@NL@%
  2847. Assembly                    Changes to assembly mode (showing only%@NL@%
  2848.                             unassembled machine code).%@NL@%
  2849. %@NL@%
  2850. Registers                   Selecting this option will toggle the register%@NL@%
  2851.                             window on and off. You can also turn the%@NL@%
  2852.                             register on and off by pressing F2.%@NL@%
  2853. %@NL@%
  2854. Output                      Selecting this option will display the output%@NL@%
  2855.                             screen. The entire CodeView display will%@NL@%
  2856.                             temporarily disappear, but come back as soon as%@NL@%
  2857.                             you press any key. The Output command can also%@NL@%
  2858.                             be selected with F4.%@NL@%
  2859. %@NL@%
  2860. %@NL@%
  2861. %@CR:MCV21330@%%@4@%%@AB@%2.1.3.3  The Search Menu%@AE@%%@EH@%%@NL@%
  2862. %@NL@%
  2863. %@CR:MCV21331@%%@4@%The Search menu includes selections for searching through text files for%@EH@%
  2864. text strings and searching executable code for labels. The Search menu is
  2865. shown in Figure 2.4%@FN@%
  2866. Figure 2.4 is found on page 49 of the printed version.%@EF@%, and the selections are explained below.%@NL@%
  2867. %@CR:MCV21332@%%@NL@%
  2868. %@TH:   86   5324  2 28 48 @%
  2869. %@AB@%Selection                   Action     %@AE@%
  2870.  
  2871. Find                        Searches the current source file or other text
  2872.                             file for a specified regular expression. (This
  2873.                             selection can also be made without pulling down
  2874.                             a menu by pressing CTRL+F.)
  2875.  
  2876.                             When you make this selection, a dialog box opens
  2877.                             asking you to enter a regular expression. Type
  2878.                             the expression you want to search for and press
  2879.                             ENTER. The CodeView debugger starts at the
  2880.                             current or most recent cursor position in the
  2881.                             display window and searches for the expression.
  2882.  
  2883.                             If your entry is found, the cursor moves to the
  2884.                             first source line containing the expression. If
  2885.                             you are in assembly mode, the debugger
  2886.                             automatically switches to source mode when the
  2887.                             expression is found. If the entry is not found,
  2888.                             a message box opens, telling you the problem and
  2889.                             asking you to press a key (you can also click a
  2890.                             mouse button) to continue.
  2891.  
  2892.                             Regular expressions are a method of specifying
  2893.                             variable text strings. This method is similar to
  2894.                             the DOS method of using wild cards in file
  2895.                             names. Regular expressions are explained in
  2896.                             detail in Appendix A of this manual.
  2897.  
  2898.                             You can use the Search selections without
  2899.                             understanding regular expressions. Since text
  2900.                             strings are the simplest form of regular
  2901.                             expressions, you can simply enter a string of
  2902.                             characters as the expression you want to find.
  2903.                             For example, you could enter %@AS@%count%@AE@% if you wanted
  2904.                             to search for the word "count."
  2905.  
  2906.                             The following characters have a special meaning
  2907.                             in regular expressions: backslash (%@AB@%\%@AE@%), asterisk
  2908.                             (%@AB@%*%@AE@%), left bracket (%@AB@%[%@AE@%), period (%@AB@%.%@AE@%), dollar sign
  2909.                             (%@AB@%$%@AE@%), and caret (%@AB@%^%@AE@%). In order to find strings
  2910.                             containing these characters, you must precede
  2911.                             the characters with a backslash; this cancels
  2912.                             their special meanings.
  2913.  
  2914.                             For example, the periods in FORTRAN relational
  2915.                             and logical operators must be preceded by
  2916.                             back-slashes. You would use %@AS@%%@AE@%%@AS@%\.EQ%@AE@%%@AS@% %@AE@%%@AS@%%@AE@% to find the%@AS@%.EQ%@AE@%
  2917.                             operator. With C, you would use %@AS@%%@AE@%%@AS@%\*ptr%@AE@%%@AS@% %@AE@%%@AS@%%@AE@% to find%@AE@%
  2918.                             %@AS@%%@AE@%%@AS@%*ptr%@AE@%; with BASIC, you would use %@AS@%%@AE@%%@AS@%NAME\$%@AE@% to find%@AE@%
  2919.                             %@AS@%%@AE@%%@AS@%NAME$%@AE@%.
  2920.  
  2921.                             The Case Sense selection from the Options menu
  2922.                             has no effect on searching for regular
  2923.                             expressions.
  2924.  
  2925. Next                        Searches for the next match of the current
  2926.                             regular expression.
  2927.  
  2928.                             This selection is meaningful only after you have
  2929.                             used the Search command to specify the current
  2930.                             regular expression. If the CodeView debugger
  2931.                             searches to the end of the file without finding
  2932.                             another match for the expression, it wraps
  2933.                             around and starts searching at the beginning of
  2934.                             the file.
  2935.  
  2936. Previous                    Searches for the previous match of the current
  2937.                             regular expression.
  2938.  
  2939.                             This selection is meaningful only after you have
  2940.                             used the Search command to specify the current
  2941.                             regular expression. If the debugger searches to
  2942.                             the beginning of the file without finding
  2943.                             another match for the expression, it wraps
  2944.                             around and starts searching at the end of the
  2945.                             file.
  2946.  
  2947. Label                       Searches the executable code for an
  2948.                             assembly-language label.
  2949.  
  2950.                             If the label is found, the cursor moves to the
  2951.                             instruction containing the label. If you start
  2952.                             the search in source mode, the debugger will
  2953.                             switch to assembly mode to show a label in a
  2954.                             library routine or an assembly-language module.
  2955. %@TE:   86   5324  2 28 48 @%
  2956. %@NL@%
  2957. %@CR:MCV21340@%%@4@%%@AB@%2.1.3.4  The Run Menu%@AE@%%@EH@%%@NL@%
  2958. %@NL@%
  2959. %@CR:MCV21341@%%@4@%The Run menu includes selections for running your program. The Run menu is%@EH@%
  2960. shown in Figure 2.5%@FN@%
  2961. Figure 2.5 is found on page 51 of the printed version.%@EF@%, and the selections are explained below.%@NL@%
  2962. %@CR:MCV21342@%
  2963. %@TH:   33   1676  2 28 48 @%
  2964. %@AB@%Selection                   Action%@AE@%
  2965.  
  2966. Start                       Starts the program from the beginning and runs
  2967.                             it.
  2968.  
  2969.                             Any previously set breakpoints or watch
  2970.                             statements will still be in effect. The CodeView
  2971.                             debugger will run your program from the
  2972.                             beginning to the first breakpoint, or to the end
  2973.                             of the program if no breakpoint is encountered.
  2974.                             This has the same effect as selecting Restart
  2975.                             (see the next selection), then entering the Go
  2976.                             command.
  2977.  
  2978. Restart                     Restarts the current program, but does not begin
  2979.                             executing it.
  2980.  
  2981.                             You can debug the program again from the
  2982.                             beginning. Any previously set breakpoints or
  2983.                             watch statements will still be in effect.
  2984.  
  2985. Execute                     Executes from the current instruction.
  2986.  
  2987.                             This is the same as the Execute dialog command
  2988.                             (%@AB@%E%@AE@%). To stop execution, press any key or a mouse
  2989.                             button.
  2990.  
  2991. Clear Breakpoints           Clears all breakpoints.
  2992.  
  2993.                             This selection may be convenient after selecting
  2994.                             Restart if you don't want to use previously set
  2995.                             breakpoints. Note that watch statements are not
  2996.                             cleared by this command.
  2997. %@TE:   33   1676  2 28 48 @%
  2998. %@NL@%
  2999. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3000. %@AI@%NOTE%@AE@%%@NL@%
  3001.    Although the Start and Restart selections retain breakpoints along with%@NL@%
  3002.    pass count and arguments, any instructions entered with the Assemble%@NL@%
  3003.    command will be overwritten by the original program.%@NL@%
  3004. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3005. %@NL@%
  3006. %@CR:MCV21350@%%@4@%%@AB@%2.1.3.5  The Watch Menu%@AE@%%@EH@%%@NL@%
  3007. %@NL@%
  3008. %@CR:MCV21351@%%@4@%The Watch menu includes selections for managing the watch window. Selections%@EH@%
  3009. on this menu are also available with dialog commands. The Watch menu is
  3010. shown in Figure 2.6%@FN@%
  3011. Figure 2.6 is found on page 52 of the printed version.%@EF@%, and the selections are explained below.%@NL@%
  3012. %@CR:MCV21352@%%@NL@%
  3013. %@TH:   81   5051  2 28 49 @%
  3014. %@AB@%Selection                   Action%@AE@%
  3015.  
  3016. Add Watch                   Adds a watch-expression statement to the watch
  3017.                             window. (This selection can also be made
  3018.                             directly, by pressing CTRL+W.)
  3019.  
  3020.                             A dialog window opens, asking for the
  3021.                             source-level expression (which may be simply a
  3022.                             variable) whose value you want to see displayed
  3023.                             in the watch window. Type the expression and
  3024.                             press ENTER or a mouse button. The statement
  3025.                             appears in the watch window in normal text. You
  3026.                             cannot specify a memory range to be displayed
  3027.                             with the Add Watch selection as with the Watch
  3028.                             dialog command.
  3029.  
  3030.                             You can specify the format in which the value
  3031.                             will be displayed. Type the expression, followed
  3032.                             by a comma and a CodeView format specifier. If
  3033.                             you do not give a format specifier, the CodeView
  3034.                             debugger displays the value in a default format.
  3035.                             See Chapter 6%@BO:   43f5c@%, "Examining Data and Expressions,"
  3036.                             for more information about format specifiers and
  3037.                             the default format. See Section 8.2%@BO:   5ceb8@%, "Setting
  3038.                             Watch-Expression and Watch-Memory Statements,"
  3039.                             for more information about the Watch command.
  3040.  
  3041. Watchpoint                  Adds a watchpoint statement to the window.
  3042.  
  3043.                             A dialog window opens, asking for the
  3044.                             source-level expression whose value you want to
  3045.                             test. The watchpoint statement appears in the
  3046.                             watch window in high-intensity text when you
  3047.                             enter the expression. A watchpoint is a
  3048.                             conditional breakpoint that causes execution to
  3049.                             stop when the expression becomes nonzero (true).
  3050.                             See Section 8.3%@BO:   5ebff@%, "Setting Watchpoints," for
  3051.                             more information.
  3052.  
  3053. Tracepoint                  Adds a tracepoint statement to the watch window.
  3054.  
  3055.                             A dialog window opens, asking for the
  3056.                             source-level expression or memory range whose
  3057.                             value you want to test. The tracepoint statement
  3058.                             appears in the watch window in high-intensity
  3059.                             text when you enter the expression. A tracepoint
  3060.                             is a conditional breakpoint that causes
  3061.                             execution to stop when the value of a given
  3062.                             expression changes. You cannot specify a memory
  3063.                             range to be tested with the Tracepoint selection
  3064.                             as you can with the Tracepoint dialog command.
  3065.  
  3066.                             When setting a tracepoint expression, you can
  3067.                             specify the format in which the value will be
  3068.                             displayed. After the expression type a comma and
  3069.                             a format specifier. If you do not give a format
  3070.                             specifier, the CodeView debugger displays the
  3071.                             value in a default format. See Chapter 6%@BO:   43f5c@%,
  3072.                             "Examining Data and Expressions," for more
  3073.                             information about format specifiers and default.
  3074.                             See Section 8.4%@BO:   6059c@%, "Setting Tracepoints," for
  3075.                             more information about tracepoints.
  3076.  
  3077. Delete Watch                Deletes a statement from the watch window. (This
  3078.                             selection can also be made directly, by pressing
  3079.                             CTRL+U.)
  3080.  
  3081.                             A dialog window opens, showing the current watch
  3082.                             statements. If you are using a mouse, move the
  3083.                             pointer to the statement you want to delete and
  3084.                             click either button. If you are using the
  3085.                             keyboard, press the UP ARROW or DOWN ARROW key
  3086.                             to move the highlight to the statement you want
  3087.                             to delete, then press ENTER.
  3088.  
  3089. Delete All Watch            Deletes all statements in the watch window.
  3090.  
  3091.                             All watch, watchpoint, and tracepoint statements
  3092.                             are deleted, the watch window disappears, and
  3093.                             the display window is redrawn to take advantage
  3094.                             of the freed space on screen.
  3095. %@TE:   81   5051  2 28 49 @%
  3096. %@NL@%
  3097. %@CR:MCV21360@%%@4@%%@AB@%2.1.3.6  The Options Menu%@AE@%%@EH@%%@NL@%
  3098. %@NL@%
  3099. %@CR:MCV21361@%%@4@%The Options menu allows you to set options that affect various aspects of%@EH@%
  3100. the behavior of the CodeView debugger. The Options menu is shown in Figure
  3101. 2.7%@FN@%
  3102. Figure 2.7 is found on page 54 of the printed version.%@EF@%, and the selections are explained below.%@NL@%
  3103. %@NL@%
  3104. %@CR:MCV21362@%%@4@%Selections on the Options menu have small double arrows to the left of the%@EH@%
  3105. selection name when the option is on. The status of the option (and the
  3106. presence of the double arrows) is reversed each time you select the option.
  3107. By default, the Flip/Swap and Bytes Coded options are on and the 386 option
  3108. is off when you start the CodeView debugger. Depending on which language
  3109. your main program is in, the debugger will automatically turn Case Sense on
  3110. (if your program is in C) or off (if your program is in another language)
  3111. when you start debugging.%@AB@%%@NL@%
  3112. %@NL@%
  3113. %@CR:MCV21363@%%@4@%The selections from the Options menu are discussed below.%@EH@%%@NL@%
  3114. %@CR:MCV21364@%%@NL@%
  3115. %@TH:   80   4684  2 28 58 @%
  3116. %@AB@%Selection                   Action%@AE@%
  3117.  
  3118. Flip/Swap                   When on (the default), screen swapping or screen
  3119.                             flipping (whichever the debugger was started
  3120.                             with) is active; when off, swapping or flipping
  3121.                             is disabled.
  3122.  
  3123.                             Turning off swapping or flipping makes the
  3124.                             screen scroll more smoothly. You will not see
  3125.                             the program flip or swap each time you execute
  3126.                             part of the program. This option has no effect
  3127.                             if neither swapping nor flipping was selected
  3128.                             during start-up.
  3129.  
  3130.                             ───────────────────────────────────────────────
  3131.                             %@AI@%WARNING%@AE@%
  3132.                                Any time your program writes to the screen,
  3133.                                make sure flipping or swapping is on. If
  3134.                                swapping and flipping are off, your program
  3135.                                writes the output at the location of the
  3136.                                cursor. The CodeView debugger detects the
  3137.                                screen has changed and redraws the screen,
  3138.                                thus destroying the program output. An error
  3139.                                message is also displayed: %@AS@%Flip/Swap%@AE@%
  3140.                                %@AS@%option off - application output lost%@AE@%.
  3141.                             ───────────────────────────────────────────────
  3142.  
  3143. Bytes Coded                 When on (the default), the instructions,
  3144.                             instruction addresses, and the bytes for each
  3145.                             instruction are shown; when off, only the
  3146.                             instructions are shown.
  3147.  
  3148.                             This option affects only assembly mode. The
  3149.                             following display shows the appearance of sample
  3150.                             code when the option is off:
  3151.  
  3152.                             The following display shows the appearance of
  3153.                             the same code when the option is on:
  3154.  
  3155.                             27:              name = gets(namebuf);<R>
  3156.                                       LEA       AX,Word Ptr [namebuf]<R>
  3157.                                       PUSH      AX<R>
  3158.                                       CALL      _gets (03E1)<R>
  3159.                                       ADD       SP,02<R>
  3160.                                       MOV       Word Ptr [name],AX
  3161.  
  3162.                             The following display shows the appearance of
  3163.                             the same code when the option is on:
  3164.  
  3165.                             27:              name = gets(namebuf);
  3166.                             32AF:003E 8D46DE    LEA   AX,Word Ptr [namebuf]
  3167.                             32AF:0041 50        PUSH  AX
  3168.                             32AF:0042 E89C03    CALL  _gets (03E1)
  3169.                             32AF:0045 83C402    ADD   SP,02
  3170.                             32AF:0048 8946DA    MOV   Word Ptr [name],AX
  3171.  
  3172. Case Sense                  When the selection is turned on, the CodeView
  3173.                             debugger assumes that symbol names are case
  3174.                             sensitive (each lowercase letter is different
  3175.                             from the corresponding uppercase letter); when
  3176.                             off, symbol names are not case sensitive.
  3177.  
  3178.                             This option is on by default for C programs and
  3179.                             off by default for FORTRAN, BASIC, and assembly
  3180.                             programs. You will probably want to leave the
  3181.                             option in its default setting.
  3182.  
  3183. 386 (DOS Only)              When on, the register window will display the
  3184.                             registers in the wider, 386 format. Furthermore,
  3185.                             this option will enable you to assemble and
  3186.                             execute instructions that reference 32-bit
  3187.                             registers. If the 386 option is not on, any data
  3188.                             stored in the high-order word of a 32-bit
  3189.                             register will be lost.
  3190.  
  3191.                             To use this option, you should have a 386
  3192.                             processor running in 386 mode. If you do not
  3193.                             have a 386 processor, the debugger will respond
  3194.                             with the message, %@AS@%CPU is not an 80386%@AE@%, and leave
  3195.                             the option turned off.
  3196. %@TE:   80   4684  2 28 58 @%
  3197. %@NL@%
  3198. %@CR:MCV21370@%%@4@%%@AB@%2.1.3.7  The Language Menu%@AE@%%@EH@%%@NL@%
  3199. %@NL@%
  3200. %@CR:MCV21371@%%@4@%The Language menu allows you to either select the expression evaluator or%@EH@%
  3201. instruct the CodeView debugger to select it for you automatically. The
  3202. Language menu is shown in Figure 2.8%@FN@%
  3203. Figure 2.8 is found on page 56 of the printed version.%@EF@%, and the selections are explained
  3204. below.%@NL@%
  3205. %@NL@%
  3206. %@CR:MCV21372@%%@4@%As with the Options menu, the selection on is marked by double arrows.%@EH@%
  3207. Unlike the Options menu, however, exactly one item (and no more) on the
  3208. Language menu is selected at any given time.%@AB@%%@NL@%
  3209. %@NL@%
  3210. %@CR:MCV21373@%%@4@%The Auto selection causes the debugger to select automatically the%@EH@%
  3211. expression evaluator each time a new source file is loaded. The debugger
  3212. will examine the extension of the source file in order to determine which
  3213. expression evaluator to select. The Auto selection will use the C expression
  3214. evaluator if the current source file does not have a .BAS, .F, .FOR, or .PAS
  3215. extension.%@NL@%
  3216. %@NL@%
  3217. %@CR:MCV21374@%%@4@%If you change to a source module with an .ASM extension, Auto will cause the%@EH@%
  3218. debugger to select the C expression evaluator, but not all of the C defaults
  3219. will be used; system radix will be hexadecimal, case sensitivity will be
  3220. turned off, and the register window will be displayed.%@NL@%
  3221. %@NL@%
  3222. %@CR:MCV21375@%%@4@%When a language expression evaluator is selected, the debugger uses that%@EH@%
  3223. evaluator, regardless of what kind of program is being debugged.%@NL@%
  3224. %@NL@%
  3225. %@CR:MCV21380@%%@4@%%@AB@%2.1.3.8  The Calls Menu%@AE@%%@EH@%%@NL@%
  3226. %@NL@%
  3227. %@CR:MCV21381@%%@4@%The Calls menu is different from other menus in that its contents and size%@EH@%
  3228. change depending on the status of your program. The Calls menu is shown in
  3229. Figure 2.9%@FN@%
  3230. Figure 2.9 is found on page 57 of the printed version.%@EF@%.%@NL@%
  3231. %@NL@%
  3232. %@CR:MCV21382@%%@4@%The mnemonic for each item in the Calls menu is a number. Type the number%@EH@%
  3233. displayed immediately to the left of a routine in order to select it. You
  3234. can also use the UP ARROW or DOWN ARROW key to move to your selection, and
  3235. then press ENTER. You can use the mouse to select from the Calls menu as
  3236. well.%@NL@%
  3237. %@NL@%
  3238. %@CR:MCV21383@%%@4@%The effect of making a selection from the Calls menu is to view a routine.%@EH@%
  3239. The cursor will go to the line at which the selected routine was last
  3240. executing. For example, selecting %@AS@%main%@AE@% in the example above will cause
  3241. CodeView to display %@AS@%main%@AE@%, at the point at which %@AS@%main%@AE@% made a call to %@AS@%calc%@AE@%
  3242. (the function immediately above it). Note that selecting a routine from the
  3243. Calls menu does not (by itself) affect program execution. It simply provides
  3244. a convenient way to view previously called routines.%@NL@%
  3245. %@NL@%
  3246. %@CR:MCV21384@%%@4@%It is not required that one of the routines be selected. The Calls menu is%@EH@%
  3247. useful for viewing the list of previously called routines.%@NL@%
  3248. %@NL@%
  3249. %@CR:MCV21385@%%@4@%The Calls menu shows the current routine and the trail of routines from%@EH@%
  3250. which it was called. The current routine is always at the top. The routine
  3251. from which the current routine was called is directly below. Other active
  3252. routines are shown in the reverse order in which they were called. With C
  3253. and FORTRAN programs, the bottom routine should always be %@AB@%main%@AE@%. (The only
  3254. time %@AB@%main%@AE@% will not be the bottom routine is when you are tracing through the
  3255. standard library's start-up or termination routines.)%@NL@%
  3256. %@NL@%
  3257. %@CR:MCV21386@%%@4@%The current value of each argument, if any, is shown in parentheses%@EH@%
  3258. following the routine. The menu expands to accommodate the arguments of the
  3259. widest routine. Arguments are shown in the current radix (the default is
  3260. decimal). If there are more active routines than will fit on the screen, or
  3261. if the routine arguments are too wide, the display will expand to both the
  3262. left and right. The Stack Trace dialog command (%@AB@%K%@AE@%) also shows all the
  3263. routines and arguments.%@NL@%
  3264. %@NL@%
  3265. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3266. %@AI@%NOTE%@AE@%%@NL@%
  3267.    If you are using the CodeView debugger to debug assembly-language%@NL@%
  3268.    programs, routines will be shown in the Calls menu only if they use one%@NL@%
  3269.    of the Microsoft calling conventions. These calling conventions are%@NL@%
  3270.    explained in the Microsoft Mixed-Language Programming Guide.%@NL@%
  3271. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3272. %@NL@%
  3273. %@CR:MCV21390@%%@4@%%@AB@%2.1.3.9  The Help Menu%@AE@%%@EH@%%@NL@%
  3274. %@NL@%
  3275. %@CR:MCV21391@%%@4@%The Help menu lists the major topics in the on-line Help. For Help, open the%@EH@%
  3276. Help menu and select the topic you want to view.%@NL@%
  3277. %@NL@%
  3278. %@CR:MCV21392@%%@4@%Each topic may have any number of subtopics. You must go to the major topic%@EH@%
  3279. first. Information on how to move around within the help system is provided
  3280. in the next section.%@NL@%
  3281. %@NL@%
  3282. %@CR:MCV21393@%%@4@%The bottom selection on the Help menu is the About command. When you make%@EH@%
  3283. this selection, the debugger displays a small box at the center of the
  3284. screen that gives the time, the name of the product, and the version number.%@NL@%
  3285. %@NL@%
  3286. %@NL@%
  3287. %@CR:MCV21400@%%@3@%%@AB@%2.1.4  Using On-Line Help%@AE@%%@EH@%%@NL@%
  3288. %@NL@%
  3289. %@CR:MCV21401@%%@4@%The CodeView on-line Help system uses tree-structured menus to give you%@EH@%
  3290. quick access to help screens on a variety of subjects. Help uses a
  3291. combination of menu access and sequentially linked screens, as explained
  3292. below.%@NL@%
  3293. %@NL@%
  3294. %@CR:MCV21402@%%@4@%The Help file is called CV.HLP. It must be present in the current directory%@EH@%
  3295. or in one of the directories specified with the DOS PATH command. If the
  3296. Help file is not found, the CodeView debugger will still operate, but you
  3297. will not be able to use Help. An error message will appear if you try to use
  3298. a Help command.%@NL@%
  3299. %@NL@%
  3300. %@CR:MCV21403@%%@4@%When you request help, either by pressing F1, by using the %@AB@%H%@AE@% dialog command,%@EH@%
  3301. or by selecting the Help menu, the first help screen appears. You can select
  3302. Next and Previous buttons to page through the screens. The screens are
  3303. arranged in a circular fashion, so that selecting Next on the last screen
  3304. gets you to the first screen. Select the Cancel button to return to the
  3305. CodeView screen. Pressing the PGDN, PGUP, and ESC keys achieves the same
  3306. results as selecting Next, Previous, and Cancel, respectively, with the
  3307. mouse.%@NL@%
  3308. %@NL@%
  3309. %@CR:MCV21404@%%@4@%You can enter Help at a particular topic by selecting the topic from the%@EH@%
  3310. Help menu. Once in Help, use Next and Previous to page to other screens.%@NL@%
  3311. %@NL@%
  3312. %@NL@%
  3313. %@CR:MCV22000@%%@2@%%@AB@%2.2  Using Sequential Mode%@AE@%%@EH@%%@NL@%
  3314. %@NL@%
  3315. %@CR:MCV22001@%%@4@%Sequential mode is required if you have neither an IBM Personal Computer nor%@EH@%
  3316. a closely compatible computer. In sequential mode, the CodeView debugger
  3317. works much like its forerunner, the Microsoft Symbolic Debug Utility
  3318. (SYMDEB) and the DOS DEBUG utility. Sequential mode is also useful when you
  3319. are using redirected CodeView input and output.%@NL@%
  3320. %@NL@%
  3321. %@CR:MCV22002@%%@4@%In sequential mode, the CodeView debugger's input and output always move%@EH@%
  3322. down the screen from the current location. When the screen is full, the old
  3323. output scrolls off the top of the screen to make room for new output
  3324. appearing at the bottom. You can never return to examine previous commands
  3325. once they scroll off, but in many cases, you can reenter the command to put
  3326. the same information on the screen again.%@NL@%
  3327. %@NL@%
  3328. %@CR:MCV22003@%%@4@%Most window commands cannot be used in sequential mode. However, the%@EH@%
  3329. following function keys, which are used as commands in window mode, are also
  3330. available in sequential mode.%@NL@%
  3331. %@CR:MCV22004@%%@NL@%
  3332. %@TH:   60   3138  2 28 48 @%
  3333. %@AB@%Command                     Action%@AE@%
  3334.  
  3335. F1                          Displays a command-syntax summary.
  3336.  
  3337. F2                          Displays the registers.
  3338.  
  3339.                             This is equivalent to the Register (%@AB@%R%@AE@%) dialog
  3340.                             command.
  3341.  
  3342. F3                          Toggles between source, mixed, and assembly
  3343.                             modes.
  3344.  
  3345.                             Pressing this key will rotate the mode between
  3346.                             source, mixed, and assembly. You can achieve the
  3347.                             same effect by using the Set Assembly (%@AB@%S-%@AE@%), Set
  3348.                             Mixed (%@AB@%S&%@AE@%), and Set Source (%@AB@%S+%@AE@%) dialog commands.
  3349.  
  3350. F4                          Switches to the output screen, which shows the
  3351.                             output of your program.
  3352.  
  3353.                             Press any key to return to the CodeView
  3354.                             debugging screen. This is equivalent to the
  3355.                             Screen Exchange (%@AB@%\%@AE@%) dialog command.
  3356.  
  3357. F5                          Executes from the current instruction until a
  3358.                             breakpoint or the end of the program is
  3359.                             encountered.
  3360.  
  3361.                             This is equivalent to the Go dialog command (%@AB@%G%@AE@%)
  3362.                             with no argument.
  3363.  
  3364. F8                          Executes the next source line in source mode, or
  3365.                             the next instruction in assembly mode.
  3366.  
  3367.                             If the source line or instruction contains a
  3368.                             function, procedure, or interrupt call, the
  3369.                             CodeView debugger executes the first source line
  3370.                             or instruction of the call and is ready to
  3371.                             execute the next source line or instruction
  3372.                             within the call. This is equivalent to the Trace
  3373.                             (%@AB@%T%@AE@%) dialog command.
  3374.  
  3375. F9                          Sets or clears a breakpoint at the current
  3376.                             program location.
  3377.  
  3378.                             If the current program location has no
  3379.                             breakpoint, one is set. If the current location
  3380.                             has a breakpoint, it is removed. This is
  3381.                             equivalent to the Breakpoint Set (%@AB@%BP%@AE@%) dialog
  3382.                             command with no argument.
  3383.  
  3384. F10                         Executes the next source line in source mode or
  3385.                             the next instruction in assembly mode.
  3386.  
  3387.                             If the source line or instruction contains a
  3388.                             function, procedure, or interrupt call, the call
  3389.                             is executed to the end, and the CodeView
  3390.                             debugger is ready to execute the line or
  3391.                             instruction after the call. This is equivalent
  3392.                             to the Program Step (%@AB@%P%@AE@%) dialog command.
  3393. %@TE:   60   3138  2 28 48 @%
  3394. %@NL@%
  3395. %@CR:MCV22005@%%@4@%The CodeView Watch (%@AB@%W%@AE@%), Watchpoint (%@AB@%WP%@AE@%), and Tracepoint (%@AB@%TP%@AE@%) commands work
  3396. in sequential mode, but since there is no watch window, the watch statements
  3397. are not shown. You must use the Watch List command (%@AB@%W%@AE@%) to examine watch 
  3398. statements and watch values. See Chapter 8%@BO:   5c045@% for information on watch 
  3399. statement commands.%@NL@%
  3400. %@NL@%
  3401. %@CR:MCV22006@%%@4@%All the CodeView commands that affect program operation (such as Trace, Go,%@EH@%
  3402. and Breakpoint Set) are available in sequential mode. Any debugging
  3403. operation done in window mode can also be done in sequential mode.%@NL@%
  3404. %@NL@%
  3405. %@NL@%
  3406. %@CR:MCV30000@%%@1@%%@AB@%Chapter 3  Using Dialog Commands%@AE@%%@EH@%%@NL@%
  3407. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3408. %@NL@%
  3409. %@CR:MCV30001@%%@4@%CodeView dialog commands can be used in sequential mode or from the dialog%@EH@%
  3410. window. In sequential mode, they are the primary method of entering
  3411. commands. In window mode, dialog commands are used to enter commands that
  3412. require arguments or do not have corresponding window commands.%@NL@%
  3413. %@NL@%
  3414. %@CR:MCV30002@%%@4@%Many window commands have duplicate dialog commands. Generally, the window%@EH@%
  3415. version of a command is more convenient, but the dialog version is more
  3416. powerful.  For example, to set a breakpoint on a source line in window mode,
  3417. put the cursor on the source line and press F9, or point to the line and
  3418. click the left mouse button.  The dialog version of the Breakpoint command
  3419. (%@AB@%BP%@AE@%) requires more keystrokes, but it allows you to specify an address, a
  3420. pass count, and a string of commands to be taken whenever the breakpoint is
  3421. encountered.%@NL@%
  3422. %@NL@%
  3423. %@CR:MCV30003@%%@4@%The rest of this chapter explains how to enter dialog commands and how to%@EH@%
  3424. select text on the screen for use with commands.%@NL@%
  3425. %@NL@%
  3426. %@NL@%
  3427. %@CR:MCV31000@%%@2@%%@AB@%3.1  Entering Commands and Arguments%@AE@%%@EH@%%@NL@%
  3428. %@NL@%
  3429. %@CR:MCV31001@%%@4@%Dialog commands are entered at the CodeView prompt(%@AS@%>%@AE@%). Type the command and%@EH@%
  3430. arguments and press ENTER.%@NL@%
  3431. %@NL@%
  3432. %@CR:MCV31002@%%@4@%In window mode, you can enter commands whether or not the cursor is at the%@EH@%
  3433. CodeView prompt. If the cursor is not in the dialog window, it moves to the
  3434. dialog window as soon as you type text.%@NL@%
  3435. %@NL@%
  3436. %@NL@%
  3437. %@CR:MCV31100@%%@3@%%@AB@%3.1.1  Using Special Keys%@AE@%%@EH@%%@NL@%
  3438. %@NL@%
  3439. %@CR:MCV31101@%%@4@%When entering dialog commands or viewing output from commands, you can use%@EH@%
  3440. the following special keys:%@NL@%
  3441. %@CR:MCV31102@%%@NL@%
  3442. %@TH:   25   1636  2 28 48 @%
  3443. %@AB@%Key                         Action%@AE@%
  3444.  
  3445. CTRL+C                      Stops the current output or cancels the current
  3446.                             command line. For example, if you are watching a
  3447.                             long display from a Dump command, you can press
  3448.                             CTRL+C to interrupt the output and return to the
  3449.                             CodeView prompt. If you make a mistake while
  3450.                             entering a command, you can press CTRL+C to
  3451.                             cancel the command without executing it. A new
  3452.                             prompt appears, and you can reenter the command.
  3453.  
  3454. CTRL+S                      Pauses during the output of a command. You can
  3455.                             press any key to continue output. For example,
  3456.                             if you are watching a long display from a Dump
  3457.                             command, you can press CTRL+S when a part of the
  3458.                             display appears that you want to examine more
  3459.                             closely. Then press any key when you are ready
  3460.                             for the output to continue scrolling.
  3461.  
  3462. BACKSPACE                   Deletes the previous character on the command
  3463.                             line and moves the cursor back one space. For
  3464.                             example, if you make an error while typing a
  3465.                             command, you can use the BACKSPACE key to delete
  3466.                             the characters back to the error──then retype
  3467.                             the remainder of the command.%@AB@%
  3468. %@TE:   25   1636  2 28 48 @%
  3469. %@NL@%
  3470. %@CR:MCV31200@%%@3@%%@AB@%3.1.2  Using the Command Buffer%@AE@%%@EH@%%@NL@%
  3471. %@NL@%
  3472. %@CR:MCV31201@%%@4@%In window mode, the CodeView debugger has a command buffer where the last%@EH@%
  3473. 2-4 screens of commands and command output are stored. The command buffer is
  3474. not available in sequential mode.%@NL@%
  3475. %@NL@%
  3476. %@CR:MCV31202@%%@4@%When the cursor is in the dialog window, you can scroll up or down to view%@EH@%
  3477. the commands you have entered earlier in the session. The commands for
  3478. moving the cursor and scrolling through the buffer are explained in sections
  3479. 2.1.1.1%@BO:   1cb3e@% and 2.1.2.1%@BO:   20e91@%.%@NL@%
  3480. %@NL@%
  3481. %@CR:MCV31203@%%@4@%Scrolling through the buffer is particularly useful for viewing the output%@EH@%
  3482. from commands, such as Dump or Examine Symbols, whose output may scroll off
  3483. the top of the dialog window.%@NL@%
  3484. %@NL@%
  3485. %@CR:MCV31204@%%@4@%If you have scrolled through the dialog buffer to look at previous commands%@EH@%
  3486. and output, you can still enter new commands. When you type a command, the
  3487. cursor moves to the end of the command buffer and the text appears on a new
  3488. line.%@NL@%
  3489. %@NL@%
  3490. %@CR:MCV31205@%%@4@%When you start the debugger, the buffer is empty except for the copyright%@EH@%
  3491. message. As you enter commands during the session, the buffer is gradually
  3492. filled from the bottom to the top. If you have not filled the entire buffer
  3493. and you press HOME to go to the top of the buffer, you will not see the
  3494. first commands of the session. Instead you will see blank lines, since there
  3495. is nothing at the top of the buffer.%@NL@%
  3496. %@NL@%
  3497. %@NL@%
  3498. %@CR:MCV32000@%%@2@%%@AB@%3.2  Format for CodeView Commands and Arguments%@AE@%%@EH@%%@NL@%
  3499. %@NL@%
  3500. %@CR:MCV32001@%%@4@%The CodeView command format is similar to the format of the earlier%@EH@%
  3501. Microsoft debuggers, SYMDEB and DEBUG. However, some features, particularly
  3502. operators and expressions, are different. The general format for CodeView
  3503. commands is shown below:%@NL@%
  3504. %@NL@%
  3505.      %@AI@%command%@AE@% «%@AI@%arguments%@AE@%» «;%@AI@%command2%@AE@%»%@NL@%
  3506. %@NL@%
  3507. %@CR:MCV32002@%%@4@%The %@AI@%command%@AE@% is a one-, two-, or three-character command name, and %@AI@%arguments%@AE@%%@EH@%
  3508. are expressions that represent values or addresses to be used by the
  3509. command. The %@AI@%command%@AE@% is not case sensitive; any combination of uppercase
  3510. and lowercase letters can be used. However, %@AI@%arguments%@AE@% consisting of
  3511. source-level expressions may or may not be case sensitive. (For example, C
  3512. expressions are normally case sensitive; FORTRAN expressions are not. Case
  3513. sensitivity can be affected by the language selected for expression
  3514. evaluation.) Usually, the first %@AI@%argument%@AE@% can be placed immediately after
  3515. %@AI@%command%@AE@% with no space separating the two fields.%@NL@%
  3516. %@NL@%
  3517. %@CR:MCV32003@%%@4@%The number of arguments required or allowed with each command varies. If a%@EH@%
  3518. command takes two or more arguments, you must separate the arguments with
  3519. spaces. A semicolon (%@AB@%;%@AE@%) can be used as a command separator if you want to
  3520. specify more than one command on a line.%@NL@%
  3521. %@NL@%
  3522. %@CR:MCV32004@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  3523. %@NL@%
  3524.      DB 100 200      %@AI@%;* Example 1%@AE@%%@NL@%
  3525. %@NL@%
  3526.      >U Label1       %@AI@%;* Example 2, C variable as argument%@AE@%%@NL@%
  3527. %@NL@%
  3528.      >U SUM          %@AI@%;* Example 3, FORTRAN variable as argument%@AE@%%@NL@%
  3529. %@NL@%
  3530.      >U SUM; DB      %@AI@%;* Example 4, multiple commands%@AE@%%@NL@%
  3531. %@NL@%
  3532. %@CR:MCV32005@%%@4@%In Example 1, %@AS@%DB%@AE@% is the first command (for the Dump Bytes command). The%@EH@%
  3533. arguments to the command are %@AS@%100%@AE@% and %@AS@%200%@AE@%. The second command on this line is
  3534. the Comment command (%@AS@%*%@AE@%). A semicolon is used to separate the two commands.
  3535. The Comment command is used throughout the rest of the manual to number
  3536. examples.%@NL@%
  3537. %@NL@%
  3538. %@CR:MCV32006@%%@4@%In Example 2, %@AS@%U%@AE@% is the first command (for the Unassemble command), and the%@EH@%
  3539. C-language variable %@AS@%Label1%@AE@% is a command argument.%@NL@%
  3540. %@NL@%
  3541. %@CR:MCV32007@%%@4@%In Example 3, %@AS@%U%@AE@% is again the first command (for the Unassemble command), and%@EH@%
  3542. the FORTRAN variable %@AS@%SUM%@AE@% is a command argument.%@NL@%
  3543. %@NL@%
  3544. %@CR:MCV32008@%%@4@%Example 4 consists of three commands, separated by semicolons. The first is%@EH@%
  3545. the Unassemble command ( %@AS@%U%@AE@%) with the FORTRAN variable %@AS@%SUM%@AE@% as an argument.
  3546. The second is the Dump Bytes command (%@AS@%DB%@AE@%) with no arguments. The third is
  3547. the Comment command (%@AS@%*%@AE@%).%@NL@%
  3548. %@NL@%
  3549. %@NL@%
  3550. %@CR:MCV33000@%%@2@%%@AB@%3.3  Selecting Text for Use with Commands%@AE@%%@EH@%%@NL@%
  3551. %@NL@%
  3552. %@CR:MCV33001@%%@4@%If you run CodeView in window mode, you can select text on the screen and%@EH@%
  3553. use this same text as a command. This technique is useful for reusing a
  3554. dialog command that is not among the last 20. Any text that appears in any
  3555. window can be selected.%@NL@%
  3556. %@NL@%
  3557. %@CR:MCV33002@%%@4@%To select and use text onscreen, follow these steps:%@EH@%%@NL@%
  3558. %@NL@%
  3559. %@CR:MCV33003@%  1. Select text with either the mouse or keyboard.%@NL@%
  3560. %@NL@%
  3561.      To select text with the mouse, move the mouse cursor to the beginning%@NL@%
  3562.      of the desired text, hold the left mouse button down and drag the mouse%@NL@%
  3563.      to the left. When you have dragged the mouse to the end of the desired%@NL@%
  3564.      text, release the button.%@NL@%
  3565. %@NL@%
  3566.      To select text with the keyboard, move the cursor to the beginning of%@NL@%
  3567.      the desired text, hold the SHIFT key down, and move the cursor to the%@NL@%
  3568.      right. When the cursor is at the end of the desired text, release the%@NL@%
  3569.      SHIFT key and press ENTER.%@NL@%
  3570. %@NL@%
  3571.   2. To use the selected text, press INS.%@NL@%
  3572. %@NL@%
  3573.   3. Edit the command if desired, and press ENTER to execute.%@NL@%
  3574. %@NL@%
  3575. %@NL@%
  3576. %@CR:MCV40000@%%@1@%%@AB@%Chapter 4  CodeView Expressions%@AE@%%@EH@%%@NL@%
  3577. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3578. %@NL@%
  3579. %@CR:MCV40001@%%@4@%CodeView command arguments are expressions that can include symbols,%@EH@%
  3580. constant numbers, operators, and registers. Arguments can be simple
  3581. machine-level expressions that directly specify an address or range in
  3582. memory, or they can be source-level expressions that correspond to operators
  3583. and symbols used in Microsoft C, FORTRAN, BASIC, or the Macro Assembler. For
  3584. each high-level language (C, FORTRAN, and  BASIC), CodeView has an
  3585. expression evaluator that computes the value of source-level expressions.%@NL@%
  3586. %@NL@%
  3587. %@CR:MCV40002@%%@4@%Each of the three expression evaluators has a different set of operators and%@EH@%
  3588. rules of precedence. However, the basic syntax for registers, addresses, and
  3589. line numbers is the same regardless of the language.  You can always change
  3590. the expression evaluator. If you specify a language other than the one used
  3591. in the source file, the expression evaluator will still recognize your
  3592. program symbols──if possible. (C and FORTRAN, however, will not accept BASIC
  3593. type tags.) If you are debugging an assembly routine called from BASIC or
  3594. FORTRAN, you may want to choose the language of the main program rather than
  3595. C, the default for assembly programs.%@NL@%
  3596. %@NL@%
  3597. %@CR:MCV40003@%%@4@%If the Auto option is on, the debugger examines the file extension of each%@EH@%
  3598. new source file you trace through. Both C and assembly modules cause the
  3599. debugger to select C as the expression evaluator.%@NL@%
  3600. %@NL@%
  3601. %@CR:MCV40004@%%@4@%This chapter first deals with the expressions specific to each language.%@EH@%
  3602. Line-number expressions are presented next; they work the same way
  3603. regardless of the language. Then, register and address expressions are
  3604. described. Generally, these do not have to be mastered unless you are doing
  3605. assembly-level debugging. Finally, the chapter describes how to switch the
  3606. expression evaluator.%@NL@%
  3607. %@NL@%
  3608. %@NL@%
  3609. %@CR:MCV41000@%%@2@%%@AB@%4.1  C Expressions%@AE@%%@EH@%%@NL@%
  3610. %@NL@%
  3611. %@CR:MCV41001@%%@4@%The C expression evaluator uses a subset of the most commonly used C%@EH@%
  3612. operators. It also supports the colon operator (%@AB@%:%@AE@%), which is described in
  3613. Section 4.6.2%@BO:   3a308@%, "Addresses," and the three memory operators (%@AB@%BY%@AE@%, %@AB@%WO%@AE@%, and %@AB@%DW%@AE@%),
  3614. which are discussed in Section 4.7.%@BO:   3b6ea@% The memory operators are primarily
  3615. useful for debugging assembly source code. The CodeView C expression
  3616. operators are listed in Table 4.1 in order of precedence. The superscripts
  3617. a, b, and c refer to explanatory footnotes.%@NL@%
  3618. %@NL@%
  3619. %@CR:MCV4T100@%%@4@%%@AB@%Table 4.1  CodeView C Expression Operators%@AE@%%@EH@%%@NL@%
  3620. %@TH:   25   1414  1 16 60 @%
  3621. %@AB@%Precedence      Operators%@AE@%
  3622.  
  3623. (Highest)
  3624.  
  3625. 1               %@AB@%( )  [ ]  ->  .%@AE@%
  3626.  
  3627. 2               %@AB@%!  ~  -%@AE@%%@FN@%
  3628. The minus sign with precedence 2 is the %@AI@%unary minus%@AE@% indicating the sign of
  3629. a number; the minus sign with precedence 4 is a %@AI@%binary minus%@AE@% indicating
  3630. subtraction.%@EF@%  (%@AI@%type%@AE@%) %@AB@%++  -- %@AE@%%@AB@%*%@AE@%%@FN@%
  3631. The asterisk with precedence 2 is the pointer operator; the asterisk with
  3632. precedence 3 is the multiplication operator.%@EF@%  %@AB@%&%@AE@%%@FN@%
  3633. The ampersand with precedence 2 is the address-of operator. The ampersand
  3634. as a bitwise %@AB@%AND%@AE@% operator is not supported by the CodeView
  3635. debugger.%@EF@%  %@AB@%sizeof%@AE@%
  3636.  
  3637. 3               %@AB@%*%@AE@%%@FN@%
  3638. The asterisk with precedence 2 is the pointer operator; the asterisk with
  3639. precedence 3 is the multiplication operator.%@EF@%  %@AB@%/  %  :%@AE@%
  3640.  
  3641. 4               %@AB@%+  -%@AE@%%@FN@%
  3642. The minus sign with precedence 2 is the %@AI@%unary minus%@AE@% indicating the sign of
  3643. a number; the minus sign with precedence 4 is a %@AI@%binary minus%@AE@% indicating
  3644. subtraction.%@EF@%
  3645.  
  3646.  
  3647. 5               %@AB@%<  >  <=  >=%@AE@%
  3648.  
  3649. 6               %@AB@%==  !=%@AE@%
  3650.  
  3651. 7               %@AB@%&&%@AE@%
  3652.  
  3653. 8               %@AB@%||%@AE@%
  3654.  
  3655. 9               %@AB@%=   +=    -=     *=     /=     %=%@AE@%
  3656.  
  3657. 10              %@AB@%BY   WO   DW%@AE@%
  3658.  
  3659. (Lowest)
  3660. %@TE:   25   1414  1 16 60 @%
  3661. %@NL@%
  3662. %@CR:MCV41002@%%@4@%See the %@AI@%Microsoft C Compiler Language Reference%@AE@% for a description of how C%@EH@%
  3663. operators can be combined with identifiers and constants to form
  3664. expressions. With the C expression evaluator, the period (%@AB@%.%@AE@%) has its normal
  3665. use as a member selection operator, but it also has an extended use as a
  3666. specifier of local variables in parent functions. The syntax is shown below:%@NL@%
  3667. %@NL@%
  3668.      %@AI@%function%@AE@%.%@AI@%variable%@AE@%%@NL@%
  3669. %@NL@%
  3670. %@CR:MCV41003@%%@4@%The %@AI@%function%@AE@% must be a high-level-language function, and the %@AI@%variable%@AE@% must%@EH@%
  3671. be a local variable within the specified function.  The %@AI@%variable%@AE@% cannot be a
  3672. register variable. For example, you can use the expression %@AS@%main.argc%@AE@% to
  3673. refer to the local variable %@AS@%argc%@AE@% when you are in a function that has been
  3674. called by %@AS@%main%@AE@%.%@NL@%
  3675. %@NL@%
  3676. %@CR:MCV41004@%%@4@%The %@AI@%type%@AE@% operator (used in type casting) can be any of the predefined C%@EH@%
  3677. types. The CodeView debugger limits casts of pointer types to one level of
  3678. indirection.  For example, %@AS@%(char *)sym%@AE@% is accepted, but %@AS@%(char **)sym%@AE@% is not.%@NL@%
  3679. %@NL@%
  3680. %@CR:MCV41005@%%@4@%When a C expression is used as an argument with a command that takes%@EH@%
  3681. multiple arguments, the expression should not have any internal spaces. For
  3682. example, %@AS@%count+6%@AE@% is allowed, but %@AS@%count + 6%@AE@% may be interpreted as three
  3683. separate arguments.  Some commands (such as the Display Expression command)
  3684. do permit spaces in expressions.%@NL@%
  3685. %@NL@%
  3686. %@NL@%
  3687. %@CR:MCV41100@%%@3@%%@AB@%4.1.1  C Symbols%@AE@%%@EH@%%@NL@%
  3688. %@NL@%
  3689. %@CR:MCV41101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3690. %@NL@%
  3691.      %@AI@%name%@AE@%%@NL@%
  3692. %@NL@%
  3693. %@CR:MCV41102@%%@4@%A symbol is a name that represents a register, a segment address, an offset%@EH@%
  3694. address, or a full 32-bit address. At the C source level, a symbol is a
  3695. variable name or the name of a function. Symbols (also called identifiers)
  3696. follow the naming rules of the C compiler. Although CodeView command letters
  3697. are not case sensitive, symbols given as arguments are case sensitive
  3698. (unless you have turned off case sensitivity with the Case Sense selection
  3699. from the Options menu).%@NL@%
  3700. %@NL@%
  3701. %@CR:MCV41103@%%@4@%In assembly-language output or in output from the Examine Symbols command,%@EH@%
  3702. the CodeView debugger displays some symbol names in the object-code format
  3703. produced by the Microsoft C Compiler. This format includes a leading
  3704. underscore. For example, the function %@AS@%main%@AE@% is displayed as %@AS@%_main.%@AE@% Only
  3705. global labels (such as procedure names) are shown in this format. You do not
  3706. need to include the underscore when specifying such a symbol in CodeView
  3707. commands. Labels within library routines are sometimes displayed with a
  3708. double underscore %@AS@%(__chkstk)%@AE@%. You must use two leading underscores when
  3709. accessing these labels with CodeView commands.%@NL@%
  3710. %@NL@%
  3711. %@NL@%
  3712. %@CR:MCV41200@%%@3@%%@AB@%4.1.2  C Constants%@AE@%%@EH@%%@NL@%
  3713. %@NL@%
  3714. %@CR:MCV41201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3715. %@NL@%
  3716.      %@AI@%digits%@AE@%                    Default radix%@NL@%
  3717.      %@AB@%0%@AE@%%@AI@%digits%@AE@%                   Octal radix%@NL@%
  3718.      %@AB@%0x%@AE@%%@AI@%digits%@AE@%                  Hexadecimal radix%@NL@%
  3719.      %@AB@%0n%@AE@%%@AI@%digits%@AE@%                  Decimal radix%@NL@%
  3720. %@NL@%
  3721. %@CR:MCV41202@%%@4@%Numbers used in CodeView commands represent integer constants. They are made%@EH@%
  3722. up of octal, hexadecimal, or decimal digits, and are entered in the current
  3723. input radix.  The C-language format for entering numbers of different
  3724. radixes can be used to override the current input radix.%@NL@%
  3725. %@NL@%
  3726. %@CR:MCV41203@%%@4@%The default radix for the C expression evaluator is decimal.  However, you%@EH@%
  3727. can use the Radix command (%@AB@%N%@AE@%) to specify an octal or hexadecimal radix, as
  3728. explained in Section 11.3%@BO:   77bd5@%, "Radix Command."%@NL@%
  3729. %@NL@%
  3730. %@CR:MCV41204@%%@4@%If the current radix is 16 (hexadecimal) or 8 (octal), you can enter decimal%@EH@%
  3731. numbers in the special CodeView format %@AB@%0n%@AE@%%@AI@%digits%@AE@%. For example, you would
  3732. enter 21 decimal as %@AS@%0n21%@AE@%.%@NL@%
  3733. %@NL@%
  3734. %@CR:MCV41205@%%@4@%With radix 16, it is possible to enter a value or argument that could be%@EH@%
  3735. interpreted either as a symbol or as a hexadecimal number. The CodeView
  3736. debugger resolves the ambiguity by searching first for a symbol (identifier)
  3737. with that name.  If no symbol is found, the debugger interprets the value as
  3738. a hexadecimal number.  If you want to enter a number that overrides an
  3739. existing symbol, use the hexadecimal format (%@AB@%0x%@AE@%%@AI@%digits%@AE@%).%@NL@%
  3740. %@NL@%
  3741. %@CR:MCV41206@%%@4@%For example, if you enter %@AS@%abc%@AE@% as an argument when the program contains a%@EH@%
  3742. variable or function named %@AS@%abc%@AE@%, the CodeView debugger interprets the
  3743. argument as the symbol.  If you want to enter %@AS@%abc%@AE@% as a number, enter it as%@AE@%
  3744. %@AS@%0xabc%@AE@%.%@NL@%
  3745. %@NL@%
  3746. %@CR:MCV41207@%%@4@%Table 4.2 shows how a sample number (63 decimal) would be represented in%@EH@%
  3747. each radix.%@NL@%
  3748. %@NL@%
  3749. %@CR:MCV4T200@%%@4@%%@AB@%Table 4.2  C Radix Examples%@AE@%%@EH@%%@NL@%
  3750. %@NL@%
  3751. %@AB@%Input Radix      Octal     Decimal     Hexadecimal%@AE@%%@NL@%
  3752. %@NL@%
  3753. 8                %@AS@%77        0n63        0x3F %@AE@%%@NL@%
  3754. %@NL@%
  3755. 10               %@AS@%077       63          0x3F %@AE@%%@NL@%
  3756. %@NL@%
  3757. 16               %@AS@%077       0n63        3F%@AE@%%@NL@%
  3758. %@NL@%
  3759. %@NL@%
  3760. %@CR:MCV41300@%%@3@%%@AB@%4.1.3  C Strings%@AE@%%@EH@%%@NL@%
  3761. %@NL@%
  3762. %@CR:MCV41301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3763. %@NL@%
  3764.      %@AB@%"%@AE@%%@AI@%null-terminated-string%@AE@%%@AB@%"%@AE@%%@NL@%
  3765. %@NL@%
  3766. %@CR:MCV41302@%%@4@%Strings can be specified as expressions in the C format.  You can use C%@EH@%
  3767. escape characters within strings. For example, double quotation marks within
  3768. a string are specified with the escape character %@AS@%\"%@AE@%.%@NL@%
  3769. %@NL@%
  3770. %@CR:MCV41303@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  3771. %@NL@%
  3772.      EA message "This \"string\" is okay."%@NL@%
  3773. %@NL@%
  3774. %@CR:MCV41304@%%@4@%The example uses the Enter ASCII command (%@AB@%EA%@AE@%) to enter the given string into%@EH@%
  3775. memory starting at the address of the variable %@AS@%message.%@AE@%%@NL@%
  3776. %@NL@%
  3777. %@NL@%
  3778. %@CR:MCV42000@%%@2@%%@AB@%4.2  FORTRAN Expressions%@AE@%%@EH@%%@NL@%
  3779. %@NL@%
  3780. %@CR:MCV42001@%%@4@%The FORTRAN expression evaluator uses a subset of the most commonly used%@EH@%
  3781. FORTRAN operators. It also supports two additional operators, the period (%@AB@%.%@AE@%)
  3782. and the colon (%@AB@%:%@AE@%). A number of FORTRAN intrinsic functions, which are listed
  3783. in Section 4.2.4%@BO:   34369@%, are also supported. FORTRAN function calls are permitted,
  3784. but statement function names and COMMON block names are not. (Note that
  3785. these limitations only apply to the arguments of CodeView commands. They
  3786. do not apply to the source program, which can contain any valid FORTRAN
  3787. expression.)%@NL@%
  3788. %@NL@%
  3789. %@CR:MCV42002@%%@4@%The CodeView FORTRAN operators are listed in Table 4.3 in order of%@EH@%
  3790. precedence.%@NL@%
  3791. %@NL@%
  3792. %@CR:MCV4T300@%%@4@%%@AB@%Table 4.3  CodeView FORTRAN Operators%@AE@%%@EH@%%@NL@%
  3793. %@TH:   27    514  2 16 60 @%
  3794. %@AB@%Precedence      Operators%@AE@%
  3795.  
  3796. (Highest)
  3797.  
  3798. 1               %@AB@%()%@AE@%
  3799.  
  3800. 2               %@AB@%.  :%@AE@%
  3801.  
  3802. 3               Unary  %@AB@%+  -%@AE@%
  3803.  
  3804. 4               %@AB@%*  /%@AE@%
  3805.  
  3806. 5               Binary  %@AB@%+  -%@AE@%
  3807.  
  3808. 6               %@AB@%.LT.  .LE.  .EQ.  .NE.  .GT.  .GE.%@AE@%
  3809.  
  3810. 7               %@AB@%.NOT.%@AE@%
  3811.  
  3812. 8               %@AB@%.AND.%@AE@%
  3813.  
  3814. 9               %@AB@%.OR.%@AE@%
  3815.  
  3816. 10              %@AB@%.EQV.  .NEQV.%@AE@%
  3817.  
  3818. 11              %@AB@%=%@AE@%
  3819.  
  3820. (Lowest)
  3821. %@TE:   27    514  2 16 60 @%
  3822. %@NL@%
  3823. %@CR:MCV42003@%%@4@%The FORTRAN expression evaluator does not support the character%@EH@%
  3824. concatenation operator (%@AB@%//%@AE@%) or the exponentiation operator (%@AB@%**%@AE@%). Relational
  3825. operators are not supported for string variables or constants.%@NL@%
  3826. %@NL@%
  3827. %@CR:MCV42004@%%@4@%The order and precedence with which the CodeView debugger evaluates FORTRAN%@EH@%
  3828. expressions are the same as in the Microsoft FORTRAN language. See Chapter
  3829. 1%@BO:    9668@%, "Elements of FORTRAN" of the %@AI@%Microsoft FORTRAN Reference%@AE@% for a
  3830. description of how FORTRAN operators can be combined with symbols and
  3831. constants to form expressions.%@NL@%
  3832. %@NL@%
  3833. %@CR:MCV42005@%%@4@%The colon operator (%@AB@%:%@AE@%) may be used when specifying a memory address. It acts%@EH@%
  3834. as a %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% separator, as described in Section 4.6.2%@BO:   3a308@%, "Addresses."%@NL@%
  3835. %@NL@%
  3836. %@CR:MCV42006@%%@4@%In the CodeView debugger, the period (%@AB@%.%@AE@%) has an extended use as a specifier%@EH@%
  3837. of local variables in parent routines. The syntax is shown below:%@NL@%
  3838. %@NL@%
  3839.      %@AI@%routine%@AE@%.%@AI@%variable%@AE@%%@NL@%
  3840. %@NL@%
  3841. %@CR:MCV42007@%%@4@%The %@AI@%routine%@AE@% must be a high-level-language routine and the %@AI@%variable%@AE@% must be a%@EH@%
  3842. local variable within the specified routine. For example, you can use the
  3843. expression %@AS@%main.X%@AE@% to refer to the local variable %@AS@%X%@AE@% in the procedure %@AS@%main%@AE@% if
  3844. you are in a routine called by %@AS@%main%@AE@%. Note that in this example, %@AS@%main%@AE@% refers
  3845. to the main routine of a FORTRAN or C program. It does not appear in FORTRAN
  3846. source code.%@NL@%
  3847. %@NL@%
  3848. %@NL@%
  3849. %@CR:MCV42100@%%@3@%%@AB@%4.2.1  FORTRAN Symbols%@AE@%%@EH@%%@NL@%
  3850. %@NL@%
  3851. %@CR:MCV42101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3852. %@NL@%
  3853.      %@AI@%name%@AE@%%@NL@%
  3854. %@NL@%
  3855. %@CR:MCV42102@%%@4@%A symbol is a name that represents a register, a segment address, an offset%@EH@%
  3856. address, or a full 32-bit address. At the FORTRAN source level, a symbol is
  3857. simply a variable name or the name of a routine; you do not necessarily need
  3858. to know what kind of address it represents. When given as arguments, symbols
  3859. are never case sensitive with the FORTRAN expression evaluator. If you have
  3860. turned on case sensitivity with the Case Sense selection from the Options
  3861. menu, it is turned off automatically when a symbol is used.%@NL@%
  3862. %@NL@%
  3863. %@CR:MCV42103@%%@4@%In assembly-language output or in output from the Examine Symbols command,%@EH@%
  3864. the CodeView debugger displays some symbol names in the object-code format
  3865. produced by the Microsoft FORTRAN Optimizing Compiler. This format includes
  3866. a leading underscore. For example, the main routine in your program is
  3867. displayed as %@AS@%_main%@AE@%. Only global labels (such as procedure names) are shown
  3868. in this format. You do not need to include the underscore when specifying
  3869. such a symbol in CodeView commands. Labels within library routines are
  3870. sometimes displayed with a double underscore %@AS@%(__chkstk)%@AE@%. You must use
  3871. leading underscores when accessing these labels with CodeView commands.%@NL@%
  3872. %@NL@%
  3873. %@NL@%
  3874. %@CR:MCV42200@%%@3@%%@AB@%4.2.2  FORTRAN Constants%@AE@%%@EH@%%@NL@%
  3875. %@NL@%
  3876. %@CR:MCV42201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3877. %@NL@%
  3878.      %@AI@%digits%@AE@%                      Default radix%@NL@%
  3879.      %@AI@%radix#digits%@AE@%                Specified radix%@NL@%
  3880.      %@AI@%#digits%@AE@%                     Hexadecimal radix%@NL@%
  3881. %@NL@%
  3882. %@CR:MCV42202@%%@4@%Numbers used in CodeView commands represent integer constants. These%@EH@%
  3883. constants are entered in the current input radix (base). When you are using
  3884. the FORTRAN expression evaluator, the debugger will recognize any explicitly
  3885. specified radix between 2 and 36 inclusive, as in %@AS@%20#2G.%@AE@% The FORTRAN radix
  3886. specifiers can be used to override the current radix. Note that a
  3887. hexadecimal number may be entered in two ways. For example, 3F hex could be
  3888. entered as either %@AS@%#3F%@AE@% or %@AS@%16#3F%@AE@%. In this manual, the number sign alone is
  3889. used to indicate hexadecimal numbers.%@NL@%
  3890. %@NL@%
  3891. %@CR:MCV42203@%%@4@%The default radix for the FORTRAN version of the CodeView debugger is%@EH@%
  3892. decimal. However, you can use the Radix command (%@AB@%N%@AE@%) to specify an octal or
  3893. hexadecimal radix, as explained in Section 11.3%@BO:   77bd5@%, "Radix Command."%@NL@%
  3894. %@NL@%
  3895. %@CR:MCV42204@%%@4@%With radix 16, it is possible to enter a value or argument that could be%@EH@%
  3896. interpreted either as an identifier or as a hexadecimal number. The CodeView
  3897. debugger resolves the ambiguity by searching first for a symbol (identifier)
  3898. with that name. If no symbol is found, the debugger interprets the value as
  3899. a hexadecimal number. If you want to enter a number that overrides an
  3900. existing symbol, use the hexadecimal format (%@AS@%#%@AE@%%@AI@%digits%@AE@%).%@NL@%
  3901. %@NL@%
  3902. %@CR:MCV42205@%%@4@%For example, if you enter %@AS@%ABC%@AE@% as an argument when the program contains a%@EH@%
  3903. variable or function named %@AS@%ABC%@AE@%, the CodeView debugger interprets the
  3904. argument as the symbol. If you want to enter %@AS@%ABC%@AE@% as a number, enter it as
  3905. %@AS@%#ABC.%@AE@%%@NL@%
  3906. %@NL@%
  3907. %@CR:MCV42206@%%@4@%Table 4.4 shows how a sample number (63 decimal) would be represented in the%@EH@%
  3908. octal, decimal, and hexadecimal radixes.%@NL@%
  3909. %@NL@%
  3910. %@CR:MCV4T400@%%@4@%%@AB@%Table 4.4  FORTRAN Radix Examples%@AE@%%@EH@%%@NL@%
  3911. %@NL@%
  3912. %@AB@%Input Radix      Octal     Decimal     Hexadecimal%@AE@%%@NL@%
  3913. %@NL@%
  3914.  8               %@AS@%77        10#63       #3F  %@AE@%%@NL@%
  3915. %@NL@%
  3916. 10               %@AS@%8#77      63          #3F  %@AE@%%@NL@%
  3917. %@NL@%
  3918. 16               %@AS@%8#77      10#63       3F              %@AE@%%@NL@%
  3919. %@NL@%
  3920. %@NL@%
  3921. %@CR:MCV42300@%%@3@%%@AB@%4.2.3  FORTRAN Strings%@AE@%%@EH@%%@NL@%
  3922. %@NL@%
  3923. %@CR:MCV42301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3924. %@NL@%
  3925.      %@AB@%'%@AE@%%@AI@%string%@AE@%%@AB@%'%@AE@%%@NL@%
  3926. %@NL@%
  3927. %@CR:MCV42302@%%@4@%Strings can be specified as character expressions in the FORTRAN format.%@EH@%
  3928. Single quotation marks within a string must be specified by two single
  3929. quotation marks.%@NL@%
  3930. %@NL@%
  3931. %@CR:MCV42303@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  3932. %@NL@%
  3933.      EA MESSAGE 'This ''string'' is okay.  '%@NL@%
  3934. %@NL@%
  3935. %@CR:MCV42304@%%@4@%The example above uses the Enter ASCII command (%@AB@%EA%@AE@%) to enter the given%@EH@%
  3936. string into memory, starting at the address of the variable %@AS@%MESSAGE%@AE@%. Notice
  3937. that the string includes embedded single quotation marks and trailing
  3938. blanks.%@NL@%
  3939. %@NL@%
  3940. %@NL@%
  3941. %@CR:MCV42400@%%@3@%%@AB@%4.2.4  FORTRAN Intrinsic Functions%@AE@%%@EH@%%@NL@%
  3942. %@NL@%
  3943. %@CR:MCV42401@%%@4@%When entering a FORTRAN expression, you may use a limited number of FORTRAN%@EH@%
  3944. intrinsic functions. The primary use of these functions is to convert a
  3945. FORTRAN variable or value from one type to another for purposes of
  3946. calculation. The intrinsic functions recognized by the expression evaluator
  3947. of the CodeView debugger are listed in Table 4.5. See Chapter 5%@BO:   3d63b@%, "Intrinsic
  3948. Functions and Additional Procedures" of the %@AI@%Microsoft FORTRAN Reference%@AE@% for
  3949. a complete description of the FORTRAN intrinsic functions.%@NL@%
  3950. %@NL@%
  3951. %@CR:MCV4T500@%%@4@%%@AB@%Table 4.5  FORTRAN Intrinsic Functions Supported by the CodeView Debugger%@AE@%%@EH@%
  3952. %@TH:   51   2760  3 23 17 26 10 @%
  3953. %@AB@%                       Argument         Function%@AE@%
  3954. %@AB@%Name                   Definition       Type                      Type%@AE@%
  3955.  
  3956. %@AB@%CHAR(%@AE@%%@AI@%int%@AE@%%@AB@%)%@AE@%              Data-type        int                       char%@FN@%
  3957. The abbreviations used for the different data types in this table are listed
  3958. in Chapter 5, "Intrinsic Functions and Additional Procedures" of the
  3959. %@AI@%Microsoft FORTRAN Reference%@AE@%.%@EF@%
  3960.  
  3961.  
  3962.                        conversion
  3963.  
  3964. %@AB@%CMPLX(%@AE@%%@AI@%genA%@AE@%«,%@AI@%genB%@AE@%»)     Data-type        int, real, or cmp         cmp8
  3965.                        conversion
  3966.  
  3967. %@AB@%DBLE(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%              Data-type        int, real, or cmp         dbl
  3968.                        conversion
  3969.  
  3970. %@AB@%DCMPLX(%@AE@%%@AI@%genA%@AE@%«,%@AI@%genB%@AE@%»)    Data-type        int, real, or cmp         cmp16
  3971.                        conversion
  3972.  
  3973. %@AB@%DIMAG(%@AE@%%@AI@%cmp16%@AE@%%@AB@%)%@AE@%           Imaginary        cmp16                     dbl
  3974.                        part of cmp16
  3975.                        number
  3976.  
  3977. %@AB@%DREAL(%@AE@%%@AI@%cmp16%@AE@%%@AB@%)%@AE@%           Data-type        cmp16                     dbl
  3978.                        conversion
  3979.  
  3980. %@AB@%ICHAR(%@AE@%%@AI@%char%@AE@%%@AB@%)%@AE@%            Data-type        char                      int
  3981.                        conversion
  3982.  
  3983. %@AB@%IMAG(%@AE@%%@AI@%cmp%@AE@%%@AB@%)%@AE@%              Imaginary        cmp                       real%@FN@%
  3984. If argument is %@AB@%COMPLEX*8%@AE@%, function is %@AB@%REAL*4%@AE@%. If argument is %@AB@%COMPLEX*16%@AE@%,
  3985. function is %@AB@%DOUBLE PRECISION%@AE@%%@EF@%
  3986.  
  3987.  
  3988.                        part of cmp
  3989.                        number
  3990.  
  3991. %@AB@%INT(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%               Data-type        int, real, or cmp         int
  3992.                        conversion
  3993.  
  3994. %@AB@%INT1(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%              Data-type        int, real, or cmp         int1
  3995.                        conversion
  3996.  
  3997. %@AB@%INT4(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%              Data-type        int, real, or cmp         int4
  3998.                        conversion
  3999.  
  4000. %@AB@%INTC(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%              Data-type        int, real, or cmp         %@AB@%INTEGER%@AE@%[%@AB@%C%@AE@%]
  4001.                        conversion
  4002.  
  4003. %@AB@%LOCFAR(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%            Segmented        int, real, or cmp         int4
  4004.                        address
  4005.  
  4006. %@AB@%LOCNEAR%@AE@%(%@AI@%gen%@AE@%%@AB@%)%@AE@%           Unsegmented      int, real, or cmp         int2
  4007.                        address
  4008.  
  4009. %@AB@%REAL(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%              Data-type        int, real, or cmp         real4
  4010.                        conversion
  4011. %@TE:   51   2760  3 23 17 26 10 @%
  4012. %@NL@%
  4013. %@CR:MCV43000@%%@2@%%@AB@%4.3  BASIC Expressions%@AE@%%@EH@%%@NL@%
  4014. %@NL@%
  4015. %@CR:MCV43001@%%@4@%The BASIC expression evaluator uses a subset of the most commonly used BASIC%@EH@%
  4016. operators. It also supports one important BASIC command──the %@AB@%LET%@AE@%
  4017. command──and one operator in addition to the BASIC operators──the colon (%@AB@%:%@AE@%).
  4018. The CodeView BASIC operators are listed in Table 4.6 in order of precedence.%@NL@%
  4019. %@NL@%
  4020. %@CR:MCV4T700@%%@4@%%@AB@%Table 4.6  CodeView BASIC Operators%@AE@%%@EH@%%@NL@%
  4021. %@TH:   31    573  2 16 60 @%
  4022. %@AB@%Precedence      Operators%@AE@%
  4023.  
  4024. (Highest)
  4025.  
  4026. 1               %@AB@%()%@AE@%
  4027.  
  4028. 2               %@AB@%.  :%@AE@%
  4029.  
  4030. 3               %@AB@%*  /%@AE@%
  4031.  
  4032. 4               %@AB@%\  MOD%@AE@%
  4033.  
  4034. 5               %@AB@%+  -%@AE@%
  4035.  
  4036. 6               %@AB@%=  <>  <  >  <=  >=%@AE@%
  4037.  
  4038. 7               %@AB@%NOT%@AE@%
  4039.  
  4040. 8               %@AB@%AND%@AE@%
  4041.  
  4042. 9               %@AB@%OR%@AE@%
  4043.  
  4044. 10              %@AB@%XOR%@AE@%
  4045.  
  4046. 11              %@AB@%EQV%@AE@%
  4047.  
  4048. 12              %@AB@%IMP%@AE@%
  4049.  
  4050. 13              %@AB@%LET%@AE@% %@AI@%variable%@AE@% %@AB@%=%@AE@%
  4051.  
  4052. (Lowest)
  4053. %@TE:   31    573  2 16 60 @%
  4054. %@NL@%
  4055. %@CR:MCV43002@%%@4@%The BASIC expression evaluator does not support the exponentiation operator%@EH@%
  4056. (%@AB@%^%@AE@%). Nor does it support string assignment, the string concatenation
  4057. operator (%@AB@%+%@AE@%), or any of the relational operators (%@AB@%=%@AE@%,%@AB@%<%@AE@%,%@AB@%>%@AE@%,etc.), when used
  4058. with strings. However, arrays, records, and user-defined types are all
  4059. supported.%@AS@%%@NL@%
  4060. %@NL@%
  4061. %@CR:MCV43003@%%@4@%The order and precedence with which the CodeView debugger evaluates BASIC%@EH@%
  4062. expressions are the same as in the Microsoft BASIC language. See your BASIC
  4063. documentation for a description of how BASIC operators can be combined with
  4064. symbols and constants to form expressions.%@NL@%
  4065. %@NL@%
  4066. %@CR:MCV43004@%%@4@%The assignment operator %@AB@%LET%@AE@% is supported for numerical operations only. When%@EH@%
  4067. you use %@AB@%LET%@AE@% in a BASIC expression, the return value will not be useful.
  4068. However, an assignment will take place whenever the expression is
  4069. evaluated. This gives you a convenient way of manipulating data. For
  4070. example, after the expression %@AS@%LET A = 5%@AE@% is evaluated, the variable %@AS@%A%@AE@% will
  4071. contain the value 5. You must use the keyword %@AB@%LET%@AE@% to specify assignment;
  4072. otherwise, the BASIC expression evaluator will interpret the equal sign (%@AB@%=%@AE@%)
  4073. as a test for equality.%@NL@%
  4074. %@NL@%
  4075. %@CR:MCV43005@%%@4@%The colon operator (%@AB@%:%@AE@%) may be used to specify a memory address. It acts as a%@EH@%
  4076. %@AI@%segment%@AE@%%@AS@%:%@AE@%%@AI@%offset%@AE@% separator, as described in Section 4.6.2%@BO:   3a308@%, "Addresses."%@NL@%
  4077. %@NL@%
  4078. %@CR:MCV43006@%%@4@%In the CodeView debugger, the period (.) has an extended use as a specifier%@EH@%
  4079. of local variables in parent routines. The syntax is shown below:%@NL@%
  4080. %@NL@%
  4081.      routine.variable%@NL@%
  4082. %@NL@%
  4083. %@CR:MCV43007@%%@4@%The %@AS@%routine%@AE@% must be a high-level-language routine and the %@AS@%variable%@AE@% must be a%@EH@%
  4084. local variable within the routine.%@NL@%
  4085. %@NL@%
  4086. %@CR:MCV43008@%%@4@%When a BASIC expression is used as an argument with a command that takes%@EH@%
  4087. multiple arguments, the expression should not have any internal spaces. For
  4088. example, %@AS@%COUNT+6%@AE@% is allowed, but %@AS@%COUNT%@AE@%%@AS@%+ 6%@AE@% may be interpreted as three
  4089. arguments. Some commands (such as the Display Expression command) only take
  4090. one argument; these commands do permit spaces in expressions.%@NL@%
  4091. %@NL@%
  4092. %@NL@%
  4093. %@CR:MCV43100@%%@3@%%@AB@%4.3.1  BASIC Symbols%@AE@%%@EH@%%@NL@%
  4094. %@NL@%
  4095. %@CR:MCV43101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  4096. %@NL@%
  4097.      %@AI@%name%@AE@%%@NL@%
  4098. %@NL@%
  4099. %@CR:MCV43102@%%@4@%A symbol is a name that represents a register, a segment address, an offset%@EH@%
  4100. address, or a full 32-bit address. At the BASIC source level, a symbol is
  4101. simply a variable name or the name of a routine; you do not necessarily need
  4102. to know what kind of address it represents. With the BASIC expression
  4103. evaluator, symbols follow the naming rules of the BASIC compiler. In
  4104. particular, all the type specifiers used in BASIC (%@AB@%$%@AE@%, %@AB@%%%@AE@%, %@AB@%&%@AE@%, %@AB@%!%@AE@%, and %@AB@%#%@AE@%) are
  4105. accepted by the BASIC expression evaluator. Symbols are never case sensitive
  4106. to BASIC, whether the Case Sense option is on or not.%@AS@%%@NL@%
  4107. %@NL@%
  4108. %@NL@%
  4109. %@CR:MCV43200@%%@3@%%@AB@%4.3.2  BASIC Constants%@AE@%%@EH@%%@NL@%
  4110. %@NL@%
  4111. %@CR:MCV43201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  4112. %@NL@%
  4113.      %@AI@%fixed-point-string%@AE@%«%@AS@%#%@AE@%|%@AS@%!%@AE@%»        Single or double, fixed-point format
  4114.      %@AI@%floating-point-string%@AE@%«%@AS@%#%@AE@%| %@AS@%!%@AE@%»    Single or double, floating-point format
  4115.  
  4116.      %@AI@%digits%@AE@%                         Integer, default radix
  4117.      %@AB@%&O%@AE@%%@AI@%digits%@AE@%                       Octal radix
  4118.      %@AB@%&%@AE@%%@AI@%digits%@AE@%                        Alternative octal radix
  4119.      %@AB@%&H%@AE@%%@AI@%digits%@AE@%                       Hexadecimal radix
  4120. %@NL@%
  4121. %@CR:MCV43202@%%@4@%With the BASIC expression evaluator, numbers can be entered as integer,%@EH@%
  4122. long, single-precision, or double-precision data objects. Constants are
  4123. formed according to the rules of the Microsoft BASIC Compiler. A single- or
  4124. double-precision constant must be entered in decimal radix, regardless of
  4125. the current system radix. To enter a single or double, use the Microsoft
  4126. BASIC rules for forming fixed and floating point strings.%@NL@%
  4127. %@NL@%
  4128. %@CR:MCV43203@%%@4@%Integer constants are entered in the system radix and are made up of octal,%@EH@%
  4129. decimal, or hexadecimal digits. You may override the system radix by using
  4130. the octal, or hexadecimal prefix. In addition, you can use the %@AB@%&%@AE@% suffix on
  4131. any integer constant to indicate that the integer is to be stored as a long
  4132. (four-byte) integer, rather than as a short (two-byte) integer. To enter
  4133. integers in the decimal format, the system radix must be 10, and you use the
  4134. default radix. There is no way to enter decimal integers when the system
  4135. radix is other than 10, unless you switch to another expression evaluator.%@NL@%
  4136. %@NL@%
  4137. %@CR:MCV43204@%%@4@%The default radix for the BASIC expression evaluator is decimal. However,%@EH@%
  4138. you can use the Radix command (%@AB@%N%@AE@%) to specify an octal or hexadecimal radix,
  4139. as explained in Section 11.3%@BO:   77bd5@%, "Radix Command." With radix 16, it is possible
  4140. to enter a value or argument that could be interpreted either as an
  4141. identifier or as a hexadecimal number. The CodeView debugger resolves the
  4142. ambiguity by searching first for a symbol (identifier) with that name. If no
  4143. symbol is found, the debugger interprets the value as a hexadecimal number.
  4144. If you want to enter a number that overrides an existing symbol, use the
  4145. hexadecimal format (%@AB@%&H%@AE@%%@AI@%digits%@AE@%).%@NL@%
  4146. %@NL@%
  4147. %@CR:MCV43205@%%@4@%For example, if you enter %@AS@%ABC%@AE@% as an argument when the program contains a%@EH@%
  4148. variable or function named %@AS@%ABC%@AE@%, the CodeView debugger interprets the
  4149. argument as the symbol. If you want to enter %@AS@%ABC%@AE@% as a number, enter it as
  4150. %@AS@%&HABC%@AE@%.%@NL@%
  4151. %@NL@%
  4152. %@CR:MCV43206@%%@4@%Table 4.7 shows how a sample number (63 decimal) would be represented in the%@EH@%
  4153. octal, decimal, and hexadecimal radixes.%@NL@%
  4154. %@NL@%
  4155. %@CR:MCV4T800@%%@4@%%@AB@%Table 4.7  BASIC Radix Examples%@AE@%%@EH@%%@NL@%
  4156. %@NL@%
  4157. %@AB@%Input Radix      Octal     Decimal     Hexadecimal%@AE@%%@NL@%
  4158. %@NL@%
  4159. 8                %@AS@%77        -           &H3F %@AE@%%@NL@%
  4160. %@NL@%
  4161. 10               %@AS@%&O77      63          &H3F %@AE@%%@NL@%
  4162. %@NL@%
  4163. 16               %@AS@%&O77      -           3F              %@AE@%%@NL@%
  4164. %@NL@%
  4165. %@NL@%
  4166. %@CR:MCV43300@%%@3@%%@AB@%4.3.3  BASIC Strings%@AE@%%@EH@%%@NL@%
  4167. %@NL@%
  4168. %@CR:MCV43301@%%@4@%The BASIC expression evaluator does not allow you to input strings while%@EH@%
  4169. debugging. However, it does recognize both fixed and variable-length string
  4170. variables, as defined by the BASIC compiler. (This includes arrays and
  4171. records of strings.) Expressions that refer to strings will probably be
  4172. quite simple, because string operators (concatenation and relational
  4173. operators) are not supported by the BASIC expression evaluator.%@NL@%
  4174. %@NL@%
  4175. %@CR:MCV43302@%%@4@%By using the Enter Address command, you can enter a string literal at a%@EH@%
  4176. given address. To use this technique effectively, however, you will need to
  4177. understand how BASIC handles string variables. For more information, see
  4178. Chapter 6%@BO:   43f5c@%, "Examining Data and Expressions."%@NL@%
  4179. %@NL@%
  4180. %@NL@%
  4181. %@CR:MCV43400@%%@3@%%@AB@%4.3.4  BASIC Intrinsic Functions%@AE@%%@EH@%%@NL@%
  4182. %@NL@%
  4183. %@CR:MCV43401@%%@4@%When entering a BASIC expression, you may use a limited number of BASIC%@EH@%
  4184. intrinsic functions. The primary use of these functions is to convert a
  4185. BASIC variable or value from one type to another for purposes of
  4186. calculation. The intrinsic functions recognized by the expression evaluator
  4187. of the CodeView debugger are listed in Table 4.8. See your BASIC compiler
  4188. manual for a complete description of the BASIC intrinsic functions.%@NL@%
  4189. %@NL@%
  4190. %@CR:MCV4T900@%%@4@%%@AB@%Table 4.8  BASIC Intrinsic Functions Supported by the CodeView Debugger%@AE@%%@EH@%%@NL@%
  4191. %@TH:   38   2180  3 24 27 27 18 @%
  4192.  
  4193. %@AB@%                                                   Argument                   Function%@AE@%
  4194. %@AB@%Name                    Definition                 Type                       Type%@AE@%
  4195.  
  4196. %@AB@%ASC%@AE@%%@FN@%
  4197. Except where noted, each of the functions in this table takes exactly one
  4198. argument of the type indicated in the third column%@EF@%                    ASCII value of first       string                     integer
  4199.                         character
  4200.  
  4201. %@AB@%CDBL%@AE@%                    Data-type conversion       numerical expression       double
  4202.  
  4203. %@AB@%CINT%@AE@%                    Conversion, with           numerical expression       integer
  4204.                         rounding
  4205.  
  4206. %@AB@%CSGN%@AE@%                    Data-type conversion       numerical expression       single
  4207.  
  4208. %@AB@%CVI%@AE@%                     Data-type conversion       two-byte string            integer
  4209.  
  4210. %@AB@%CVL%@AE@%                     Data-type conversion       four-byte string           long
  4211.  
  4212. %@AB@%CVS%@AE@%                     Data-type conversion       four-byte string           short
  4213.  
  4214. %@AB@%CVD%@AE@%                     Data-type conversion       eight-byte string          double
  4215.  
  4216. %@AB@%FIX%@AE@%                     Conversion, with           numerical expression       integer
  4217.                         truncation
  4218.  
  4219. %@AB@%INT%@AE@%                     Conversion, with           numerical expression       integer
  4220.                         truncation
  4221.  
  4222. %@AB@%LBOUND(%@AE@%%@AI@%arr%@AE@%%@AB@%«,%@AE@%%@AI@%dim%@AE@%%@AB@%»)%@AE@%       Lowest index of array      array, dimension           integer
  4223.  
  4224. %@AB@%UBOUND(%@AE@%%@AI@%arr%@AE@%%@AB@%«,%@AE@%%@AI@%dim%@AE@%%@AB@%»)%@AE@%       Highest index of array     array, dimension           integer
  4225.  
  4226. %@AB@%VAL%@AE@%                     Numerical value of         string                     integer, long,
  4227.                         string                                                single, or double
  4228.  
  4229. %@AB@%VARPTR%@AE@%                  Offset of variable         variable name              integer
  4230.  
  4231. %@AB@%VARSEG%@AE@%                  Segment of variable        variable name              integer
  4232. %@TE:   38   2180  3 24 27 27 18 @%
  4233. %@NL@%
  4234. %@CR:MCV44000@%%@2@%%@AB@%4.4  Assembly Expressions%@AE@%%@EH@%%@NL@%
  4235. %@NL@%
  4236. %@CR:MCV44001@%%@4@%The /ZI option, available with Version 5.0 and later of the Microsoft Macro%@EH@%
  4237. Assembler, provides variable size information for the CodeView debugger.
  4238. This makes for correct evaluation of expressions derived from assembly code
  4239. (except with arrays, which are discussed later in this section). If you have
  4240. an earlier version of the Macro Assembler, you will need to use C type casts
  4241. to get correct evaluation.%@NL@%
  4242. %@NL@%
  4243. %@CR:MCV44002@%%@4@%When a program assembles or when the Auto switch is on, source files with an%@EH@%
  4244. .ASM extension will cause CodeView to select the C expression evaluator.
  4245. How-ever, the following options will be set differently from the C default
  4246. options:%@NL@%
  4247. %@NL@%
  4248. %@CR:MCV44003@%  ■  System radix is hexadecimal (not decimal).%@NL@%
  4249. %@NL@%
  4250.   ■  Register window is on.%@NL@%
  4251. %@NL@%
  4252.   ■  Case sense is off.%@NL@%
  4253. %@NL@%
  4254. %@CR:MCV44004@%%@4@%The C expression evaluator supports the memory operators described in%@EH@%
  4255. Section 4.7%@BO:   3b6ea@%, and generally is the appropriate expression evaluator with
  4256. which to debug assembly because of its flexibility.%@NL@%
  4257. %@NL@%
  4258. %@CR:MCV44005@%%@4@%However, you cannot always use the C expression evaluator to specify an%@EH@%
  4259. expression exactly as it would appear in assembly code. The list below
  4260. describes the principal differences between assembler syntax and syntax used
  4261. with the C expression evaluator.%@NL@%
  4262. %@NL@%
  4263. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4264. %@AI@%NOTE%@AE@%%@NL@%
  4265.    The examples below present expressions, not CodeView commands. You can%@NL@%
  4266.    see the results of these expressions by using them as operands for the%@NL@%
  4267.    Display Expression command (%@AB@%?%@AE@%), described in Chapter 6%@BO:   43f5c@%, "Examining Data%@NL@%
  4268.    and Expressions."%@NL@%
  4269. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4270. %@NL@%
  4271. %@CR:MCV44006@%%@4@%In the following list, examples of assembly source code are shown in the%@EH@%
  4272. left-hand column. Corresponding CodeView expressions (with the C expression
  4273. evaluator) are shown in the right-hand column.%@NL@%
  4274. %@NL@%
  4275. %@CR:MCV44007@%  1. Register indirection.%@NL@%
  4276. %@NL@%
  4277.      The C expression evaluator does not extend the use of brackets to%@NL@%
  4278.      registers. To refer to the byte, word, or double word pointed to by a%@NL@%
  4279.      register, use the %@AB@%BY%@AE@%, %@AB@%WO%@AE@%, or %@AB@%DW%@AE@% operator.%@NL@%
  4280. %@NL@%
  4281.           %@AS@%BYTE PTR [bx]                    BY bx%@AE@%%@NL@%
  4282.           %@AS@%WORD PTR [bp]                    WO bp%@AE@%%@NL@%
  4283.           %@AS@%DWORD PTR [bp]                   DW bp%@AE@%%@NL@%
  4284. %@NL@%
  4285.   2. Register indirection with displacement.%@NL@%
  4286. %@NL@%
  4287.      To perform based, indexed, or based-index indirection with a%@NL@%
  4288.      displacement, use either the %@AB@%BY%@AE@%, %@AB@%WO%@AE@%, or %@AB@%DW%@AE@% operator along with addition%@NL@%
  4289.      in a complex expression:%@NL@%
  4290. %@NL@%
  4291.           %@AS@%BYTE PTR [di+6]                  BY di+6%@AE@%%@NL@%
  4292.           %@AS@%BYTE PTR [si][bp+6]              BY si+bp+6%@AE@%%@NL@%
  4293.           %@AS@%WORD PTR [bx][si]                WO bx+si%@AE@%%@NL@%
  4294. %@NL@%
  4295.   3. Taking the address of a variable.%@NL@%
  4296. %@NL@%
  4297.      Use the ampersand (%@AB@%&%@AE@%) to get the address of a variable with the C%@NL@%
  4298.      expression evaluator.%@NL@%
  4299. %@NL@%
  4300.           %@AS@%OFFSET var                       &var%@AE@%%@NL@%
  4301. %@NL@%
  4302.   4. The %@AB@%PTR%@AE@% operator.%@NL@%
  4303. %@NL@%
  4304.      With the CodeView debugger, C type casts perform the same function as%@NL@%
  4305.      the assembler %@AB@%PTR%@AE@% operator.%@NL@%
  4306. %@NL@%
  4307.           %@AS@%BYTE PTR var                      (char) var%@AE@%%@NL@%
  4308.           %@AS@%WORD PTR var                      (int) var%@AE@%%@NL@%
  4309.           %@AS@%DWORD PTR var                     (long) var%@AE@%%@NL@%
  4310. %@NL@%
  4311.   5. Accessing array elements.%@NL@%
  4312. %@NL@%
  4313.      Accessing arrays declared in assembly code is problematic because the%@NL@%
  4314.      Macro Assembler emits no type information to indicate which variables%@NL@%
  4315.      are arrays. Therefore the CodeView debugger treats an array name like%@NL@%
  4316.      any other variable.%@NL@%
  4317. %@NL@%
  4318.      In C, an array name is equated with the address of the first element.%@NL@%
  4319.      Therefore, if you prefix an array with the address operator (%@AB@%&%@AE@%), the C%@NL@%
  4320.      expression evaluator gives correct results for array operations.%@NL@%
  4321. %@NL@%
  4322.           %@AS@%string[12]                         (&string)[12]%@AE@%%@NL@%
  4323.           %@AS@%warray[bx+di]                      (&warray)(bx+di)/2%@AE@%%@NL@%
  4324.           %@AS@%darray[4]                          (&darray)[1]%@AE@%%@NL@%
  4325. %@NL@%
  4326.      %@CR:MCV44008@%%@4@%In the second and third examples above, notice that the indexes used%@EH@%
  4327.      in the assembly source-code expressions differ from the indexes used
  4328.      in the CodeView expressions. This difference is necessary because C
  4329.      arrays are automatically scaled according to the size of elements. In
  4330.      assembly, the program must do the scaling.%@NL@%
  4331. %@NL@%
  4332. %@NL@%
  4333. %@CR:MCV45000@%%@2@%%@AB@%4.5  Line Numbers%@AE@%%@EH@%%@NL@%
  4334. %@NL@%
  4335. %@CR:MCV45001@%%@4@%Line numbers are useful for source-level debugging. They correspond to the%@EH@%
  4336. lines in source-code files (BASIC, C, FORTRAN, or Macro Assembler). In
  4337. source mode, you see a program displayed with each line numbered
  4338. sequentially. The CodeView debugger allows you to use these same numbers to
  4339. access parts of a program.%@NL@%
  4340. %@NL@%
  4341. %@CR:MCV45002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  4342. %@NL@%
  4343.      .«%@AI@%filename%@AE@%:»%@AI@%linenumber%@AE@%%@NL@%
  4344. %@NL@%
  4345. %@CR:MCV45003@%%@4@%The address corresponding to a source-line number can be specified as %@EH@%
  4346. %@AI@%linenumber%@AE@% prefixed with a period (%@AB@%.%@AE@%). The CodeView debugger assumes that
  4347. the source line is in the current source file, unless you specify the
  4348. optional %@AI@%filename%@AE@% followed by a colon and the line number.%@NL@%
  4349. %@NL@%
  4350. %@CR:MCV45004@%%@4@%The CodeView debugger displays an error message if %@AI@%filename%@AE@% does not exist,%@EH@%
  4351. or if no source line exists for the specified number.%@NL@%
  4352. %@NL@%
  4353. %@CR:MCV45005@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  4354. %@NL@%
  4355.      >V .100%@NL@%
  4356. %@NL@%
  4357. %@CR:MCV45006@%%@4@%The example above uses the View command (%@AB@%V%@AE@%) to display code starting at the%@EH@%
  4358. source line %@AS@%100%@AE@%. Since no file is indicated, the current source file is
  4359. assumed.%@NL@%
  4360. %@NL@%
  4361.      >V .SAMPLE.FOR:10%@NL@%
  4362. %@NL@%
  4363.      >V .EXAMPLE.BAS:22%@NL@%
  4364. %@NL@%
  4365.      >V .DEMO.C:301%@NL@%
  4366. %@NL@%
  4367. %@CR:MCV45007@%%@4@%The examples above use %@AB@%V%@AE@% to display source code starting at line %@AS@%10%@AE@% of%@EH@%
  4368. %@AS@%SAMPLE.FOR%@AE@%, line %@AS@%22%@AE@% of %@AS@%EXAMPLE.BAS%@AE@%, and line %@AS@%301%@AE@% of %@AS@%DEMO.C%@AE@%, respectively.%@AS@%%@NL@%
  4369. %@NL@%
  4370. %@NL@%
  4371. %@CR:MCV46000@%%@2@%%@AB@%4.6  Registers and Addresses%@AE@%%@EH@%%@NL@%
  4372. %@NL@%
  4373. %@CR:MCV46001@%%@4@%This section presents alternative ways to refer to objects in memory,%@EH@%
  4374. including values stored in the processor's registers. Addresses are basic to
  4375. each of the expression evaluators. A data symbol represents an address in a
  4376. data segment; a procedure name represents an address in a code segment. All
  4377. of the syntax in this section can be considered as an extension to the
  4378. BASIC, C, or FORTRAN expression evaluator.%@NL@%
  4379. %@NL@%
  4380. %@NL@%
  4381. %@CR:MCV46100@%%@3@%%@AB@%4.6.1  Registers%@AE@%%@EH@%%@NL@%
  4382. %@NL@%
  4383. %@CR:MCV46101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  4384. %@NL@%
  4385.      «@»%@AI@%register%@AE@%%@NL@%
  4386. %@NL@%
  4387. %@CR:MCV46102@%%@4@%You can specify a register name if you want to use the current value stored%@EH@%
  4388. in the register. Registers are rarely needed in source-level debugging, but
  4389. they are used frequently for assembly-language debugging.%@NL@%
  4390. %@NL@%
  4391. %@CR:MCV46103@%%@4@%When you specify an identifier, the CodeView debugger first checks the%@EH@%
  4392. symbol table for a symbol with that name. If the debugger does not find a
  4393. symbol, it checks to see if the identifier is a valid register name. If you
  4394. want the identifier to be considered a register, regardless of any name in
  4395. the symbol table, use the "at" sign (%@AB@%@%@AE@%) as a prefix to the register name.
  4396. For example, if your program has a symbol called %@AS@%AX%@AE@%, you could specify %@AS@%@AX%@AE@%
  4397. to refer to the AX register. You can avoid this problem entirely by making
  4398. sure that identifier names in your program do not conflict with register
  4399. names.%@NL@%
  4400. %@NL@%
  4401. %@CR:MCV46104@%%@4@%The register names known to the CodeView debugger are shown in Table 4.9.%@EH@%
  4402. Note that the 32-bit registers are available only if the 386 option is on
  4403. and if the computer is a 386 machine running in 386 mode.%@NL@%
  4404. %@NL@%
  4405. %@CR:MCV4TB00@%%@4@%%@AB@%Table 4.9  Registers%@AE@%%@EH@%%@NL@%
  4406. %@NL@%
  4407. %@AB@%Type                        Names%@AE@%%@NL@%
  4408. %@NL@%
  4409. 8-bit high byte             AH   BH   CH   DH%@NL@%
  4410. %@NL@%
  4411. 8-bit low byte              AL   BL   CL   DL%@NL@%
  4412. %@NL@%
  4413. 16-bit general purpose      AX   BX   CX   DX%@NL@%
  4414. %@NL@%
  4415. 16-bit segment              CS   DS   SS   ES%@NL@%
  4416. %@NL@%
  4417. 16-bit pointer              SP   BP   IP%@NL@%
  4418. %@NL@%
  4419. 16-bit index                SI   DI%@NL@%
  4420. %@NL@%
  4421. 32-bit general purpose      EAX  EBX  ECX  EDX%@NL@%
  4422. %@NL@%
  4423. 32-bit pointer              ESP  EBP%@NL@%
  4424. %@NL@%
  4425. 32-bit index                ESI  EDI%@NL@%
  4426. %@NL@%
  4427. %@NL@%
  4428. %@CR:MCV46200@%%@3@%%@AB@%4.6.2  Addresses%@AE@%%@EH@%%@NL@%
  4429. %@NL@%
  4430. %@CR:MCV46201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  4431. %@NL@%
  4432.      «%@AI@%segment%@AE@%:»%@AI@%offset%@AE@%%@NL@%
  4433. %@NL@%
  4434. %@CR:MCV46202@%%@4@%Addresses can be specified in the CodeView debugger through the use of the%@EH@%
  4435. colon operator as a %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% connector. Both the %@AI@%segment%@AE@% and the
  4436. %@AI@%offset%@AE@% are made up of expressions.%@NL@%
  4437. %@NL@%
  4438. %@CR:MCV46203@%%@4@%A full address has a %@AI@%segment%@AE@% and an %@AI@%offset%@AE@%, separated by a colon. A partial%@EH@%
  4439. address has just an %@AI@%offset%@AE@%; a default segment is assumed. The default
  4440. segment varies, depending on the command with which the address is used.
  4441. Commands that refer to data (Dump, Enter, Watch, and Tracepoint) use the
  4442. contents of the DS register. Commands that refer to code (Assemble,
  4443. Breakpoint Set, Go, Unassemble, and View) use the contents of the CS
  4444. register.%@NL@%
  4445. %@NL@%
  4446. %@CR:MCV46204@%%@4@%Full addresses are seldom necessary in source-level debugging. Occasionally%@EH@%
  4447. they may be convenient for referring to addresses outside the program, such
  4448. as BIOS (basic input/output system) or DOS addresses.%@NL@%
  4449. %@NL@%
  4450. %@CR:MCV46205@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  4451. %@NL@%
  4452.      >DB 100%@NL@%
  4453. %@NL@%
  4454. %@CR:MCV46206@%%@4@%In the example above, the Dump Bytes command (%@AB@%DB%@AE@%) is used to dump memory%@EH@%
  4455. starting at offset address %@AS@%100%@AE@%. Since no segment is given, the data segment
  4456. (the default for Dump commands) is assumed.%@NL@%
  4457. %@NL@%
  4458.      >DB ARRAY(COUNT)     %@AI@%;* FORTRAN/BASIC example%@AE@%%@NL@%
  4459. %@NL@%
  4460. %@CR:MCV46207@%%@4@%In the example above, the Dump Bytes command is used to dump memory starting%@EH@%
  4461. at the address of the variable %@AS@%ARRAY(COUNT)%@AE@%. In C, a similar variable might
  4462. be denoted as %@AS@%array[count]%@AE@%.%@NL@%
  4463. %@NL@%
  4464.      >DB label+10%@NL@%
  4465. %@NL@%
  4466. %@CR:MCV46208@%%@4@%In the example above, the Dump Bytes command is used to dump memory starting%@EH@%
  4467. at a point 10 bytes beyond the symbol %@AS@%label%@AE@%.%@NL@%
  4468. %@NL@%
  4469.      >DB ES:200%@NL@%
  4470. %@NL@%
  4471. %@CR:MCV46209@%%@4@%In the example above, the Dump Bytes command is used to dump memory at the%@EH@%
  4472. address having the segment value stored in ES and the offset address %@AS@%200%@AE@%.%@NL@%
  4473. %@NL@%
  4474. %@NL@%
  4475. %@CR:MCV46300@%%@3@%%@AB@%4.6.3  Address Ranges%@AE@%%@EH@%%@NL@%
  4476. %@NL@%
  4477. %@CR:MCV46301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  4478. %@NL@%
  4479.      %@AI@%startaddress%@AE@% %@AI@%endaddress%@AE@%%@NL@%
  4480.      %@AI@%startaddress%@AE@% %@AB@%L%@AE@% %@AI@%count%@AE@%%@NL@%
  4481. %@NL@%
  4482. %@CR:MCV46302@%%@4@%A "range" is a pair of memory addresses that bound a sequence of contiguous%@EH@%
  4483. memory locations.%@NL@%
  4484. %@NL@%
  4485. %@CR:MCV46303@%%@4@%You can specify a range in two ways. One way is to give the start and end%@EH@%
  4486. points. In this case, the range covers %@AI@%startaddress%@AE@% to %@AI@%endaddress%@AE@%,
  4487. inclusively. If a command takes a range, but if you do not supply a second
  4488. address, the CodeView debugger usually assumes the default range. Each
  4489. command has its own default range. (The most common default range is 128
  4490. bytes.)%@NL@%
  4491. %@NL@%
  4492. %@CR:MCV46304@%%@4@%You can also specify a range by giving its starting point and the number of%@EH@%
  4493. objects you want included in the range. This type of range is called an
  4494. object range. In specifying an object range, %@AI@%startaddress%@AE@% is the address of
  4495. the first object in the list, %@AB@%L%@AE@% indicates that this is an object range
  4496. rather than an ordinary range, and %@AI@%count%@AE@% specifies the number of objects in
  4497. the range.%@NL@%
  4498. %@NL@%
  4499. %@CR:MCV46305@%%@4@%The size of the objects is the size taken by the command. For example, the%@EH@%
  4500. Dump Bytes command (%@AB@%DB%@AE@%) has byte objects, the Dump Words command (%@AB@%DW%@AE@%) has
  4501. words, the Unassemble command (%@AB@%U%@AE@%) has instructions, and so on.%@NL@%
  4502. %@NL@%
  4503. %@CR:MCV46306@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  4504. %@NL@%
  4505.      >DB buffer%@NL@%
  4506. %@NL@%
  4507. %@CR:MCV46307@%%@4@%The example above dumps a range of memory starting at the symbol %@AS@%buffer%@AE@%.%@EH@%
  4508. Since the end of the range is not given, the default size (128 bytes for the
  4509. Dump Bytes command) is assumed.%@NL@%
  4510. %@NL@%
  4511.      >DB buffer buffer+20%@NL@%
  4512. %@NL@%
  4513. %@CR:MCV46308@%%@4@%The example above dumps a range of memory starting at %@AS@%buffer%@AE@% and ending at%@EH@%
  4514. %@AS@%buffer+20%@AE@% (the point 20 bytes beyond %@AS@%buffer%@AE@%).%@NL@%
  4515. %@NL@%
  4516.      >DB buffer L 20%@NL@%
  4517. %@NL@%
  4518. %@CR:MCV46309@%%@4@%The example above uses an object range to dump the same range as in the%@EH@%
  4519. previous example. The %@AS@%L%@AE@% indicates that the range is an object range, and %@AS@%20%@AE@%
  4520. is the number of objects in the range. Each object has a size of 1 byte,
  4521. since that is the command size.%@NL@%
  4522. %@NL@%
  4523.      >U funcname-30 funcname%@NL@%
  4524. %@NL@%
  4525. %@CR:MCV4630A@%%@4@%The example above uses the Unassemble command (%@AS@%U%@AE@%) to list the%@EH@%
  4526. assembly-language statements starting 30 instructions before %@AS@%funcname%@AE@% and
  4527. continuing to %@AS@%funcname%@AE@%.%@NL@%
  4528. %@NL@%
  4529. %@NL@%
  4530. %@CR:MCV47000@%%@2@%%@AB@%4.7  Memory Operators%@AE@%%@EH@%%@NL@%
  4531. %@NL@%
  4532. %@CR:MCV47001@%%@4@%Memory operators return the content of specific locations in memory. They%@EH@%
  4533. are unary operators that work in the same way regardless of the language
  4534. selected and return the result of a direct memory operation. They are
  4535. chiefly of interest to programmers who debug in assembly mode, and are not
  4536. necessary for high-level debugging.%@NL@%
  4537. %@NL@%
  4538. %@CR:MCV47002@%%@4@%All of the operators listed in this section are part of the CodeView C%@EH@%
  4539. expression evaluator and should not be confused with CodeView commands. As
  4540. opera-tors, they can only build expressions, which in turn are used as
  4541. arguments in commands.%@NL@%
  4542. %@NL@%
  4543. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4544. %@AI@%NOTE%@AE@%%@NL@%
  4545.    The memory operators discussed in this section are only available with%@NL@%
  4546.    the C expression evaluator and have the lowest precedence of any C%@NL@%
  4547.    operators.%@NL@%
  4548. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4549. %@NL@%
  4550. %@NL@%
  4551. %@CR:MCV47100@%%@3@%%@AB@%4.7.1  Accessing Bytes (BY)%@AE@%%@EH@%%@NL@%
  4552. %@NL@%
  4553. %@CR:MCV47101@%%@4@%You can access the byte at an address by using the %@AB@%BY%@AE@% operator. This%@EH@%
  4554. operator is useful for simulating the %@AB@%BYTE PTR%@AE@% operation of the Microsoft
  4555. Macro Assembler. It is useful for watching the byte pointed to by a
  4556. particular register.%@NL@%
  4557. %@NL@%
  4558. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4559. %@AI@%NOTE%@AE@%%@NL@%
  4560.    The examples that follow in this section make use of the Display%@NL@%
  4561.    Expression (%@AB@%?%@AE@%) Command, which is described in Section 6.1.%@BO:   44676@% The %@AB@%x%@AE@% format%@NL@%
  4562.    specifier causes the debugger to produce output in hexadecimal.%@NL@%
  4563. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4564. %@NL@%
  4565. %@CR:MCV47102@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  4566. %@NL@%
  4567.      %@AB@%BY%@AE@% %@AI@%address%@AE@%%@NL@%
  4568. %@NL@%
  4569. %@CR:MCV47103@%%@4@%The result is a short integer that contains the value of the first byte%@EH@%
  4570. stored at %@AI@%address%@AE@%.%@NL@%
  4571. %@NL@%
  4572. %@CR:MCV47104@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  4573. %@NL@%
  4574.      >? BY sum%@NL@%
  4575.      %@AS@%101%@NL@%
  4576. %@NL@%
  4577. %@CR:MCV47105@%%@4@%The example above returns the first byte at the address of %@AS@%sum.%@AE@%%@EH@%%@NL@%
  4578. %@NL@%
  4579.      >? BY bp+6%@NL@%
  4580.      %@AS@%42%@NL@%
  4581. %@NL@%
  4582. %@CR:MCV47106@%%@4@%This example returns the byte pointed to by the BP register, with a%@EH@%
  4583. displacement of 6.%@NL@%
  4584. %@NL@%
  4585. %@NL@%
  4586. %@CR:MCV47200@%%@3@%%@AB@%4.7.2  Accessing Words (WO)%@AE@%%@EH@%%@NL@%
  4587. %@NL@%
  4588. %@CR:MCV47201@%%@4@%You can access the word at an address by using the %@AB@%WO%@AE@% operator. This%@EH@%
  4589. operator is useful for simulating the %@AB@%WORD PTR%@AE@% operation of the assembler.
  4590. It is particularly useful for watching the word pointed to by a particular
  4591. register, such as the stack pointer.%@NL@%
  4592. %@NL@%
  4593. %@CR:MCV47202@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  4594. %@NL@%
  4595.      %@AB@%WO%@AE@% %@AI@%address%@AE@%%@NL@%
  4596. %@NL@%
  4597. %@CR:MCV47203@%%@4@%The result is a short integer that contains the value of the first two bytes%@EH@%
  4598. stored at %@AI@%address%@AE@%.%@NL@%
  4599. %@NL@%
  4600. %@CR:MCV47204@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  4601. %@NL@%
  4602.      >? WO sum%@NL@%
  4603.      %@AS@%>13120%@NL@%
  4604. %@NL@%
  4605. %@CR:MCV47205@%%@4@%The example above returns the first word at the address of %@AS@%sum.%@AE@%%@EH@%%@NL@%
  4606. %@NL@%
  4607.      >? WO sp,x%@NL@%
  4608.      %@AS@%>2F38%@NL@%
  4609. %@NL@%
  4610. %@CR:MCV47206@%%@4@%This example returns the word pointed to by the stack pointer; the word%@EH@%
  4611. therefore represents the last word pushed (the "top" of the stack).%@NL@%
  4612. %@NL@%
  4613. %@NL@%
  4614. %@CR:MCV47300@%%@3@%%@AB@%4.7.3  Accessing Double Words (DW)%@AE@%%@EH@%%@NL@%
  4615. %@NL@%
  4616. %@CR:MCV47301@%%@4@%You can access the word at an address by using the %@AB@%DW%@AE@% operator. This%@EH@%
  4617. operator is useful for simulating the %@AB@%DWORD PTR%@AE@% operation of the Microsoft
  4618. Macro Assembler. It is particularly useful for watching the word pointed to
  4619. by a particular register.%@NL@%
  4620. %@NL@%
  4621. %@CR:MCV47302@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  4622. %@NL@%
  4623.      %@AB@%DW%@AE@% %@AI@%address%@AE@%%@NL@%
  4624. %@NL@%
  4625. %@CR:MCV47303@%%@4@%The result is a long integer that contains the value of the first four bytes%@EH@%
  4626. stored at %@AI@%address%@AE@%.%@NL@%
  4627. %@NL@%
  4628. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4629. %@AI@%NOTE%@AE@%%@NL@%
  4630.    Be careful not to confuse the %@AB@%DW%@AE@% operator with the %@AB@%DW%@AE@% comm and. The%@NL@%
  4631.    operator is only useful for building expressions; it occurs within a%@NL@%
  4632.    CodeView command line, but never at the beginning. The second use of %@AB@%DW%@AE@%%@NL@%
  4633.    mentioned above, the Dump Words Command, occurs only at the beginning of%@NL@%
  4634.    a CodeView command line. It displays an entire range of memory (in words,%@NL@%
  4635.    not double words) rather than returning a single result.%@NL@%
  4636. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4637. %@NL@%
  4638. %@CR:MCV47304@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  4639. %@NL@%
  4640.      >? DW sum%@NL@%
  4641.      %@AS@%>132120365%@NL@%
  4642. %@NL@%
  4643. %@CR:MCV47305@%%@4@%The example above returns the first double word at the address of %@AS@%sum%@AE@%.%@EH@%%@NL@%
  4644. %@NL@%
  4645.      >? DW si,x%@NL@%
  4646.      %@AS@%>3F880000%@NL@%
  4647. %@NL@%
  4648. %@CR:MCV47306@%%@4@%This example returns the double word pointed to by the SI register.%@EH@%%@NL@%
  4649. %@NL@%
  4650. %@NL@%
  4651. %@CR:MCV48000@%%@2@%%@AB@%4.8  Switching Expression Evaluators%@AE@%%@EH@%%@NL@%
  4652. %@NL@%
  4653. %@CR:MCV48001@%%@4@%The CodeView debugger allows you to specify a particular expression%@EH@%
  4654. evaluator: BASIC, C, or FORTRAN. You may want to specify the expression
  4655. evaluator if you are debugging a source module that does not use the
  4656. standard extension of the source language (such as .C for C, .BAS for BASIC,
  4657. etc.), or if you want to use a feature of a different language. For example,
  4658. you might be debugging a C program and want to evaluate a string of binary
  4659. digits. The FORTRAN expression evaluator accepts base 2, so you might want
  4660. to switch temporarily to the FORTRAN expression evaluator.%@NL@%
  4661. %@NL@%
  4662. %@CR:MCV48002@%%@4@%It is normally not necessary to specify the evaluator, even if you are%@EH@%
  4663. debugging a mixed-language program; the Auto selection changes the
  4664. expression evaluator for you.%@NL@%
  4665. %@NL@%
  4666. %@CR:MCV48003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  4667. %@NL@%
  4668. %@CR:MCV48004@%%@4@%To switch expression evaluators with the mouse, open the Language menu and%@EH@%
  4669. click the appropriate language selection.%@NL@%
  4670. %@NL@%
  4671. %@CR:MCV48005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  4672. %@NL@%
  4673. %@CR:MCV48006@%%@4@%To switch expression evaluators with a keyboard command, press ALT+L to open%@EH@%
  4674. up the Language menu, use the direction keys (or mnemonic letter) to move to
  4675. the appropriate language, then press RETURN.%@NL@%
  4676. %@NL@%
  4677. %@CR:MCV48007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  4678. %@NL@%
  4679. %@CR:MCV48008@%%@4@%To switch expression evaluators using a dialog command, enter a command line%@EH@%
  4680. with the syntax%@NL@%
  4681. %@NL@%
  4682.      %@AB@%USE%@AE@% «%@AI@%language%@AE@%»%@NL@%
  4683. %@NL@%
  4684. %@CR:MCV48009@%%@4@%where %@AI@%language%@AE@% is C, FORTRAN, BASIC, or Auto. The command is not case%@EH@%
  4685. sensitive, and you can enter the language name in any combination of
  4686. uppercase and lowercase letters. Entered on a line by itself, %@AB@%USE%@AE@% displays
  4687. the name of the current expression evaluator. The %@AB@%USE%@AE@% command always
  4688. displays the name of the current expression evaluator or the new expression
  4689. evaluator (if specified).%@NL@%
  4690. %@NL@%
  4691. %@CR:MCV4800A@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  4692. %@NL@%
  4693.      >USE fortran%@NL@%
  4694.      %@AS@%FORTRAN%@NL@%
  4695. %@NL@%
  4696. %@CR:MCV4800B@%%@4@%The example above switches to the FORTRAN expression evaluator.%@EH@%%@NL@%
  4697. %@NL@%
  4698.      >USE%@NL@%
  4699.      %@AS@%BASIC%@NL@%
  4700. %@NL@%
  4701. %@CR:MCV4800C@%%@4@%The example above displays the name of the current expression evaluator,%@EH@%
  4702. which in this case happens to be BASIC.%@NL@%
  4703. %@NL@%
  4704. %@NL@%
  4705. %@CR:MCV50000@%%@1@%%@AB@%Chapter 5  Executing Code%@AE@%%@EH@%%@NL@%
  4706. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4707. %@NL@%
  4708. %@CR:MCV50001@%%@4@%Several commands execute code within a program. Among the differences%@EH@%
  4709. between the commands is the size of step executed by each. The commands and
  4710. their step sizes are listed below.%@NL@%
  4711. %@NL@%
  4712. %@CR:MCV50002@%  ■  Trace (%@AB@%T%@AE@%)%@NL@%
  4713. %@NL@%
  4714.      Executes the current source line in source mode, or the current%@NL@%
  4715.      instruction in assembly mode; traces into routines, procedures, or%@NL@%
  4716.      interrupts%@NL@%
  4717. %@NL@%
  4718.   ■  Program Step (%@AB@%P%@AE@%)%@NL@%
  4719. %@NL@%
  4720.      Executes the current source line in source mode, or the current%@NL@%
  4721.      instruction in assembly mode; steps over routines, procedures, or%@NL@%
  4722.      interrupts%@NL@%
  4723. %@NL@%
  4724.   ■  Go (%@AB@%G%@AE@%)%@NL@%
  4725. %@NL@%
  4726.      Executes the current program%@NL@%
  4727. %@NL@%
  4728.   ■  Execute (%@AB@%E%@AE@%)%@NL@%
  4729. %@NL@%
  4730.      Executes the current program in slow motion%@NL@%
  4731. %@NL@%
  4732.   ■  Restart (%@AB@%L%@AE@%)%@NL@%
  4733. %@NL@%
  4734.      Restarts the current program%@NL@%
  4735. %@NL@%
  4736. %@NL@%
  4737. %@CR:MCV51000@%%@2@%%@AB@%5.1  Window and Sequential Mode Commands%@AE@%%@EH@%%@NL@%
  4738. %@NL@%
  4739. %@CR:MCV51001@%%@4@%In window mode, the screen is updated to reflect changes that occur when you%@EH@%
  4740. execute a Trace, Program Step, or Go command. The highlight marking the
  4741. current location is moved to the new instruction in the display window. When
  4742. appropriate, values are changed in the register and watch windows.%@NL@%
  4743. %@NL@%
  4744. %@CR:MCV51002@%%@4@%In sequential mode, the current source line or instruction is displayed%@EH@%
  4745. after each Trace, Program Step, or Go command. The format of the display
  4746. depends on the display mode. The three display modes in sequential mode
  4747. (source, assembly, and mixed) are discussed in Chapter 9%@BO:   6542b@%, "Examining Code."%@NL@%
  4748. %@NL@%
  4749. %@CR:MCV51003@%%@4@%If the display mode is source (%@AB@%S+%@AE@%) in sequential mode, the current source%@EH@%
  4750. line is shown. If the display mode is assembly (%@AB@%S-%@AE@%), the status of the
  4751. registers and the flags and the new instruction are shown in the format of
  4752. the Register command (see Chapter 6%@BO:   43f5c@%, "Examining Data and Expressions"). If
  4753. the display mode is mixed (%@AB@%S&%@AE@%), then the registers, the new source line, and
  4754. the new instruction are all shown.%@NL@%
  4755. %@NL@%
  4756. %@CR:MCV51004@%%@4@%The commands that execute code are explained in Sections 5.2%@BO:   3e3a8@%-5.6.%@EH@%%@NL@%
  4757. %@NL@%
  4758. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4759. %@AI@%NOTE%@AE@%%@NL@%
  4760.    If you are executing a section of code with the Go or Program Step%@NL@%
  4761.    command, you can usually interrupt program execution by pressing%@NL@%
  4762.    CTRL+BREAK or CTRL+C. This can terminate endless loops, or it can%@NL@%
  4763.    interrupt loops that are delayed by the Watchpoint or Tracepoint command%@NL@%
  4764.    (see Chapter 8%@BO:   5c045@%, "Managing Watch Statements").%@NL@%
  4765. %@NL@%
  4766.    CTRL+BREAK or CTRL+C may not work if your program has a special use for%@NL@%
  4767.    either of these key combinations. If you have an IBM Personal Computer AT%@NL@%
  4768.    (or a compatible computer), you can use the SYSTEM-REQUEST key to%@NL@%
  4769.    interrupt execution regardless of your program's use of CTRL+BREAK and%@NL@%
  4770.    CTRL+C.%@NL@%
  4771. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4772. %@NL@%
  4773. %@NL@%
  4774. %@CR:MCV52000@%%@2@%%@AB@%5.2  Trace Command%@AE@%%@EH@%%@NL@%
  4775. %@NL@%
  4776. %@CR:MCV52001@%%@4@%The Trace command executes the current source line in source mode, or the%@EH@%
  4777. current instruction in assembly mode. The current source line or instruction
  4778. is the one pointed to by the CS and IP registers. In window mode, the
  4779. current instruction is shown in reverse video or in a contrasting color.%@NL@%
  4780. %@NL@%
  4781. %@CR:MCV52002@%%@4@%In source mode, if the current source line contains a call, the CodeView%@EH@%
  4782. debugger executes the first source line of the called routine. In this mode,
  4783. the debugger will only trace into functions and routines that have source
  4784. code. For example, if the current line contains a call to an intrinsic
  4785. function or a standard C library function, the debugger will simply execute
  4786. the function if you are in source mode, since the source code for Microsoft
  4787. standard libraries is not available.%@NL@%
  4788. %@NL@%
  4789. %@CR:MCV52003@%%@4@%If you are in assembly or mixed mode, the debugger will trace into the%@EH@%
  4790. function. In this mode, if the current instruction is %@AB@%CALL%@AE@%, %@AB@%INT%@AE@% or %@AB@%REP%@AE@%, the
  4791. debugger executes the first instruction of the procedure, interrupt, or
  4792. repeated string sequence.%@NL@%
  4793. %@NL@%
  4794. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4795. %@AI@%NOTE%@AE@%%@NL@%
  4796.    When you debug Microsoft Macro Assembler programs in source mode, the%@NL@%
  4797.    paragraph above still applies. The debugger will not trace into an %@AB@%INT%@AE@% or%@NL@%
  4798.    %@AB@%REP%@AE@% sequence when you are in source mode.%@NL@%
  4799. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4800. %@NL@%
  4801. %@CR:MCV52004@%%@4@%Use the Trace command i execute calls without tracing into them, you should%@EH@%
  4802. use the Program Step command (%@AB@%P%@AE@%) instead. Both commands execute DOS function
  4803. calls without tracing into them. There is no direct way to trace into DOS
  4804. function calls. However, you can trace through BIOS calls in assembly or
  4805. mixed mode.%@NL@%
  4806. %@NL@%
  4807. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4808. %@AI@%NOTE%@AE@%%@NL@%
  4809.    The Trace command (%@AB@%T%@AE@%) uses the hardware trace mode of the 8086 family of%@NL@%
  4810.    processors. Consequently, you can also trace instructions stored in ROM%@NL@%
  4811.    (read-only memory). However, the Program Step command (%@AB@%P%@AE@%) will not work%@NL@%
  4812.    in ROM.Using the Program Step command has the same effect as using the%@NL@%
  4813.    Gocommand (%@AB@%G%@AE@%).%@NL@%
  4814. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4815. %@NL@%
  4816. %@CR:MCV52005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  4817. %@NL@%
  4818. %@CR:MCV52006@%%@4@%To execute the Trace command with the mouse, point to Trace on the menu bar%@EH@%
  4819. and click Left.%@NL@%
  4820. %@NL@%
  4821. %@CR:MCV52007@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  4822. %@NL@%
  4823. %@CR:MCV52008@%%@4@%To execute the Trace command with a keyboard command, press F8. This works%@EH@%
  4824. in both window and sequential modes.%@NL@%
  4825. %@NL@%
  4826. %@CR:MCV52009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  4827. %@NL@%
  4828. %@CR:MCV5200A@%%@4@%To execute the Trace command using a dialog command, enter a command line%@EH@%
  4829. with the following syntax:%@NL@%
  4830. %@NL@%
  4831.      %@AB@%T%@AE@% «%@AI@%count%@AE@%»%@NL@%
  4832. %@NL@%
  4833. %@CR:MCV5200B@%%@4@%If the optional %@AI@%count%@AE@% is specified, the command executes %@AI@%count%@AE@% times before%@EH@%
  4834. stopping.%@NL@%
  4835. %@NL@%
  4836. %@CR:MCV5200C@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  4837. %@NL@%
  4838. %@CR:MCV5200D@%%@4@%The following example shows the Trace command in sequential mode. (In window%@EH@%
  4839. mode, there would be no output from the commands, but the display would be
  4840. updated to show changes caused by the command.)%@NL@%
  4841. %@NL@%
  4842.      S+       %@AI@%;* FORTRAN example%@AE@%%@NL@%
  4843.      source%@NL@%
  4844.      >.%@NL@%
  4845.      9:        CALL INPUT (DATA,N,INPFMT)%@NL@%
  4846.      >T 3%@NL@%
  4847.      34:  OPEN (1,FILE='EXAMPLE.DAT',STATUS='OLD')%@NL@%
  4848.      35:       DO 100 I=1,N%@NL@%
  4849.      36:       READ (1,'(BN,I10)',END=999) DATA(I)%@NL@%
  4850.      %@NL@%
  4851.      >%@NL@%
  4852. %@NL@%
  4853. %@CR:MCV5200E@%%@4@%The FORTRAN example above sets the display mode to source, and then uses the%@EH@%
  4854. Source Line command to display the current source line. (See Chapter 9%@BO:   6542b@%,
  4855. "Examining Code," for a further explanation of the Set Source and Source
  4856. Line commands.) Note that the current source line calls the subroutine
  4857. %@AS@%INPUT%@AE@%. The Trace command is then used to execute the next three source
  4858. lines. These lines will be the first three lines of the subroutine %@AS@%INPUT%@AE@%.%@NL@%
  4859. %@NL@%
  4860. %@CR:MCV5200F@%%@4@%Debugging C and BASIC source code is very similar. If you execute the Trace%@EH@%
  4861. command when the current source line contains a C function call or a BASIC
  4862. subprogram call, the debugger will execute the first line of the called
  4863. routine.%@NL@%
  4864. %@NL@%
  4865.      S-%@NL@%
  4866.      assembly%@NL@%
  4867.      >T%@NL@%
  4868.      AX=0058  BX=3050  CX=000B  DX=3FB0  SP=304C  BP=3056  SI=00CC  DI=40E0%@NL@%
  4869.      DS=49B7  ES=49B7  SS=49B7  CS=3FB0  IP=0013  NV UP EI PL NZ AC PONC%@NL@%
  4870.      3FB0:0013 50             PUSH      AX%@NL@%
  4871.      >%@NL@%
  4872. %@NL@%
  4873. %@CR:MCV5200G@%%@4@%The example above sets the display mode to assembly and traces the current%@EH@%
  4874. instruction. (This example and the next example are the same as the examples
  4875. of the Program Step command in Section 5.3.%@BO:   3fb26@%) The Trace and Program Step
  4876. commands behave differently only when the current instruction is a %@AB@%CALL%@AE@%,
  4877. %@AB@%INT%@AE@%, or %@AB@%REP%@AE@% instruction.%@NL@%
  4878. %@NL@%
  4879.      S&%@NL@%
  4880.      mixed%@NL@%
  4881.      >T%@NL@%
  4882.      AX=0000 BX=319C  CX=0028  DX=0000  SP=304C  BP=3056  SI=00CC  DI=40E0%@NL@%
  4883.      DS=49B7  ES=49B7  SS=49B7  CS=3FB0  IP=003C  NV UP EI PL NZ NA PONC%@NL@%
  4884.      8:        IF (N.LT.1 .OR. N.GT.1000) GO TO 100%@NL@%
  4885.      3FB0:003C 833ECE2101   CMP     Word Ptr [21CE],+01        DS:21CE=0028%@NL@%
  4886.      >%@NL@%
  4887. %@NL@%
  4888. %@CR:MCV5200H@%%@4@%The example above sets the display mode to mixed and traces the current%@EH@%
  4889. instruction.%@NL@%
  4890. %@NL@%
  4891. %@NL@%
  4892. %@CR:MCV53000@%%@2@%%@AB@%5.3  Program Step Command%@AE@%%@EH@%%@NL@%
  4893. %@NL@%
  4894. %@CR:MCV53001@%%@4@%The Program Step command executes the current source line in source mode, or%@EH@%
  4895. the current instruction in assembly mode. The current source line or
  4896. instruction is the one pointed to by the CS and IP registers. In window
  4897. mode, the current instruction is shown in reverse video or in a contrasting
  4898. color.%@NL@%
  4899. %@NL@%
  4900. %@CR:MCV53002@%%@4@%In source mode, if the current source line contains a call, the CodeView%@EH@%
  4901. debugger executes the entire routine and is ready to execute the line after
  4902. the call. In assembly mode, if the current instruction is %@AB@%CALL%@AE@%, %@AB@%INT%@AE@%, or %@AB@%REP%@AE@%,
  4903. the debugger executes the entire procedure, interrupt, or repeated string
  4904. sequence.  Use the Program Step command if you want to execute over routine,
  4905. function, procedure, and interrupt calls. If you want to trace into calls,
  4906. you should use the Trace command (%@AB@%T%@AE@%) instead. Both commands execute DOS
  4907. function calls without tracing into them. There is no direct way to trace
  4908. into DOS function calls.%@NL@%
  4909. %@NL@%
  4910. %@CR:MCV53003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  4911. %@NL@%
  4912. %@CR:MCV53004@%%@4@%To execute the Program Step command with the mouse, point to Trace on the%@EH@%
  4913. menu bar and click Right.%@NL@%
  4914. %@NL@%
  4915. %@CR:MCV53005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  4916. %@NL@%
  4917. %@CR:MCV53006@%%@4@%To execute the Program Step command with a keyboard command, press F10. This%@EH@%
  4918. works in both window and sequential modes.%@NL@%
  4919. %@NL@%
  4920. %@CR:MCV53007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  4921. %@NL@%
  4922. %@CR:MCV53008@%%@4@%To execute the Program Step command with a dialog command, enter a command%@EH@%
  4923. line with the following syntax:%@NL@%
  4924. %@NL@%
  4925.      %@AB@%P%@AE@% «%@AI@%count%@AE@%»%@NL@%
  4926. %@NL@%
  4927. %@CR:MCV53009@%%@4@%If the optional %@AI@%count%@AE@% is specified, the command executes %@AI@%count%@AE@% times before%@EH@%
  4928. stopping.%@NL@%
  4929. %@NL@%
  4930. %@CR:MCV5300A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  4931. %@NL@%
  4932. %@CR:MCV5300B@%%@4@%This example shows the Program Step command in sequential mode. In window%@EH@%
  4933. mode, there would be no output from the commands, but the display would be
  4934. updated to show changes.%@NL@%
  4935. %@NL@%
  4936.      S+       %@AI@%;* FORTRAN/BASIC example%@AE@%%@NL@%
  4937.      source%@NL@%
  4938.      >.%@NL@%
  4939.      9:        CALL INPUT (DATA,N,INPFMT)%@NL@%
  4940.      >P 3%@NL@%
  4941.      10:       CALL BUBBLE (DATA,N)%@NL@%
  4942.      11:       CALL STATS (DATA,N)%@NL@%
  4943.      12:       END%@NL@%
  4944.      >%@NL@%
  4945. %@NL@%
  4946. %@CR:MCV5300C@%%@4@%The example above (in FORTRAN or BASIC) sets the display mode to source, and%@EH@%
  4947. then uses the Source Line command to display the current source line. (See
  4948. Chapter 9%@BO:   6542b@%, "Examining Code," for an explanation of the Set Source and
  4949. Source Line commands.) Notice that the current source line calls the
  4950. subprogram %@AS@%INPUT%@AE@%. The Program Step command is then used to execute the next
  4951. three source lines. The first program step executes the entire subprogram
  4952. %@AS@%INPUT%@AE@%. The next two steps execute the subprograms %@AS@%BUBBLE%@AE@% and %@AS@%STATS%@AE@% in their
  4953. entirety.%@NL@%
  4954. %@NL@%
  4955. %@CR:MCV5300D@%%@4@%The same program, written in C, would behave exactly the same way with the%@EH@%
  4956. Program Step command. The Program Step command will not trace into a C
  4957. function call.%@NL@%
  4958. %@NL@%
  4959.      S-%@NL@%
  4960.      assembly%@NL@%
  4961.      >P%@NL@%
  4962.      AX=0058 BX=3050  CX=000B  DX=3FB0  SP=304C  BP=3056  SI=00CC  DI=40E0%@NL@%
  4963.      DS=49B7  ES=49B7  SS=49B7  CS=3FB0  IP=0013  NV UP EI PL NZ AC PONC%@NL@%
  4964.      3FB0:0013 50             PUSH      AX%@NL@%
  4965.      >%@NL@%
  4966. %@NL@%
  4967. %@CR:MCV5300E@%%@4@%The example above sets the display mode to assembly and steps through the%@EH@%
  4968. current instruction. (This example and the next example are the same as the
  4969. examples of the Trace command in Section 5.2.%@BO:   3e3a8@%) The Trace and Program Step
  4970. commands behave differently only when the current instruction is a %@AB@%CALL%@AE@%,
  4971. %@AB@%INT%@AE@%, or %@AB@%REP%@AE@% instruction.%@NL@%
  4972. %@NL@%
  4973.      S&%@NL@%
  4974.      mixed%@NL@%
  4975.      >P%@NL@%
  4976.      AX=0000 BX=319C  CX=0028  DX=0000  SP=304C  BP=3056  SI=00CC  DI=40E0%@NL@%
  4977.      DS=49B7  ES=49B7  SS=49B7  CS=3FB0  IP=003C  NV UP EI PL NZ NA PONC%@NL@%
  4978.      8:        IF (N.LT.1 .OR. N.GT.1000) GO TO 100%@NL@%
  4979.      3FB0:003C 833ECE2101   CMP     Word Ptr [21CE],+01         DS:21CE=0028%@NL@%
  4980.      >%@NL@%
  4981. %@NL@%
  4982. %@CR:MCV5300F@%%@4@%The example above sets the display mode to mixed and steps through the%@EH@%
  4983. current instruction.%@NL@%
  4984. %@NL@%
  4985. %@NL@%
  4986. %@CR:MCV54000@%%@2@%%@AB@%5.4  Go Command%@AE@%%@EH@%%@NL@%
  4987. %@NL@%
  4988. %@CR:MCV54001@%%@4@%The Go command starts execution at the current address. There are two%@EH@%
  4989. variations of the Go command──Go and Goto. The Go variation simply starts
  4990. execution and continues to the end of the program or until a breakpoint set
  4991. earlier with the Breakpoint Set (%@AB@%BP%@AE@%), Watchpoint (%@AB@%WP%@AE@%), or Tracepoint (%@AB@%TP%@AE@%)
  4992. command is encountered. The other variation is a Goto command, in which a
  4993. destination is given with the command.%@NL@%
  4994. %@NL@%
  4995. %@CR:MCV54002@%%@4@%If a destination address is given but never encountered (for example, if the%@EH@%
  4996. destination is on a program branch that is never taken), the CodeView
  4997. debugger executes to the end of the program.%@NL@%
  4998. %@NL@%
  4999. %@CR:MCV54003@%%@4@%If you enter the Go command and the debugger does not encounter a%@EH@%
  5000. breakpoint, the entire program is executed and the following message is
  5001. displayed:%@NL@%
  5002. %@NL@%
  5003.      %@AS@%Program terminated normally  (%@AE@%%@AI@%number%@AE@%%@AS@%)%@AE@%%@NL@%
  5004. %@NL@%
  5005. %@CR:MCV54004@%%@4@%The %@AI@%number%@AE@% in parentheses is the value returned by the program (sometimes%@EH@%
  5006. called the exit or "errorlevel" code).%@NL@%
  5007. %@NL@%
  5008. %@CR:MCV54005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5009. %@NL@%
  5010. %@CR:MCV54006@%%@4@%To execute the Go command with no destination, point to Go on the menu bar%@EH@%
  5011. and press either button.%@NL@%
  5012. %@NL@%
  5013. %@CR:MCV54007@%%@4@%To execute the Goto variation of the Go command, point to the source line or%@EH@%
  5014. instruction you wish to go to, then press the right button. The highlight
  5015. marking the current location will move to the source line or instruction you
  5016. pointed to (unless a breakpoint is encountered first). The CodeView debugger
  5017. will sound a warning and take no action if you try to go to a comment line
  5018. or other source line that does not correspond to code.%@NL@%
  5019. %@NL@%
  5020. %@CR:MCV54008@%%@4@%If the line you wish to go to is in another module, you can use the Load%@EH@%
  5021. command from the Files menu to load the source file for the other module.
  5022. Then point to the destination line and press the right button.%@NL@%
  5023. %@NL@%
  5024. %@CR:MCV54009@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5025. %@NL@%
  5026. %@CR:MCV5400A@%%@4@%To use a keyboard command to execute the Go command with no destination,%@EH@%
  5027. press F5. This works in both window and sequential modes.%@NL@%
  5028. %@NL@%
  5029. %@CR:MCV5400B@%%@4@%To execute the Goto variation of the Go command, point to the source line or%@EH@%
  5030. instruction you wish to go to then press the right button. The highlight
  5031. marking the current location will move to the source line or instruction to
  5032. which you wish to go. If the cursor is in the dialog window, first press F6
  5033. to move the cursor to the display window. When the cursor is at the
  5034. appropriate line in the display window, press F7. The highlight marking the
  5035. current location will move to the source line or instruction you pointed to
  5036. (unless a breakpoint is encountered first). If you try to go to a comment
  5037. line or to another source line that does not correspond to code, the
  5038. CodeView debugger will sound a warning and take no action.%@NL@%
  5039. %@NL@%
  5040. %@CR:MCV5400C@%%@4@%If the line you wish to go to is in another module, you can use the Load%@EH@%
  5041. command from the Files menu to load the source file for the other module.
  5042. Then move the cursor to the destination line and press F7.%@NL@%
  5043. %@NL@%
  5044. %@CR:MCV5400D@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5045. %@NL@%
  5046. %@CR:MCV5400E@%%@4@%To execute the Go command with a dialog command, enter a command line with%@EH@%
  5047. the following syntax:%@NL@%
  5048. %@NL@%
  5049.      %@AB@%G%@AE@% «%@AI@%breakaddress%@AE@%»%@NL@%
  5050. %@NL@%
  5051. %@CR:MCV5400F@%%@4@%If the command is given with no argument, execution continues until a%@EH@%
  5052. breakpoint or the end of the program is encountered.%@NL@%
  5053. %@NL@%
  5054. %@CR:MCV5400G@%%@4@%The Goto form of the command can be given by specifying %@AI@%breakaddress%@AE@%. The%@EH@%
  5055. %@AI@%breakaddress%@AE@% can be given as a symbol, a line number, or an address in the
  5056. %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% format. If the offset address is given without a segment, the
  5057. address in the CS register is used as the default segment. If %@AI@%breakaddress%@AE@%
  5058. is given as a line number, but the corresponding source line is a comment,
  5059. declaration, or blank line, the following message appears:%@NL@%
  5060. %@NL@%
  5061.      %@AS@%No code at this line number%@AE@%%@NL@%
  5062. %@NL@%
  5063. %@CR:MCV5400H@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5064. %@NL@%
  5065. %@CR:MCV5400I@%%@4@%The following examples show the Go command in sequential mode. In window%@EH@%
  5066. mode there would be no output from the commands, but the display would be
  5067. updated to show changes caused by the command.%@NL@%
  5068. %@NL@%
  5069.      >G%@NL@%
  5070.      %@NL@%
  5071.      Program terminated normally (0)%@NL@%
  5072.      >%@NL@%
  5073. %@NL@%
  5074. %@CR:MCV5400J@%%@4@%The example above passes control to the instruction pointed to by the%@EH@%
  5075. current values of the CS and IP registers. No breakpoint is encountered, so
  5076. that the CodeView debugger executes to the end of the program, where it
  5077. prints a termination message and the exit code returned by the program ( %@AS@%0%@AE@%
  5078. in the example).%@NL@%
  5079. %@NL@%
  5080.      S+     %@AI@%;* FORTRAN/BASIC example (source mode)%@AE@%%@NL@%
  5081.      source%@NL@%
  5082.      >G BUBBLE%@NL@%
  5083.      17:        A = B + C%@NL@%
  5084.      >%@NL@%
  5085. %@NL@%
  5086. %@CR:MCV5400K@%%@4@%In the example above, the display mode is first set to source %@AS@%(S+)%@AE@%. (See%@EH@%
  5087. Chapter 9%@BO:   6542b@%, "Examining Code," for information on setting the display mode.)
  5088. When the Go command is entered, the CodeView debugger starts program
  5089. execution at the current address and continues until it reaches the start of
  5090. the subprogram %@AS@%BUBBLE%@AE@%.%@NL@%
  5091. %@NL@%
  5092.      S&     %@AI@%;* C example (mixed mode)%@AE@%%@NL@%
  5093.      mixed%@NL@%
  5094.      >G .22%@NL@%
  5095.      AX=02F4  BX=0002  CX=00A8  DX=0000  SP=3036  BP=3042  SI=0070  DI=40E0%@NL@%
  5096.      DS=49B7  ES=49B7  SS=49B7  CS=3FB0  IP=0141  NV UP EI PL NZ NAPO NC%@NL@%
  5097.      22:        x[i] = x[j];%@NL@%
  5098.      3FB0:0141 8B7608       MOV     SI,Word Ptr [BP+08]         SS:304A=0070%@NL@%
  5099.      >%@NL@%
  5100. %@NL@%
  5101. %@CR:MCV5400L@%%@4@%The example above passes execution control to the program at the current%@EH@%
  5102. address and executes to the address of source line %@AS@%22%@AE@%. If the address with
  5103. the breakpoint is never encountered (for example, if the program has less
  5104. than 22 lines, or if the breakpoint is on a program branch that is never
  5105. taken), the CodeView debugger executes to the end of the program.%@NL@%
  5106. %@NL@%
  5107.      S-%@NL@%
  5108.      assembly%@NL@%
  5109.      >G #2A8%@NL@%
  5110.      AX=0049  BX=0049  CX=028F  DX=0000  SP=12F2  BP=12F6  SI=04BA  DI=1344%@NL@%
  5111.      DS=5DAF  ES=5DAF  SS=5DAF  CS=58BB  IP=02A8  NV UP EI PL NZ NA PENC%@NL@%
  5112.      58BB:02A8 98             CBW%@NL@%
  5113.      >%@NL@%
  5114. %@NL@%
  5115. %@CR:MCV5400M@%%@4@%The example above executes to the hexadecimal address CS:2A8. Since no%@EH@%
  5116. segment address is given, the CS register is assumed.%@NL@%
  5117. %@NL@%
  5118. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5119. %@AI@%NOTE%@AE@%%@NL@%
  5120.    Mixed and source mode can be used equally well with all three languages.%@NL@%
  5121.    The examples alternate languages in this chapter simply to be accessible%@NL@%
  5122.    to more users.%@NL@%
  5123. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5124. %@NL@%
  5125. %@NL@%
  5126. %@CR:MCV55000@%%@2@%%@AB@%5.5  Execute Command%@AE@%%@EH@%%@NL@%
  5127. %@NL@%
  5128. %@CR:MCV55001@%%@4@%The Execute command is similar to the Go command with no arguments except%@EH@%
  5129. that it executes in slow motion (several source lines per second). Execution
  5130. starts at the current address and continues to the end of the program or
  5131. until a breakpoint, tracepoint, or watchpoint is reached. You can also stop
  5132. automatic program execution by pressing any key or a mouse button.%@NL@%
  5133. %@NL@%
  5134. %@CR:MCV55002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5135. %@NL@%
  5136. %@CR:MCV55003@%%@4@%To execute code in slow motion with the mouse, point to Run on the menu bar,%@EH@%
  5137. press a mouse button and drag the highlight down to the Execute selection,
  5138. and then release the button.%@NL@%
  5139. %@NL@%
  5140. %@CR:MCV55004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5141. %@NL@%
  5142. %@CR:MCV55005@%%@4@%To execute code in slow motion with a keyboard command, press ALT+R to open%@EH@%
  5143. the Run menu, and then press ALT+E to select Execute.%@NL@%
  5144. %@NL@%
  5145. %@CR:MCV55006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5146. %@NL@%
  5147. %@CR:MCV55007@%%@4@%To execute code in slow motion with a dialog command, enter a command line%@EH@%
  5148. with the following syntax:%@NL@%
  5149. %@NL@%
  5150.      %@AB@%E%@AE@%%@NL@%
  5151. %@NL@%
  5152. %@CR:MCV55008@%%@4@%You cannot set a destination for the Execute command as you can for the Go%@EH@%
  5153. command.%@NL@%
  5154. %@NL@%
  5155. %@CR:MCV55009@%%@4@%In sequential mode, the output from the Execute command depends on the%@EH@%
  5156. display mode (source, assembly, or mixed). In assembly or mixed mode, the
  5157. command executes one instruction at a time. The command displays the current
  5158. status of the registers and the instruction. In mixed mode, it will also
  5159. show a source line if there is one at the instruction. In source mode, the
  5160. command executes one source line at a time, displaying the lines as it
  5161. executes them.%@NL@%
  5162. %@NL@%
  5163. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5164. %@AI@%NOTE%@AE@%%@NL@%
  5165.    The Execute command has the same command letter (%@AB@%E%@AE@%)as the Enter command.%@NL@%
  5166.    If the command has at least one argument, it is interpreted as Enter; if%@NL@%
  5167.    not, it is interpreted as Execute.%@NL@%
  5168. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5169. %@NL@%
  5170. %@NL@%
  5171. %@CR:MCV56000@%%@2@%%@AB@%5.6  Restart Command%@AE@%%@EH@%%@NL@%
  5172. %@NL@%
  5173. %@CR:MCV56001@%%@4@%The Restart command restarts the current program. The program is ready to be%@EH@%
  5174. executed just as if you had restarted the CodeView debugger. Program
  5175. variables are reinitialized, but any existing breakpoints or watch
  5176. statements are retained. The pass count for all breakpoints is reset to 1.
  5177. Any program arguments are also retained, though they can be changed with the
  5178. dialog version of the command.%@NL@%
  5179. %@NL@%
  5180. %@CR:MCV56002@%%@4@%The Restart command can only be used to restart the current program. If you%@EH@%
  5181. wish to load a new program, you must exit and restart the CodeView debugger
  5182. with the new program name.%@NL@%
  5183. %@NL@%
  5184. %@CR:MCV56003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5185. %@NL@%
  5186. %@CR:MCV56004@%%@4@%To restart the program with the mouse, point to Run on the menu bar, press a%@EH@%
  5187. mouse button and drag the highlight down to the Restart or Start selection,
  5188. and then release the button. The program will be restarted. If the Restart
  5189. selection is chosen, the program will be ready to start executing from the
  5190. beginning (but not actually running). If the Start selection is chosen, the
  5191. program starts executing from the beginning and continues until a breakpoint
  5192. or the end of the program is encountered.%@NL@%
  5193. %@NL@%
  5194. %@CR:MCV56005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5195. %@NL@%
  5196. %@CR:MCV56006@%%@4@%To restart the program with a keyboard command, press ALT+R to open the Run%@EH@%
  5197. menu, and then press either ALT+R to select Restart or ALT+S to select
  5198. Start. The program will be restarted. If the Restart selection is chosen,
  5199. the program will be ready to start executing from the beginning (but not
  5200. actually running). If the Start selection is chosen, the program starts
  5201. executing from the beginning and continues until a breakpoint or the end of
  5202. the program is encountered.%@NL@%
  5203. %@NL@%
  5204. %@CR:MCV56007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5205. %@NL@%
  5206. %@CR:MCV56008@%%@4@%To restart the program with a dialog command, enter a command line with the%@EH@%
  5207. following syntax:%@NL@%
  5208. %@NL@%
  5209.      %@AB@%L%@AE@% «%@AI@%arguments%@AE@%»%@NL@%
  5210. %@NL@%
  5211. %@CR:MCV56009@%%@4@%When you restart using the dialog version of the command, the program will%@EH@%
  5212. be ready to start executing from the beginning. If you want to restart with
  5213. new program arguments, you can give optional %@AI@%arguments%@AE@%. You cannot specify
  5214. new arguments with the mouse or keyboard version of the command.%@NL@%
  5215. %@NL@%
  5216. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5217. %@AI@%NOTE%@AE@%%@NL@%
  5218.    The command letter %@AB@%L%@AE@% is a mnemonic for Load, but the command should not%@NL@%
  5219.    be confused with the Load selection from the File menu, since that%@NL@%
  5220.    selection only loads a source file without restarting the program.%@NL@%
  5221. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5222. %@NL@%
  5223. %@CR:MCV5600A@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5224. %@NL@%
  5225.      L%@NL@%
  5226.      >%@NL@%
  5227. %@NL@%
  5228. %@CR:MCV5600B@%%@4@%The example above starts the current executable file, retaining any%@EH@%
  5229. breakpoints, watchpoints, tracepoints, and arguments.%@NL@%
  5230. %@NL@%
  5231.      L 6%@NL@%
  5232.      >%@NL@%
  5233. %@NL@%
  5234. %@CR:MCV5600C@%%@4@%The example above restarts the current executable file, but with %@AS@%6%@AE@% as the%@EH@%
  5235. new program argument.%@NL@%
  5236. %@NL@%
  5237. %@NL@%
  5238. %@CR:MCV60000@%%@1@%%@AB@%Chapter 6  Examining Data and Expressions%@AE@%%@EH@%%@NL@%
  5239. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5240. %@NL@%
  5241. %@CR:MCV60001@%%@4@%The CodeView debugger provides several commands for examining different%@EH@%
  5242. kinds of data such as expressions, symbols, memory, and registers. The
  5243. data-evaluation commands discussed in this chapter are summarized below.%@NL@%
  5244. %@NL@%
  5245. %@CR:MCV60002@%%@AB@%Command                     Action%@AE@%%@NL@%
  5246. %@NL@%
  5247. Display Expression (%@AB@%?%@AE@%)      Evaluates and displays locals, the value of%@NL@%
  5248.                             symbols, or expressions%@NL@%
  5249. %@NL@%
  5250. Graphic Display (%@AB@%??%@AE@%)        Displays local variables and complete data%@NL@%
  5251.                             structures in a scrollable dialog box and traces%@NL@%
  5252.                             pointer, structure, and array references%@NL@%
  5253. %@NL@%
  5254. Examine Symbol (%@AB@%X?%@AE@%)         Displays the addresses of symbols%@NL@%
  5255. %@NL@%
  5256. Dump (%@AB@%D%@AE@%)                    Displays sections of memory containing data%@NL@%
  5257.                             (with variations for examining different kinds%@NL@%
  5258.                             of data)%@NL@%
  5259. %@NL@%
  5260. Compare Memory (%@AB@%C%@AE@%)          Compares two blocks of memory, byte by byte%@NL@%
  5261. %@NL@%
  5262. Search Memory (%@AB@%S%@AE@%)           Scans memory for specified byte values%@NL@%
  5263. %@NL@%
  5264. Port Input (%@AB@%I%@AE@%)              Reads a byte from a hardware port%@NL@%
  5265. %@NL@%
  5266. Register (%@AB@%R%@AE@%)                Shows the current value of each register and%@NL@%
  5267.                             each flag (and optionally changes them)%@NL@%
  5268. %@NL@%
  5269. 8087 (%@AB@%7%@AE@%)                    Shows the current value in the 8087 or 80287%@NL@%
  5270.                             register%@NL@%
  5271. %@NL@%
  5272. %@NL@%
  5273. %@CR:MCV61000@%%@2@%%@AB@%6.1  Display Expression Command%@AE@%%@EH@%%@NL@%
  5274. %@NL@%
  5275. %@CR:MCV61001@%%@4@%The Display Expression command displays the value of a CodeView expression.%@EH@%%@NL@%
  5276. %@NL@%
  5277. %@CR:MCV61002@%%@4@%Each of the expression evaluators (C, FORTRAN, and BASIC) accepts a%@EH@%
  5278. different set of symbols, operators, functions, and constants, as explained
  5279. in Chapter 4%@BO:   2faf9@%, "CodeView Expressions." The resulting expressions can contain
  5280. the intrinsic functions listed for the FORTRAN and BASIC expression
  5281. evaluators. They may also contain functions that are part of the executable
  5282. file. The simplest form of expression is a symbol representing a single
  5283. variable or routine.%@NL@%
  5284. %@NL@%
  5285. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5286. %@AI@%NOTE%@AE@%%@NL@%
  5287.    FORTRAN subroutines and BASIC subprograms do not return values as%@NL@%
  5288.    functions do. They can be used in expressions, and may be useful for%@NL@%
  5289.    observing side effects. However, the value returned by the expression%@NL@%
  5290.    will be meaningless.%@NL@%
  5291. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5292. %@NL@%
  5293. %@CR:MCV61003@%%@4@%In addition to displaying values, the Display Expression command can also%@EH@%
  5294. set values as a side effect. For example, with the C expression evaluator
  5295. you can increment the variable %@AS@%n%@AE@% by using the expression %@AS@%++n%@AE@% with the
  5296. Display Expression command. With the FORTRAN expression evaluator you would
  5297. use %@AS@%N=N+1%@AE@%, and with the BASIC expression evaluator you would use %@AS@%LET N=N+1%@AE@%.
  5298. After being incremented, the new value will be displayed.%@NL@%
  5299. %@NL@%
  5300. %@CR:MCV61004@%%@4@%You can specify the format in which the values of expressions are displayed%@EH@%
  5301. by the Display Expression command. Type a comma after the expression,
  5302. followed by a CodeView format specifier. The format specifiers used in the
  5303. CodeView debugger are a subset of those used by the C %@AB@%printf%@AE@% function. They
  5304. are listed in Table 6.1.%@NL@%
  5305. %@NL@%
  5306. %@CR:MCV6T100@%%@4@%%@AB@%Table 6.1  CodeView Format Specifiers%@AE@%%@EH@%%@NL@%
  5307. %@TH:   31   2189  3 13 35 14 14 @%
  5308. %@AB@%             Output                             Sample        Sample%@AE@%
  5309. %@AB@%Character    Format                             Expression    Output%@AE@%
  5310.  
  5311. %@AB@%d%@AE@%            Signed decimal integer             %@AS@%? 40000,d      40000%@AE@%
  5312.  
  5313. %@AB@%i%@AE@%            Signed decimal integer             %@AS@%? 40000,i      40000%@AE@%
  5314.  
  5315. %@AB@%u%@AE@%%@FN@%
  5316. FORTRAN and BASIC have no unsigned data types. Using an unsigned format
  5317. specifier has  no effect on the output of positive numbers, but causes
  5318. negative numbers to be output as positive values.%@EF@%           Unsigned decimal integer           %@AS@%? 40000,u      40000%@AE@%
  5319.  
  5320. %@AB@%o%@AE@%            Unsigned octal integer             %@AS@%? 40000,o      116100%@AE@%
  5321.  
  5322. %@AB@%x%@AE@% or %@AB@%X%@AE@%       Hexadecimal integer                %@AS@%? 40000,x      9c40%@AE@%
  5323.  
  5324. %@AB@%f%@AE@%            Signed value in floating-point     %@AS@%? 3./2.,f      1.500000%@AE@%
  5325.              decimal format with six decimal
  5326.              places
  5327.  
  5328. %@AB@%e%@AE@% or %@AB@%E%@AE@%%@FN@%
  5329. The "E" is uppercse if the type is %@AB@%E%@AE@% or %@AB@%G%@AE@%; and lowercase if the type is %@AB@%e%@AE@% or
  5330. %@AB@%g%@AE@%.%@EF@%      Signed value in scientific-        %@AS@%? 3./2.,e      1.500000e+000%@AE@%
  5331.              notation format with up to six
  5332.              decimal places (trailing zeros
  5333.              and decimal point are truncated)
  5334.  
  5335. %@AB@%g%@AE@% or %@AB@%G%@AE@%%@FN@%
  5336. The "G" is uppercase if the type is %@AB@%E%@AE@% or %@AB@%G%@AE@%; and lowercase if the type is %@AB@%e%@AE@% or
  5337. %@AB@%g%@AE@%.%@EF@%      Signed value with floating-point   %@AS@%? 3./2.,g      1.5%@AE@%
  5338.              decimal format (%@AB@%f%@AE@%) or scientific-
  5339.              notation format (%@AB@%g%@AE@% or %@AB@%G%@AE@%),
  5340.              whichever is more compact
  5341.  
  5342. %@AB@%c%@AE@%            Single character                   %@AS@%? 65,c         A%@AE@%
  5343.  
  5344. %@AB@%s%@AE@%%@FN@%
  5345. The %@AB@%s%@AE@% string format is used only with the C expression evaluator; it prints
  5346. characters up to the first null.%@EF@%           Characters printed up to the       %@AS@%? "String",s   String%@AE@%
  5347.              first null character
  5348. %@TE:   31   2189  3 13 35 14 14 @%
  5349. %@NL@%
  5350. %@CR:MCV61005@%%@4@%If no format specifier is given, single- and double-precision real numbers%@EH@%
  5351. are displayed as if the format specifier had been given as %@AB@%g%@AE@%. (If you are
  5352. familiar with the C language, you should note that the %@AB@%n%@AE@% and %@AB@%p%@AE@% format
  5353. specifiers and the %@AB@%F%@AE@% and %@AB@%H%@AE@% prefixes are not supported by the CodeView
  5354. debugger, even though they are supported by the C %@AB@%printf%@AE@% function.)%@NL@%
  5355. %@NL@%
  5356. %@CR:MCV61006@%%@4@%The prefix %@AB@%h%@AE@% can be used with the integer format specifiers (%@AB@%d%@AE@%, %@AB@%o%@AE@%, %@AB@%u%@AE@%, %@AB@%x%@AE@%, and%@EH@%
  5357. %@AB@%X%@AE@%) to specify a two-byte integer. The prefix %@AB@%l%@AE@% can be used with the same
  5358. types to specify a four-byte integer. For example, the command %@AS@%?100000,ld%@AE@%
  5359. produces the output %@AS@%100000%@AE@%. However, the command %@AS@%?100000,hd%@AE@% evaluates only
  5360. the low-order two bytes, producing the output %@AS@%-31072%@AE@%.%@NL@%
  5361. %@NL@%
  5362. %@CR:MCV61007@%%@4@%You can specify individual members of a C structure or BASIC user-defined%@EH@%
  5363. type, or display the entire structure. Each member of a structure or BASIC
  5364. user-defined type is displayed, within the limits of the dialog box. (See
  5365. Section 6.2%@BO:   48adf@%, "The Graphic Display Command," for information on how to see
  5366. all the fields of a large structure.)%@NL@%
  5367. %@NL@%
  5368. %@CR:MCV61008@%%@4@%The Display Expression command does not work for programs assembled with%@EH@%
  5369. Microsoft Macro Assembler Versions 4.0 and earlier because the assembler
  5370. does not write information to the object file about the type size of each
  5371. variable. Use the Dump command instead.%@NL@%
  5372. %@NL@%
  5373. %@CR:MCV61009@%%@4@%When calling a FORTRAN subroutine that uses alternate returns, the value of%@EH@%
  5374. the return labels in the actual parameter list must be 0. For example, the
  5375. subroutine call %@AS@%CALL PROCESS (I,*10,J,*20,*30)%@AE@% must be called from the
  5376. debugger as%@AS@%?PROCESS(IARG1,0,IARG2,0,0)%@AE@%. Using other values as return labels
  5377. will cause the error %@AS@%Type%@AE@%%@AS@%clash in function argument%@AE@% or %@AS@%Unknown symbol%@AE@%.%@NL@%
  5378. %@NL@%
  5379. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5380. %@AI@%NOTE%@AE@%%@NL@%
  5381.    Do not use a %@AI@%type specifier when evaluating strings in FORTRAN  or%@AE@% %@AI@%BASIC.%@AE@%%@NL@%
  5382.    %@AI@%Simply leave off the type specifier, and the expression evaluator%@AE@% %@AI@%will%@AE@%%@NL@%
  5383.    %@AI@%display the string correctly. The%@AE@% %@AI@%s%@AE@%%@AI@% type%@AE@% %@AI@%specifier assumes the C language%@AE@%%@NL@%
  5384.    string format, with which other languages conflict; if you use %@AI@%s%@AE@%, then%@NL@%
  5385.    the debugger will simply display characters at the given address until a%@NL@%
  5386.    null is encountered.%@NL@%
  5387. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5388. %@NL@%
  5389. %@CR:MCV6100A@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5390. %@NL@%
  5391. %@CR:MCV6100B@%%@4@%The Display Expression command cannot be executed with the mouse.%@EH@%%@NL@%
  5392. %@NL@%
  5393. %@CR:MCV6100C@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5394. %@NL@%
  5395. %@CR:MCV6100D@%%@4@%The Display Expression command cannot be executed by using a keyboard%@EH@%
  5396. command.%@NL@%
  5397. %@NL@%
  5398. %@CR:MCV6100E@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5399. %@NL@%
  5400. %@CR:MCV6100F@%%@4@%To display the value of an expression using a dialog command, enter a%@EH@%
  5401. command line with the following syntax:%@NL@%
  5402. %@NL@%
  5403.      %@AB@%?%@AE@% %@AI@%expression%@AE@%[[%@AB@%,%@AE@%%@AI@%format%@AE@%]]%@NL@%
  5404. %@NL@%
  5405. %@CR:MCV6100G@%%@4@%The %@AI@%expression%@AE@% is any valid CodeView expression, and the optional %@AI@%format%@AE@% is%@EH@%
  5406. a CodeView format specifier.%@NL@%
  5407. %@NL@%
  5408. %@CR:MCV6100H@%%@4@%The remainder of this section first gives examples that are relevant to all%@EH@%
  5409. languages and then gives examples specific to C, FORTRAN, and BASIC.%@NL@%
  5410. %@NL@%
  5411. %@CR:MCV6100I@%%@4@%If you are debugging code written with the assembler, you will use the C%@EH@%
  5412. expression evaluator by default. See Section 4.4%@BO:   37e4e@% for guidelines on how to
  5413. use the C expression evaluator with assembly code.%@NL@%
  5414. %@NL@%
  5415. %@CR:MCV6100J@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5416. %@NL@%
  5417.      >? amount%@NL@%
  5418.      500%@NL@%
  5419.      >? amount,x%@NL@%
  5420.      1f4%@NL@%
  5421.      >? amount,o%@NL@%
  5422.      764%@NL@%
  5423.      >%@NL@%
  5424. %@NL@%
  5425. %@CR:MCV6100K@%%@4@%The example above displays the value stored in the variable %@AS@%amount%@AE@%, an%@EH@%
  5426. integer. This value is first displayed in the system radix (in this case,
  5427. decimal), then in hexadecimal, and then in octal.%@NL@%
  5428. %@NL@%
  5429.      ? mystruct%@NL@%
  5430.      {c1=123, c2={a=1, b=2}, c3=0x1000:2d34}%@NL@%
  5431. %@NL@%
  5432. %@CR:MCV6100L@%%@4@%The example above shows how the CodeView debugger displays a C structure or%@EH@%
  5433. BASIC user-defined type. Note that nested structures are displayed within an
  5434. extra set of braces.%@NL@%
  5435. %@NL@%
  5436.      >? 92,x%@NL@%
  5437.      5c%@NL@%
  5438.      >? 109*(35+2),o%@NL@%
  5439.      7701%@NL@%
  5440.      >? 118,c%@NL@%
  5441.      v%@NL@%
  5442.      >%@NL@%
  5443. %@NL@%
  5444. %@CR:MCV6100M@%%@4@%The example above shows how the CodeView debugger can be used as a%@EH@%
  5445. calculator. You can convert between radixes, calculate the value of constant
  5446. expressions, or check ASCII equivalences.%@NL@%
  5447. %@NL@%
  5448.      >? chance,f%@NL@%
  5449.      0.083333%@NL@%
  5450.      >? chance,e%@NL@%
  5451.      8. 333333e-002%@NL@%
  5452.      >? chance,E%@NL@%
  5453.      8.333333E-002%@NL@%
  5454. %@NL@%
  5455. %@CR:MCV6100N@%%@4@%The example above shows a double-precision real number, %@AS@%chance%@AE@%, displayed in%@EH@%
  5456. three formats. The %@AB@%f%@AE@% format always displays six digits of precision. The %@AB@%e%@AE@%
  5457. format uses scientific notation. Note that the %@AB@%E%@AE@% format yields essentially
  5458. the same display as %@AB@%e%@AE@% does.%@NL@%
  5459. %@NL@%
  5460. %@CR:MCV6100O@%%@4@%The rest of the examples in this section are specific to particular%@EH@%
  5461. languages.%@NL@%
  5462. %@NL@%
  5463. %@CR:MCV6100P@%%@4@%%@AB@%C Examples%@AE@%%@EH@%%@NL@%
  5464. %@NL@%
  5465. %@CR:MCV6100Q@%%@4@%The following examples assume that a C source file is being debugged and it%@EH@%
  5466. contains the following declarations:%@NL@%
  5467. %@NL@%
  5468.      char *text = "Here is a string."%@NL@%
  5469.      int  amount;%@NL@%
  5470.      struct {%@NL@%
  5471.           char name[20];%@NL@%
  5472.           int  id;%@NL@%
  5473.           long class;%@NL@%
  5474.      } student, *pstudent;%@NL@%
  5475. %@NL@%
  5476.      int square(int);%@NL@%
  5477. %@NL@%
  5478. %@CR:MCV6100R@%%@4@%Assume also that the program has been executed where the above variables%@EH@%
  5479. have been assigned values, and that the C expression evaluator is in use.%@NL@%
  5480. %@NL@%
  5481.      >? text, X%@NL@%
  5482.      13f3%@NL@%
  5483.      >DA 0x13F3%@NL@%
  5484.      3D83:13F0  Here is a string.%@NL@%
  5485.      >? text,s%@NL@%
  5486.      Here is a string.%@NL@%
  5487.      >%@NL@%
  5488. %@NL@%
  5489. %@CR:MCV6100S@%%@4@%The example above shows how to examine strings. One method is to evaluate%@EH@%
  5490. the variable that points to the string, and then dump the values at that
  5491. address (the Dump commands are explained in Section 6.4%@BO:   4e3b9@%). A more direct
  5492. method is to use the %@AB@%s%@AE@% type specifier.%@NL@%
  5493. %@NL@%
  5494.      >? student.id%@NL@%
  5495.      19643%@NL@%
  5496.      >? pstudent->id%@NL@%
  5497.      19643%@NL@%
  5498.      >%@NL@%
  5499. %@NL@%
  5500. %@CR:MCV6100T@%%@4@%The example above illustrates how to display the values of members of a%@EH@%
  5501. structure. The same syntax applies to unions.%@NL@%
  5502. %@NL@%
  5503.      >? amount%@NL@%
  5504.      500%@NL@%
  5505.      >? ++amount%@NL@%
  5506.      501%@NL@%
  5507.      >? amount=600%@NL@%
  5508.      600%@NL@%
  5509.      >%@NL@%
  5510. %@NL@%
  5511. %@CR:MCV6100U@%%@4@%The example above shows how the Display Expression command can be used with%@EH@%
  5512. the C expression evaluator to change the values of variables.%@NL@%
  5513. %@NL@%
  5514.      >? square(9)%@NL@%
  5515.      81%@NL@%
  5516.      >%@NL@%
  5517. %@NL@%
  5518. %@CR:MCV6100V@%%@4@%The example above shows how functions can be evaluated in expressions. The%@EH@%
  5519. CodeView debugger executes the function %@AS@%square%@AE@% with an argument of %@AS@%9%@AE@%, and
  5520. displays the value returned by the function. Note that you can use symbols
  5521. as well as constants as function arguments. However, you can only display
  5522. function values after you have executed into the function %@AS@%main%@AE@%.%@NL@%
  5523. %@NL@%
  5524. %@CR:MCV6100W@%%@4@%The C expression evaluator also supports type casts. The equivalent of a%@EH@%
  5525. type cast in another language is a type-conversion function.%@NL@%
  5526. %@NL@%
  5527. %@CR:MCV6100X@%%@4@%%@AB@%FORTRAN Examples%@AE@%%@EH@%%@NL@%
  5528. %@NL@%
  5529. %@CR:MCV6100Y@%%@4@%The examples below assume that the FORTRAN source file contains the%@EH@%
  5530. following variable declarations, in which %@AS@%SQUARE%@AE@% is a function:%@NL@%
  5531. %@NL@%
  5532.             INTEGER*2 SQUARE%@NL@%
  5533.             INTEGER*2 AMOUNT%@NL@%
  5534.             CHARACTER*16 STR%@NL@%
  5535.             STR = 'Here is a string'%@NL@%
  5536. %@NL@%
  5537. %@CR:MCV6100Z@%%@4@%Assume also that the program has executed to the point where these variables%@EH@%
  5538. have been assigned values, and that the FORTRAN expression evaluator has
  5539. been selected.%@NL@%
  5540. %@NL@%
  5541.      >? STR%@NL@%
  5542.      'Here is a string'%@AS@%%@NL@%
  5543. %@NL@%
  5544. %@CR:MCV6100a@%%@4@%The example above shows how to examine strings with the FORTRAN expression%@EH@%
  5545. evaluator. The %@AB@%s%@AE@% format specifier is not required.%@NL@%
  5546. %@NL@%
  5547.      ? AMOUNT%@NL@%
  5548.      500%@NL@%
  5549.      >? AMOUNT=AMOUNT+1%@NL@%
  5550.      501%@NL@%
  5551.      >? AMOUNT=600%@NL@%
  5552.      600%@NL@%
  5553.      >? AMOUNT%@NL@%
  5554.      600%@NL@%
  5555.      >%@AS@%%@NL@%
  5556. %@NL@%
  5557. %@CR:MCV6100b@%%@4@%The example above shows how the Display Expression command can be used to%@EH@%
  5558. change values with the FORTRAN expression evaluator.%@NL@%
  5559. %@NL@%
  5560.      ? SQUARE(9)%@NL@%
  5561.      81%@NL@%
  5562.      >%@NL@%
  5563. %@NL@%
  5564. %@CR:MCV6100c@%%@4@%The example above shows how functions can be evaluated in expressions. The%@EH@%
  5565. CodeView debugger executes the function %@AS@%SQUARE%@AE@% with an argument of %@AS@%9%@AE@%, and
  5566. displays the value returned by the function. You can only display the values
  5567. of functions after you have executed into the main program level.%@NL@%
  5568. %@NL@%
  5569. %@CR:MCV6100d@%%@4@%%@AB@%BASIC Examples%@AE@%%@EH@%%@NL@%
  5570. %@NL@%
  5571. %@CR:MCV6100e@%%@4@%These examples assume the BASIC source file contains the following%@EH@%
  5572. statements:%@NL@%
  5573. %@NL@%
  5574.      amount% = 500%@NL@%
  5575.      str$ = "Here is a string"%@NL@%
  5576. %@NL@%
  5577. %@CR:MCV6100f@%%@4@%Assume also that the program has been executed up to these statements and%@EH@%
  5578. that the BASIC expression evaluator is in use.%@NL@%
  5579. %@NL@%
  5580.      >? str$%@NL@%
  5581.      Here is a %@AS@%string%@NL@%
  5582. %@NL@%
  5583. %@CR:MCV6100g@%%@4@%The first example above shows how to examine strings with the BASIC%@EH@%
  5584. expression evaluator. The %@AB@%s%@AE@% format specifier should not be used.%@NL@%
  5585. %@NL@%
  5586.      ? ASC(str$)%@NL@%
  5587.      72%@AS@%%@NL@%
  5588. %@NL@%
  5589. %@CR:MCV6100h@%%@4@%The second example demonstrates one of the BASIC intrinsic functions%@EH@%
  5590. supported by the CodeView debugger, %@AB@%ASC%@AE@%, which returns the ASCII value of
  5591. the first character in a string.%@NL@%
  5592. %@NL@%
  5593.      >? amount%%@NL@%
  5594.      500%@NL@%
  5595.      >? LET amount%=amount%+1%@NL@%
  5596.      501%@NL@%
  5597.      >? LET amount%=600%@NL@%
  5598.      600%@NL@%
  5599.      >? amount%%@NL@%
  5600.      600%@NL@%
  5601.      >%@NL@%
  5602. %@NL@%
  5603. %@CR:MCV6100i@%%@4@%The example above shows how the Display Expression command can be used to%@EH@%
  5604. change values with the BASIC expression evaluator. With BASIC, the %@AB@%LET%@AE@%
  5605. command can only be applied to numeric data, not strings.%@NL@%
  5606. %@NL@%
  5607. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5608. %@AI@%NOTE%@AE@%%@NL@%
  5609.    The BASIC expression evaluator cannot evaluate functions defined in the%@NL@%
  5610.    program, as the C and FORTRAN expression evaluators can.%@NL@%
  5611. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5612. %@NL@%
  5613. %@CR:MCV6100j@%%@4@%%@AB@%Assembly Examples%@AE@%%@EH@%%@NL@%
  5614. %@NL@%
  5615. %@CR:MCV6100k@%%@4@%By default, the C expression evaluator is used for debugging assembly%@EH@%
  5616. modules. However, some C expressions are particularly helpful for debugging
  5617. assembly code. Some typical examples are presented below.%@NL@%
  5618. %@NL@%
  5619.      >? BY bx%@NL@%
  5620.      12%@NL@%
  5621.      >%@NL@%
  5622. %@NL@%
  5623. %@CR:MCV6100l@%%@4@%The example above displays the first byte at the location pointed to by BX,%@EH@%
  5624. and is equivalent to the assembly expression %@AS@%BYTE PTR%@AE@%%@AS@%[bx]%@AE@%.%@NL@%
  5625. %@NL@%
  5626.      >? WO bp+8%@NL@%
  5627.      9359%@NL@%
  5628.      >%@NL@%
  5629. %@NL@%
  5630. %@CR:MCV6100m@%%@4@%The example above displays the first word at the location pointed to by%@EH@%
  5631. %@AS@%[bp+8]%@AE@%.%@NL@%
  5632. %@NL@%
  5633.      >? DW si+12%@NL@%
  5634.      Y12555324%@NL@%
  5635.      >%@NL@%
  5636. %@NL@%
  5637. %@CR:MCV6100n@%%@4@%The example above displays the first double word at the location pointed to%@EH@%
  5638. by %@AS@%[si+12]%@AE@%.%@NL@%
  5639. %@NL@%
  5640.      >? (char) var%@NL@%
  5641.      5%@NL@%
  5642.      >? (int) var%@NL@%
  5643.      1005%@NL@%
  5644.      >%@NL@%
  5645. %@NL@%
  5646. %@CR:MCV6100o@%%@4@%The last two examples use type casts, which are similar to the assembler %@AB@%PTR%@AE@%%@EH@%
  5647. operator. The expression %@AS@%(char) var%@AE@% displays the byte at the address of %@AS@%var%@AE@%,
  5648. in signed format. The expression %@AS@%(int) var%@AE@% displays the word at the same
  5649. address, also in signed format. You can alter either of these commands to
  5650. display results in unsigned format simply by using the %@AB@%u%@AE@% format specifier.%@NL@%
  5651. %@NL@%
  5652.      >? (char) var,u%@NL@%
  5653. %@NL@%
  5654.      >? (int) var,u%@NL@%
  5655. %@NL@%
  5656. %@NL@%
  5657. %@CR:MCV62000@%%@2@%%@AB@%6.2  The Graphic Display Command%@AE@%%@EH@%%@NL@%
  5658. %@NL@%
  5659. %@CR:MCV62001@%%@4@%The Graphic Display command (%@AB@%??%@AE@%) is similar to the Examine Symbols command.%@EH@%
  5660. The Graphic Display command shows the value of any symbol you specify.
  5661. However, the Graphic Display command is the more efficient means for viewing
  5662. a multiple-field object such as a structure or a linked list of data.%@NL@%
  5663. %@NL@%
  5664. %@CR:MCV62002@%%@4@%The Graphic Display command lets you browse through related data. For%@EH@%
  5665. example, both C and BASIC let you define structures inside of other
  5666. structures. (In BASIC, structures are called "user-defined types.") The
  5667. Graphic Display command lets you quickly move up and down through layers of
  5668. structures. The command also works with C pointer variables; with a single
  5669. mouse click or a few keystrokes, you see the entire structure that a pointer
  5670. addresses. When you examine a list of structures linked through pointers,
  5671. the Graphic Display command lets you quickly move back and forth through the
  5672. list.%@NL@%
  5673. %@NL@%
  5674. %@CR:MCV62003@%%@4@%To resume debugging, you must remove the Graphic Display dialog box.%@EH@%
  5675. Pressing ESC terminates the dialog box.%@NL@%
  5676. %@NL@%
  5677. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5678. %@AI@%NOTE%@AE@%%@NL@%
  5679.    Throughout the rest of this section, the term "structure" is used to%@NL@%
  5680.    refer to any of the following: a C structure, Pascal record, or BASIC%@NL@%
  5681.    user-defined type.%@NL@%
  5682. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5683. %@NL@%
  5684. %@CR:MCV62004@%%@4@%This section discusses how to invoke the Graphic Display command and how to%@EH@%
  5685. browse through data once the Graphic Display dialog box appears. Regardless
  5686. of how you invoke the command, the same rules apply for browsing through the
  5687. data.%@NL@%
  5688. %@NL@%
  5689. %@NL@%
  5690. %@CR:MCV62100@%%@3@%%@AB@%6.2.1  Invoking the Graphic Display Command%@AE@%%@EH@%%@NL@%
  5691. %@NL@%
  5692. %@CR:MCV62101@%%@4@%The Graphic Display command is useful for evaluating a structure or pointer,%@EH@%
  5693. although you can legally use the command with any variable. To use this
  5694. command to display the contents of a variable, enter the following:%@NL@%
  5695. %@NL@%
  5696.      %@AB@%??%@AE@%%@AI@%symbol,%@AE@% %@AB@%c%@AE@%%@NL@%
  5697. %@NL@%
  5698. %@CR:MCV62102@%%@4@%In the syntax display above, %@AI@%symbol%@AE@% is the name of any recognized variable,%@EH@%
  5699. the second field is either blank or contains the character c.%@NL@%
  5700. %@NL@%
  5701. %@CR:MCV62103@%%@4@%The second field may contain the character %@AS@%c%@AE@%. This character is a C %@AB@%printf%@AE@%%@EH@%
  5702. format specifier that causes CodeView to display each byte of a character
  5703. array in its ASCII form, rather than display its numerical value.%@NL@%
  5704. %@NL@%
  5705. %@CR:MCV62104@%%@4@%As shown in the Figure 6.1%@FN@%
  5706. Figure 6.1 is found on page 108 of the printed version.%@EF@% below, structures are represented as three dots%@EH@%
  5707. enclosed in braces: {...}. Pointers are represented in the standard
  5708. %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% format. The Graphic Display dialog box also displays a title;
  5709. the title is the name of the variable or member currently displayed.%@NL@%
  5710. %@NL@%
  5711. %@CR:MCV62105@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  5712. %@NL@%
  5713.      ?? graduate, c%@NL@%
  5714. %@NL@%
  5715. %@CR:MCV62106@%%@4@%The example above displays the members of a structure, as shown in Figure%@EH@%
  5716. 6.1%@FN@%
  5717. Figure 6.1 is found on page 108 of the printed version.%@EF@%.%@NL@%
  5718. %@NL@%
  5719. %@CR:MCV62107@%%@4@%As is the case with the display of local variables, nested structures are%@EH@%
  5720. represented as three dots enclosed in braces, and pointers are represented
  5721. in the standard%@AI@%segment%@AE@%:%@AI@%offset%@AE@% format. Section 6.2.2%@BO:   49b89@%, "Changing the Display,"
  5722. explains how to select nested structures and pointers for display.%@NL@%
  5723. %@NL@%
  5724.      ?? Kount%@AB@%%@NL@%
  5725. %@NL@%
  5726. %@CR:MCV62108@%%@4@%Since %@AS@%Kount%@AE@% is neither a structure nor an array, CodeView responds by%@EH@%
  5727. displaying a single field as shown in Figure 6.2%@FN@%
  5728. Figure 6.2 is found on page 109 of the printed version.%@EF@%.%@NL@%
  5729. %@NL@%
  5730. %@CR:MCV62109@%%@4@%To close the Graphic display dialog box and continue debugging, click left%@EH@%
  5731. outside the dialog box or press ESC.%@NL@%
  5732. %@NL@%
  5733. %@NL@%
  5734. %@CR:MCV62200@%%@3@%%@AB@%6.2.2  Changing the Display%@AE@%%@EH@%%@NL@%
  5735. %@NL@%
  5736. %@CR:MCV62201@%%@4@%Once the Graphic Display dialog box appears, you change what information is%@EH@%
  5737. displayed by selecting an individual variable, member, or array element.
  5738. (However, the command displays array elements only when the current module
  5739. is a C module.) Making such a selection changes the subject matter of the
  5740. dialog box; for example, selecting a nested structure moves you one level
  5741. deeper within the structure. You can use either the mouse or the keyboard to
  5742. select an item.%@NL@%
  5743. %@NL@%
  5744. %@CR:MCV62202@%%@4@%%@AB@%Changing the Display with the Mouse%@AE@%%@EH@%%@NL@%
  5745. %@NL@%
  5746. %@CR:MCV62203@%%@4@%To select an item with the mouse, simply click the left mouse button on the%@EH@%
  5747. line where the item appears.%@NL@%
  5748. %@NL@%
  5749. %@CR:MCV62204@%%@4@%CodeView allows you to move backward through displays as well as forward.%@EH@%
  5750. After you select an item and move to a new display, CodeView remembers the
  5751. previous state of the dialog box. To move back to the previous display,
  5752. click the backward arrow just below the dialog box title, or click the right
  5753. mouse button.%@NL@%
  5754. %@NL@%
  5755. %@CR:MCV62205@%%@4@%To close the dialog box and continue debugging, click the left mouse button%@EH@%
  5756. while outside the dialog box.%@NL@%
  5757. %@NL@%
  5758. %@CR:MCV62206@%%@4@%%@AB@%Changing the Display with the Keyboard%@AE@%%@EH@%%@NL@%
  5759. %@NL@%
  5760. %@CR:MCV62207@%%@4@%To select an item with the keyboard, move the cursor to the desired item and%@EH@%
  5761. press ENTER.%@NL@%
  5762. %@NL@%
  5763. %@CR:MCV62208@%%@4@%CodeView allows you to move backward through displays as well as forward.%@EH@%
  5764. After you select an item and move to a new display, CodeView remembers the
  5765. previous state of the dialog box. To move back to the previous display,
  5766. press BACKSPACE.%@NL@%
  5767. %@NL@%
  5768. %@CR:MCV62209@%%@4@%To close the dialog box and continue debugging, press ESC.%@EH@%%@NL@%
  5769. %@NL@%
  5770. %@CR:MCV6220A@%%@4@%%@AB@%Effect of Selecting an Item%@AE@%%@EH@%%@NL@%
  5771. %@NL@%
  5772. %@CR:MCV6220B@%%@4@%Depending on the item you select, CodeView executes a specific action:%@EH@%%@NL@%
  5773. %@NL@%
  5774. %@CR:MCV6220C@%%@AB@%Item                        Action%@AE@%%@NL@%
  5775. %@NL@%
  5776. Nested structure            The structure is "expanded"; the nested%@NL@%
  5777.                             structure becomes the new subject of the dialog%@NL@%
  5778.                             box. The dialog box displays each member of the%@NL@%
  5779.                             nested structure.%@NL@%
  5780. %@NL@%
  5781. Pointer                     The pointer is "dereferenced"; in other words,%@NL@%
  5782.                             CodeView locates the data that the pointer%@NL@%
  5783.                             addresses. This data becomes the new subject of%@NL@%
  5784.                             the dialog box.%@NL@%
  5785. %@NL@%
  5786.                             The pointer's type determines how the debugger%@NL@%
  5787.                             displays the dereferenced data. The debugger%@NL@%
  5788.                             uses this type information even if the pointer%@NL@%
  5789.                             does not currently address any meaningful data.%@NL@%
  5790.                             If the pointer addresses a structure, CodeView%@NL@%
  5791.                             displays each element.%@NL@%
  5792. %@NL@%
  5793. Other items                 CodeView takes no action.%@NL@%
  5794. %@NL@%
  5795. %@CR:MCV6220D@%%@4@%No matter how many times you change the display, and no matter what the%@EH@%
  5796. previous display looked like, all the rules above apply. You can repeat
  5797. these operations any number of times. For example, given a sufficiently
  5798. complex structure, you can move down several levels of nested structures,
  5799. then follow a pointer reference to another variable.%@NL@%
  5800. %@NL@%
  5801. %@NL@%
  5802. %@CR:MCV63000@%%@2@%%@AB@%6.3  Examine Symbols Command%@AE@%%@EH@%%@NL@%
  5803. %@NL@%
  5804. %@CR:MCV63001@%%@4@%The Examine Symbols command displays the names and addresses and the names%@EH@%
  5805. of modules defined within a program. You can specify the group you want to
  5806. examine by module, procedure, or name.%@NL@%
  5807. %@NL@%
  5808. %@CR:MCV63002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5809. %@NL@%
  5810. %@CR:MCV63003@%%@4@%The Examine Symbols command cannot be executed with the mouse.%@EH@%%@NL@%
  5811. %@NL@%
  5812. %@CR:MCV63004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5813. %@NL@%
  5814. %@CR:MCV63005@%%@4@%The Examine Symbols command cannot be executed with a keyboard command.%@EH@%%@NL@%
  5815. %@NL@%
  5816. %@CR:MCV63006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5817. %@NL@%
  5818. %@CR:MCV63007@%%@4@%To view the addresses of symbols with a dialog command, enter a command line%@EH@%
  5819. in one of the following formats:%@NL@%
  5820. %@NL@%
  5821.      %@AB@%XL%@AE@%%@NL@%
  5822.      %@AB@%X*%@AE@%%@NL@%
  5823.      %@AB@%X%@AE@%%@NL@%
  5824.      %@AB@%X?%@AE@% «%@AI@%module%@AE@%%@AB@%!%@AE@%» «%@AI@%routine%@AE@%%@AB@%.%@AE@%» «%@AI@%symbol%@AE@%» «%@AB@%*%@AE@%»%@NL@%
  5825. %@NL@%
  5826. %@CR:MCV63008@%%@4@%in which %@AI@%routine%@AE@% is in a program unit, such as a C function or a BASIC%@EH@%
  5827. subprogram, capable of having its own local variables.%@NL@%
  5828. %@NL@%
  5829. %@CR:MCV63009@%%@4@%The syntax combinations are listed in more detail below.%@EH@%%@NL@%
  5830. %@CR:MCV6300A@%%@NL@%
  5831. %@TH:   38   2297  2 28 48 @%
  5832. %@AB@%Syntax                      Display%@AE@%
  5833.  
  5834. %@AB@%X?%@AE@%%@AI@%module%@AE@%%@AB@%!%@AE@%%@AI@%routine%@AE@%%@AB@%.%@AE@%%@AI@%symbol%@AE@%     The specified %@AI@%symbol%@AE@% in the specified %@AI@%routine%@AE@% in
  5835.                             the specified %@AI@%module%@AE@%.
  5836.  
  5837. %@AB@%X?%@AE@%%@AI@%module%@AE@%%@AB@%!%@AE@%%@AI@%routine%@AE@%%@AB@%.*%@AE@%          All symbols in the specified %@AI@%routine%@AE@% in the
  5838.                             specified %@AI@%module%@AE@%.
  5839.  
  5840. %@AB@%X?%@AE@%%@AI@%module%@AE@%%@AB@%!%@AE@%%@AI@%symbol%@AE@%             The specified %@AI@%symbol%@AE@% in the specified %@AI@%module%@AE@%
  5841.                             (symbols within routines are not found).
  5842.  
  5843. %@AB@%X?%@AE@%%@AI@%module%@AE@%%@AB@%!*%@AE@%                  All symbols in the specified %@AI@%module%@AE@%.
  5844.  
  5845. %@AB@%X?%@AE@%%@AI@%routine%@AE@%%@AB@%.%@AE@%%@AI@%symbol%@AE@%            The specified %@AI@%symbol%@AE@% in the specified %@AI@%routine%@AE@%
  5846.                             (looks for %@AI@%routine%@AE@% first in the current module,
  5847.                             and then in other modules from first to last).
  5848.  
  5849. %@AB@%X?%@AE@%%@AI@%routine%@AE@%%@AB@%.*%@AE@%                 All symbols in the specified %@AI@%routine%@AE@% (looks for
  5850.                             %@AI@%routine%@AE@% first in the current module, and then in
  5851.                             other modules from first to last).
  5852.  
  5853. %@AB@%X?%@AE@%%@AI@%symbol%@AE@%                    Looks for the specified %@AI@%symbol%@AE@% in this order:
  5854.  
  5855.                             1.  In the current routine.
  5856.                             2.  In the current module.
  5857.                             3.  In other modules, from first to last.
  5858.  
  5859. %@AB@%X?*%@AE@%                         All symbols in the current routine.
  5860.  
  5861. %@AB@%XL%@AE@%                          All local variables of the currently executing
  5862.                             routine. This variation of the command uses a
  5863.                             special format as explained below.
  5864.  
  5865. %@AB@%X*%@AE@%                          All module names (file extensions are added to
  5866.                             these names).
  5867.  
  5868. %@AB@%X%@AE@%                           All symbolic names in the program, including all
  5869.                             modules and symbols.
  5870. %@TE:   38   2297  2 28 48 @%
  5871. %@NL@%
  5872. %@CR:MCV6300B@%%@4@%When you debug an assembly module, you cannot use the %@AI@%routine%@AE@% field; you%@EH@%
  5873. must use the %@AI@%module%@AE@% field. Therefore, the only versions of this command that
  5874. work with assembly modules are the following:%@NL@%
  5875. %@NL@%
  5876.      %@AB@%X?%@AE@%%@AI@%module%@AE@%%@AB@%!*%@AE@%%@NL@%
  5877.      %@AB@%X?%@AE@%%@AI@%module%@AE@%%@AB@%!%@AE@%%@AI@%symbol%@AE@%%@NL@%
  5878. %@NL@%
  5879. XL is a special variation of the Examine Symbol command. It lists local
  5880. variables for the currently executing routine and provides more information
  5881. than other variations of the command.%@NL@%
  5882. %@NL@%
  5883. %@CR:MCV6300C@%%@4@%Whereas most forms of the command display the address, type, and name of%@EH@%
  5884. each symbol, the %@AB@%XL%@AE@% variation displays the value of each local variable as
  5885. well. The value of a local variable is displayed in the same format that the
  5886. Display Expression command would use, assuming no type specifier.%@NL@%
  5887. %@NL@%
  5888. %@CR:MCV6300D@%%@4@%The following example shows the use of the %@AB@%XL%@AE@% command when the currently%@EH@%
  5889. executing routine has many local variables.%@NL@%
  5890. %@NL@%
  5891.      >XL%@NL@%
  5892.      [BP+0004]   int          argc = 1%@NL@%
  5893.      [BP+0006]   char * *     argv = 0x2f:0x1510%@NL@%
  5894.      [BP-0002]   int          i = 20%@NL@%
  5895.      SI register int          k = 7%@NL@%
  5896.      [BP-0078]   struct cat   item0 = {item1=0, item2=0, dog=0x2f:0x1476}%@NL@%
  5897.      [BP-0070]   struct cow   moo = {c1=11, c2=22, c3=36, c4=16}%@NL@%
  5898.      [BP-0008]   char *       wiz = 0x2f:0x1514%@NL@%
  5899.      [BP-0080]   int          duck = 0%@NL@%
  5900.      DI register int          j = 83%@NL@%
  5901. %@NL@%
  5902. %@CR:MCV6300E@%%@4@%In the example above, variables %@AS@%i%@AE@% and %@AS@%j%@AE@% are register variables assigned to%@EH@%
  5903. the registers %@AS@%SI%@AE@% and %@AS@%DI%@AE@%, respectively. The other variables are located on
  5904. the stack; %@AS@%XL%@AE@% shows the displacement of each variable from the %@AS@%BP%@AE@% register,
  5905. which holds the value of the stack pointer (SP) at the time of entry into
  5906. the procedure.%@NL@%
  5907. %@NL@%
  5908. %@CR:MCV6300F@%%@4@%If you have a parameter that is declared as a register in a C program, it%@EH@%
  5909. will appear twice: on the stack (as an offset from BP) and in the SI or DI
  5910. register.%@NL@%
  5911. %@NL@%
  5912. %@CR:MCV6300G@%%@4@%Note that if you program in assembly, local variables are not recognized by%@EH@%
  5913. CodeView unless you use the %@AB@%PROC%@AE@% and %@AB@%LOCALS%@AE@% directives provided with MASM
  5914. Version 5.1 and later.%@NL@%
  5915. %@NL@%
  5916. %@CR:MCV6300H@%%@4@%The rest of this section shows examples using the other variations of the%@EH@%
  5917. Examine Symbols command.%@NL@%
  5918. %@NL@%
  5919. %@CR:MCV6300I@%%@4@%%@AB@%C Examples%@AE@%%@EH@%%@NL@%
  5920. %@NL@%
  5921. %@CR:MCV6300J@%%@4@%For the following examples, assume that the program being examined is called%@EH@%
  5922. %@AS@%pi.exe%@AE@%, and that it consists of two modules: %@AS@%pi.c%@AE@% and %@AS@%math.c%@AE@%. The %@AS@%pi.c%@AE@%
  5923. module is a skeleton consisting only of the %@AS@%main%@AE@% function, whereas the
  5924. %@AS@%math.c%@AE@% module has several functions.  Assume that the current function is
  5925. %@AB@%div%@AE@% within the %@AS@%math%@AE@% module.%@NL@%
  5926. %@NL@%
  5927.      >X*        %@AI@%;*Example 1%@AE@%%@NL@%
  5928.      PI.OBJ%@NL@%
  5929.      MATH.OBJ%@NL@%
  5930.      chkstk.asm%@NL@%
  5931.      crt0.asm%@NL@%
  5932.      .%@NL@%
  5933.      .%@NL@%
  5934.      .%@NL@%
  5935.      C:\LIB\SLIBC.LIB(xtoa.asm)%@NL@%
  5936.      >%@NL@%
  5937. %@NL@%
  5938. %@CR:MCV6300K@%%@4@%Example 1 lists the two user-created modules of the program, as well as the%@EH@%
  5939. library modules used in the program.%@NL@%
  5940. %@NL@%
  5941.      >X?*       %@AI@%;*Example 2%@AE@%%@NL@%
  5942.                DI        int              b%@NL@%
  5943.                [BP-0006] int              quotient%@NL@%
  5944.                SI        int              i%@NL@%
  5945.                [BP-0002] int              remainder%@NL@%
  5946.                [BP+0004] int              divisor%@NL@%
  5947.      >%@NL@%
  5948. %@NL@%
  5949. %@CR:MCV6300L@%%@4@%Example 2 lists the symbols in the current function (%@AB@%div%@AE@%). Local variables%@EH@%
  5950. are shown as being stored either in a register (%@AS@%b%@AE@% in register %@AS@%DI%@AE@%) or at a
  5951. memory location specified as an offset from a register (%@AS@%divisor%@AE@% at location
  5952. %@AS@%[BP+0004]%@AE@%).%@NL@%
  5953. %@NL@%
  5954.      >X?pi!*         %@AI@%;* Example 3%@AE@%%@NL@%
  5955.      3D37:19B2       int       _scratch0     3D37:0A10 char     _p[]%@NL@%
  5956.      3D37:2954 int       _scratch1           3D37:19B4 char     _t[]%@NL@%
  5957.      3D37:2956 int       _scratch2           3D37:19B0 int      _q%@NL@%
  5958.      3A79:0010 int       _main()               3A79:0010 int    main()%@NL@%
  5959.      3D37:19B2 int        scratch0%@NL@%
  5960.      3D37:0A10 char       p[]%@NL@%
  5961.      3D37:2954 int        scratch1%@NL@%
  5962.      3D37:19B4 char       t[]%@NL@%
  5963.      3D37:2956 int        scratch2%@NL@%
  5964.      3D37:19B0 int        q%@NL@%
  5965.      >%@NL@%
  5966. %@NL@%
  5967. %@CR:MCV6300M@%%@4@%Example 3 shows all the symbols in the %@AS@%pi.c%@AE@% module.%@EH@%%@NL@%
  5968. %@NL@%
  5969.      >X?math!div.*   %@AI@%;*Example 4%@AE@%%@NL@%
  5970.      3A79:0264   int       div()%@NL@%
  5971.                   DI          int              b%@NL@%
  5972.                   [BP-0006]   int              quotient%@NL@%
  5973.                   SI          int              i%@NL@%
  5974.                   [BP-0002]   int              remainder%@NL@%
  5975.                   [BP+0004]   int              divisor%@NL@%
  5976.      >%@NL@%
  5977. %@NL@%
  5978. %@CR:MCV6300N@%%@4@%Example 4 shows the symbols in the %@AS@%div%@AE@% function in module %@AS@%math.c%@AE@%. You%@EH@%
  5979. wouldn't need to specify the module if %@AS@%math.c%@AE@% were the current module, but
  5980. you would if the current module were %@AS@%pi.c%@AE@%.%@NL@%
  5981. %@NL@%
  5982. %@CR:MCV6300O@%%@4@%Variables local to a function are indented under that function.%@EH@%%@NL@%
  5983. %@NL@%
  5984.      >X?math!arctan.s       %@AI@%;* Example 5%@AE@%%@AE@%%@NL@%
  5985.      3A79:00FA int              arc%@AS@%tan()%@AE@%%@NL@%
  5986.                    [BP+0004] int              s%@NL@%
  5987.      >%@NL@%
  5988. %@NL@%
  5989. %@CR:MCV6300P@%%@4@%Example 5 shows one specific variable (%@AS@%s%@AE@%) within the %@AS@%arctan%@AE@% function.%@EH@%%@NL@%
  5990. %@NL@%
  5991. %@CR:MCV6300Q@%%@4@%%@AB@%FORTRAN Examples%@AE@%%@EH@%%@NL@%
  5992. %@NL@%
  5993. %@CR:MCV6300R@%%@4@%For the following examples, assume that the program being examined is called%@EH@%
  5994. %@AS@%FRUST.EXE%@AE@%, and it consists of four modules: %@AS@%FRUST.FOR%@AE@%, %@AS@%FRUST1.FOR%@AE@%,
  5995. %@AS@%FRUST2.FOR%@AE@%, and %@AS@%FRUST3.FOR%@AE@%. Assume that the current routine is %@AS@%main%@AE@% within
  5996. the %@AS@%FRUST.FOR%@AE@% module.%@NL@%
  5997. %@NL@%
  5998.      >X*%@NL@%
  5999.      FRUST.OBJ%@NL@%
  6000.      FRUST1.OBJ%@NL@%
  6001.      FRUST2.OBJ%@NL@%
  6002.      FRUST3.OBJ%@NL@%
  6003.      fixups.asm%@NL@%
  6004.      crt0.asm%@NL@%
  6005.      .%@NL@%
  6006.      .%@NL@%
  6007.      .%@NL@%
  6008.      txtmode.asm%@NL@%
  6009.      _creat.asm%@NL@%
  6010. %@NL@%
  6011. %@CR:MCV6300S@%%@4@%The example above lists the four modules called by the program. The library%@EH@%
  6012. files called by the program are also listed.%@NL@%
  6013. %@NL@%
  6014.      >X?T%@NL@%
  6015.                    520D:0DE4 REAL*4    T%@NL@%
  6016. %@NL@%
  6017. %@CR:MCV6300T@%%@4@%The example above shows the address of the variable %@AS@%T%@AE@% in the current module.%@EH@%%@NL@%
  6018. %@NL@%
  6019.      >X?FRUST3!MULTPI.*%@NL@%
  6020.                    4B28:0005 INTEGER*4        MULTPI()%@NL@%
  6021.                    [BP+000A]                  V%@NL@%
  6022.                    [BP+0006]                  X%@NL@%
  6023.                    [BP-0004] INTEGER*4        MULTPI%@NL@%
  6024. %@NL@%
  6025. %@CR:MCV6300U@%%@4@%The example above lists the symbols in the function %@AS@%MULTPI%@AE@%, located in%@EH@%
  6026. module %@AS@%FRUST3%@AE@%. Variables local to the function are indented under the
  6027. function. You wouldn't need to specify the module if %@AS@%FRUST3%@AE@% were the current
  6028. module.%@NL@%
  6029. %@NL@%
  6030.      >X?FRUST2!SAREA.*%@NL@%
  6031.                    4B15:000E void             SAREA()%@NL@%
  6032.                    [BP+0012]                  R1%@NL@%
  6033.                    [BP+000E]                  R2%@NL@%
  6034.                    [BP+000A]                  H%@NL@%
  6035.                    [BP+0006]                  T%@NL@%
  6036.                    520D:0DEC REAL*4           S12%@NL@%
  6037.                    520D:0DE8 REAL*4           U%@NL@%
  6038. %@NL@%
  6039. %@CR:MCV6300V@%%@4@%The example above shows all the symbols in the routine %@AS@%SAREA%@AE@% in the module%@EH@%
  6040. %@AS@%FRUST2%@AE@%. Because %@AS@%SAREA%@AE@% is a subroutine instead of a function, the word %@AS@%void%@AE@%
  6041. appears where function return-value types are shown.%@NL@%
  6042. %@NL@%
  6043. %@CR:MCV6300W@%%@4@%%@AB@%BASIC Examples%@AE@%%@EH@%%@NL@%
  6044. %@NL@%
  6045. %@CR:MCV6300X@%%@4@%For the following examples, assume that the program being examined is called%@EH@%
  6046. %@AS@%PROG.EXE%@AE@%, and it consists of the following modules: %@AS@%PROG.BAS%@AE@% and %@AS@%SORT.BAS%@AE@%.
  6047. Assume that the current routine is the main program (which, unlike
  6048. subprograms, has no name in a BASIC program) and the module %@AS@%SORT.BAS%@AE@%
  6049. contains two subprograms, %@AS@%SORT%@AE@% and %@AS@%SWITCH%@AE@%.%@NL@%
  6050. %@NL@%
  6051.      >X*%@NL@%
  6052.      PROG.OBJ%@NL@%
  6053.      SORT.OBJ%@NL@%
  6054.      ftmdata.asm%@NL@%
  6055.      crt0.asm%@NL@%
  6056.      crt0dat.asm%@NL@%
  6057.      .%@NL@%
  6058.      .%@NL@%
  6059.      .%@NL@%
  6060.      xtoa.asm%@NL@%
  6061. %@NL@%
  6062. %@CR:MCV6300Y@%%@4@%The example above lists the two modules of the program, including %@AS@%PROG.OBJ%@AE@%,%@EH@%
  6063. which is the main module. The BASIC library files called by the program are
  6064. also listed.%@NL@%
  6065. %@NL@%
  6066.      >X?*%@NL@%
  6067.                    5825:17BE integer          A%[array]%@NL@%
  6068.                    5825:1780 single           HOURS!%@NL@%
  6069.                    5825:1784 integer          I%%@NL@%
  6070. %@NL@%
  6071. %@CR:MCV6300Z@%%@4@%The example above lists the symbols in the current routine, which happens to%@EH@%
  6072. be the main program. Although the main program has no label and therefore
  6073. will not show up in a stack trace, it is still an independent routine and
  6074. has its own local variables. In BASIC, local variables are not put on the
  6075. stack unless they are subprogram parameters.%@NL@%
  6076. %@NL@%
  6077.      >X?*SORT!*%@NL@%
  6078.                    572F:0033 integer          SORT()%@NL@%
  6079.                    572F:00E1 integer          SWITCH()%@NL@%
  6080. %@NL@%
  6081. %@CR:MCV6300a@%%@4@%The example above lists the routines in the module %@AS@%SORT.OBJ%@AE@%. This form of%@EH@%
  6082. the Display Symbols command lists routines only, not variables. Note that
  6083. %@AS@%SORT()%@AE@% and %@AS@%SWITCH()%@AE@% are given with the addresses of the two subprograms by
  6084. that name.%@NL@%
  6085. %@NL@%
  6086.      >X?SORT!SWITCH.*%@NL@%
  6087.                    [BP+0008] integer          B%%@NL@%
  6088.                    [BP+0006] integer          C%%@NL@%
  6089.                    5824:1798 integer          TEMP%%@NL@%
  6090. %@NL@%
  6091. %@CR:MCV6300b@%%@4@%The example above shows all the symbols in the routine %@AS@%SWITCH%@AE@%, which is in%@EH@%
  6092. the %@AS@%SORT.OBJ%@AE@% module. Each represents an integer. However, %@AS@%B%%@AE@% and %@AS@%C%%@AE@%
  6093. represent subprogram parameters that were passed on the stack, whereas%@NL@%
  6094. %@NL@%
  6095. %@CR:MCV6300c@%%@4@%%@AS@%TEMP%%@AE@% is a true subprogram variable. Therefore, %@AS@%TEMP%%@AE@% has an absolute%@EH@%
  6096. address in memory, whereas %@AS@%B%%@AE@% and %@AS@%C%%@AE@% are addressed relative to the stack.%@AE@%
  6097. %@AS@%(%@AE@%%@AS@%BP%@AE@% points to the value of the stack at the time the routine %@AS@%SWITCH%@AE@% was
  6098. called.)%@NL@%
  6099. %@NL@%
  6100. %@NL@%
  6101. %@CR:MCV64000@%%@2@%%@AB@%6.4  Dump Commands%@AE@%%@EH@%%@NL@%
  6102. %@NL@%
  6103. %@CR:MCV64001@%%@4@%The CodeView debugger has several commands for dumping data from memory to%@EH@%
  6104. the screen (or other output device). The Dump commands are listed below.%@NL@%
  6105. %@NL@%
  6106. %@CR:MCV64002@%       %@AB@%Command                    Command Name%@AE@%%@NL@%
  6107. %@NL@%
  6108.        %@AB@%D%@AE@%                    Dump (size is the default type)%@NL@%
  6109. %@NL@%
  6110.        %@AB@%DB%@AE@%                   Dump Bytes%@NL@%
  6111. %@NL@%
  6112.        %@AB@%DA%@AE@%                   Dump ASCII%@NL@%
  6113. %@NL@%
  6114.        %@AB@%DI%@AE@%                   Dump Integers%@NL@%
  6115. %@NL@%
  6116.        %@AB@%DU%@AE@%                   Dump Unsigned Integers%@NL@%
  6117. %@NL@%
  6118.        %@AB@%DW%@AE@%                   Dump Words%@NL@%
  6119. %@NL@%
  6120.        %@AB@%DD%@AE@%                   Dump Double Words%@NL@%
  6121. %@NL@%
  6122.        %@AB@%DS%@AE@%                   Dump Short Reals%@NL@%
  6123. %@NL@%
  6124.        %@AB@%DL%@AE@%                   Dump Long Reals%@NL@%
  6125. %@NL@%
  6126.        %@AB@%DT%@AE@%                   Dump 10-Byte Reals%@NL@%
  6127. %@NL@%
  6128. %@CR:MCV64003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6129. %@NL@%
  6130. %@CR:MCV64004@%%@4@%The Dump commands cannot be executed with the mouse.%@EH@%%@NL@%
  6131. %@NL@%
  6132. %@CR:MCV64005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6133. %@NL@%
  6134. %@CR:MCV64006@%%@4@%The Dump commands cannot be executed with keyboard commands.%@EH@%%@NL@%
  6135. %@NL@%
  6136. %@CR:MCV64007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6137. %@NL@%
  6138. %@CR:MCV64008@%%@4@%To execute a Dump command with a dialog command, enter a command line with%@EH@%
  6139. the following syntax:%@NL@%
  6140. %@NL@%
  6141.      %@AB@%D%@AE@%«%@AI@%type%@AE@%» «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6142. %@NL@%
  6143. %@CR:MCV64009@%%@4@%The %@AI@%type%@AE@% is a one-letter specifier that indicates the type of the data to be%@EH@%
  6144. dumped. The Dump commands expect either a starting %@AI@%address%@AE@% or a %@AI@%range%@AE@% of
  6145. memory. If the starting %@AI@%address%@AE@% is given, the commands assume a default
  6146. range (usually%@NL@%
  6147. %@NL@%
  6148. %@CR:MCV6400A@%%@4@%determined by the size of the dialog window) starting at %@AI@%address%@AE@%. If %@AI@%range%@AE@%%@EH@%
  6149. is given, the commands dump from the start to the end of %@AI@%range%@AE@%. The maximum
  6150. size of %@AI@%range%@AE@% is 32K.%@NL@%
  6151. %@NL@%
  6152. %@CR:MCV6400B@%%@4@%If neither %@AI@%address%@AE@% nor %@AI@%range%@AE@% is given, the commands assume the current dump%@EH@%
  6153. address as the start of the range and the default size associated with the
  6154. size of the object as the length of the range. The Dump Real commands have a
  6155. default range size of one real number. The other Dump commands have a
  6156. default size determined by the size of the dialog window (if you are in
  6157. window mode), or a default size of 128 bytes otherwise.%@NL@%
  6158. %@NL@%
  6159. %@CR:MCV6400C@%%@4@%The current dump address is the byte following the last byte specified in%@EH@%
  6160. the previous Dump command. If no Dump command has been used during the
  6161. session, the dump address is the start of the data segment (DS). For
  6162. example, if you enter the Dump Words command with no argument as the first
  6163. command of a session, the CodeView debugger displays the first 64 words (128
  6164. bytes) of data declared in the data segment. If you repeat the same command,
  6165. the debugger displays the next 64 words following the ones dumped by the
  6166. first command.%@NL@%
  6167. %@NL@%
  6168. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6169. %@AI@%NOTE%@AE@%%@NL@%
  6170.    If the value in memory cannot be evaluated as a real number, the Dump%@NL@%
  6171.    commands that display real numbers (Dump Short Reals, Dump Long Reals, or%@NL@%
  6172.    Dump 10-Byte Reals) will display a number containing one of the following%@NL@%
  6173.    character sequences: %@AS@%#NAN%@AE@%, %@AS@%#INF%@AE@%, or %@AS@%#IND%@AE@%. NAN (not a number) indicates%@NL@%
  6174.    that the data cannot be evaluated as a real number. INF (infinity)%@NL@%
  6175.    indicates that the data evaluates to infinity. IND (indefinite) indicates%@NL@%
  6176.    that the data evaluates to an indefinite number.%@NL@%
  6177. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6178. %@NL@%
  6179. %@CR:MCV6400D@%%@4@%Sections 6.4.1%@BO:   4f43b@%-6.4.10 discuss the variations of the Dump commands in order%@EH@%
  6180. of the size of data they display.%@NL@%
  6181. %@NL@%
  6182. %@NL@%
  6183. %@CR:MCV64100@%%@3@%%@AB@%6.4.1  Dump%@AE@%%@EH@%%@NL@%
  6184. %@NL@%
  6185. %@CR:MCV64101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  6186. %@NL@%
  6187.      %@AB@%D%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6188. %@NL@%
  6189. %@CR:MCV64102@%%@4@%The Dump command displays the contents of memory at the specified %@AI@%address%@AE@% or%@EH@%
  6190. in the specified %@AI@%range%@AE@% of addresses. The command dumps data in the format of
  6191. the default type. The default type is the last type specified with a Dump,
  6192. Enter, Watch Memory, or Tracepoint Memory command. If none of these commands
  6193. has been entered during the session, the default type is bytes.%@NL@%
  6194. %@NL@%
  6195. %@CR:MCV64103@%%@4@%The Dump command displays one or more lines, depending on the address or%@EH@%
  6196. range specified. Each line displays the address of the first item displayed.
  6197. The Dump command must be separated by at least one space from any %@AI@%address%@AE@% or
  6198. %@AI@%range%@AE@% value. For example, to dump memory starting at symbol %@AS@%a%@AE@%, use the
  6199. command %@AS@%D a%@AE@%, not %@AS@%Da%@AE@%. The second syntax would be interpreted as the Dump
  6200. ASCII command.%@NL@%
  6201. %@NL@%
  6202. %@NL@%
  6203. %@CR:MCV64200@%%@3@%%@AB@%6.4.2  Dump Bytes%@AE@%%@EH@%%@NL@%
  6204. %@NL@%
  6205. %@CR:MCV64201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  6206. %@NL@%
  6207.      %@AB@%DB%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6208. %@NL@%
  6209. %@CR:MCV64202@%%@4@%The Dump Bytes command displays the hexadecimal and ASCII values of the%@EH@%
  6210. bytes at the specified %@AI@%address%@AE@% or in the specified %@AI@%range%@AE@% of addresses. The
  6211. command displays one or more lines, depending on the address or range
  6212. supplied.%@NL@%
  6213. %@NL@%
  6214. %@CR:MCV64203@%%@4@%Each line displays the address of the first byte in the line, followed by up%@EH@%
  6215. to 16 hexadecimal byte values. The byte values are immediately followed by
  6216. the corresponding ASCII values. The hexadecimal values are separated by
  6217. spaces, except the eighth and ninth values, which are separated by a dash
  6218. (-). ASCII values are printed without separation. Unprintable ASCII values
  6219. (less than 32 or greater than 126) are displayed as dots. No more than 16
  6220. hexadecimal values are displayed in a line. The command displays values and
  6221. characters until the end of the %@AI@%range%@AE@% or, if no %@AI@%range%@AE@% is given, until the
  6222. first 128 bytes have been displayed.%@NL@%
  6223. %@NL@%
  6224. %@CR:MCV64204@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  6225. %@NL@%
  6226.      >DB 0 36%@NL@%
  6227.      3D5E:0000 53 6F 6D 65 20 6C 65 74-74 65 72 73 20 61 6E 64 Someletters and%@NL@%
  6228.      3D5E:0010 20 6E 75 6D 62 65 72 73-3A 00 10 EA 89 FC FF EF  numbers:.......%@NL@%
  6229.      3D5E:0020 00 F0 00 CA E4         -                         .....%@NL@%
  6230.      >%@NL@%
  6231. %@NL@%
  6232. %@CR:MCV64205@%%@4@%The example above displays the byte values from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (36 decimal is%@EH@%
  6233. equivalent to 24 hexadecimal). The data segment is assumed if no segment is
  6234. given. ASCII characters are shown on the right.%@NL@%
  6235. %@NL@%
  6236. %@NL@%
  6237. %@CR:MCV64300@%%@3@%%@AB@%6.4.3  Dump ASCII%@AE@%%@EH@%%@NL@%
  6238. %@NL@%
  6239. %@CR:MCV64301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  6240. %@NL@%
  6241.      %@AB@%DA%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6242. %@NL@%
  6243. %@CR:MCV64302@%%@4@%The Dump ASCII command displays the ASCII characters at a specified %@AI@%address%@AE@%%@EH@%
  6244. or in a specified %@AI@%range%@AE@% of addresses. The command displays one or more lines
  6245. of characters, depending on the %@AI@%address%@AE@% or %@AI@%range%@AE@% specified.%@NL@%
  6246. %@NL@%
  6247. %@CR:MCV64303@%%@4@%If no ending address is specified, the command dumps either 128 bytes or all%@EH@%
  6248. bytes preceding the first null byte, whichever comes first. Up to 64
  6249. characters per line are displayed. Unprintable characters, such as carriage
  6250. returns and line feeds, are displayed as dots. ASCII characters less than 32
  6251. and greater than 126 in number are unprintable.%@NL@%
  6252. %@NL@%
  6253. %@CR:MCV64304@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6254. %@NL@%
  6255.      >DA 0%@NL@%
  6256.      3D7C:0000 Some letters and numbers:%@NL@%
  6257.      >%@NL@%
  6258. %@NL@%
  6259. %@CR:MCV64305@%%@4@%The example above displays the ASCII values of the bytes starting at %@AS@%DS:0%@AE@%.%@EH@%
  6260. Since no ending address is given, values are displayed up to the first null
  6261. byte.%@NL@%
  6262. %@NL@%
  6263.      >DA 0 36%@NL@%
  6264.      3D7C:0000  Some letters and numbers:...........%@NL@%
  6265.      >%@NL@%
  6266. %@NL@%
  6267. %@CR:MCV64306@%%@4@%In the example above, an ending address is given, so that the characters%@EH@%
  6268. from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (24 hexadecimal) are shown. Unprintable characters are
  6269. shown as dots.%@NL@%
  6270. %@NL@%
  6271. %@NL@%
  6272. %@CR:MCV64400@%%@3@%%@AB@%6.4.4  Dump Integers%@AE@%%@EH@%%@NL@%
  6273. %@NL@%
  6274. %@CR:MCV64401@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  6275. %@NL@%
  6276.      %@AB@%DI%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6277. %@NL@%
  6278. %@CR:MCV64402@%%@4@%The Dump Integers command displays the signed decimal values of the words%@EH@%
  6279. (two-byte values) starting at %@AI@%address%@AE@% or in the specified %@AI@%range%@AE@% of
  6280. addresses. The command displays one or more lines, depending on the address
  6281. or range specified. Each line displays the address of the first integer in
  6282. the line, followed by up to eight signed decimal words. The values are
  6283. separated by spaces. The command displays values until the end of the %@AI@%range%@AE@%
  6284. or until the first 64 two-byte integers have been displayed, whichever comes
  6285. first.%@NL@%
  6286. %@NL@%
  6287. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6288. %@AI@%NOTE%@AE@%%@NL@%
  6289.    In this manual an integer is considered a two-byte value since the%@NL@%
  6290.    CodeView debugger assumes that integer size. Note that a default FORTRAN%@NL@%
  6291.    integer is a four-byte value.%@NL@%
  6292. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6293. %@NL@%
  6294. %@CR:MCV64403@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  6295. %@NL@%
  6296.      >DI 0 36%@NL@%
  6297.      3D5E:0000   28499  25965  27680  29797  25972  29554  24864  25710%@NL@%
  6298.      3D5E:0010   28192  28021  25954  29554     58  -5616   -887  -4097%@NL@%
  6299.      3D5E:0020   -4096 -13824   2532%@NL@%
  6300.      >%@NL@%
  6301. %@NL@%
  6302. %@CR:MCV64404@%%@4@%The example above displays the byte values from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (24%@EH@%
  6303. hexadecimal). Compare the signed decimal numbers at the end of this dump
  6304. with the same values shown as unsigned integers in Section 6.4.5%@BO:   50cc7@% below.%@NL@%
  6305. %@NL@%
  6306. %@NL@%
  6307. %@CR:MCV64500@%%@3@%%@AB@%6.4.5  Dump Unsigned Integers%@AE@%%@EH@%%@NL@%
  6308. %@NL@%
  6309. %@CR:MCV64501@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  6310. %@NL@%
  6311.      %@AB@%DU%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6312. %@NL@%
  6313. %@CR:MCV64502@%%@4@%The Dump Unsigned Integers command displays the unsigned decimal values of%@EH@%
  6314. the words (two-byte values) starting at %@AI@%address%@AE@% or in the specified %@AI@%range%@AE@% of
  6315. addresses. The command displays one or more lines, depending on the address
  6316. or range specified. Each line displays the address of the first unsigned
  6317. integer in the line, followed by up to eight decimal words. The values are
  6318. separated by spaces. The command displays values until the end of the %@AI@%range%@AE@%
  6319. or until the first 64 unsigned integers have been displayed, whichever comes
  6320. first.%@NL@%
  6321. %@NL@%
  6322. %@CR:MCV64503@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  6323. %@NL@%
  6324.      >DU 0 36%@NL@%
  6325.      3D5E:0000   28499  25965  27680  29797  25972  29554  24864  25710%@NL@%
  6326.      3D5E:0010   28192  28021  25954  29554     58  59920  64649  61439%@NL@%
  6327.      3D5E:0020   61440  51712   2532%@NL@%
  6328.      >%@NL@%
  6329. %@NL@%
  6330. %@CR:MCV64504@%%@4@%The example above displays the byte values from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (24%@EH@%
  6331. hexadecimal). Compare the unsigned decimal numbers at the end of this dump
  6332. with the same values shown as signed integers in Section 6.4.4%@BO:   505cb@% above.%@NL@%
  6333. %@NL@%
  6334. %@NL@%
  6335. %@CR:MCV64600@%%@3@%%@AB@%6.4.6  Dump Words%@AE@%%@EH@%%@NL@%
  6336. %@NL@%
  6337. %@CR:MCV64601@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  6338. %@NL@%
  6339.      %@AB@%DW%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6340. %@NL@%
  6341. %@CR:MCV64602@%%@4@%The Dump Words command displays the hexadecimal values of the words%@EH@%
  6342. (two-byte values) starting at %@AI@%address%@AE@% or in the specified %@AI@%range%@AE@% of
  6343. addresses. The command displays one or more lines, depending on the address
  6344. or range specified. Each line displays the address of the first word in the
  6345. line, followed by up to eight hexadecimal words. The hexadecimal values are
  6346. separated by spaces. The command displays values until the end of the %@AI@%range%@AE@%
  6347. or until the first 64 words have been displayed, whichever comes first.%@NL@%
  6348. %@NL@%
  6349. %@CR:MCV64603@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  6350. %@NL@%
  6351.      >DW 0 36%@NL@%
  6352.      3D5E:0000  6F53 656D 6C20 7465 6574 7372 6120 646E%@NL@%
  6353.      3D5E:0010  6E20 6D75 6562 7372 003A EA10 FC89 EFFF%@NL@%
  6354.      3D5E:0020  F000 CA00 09E4%@NL@%
  6355.      >%@NL@%
  6356. %@NL@%
  6357. %@CR:MCV64604@%%@4@%The example above displays the word values from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (24%@EH@%
  6358. hexadecimal). No more than eight values per line are displayed.%@NL@%
  6359. %@NL@%
  6360. %@NL@%
  6361. %@CR:MCV64700@%%@3@%%@AB@%6.4.7  Dump Double Words%@AE@%%@EH@%%@NL@%
  6362. %@NL@%
  6363. %@CR:MCV64701@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  6364. %@NL@%
  6365.      %@AB@%DD%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6366. %@NL@%
  6367. %@CR:MCV64702@%%@4@%The Dump Double Words command displays the hexadecimal values of the double%@EH@%
  6368. words (four-byte values) starting at %@AI@%address%@AE@% or in the specified %@AI@%range%@AE@% of
  6369. addresses.%@NL@%
  6370. %@NL@%
  6371. %@CR:MCV64703@%%@4@%The command displays one or more lines, depending on the address or range%@EH@%
  6372. specified. Each line displays the address of the first double word in the
  6373. line, followed by up to four hexadecimal double-word values. The words of
  6374. each double word are separated by a colon. The values are separated by
  6375. spaces. The command displays values until the end of the %@AI@%range%@AE@% or until the
  6376. first 32 double words have been displayed, whichever comes first.%@NL@%
  6377. %@NL@%
  6378. %@CR:MCV64704@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  6379. %@NL@%
  6380.      >DD 0 36%@NL@%
  6381.      3D5E:0000  656D:6F53 7465:6C20 7372:6574 646E:6120%@NL@%
  6382.      3D5E:0010  6D75:6E20 7372:6562 EA10:003A EFFF:FC89%@NL@%
  6383.      3D5E:0020  CA00:F000 6F73:09E4%@NL@%
  6384.      >%@NL@%
  6385. %@NL@%
  6386. %@CR:MCV64705@%%@4@%The example above displays the double-word values from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (24%@EH@%
  6387. hexadecimal). No more than four double-word values per line are displayed.%@NL@%
  6388. %@NL@%
  6389. %@NL@%
  6390. %@CR:MCV64800@%%@3@%%@AB@%6.4.8  Dump Short Reals%@AE@%%@EH@%%@NL@%
  6391. %@NL@%
  6392. %@CR:MCV64801@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  6393. %@NL@%
  6394.      %@AB@%DS%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6395. %@NL@%
  6396. %@CR:MCV64802@%%@4@%The Dump Short Reals command displays the hexadecimal and decimal values of%@EH@%
  6397. the short (four-byte) floating-point numbers at %@AI@%address%@AE@% or in the specified
  6398. %@AI@%range%@AE@% of addresses.%@NL@%
  6399. %@NL@%
  6400. %@CR:MCV64803@%%@4@%The command displays one or more lines, depending on the address or range%@EH@%
  6401. specified. Each line displays the address of the floating-point number in
  6402. the first column. Next, the hexadecimal values of the bytes in the number
  6403. are shown, followed by the decimal value of the number. The hexadecimal
  6404. values are separated by spaces.%@NL@%
  6405. %@NL@%
  6406. %@CR:MCV64804@%%@4@%The decimal value has the following form:%@EH@%%@NL@%
  6407. %@NL@%
  6408.      «-»%@AI@%digit%@AE@%.%@AI@%digits%@AE@%%@AB@%E%@AE@%{+ | -}%@AI@%exponent%@AE@%%@NL@%
  6409. %@NL@%
  6410. %@CR:MCV64805@%%@4@%If the number is negative, it will have a minus sign; positive numbers have%@EH@%
  6411. no sign. The first digit of the number is followed by a decimal point. Six
  6412. decimal places are shown following the decimal point. The letter E follows
  6413. the decimal digits and marks the start of a three-digit signed %@AI@%exponent%@AE@%.%@NL@%
  6414. %@NL@%
  6415. %@CR:MCV64806@%%@4@%The command displays at least one value. If a %@AI@%range%@AE@% is specified, all values%@EH@%
  6416. in the range are displayed.%@NL@%
  6417. %@NL@%
  6418. %@CR:MCV64807@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  6419. %@NL@%
  6420.      >DS SPI%@NL@%
  6421.      5E68:0100  DB 0F 49 40  3.141593E+000%@NL@%
  6422.      >%@NL@%
  6423. %@NL@%
  6424. %@CR:MCV64808@%%@4@%The example above displays the short-real floating-point number at the%@EH@%
  6425. address of the variable %@AS@%SPI%@AE@%. Only one value is displayed per line.%@NL@%
  6426. %@NL@%
  6427. %@NL@%
  6428. %@CR:MCV64900@%%@3@%%@AB@%6.4.9  Dump Long Reals%@AE@%%@EH@%%@NL@%
  6429. %@NL@%
  6430. %@CR:MCV64901@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  6431. %@NL@%
  6432.      %@AB@%DL%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6433. %@NL@%
  6434. %@CR:MCV64902@%%@4@%The Dump Long Reals command displays the hexadecimal and decimal values of%@EH@%
  6435. the long (eight-byte) floating-point numbers at the specified %@AI@%address%@AE@% or in
  6436. the specified %@AI@%range%@AE@% of addresses.%@NL@%
  6437. %@NL@%
  6438. %@CR:MCV64903@%%@4@%The command displays one or more lines, depending on the address or range%@EH@%
  6439. specified. Each line displays the address of the floating-point number in
  6440. the first column. Next, the hexadecimal values of the bytes in the number
  6441. are shown, followed by the decimal value of the number. The hexadecimal
  6442. values are separated by spaces.%@NL@%
  6443. %@NL@%
  6444. %@CR:MCV64904@%%@4@%The decimal value has the following form:%@EH@%%@NL@%
  6445. %@NL@%
  6446.      «-»%@AI@%digit.digits%@AE@%%@AB@%E%@AE@%{+ | -}%@AI@%exponent%@AE@%%@NL@%
  6447. %@NL@%
  6448. %@CR:MCV64905@%%@4@%If the number is negative, it will have a minus sign; positive numbers have%@EH@%
  6449. no sign. The first digit of the number is followed by a decimal point. Six
  6450. decimal places are shown following the decimal point. The letter E follows
  6451. the decimal digits and marks the start of a three-digit signed %@AI@%exponent%@AE@%.%@NL@%
  6452. %@NL@%
  6453. %@CR:MCV64906@%%@4@%The command displays at least one value. If a %@AI@%range%@AE@% is specified, all values%@EH@%
  6454. in the range are displayed.%@NL@%
  6455. %@NL@%
  6456. %@CR:MCV64907@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  6457. %@NL@%
  6458.      >DL LPI%@NL@%
  6459.      5E68:0200  11 2D 44 54 FB 21 09 40  3.141593E+000%@NL@%
  6460.      >%@NL@%
  6461. %@NL@%
  6462. %@CR:MCV64908@%%@4@%The example above displays the long-real floating-point number at the%@EH@%
  6463. address of the variable %@AS@%LPI%@AE@%. Only one value per line is displayed.%@NL@%
  6464. %@NL@%
  6465. %@NL@%
  6466. %@CR:MCV64A00@%%@3@%%@AB@%6.4.10  Dump 10-Byte Reals%@AE@%%@EH@%%@NL@%
  6467. %@NL@%
  6468. %@CR:MCV64A01@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  6469. %@NL@%
  6470.      %@AB@%DT%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6471. %@NL@%
  6472. %@CR:MCV64A02@%%@4@%The Dump 10-Byte Reals command displays the hexadecimal and decimal values%@EH@%
  6473. of the 10-byte floating-point numbers at the specified %@AI@%address%@AE@% or in the
  6474. specified %@AI@%range%@AE@% of addresses.%@NL@%
  6475. %@NL@%
  6476. %@CR:MCV64A03@%%@4@%The command displays one or more lines, depending on the address or range%@EH@%
  6477. specified. Each line displays the address of the floating-point number in
  6478. the first column. Next, the hexadecimal values of the bytes in the number
  6479. are shown, followed by the decimal value of the number. The hexadecimal
  6480. values are separated by spaces.%@NL@%
  6481. %@NL@%
  6482. %@CR:MCV64A04@%%@4@%The decimal value has the following form:%@EH@%%@NL@%
  6483. %@NL@%
  6484.      «-»%@AI@%digit%@AE@%.%@AI@%digits%@AE@%%@AB@%E%@AE@%{+ | -}%@AI@%exponent%@AE@%%@NL@%
  6485. %@NL@%
  6486. %@CR:MCV64A05@%%@4@%If the number is negative, it will have a minus sign; positive numbers have%@EH@%
  6487. no sign. The first digit of the number is followed by a decimal point. Six
  6488. decimal places are shown following the decimal point. The letter E follows
  6489. the decimal digits and marks the start of a three-digit signed %@AI@%exponent%@AE@%.%@NL@%
  6490. %@NL@%
  6491. %@CR:MCV64A06@%%@4@%The command displays at least one value. If a %@AI@%range%@AE@% is specified, all values%@EH@%
  6492. in the range are displayed.%@NL@%
  6493. %@NL@%
  6494. %@CR:MCV64A07@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  6495. %@NL@%
  6496.      >DT TPI%@NL@%
  6497.      5E68:0300  DE 87 68 21 A2 DA 0F C9 00 40  3.141593E+000%@NL@%
  6498.      >%@NL@%
  6499. %@NL@%
  6500. %@CR:MCV64A08@%%@4@%The example above displays the 10-byte floating-point number at the address%@EH@%
  6501. of the variable %@AS@%TPI%@AE@%. Only one number per line is displayed.%@NL@%
  6502. %@NL@%
  6503. %@NL@%
  6504. %@CR:MCV65000@%%@2@%%@AB@%6.5  Compare Memory Command%@AE@%%@EH@%%@NL@%
  6505. %@NL@%
  6506. %@CR:MCV65001@%%@4@%The Compare Memory command provides a convenient way for comparing two%@EH@%
  6507. blocks of memory, specified by absolute addresses. This command is primarily
  6508. of interest to programmers using assembly mode; however, it can be useful to
  6509. anyone who wants to compare two large areas of data, such as arrays.%@NL@%
  6510. %@NL@%
  6511. %@CR:MCV65002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6512. %@NL@%
  6513. %@CR:MCV65003@%%@4@%The Compare Memory command cannot be executed with the mouse.%@EH@%%@NL@%
  6514. %@NL@%
  6515. %@CR:MCV65004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6516. %@NL@%
  6517. %@CR:MCV65005@%%@4@%The Compare Memory command cannot be executed with a keyboard command.%@EH@%%@NL@%
  6518. %@NL@%
  6519. %@CR:MCV65006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6520. %@NL@%
  6521. %@CR:MCV65007@%%@4@%To compare two blocks of memory, enter a command line with the following%@EH@%
  6522. syntax:%@NL@%
  6523. %@NL@%
  6524.      %@AB@%C%@AE@% %@AI@%range%@AE@% %@AI@%address%@AE@%%@NL@%
  6525. %@NL@%
  6526. %@CR:MCV65008@%%@4@%The bytes in the memory locations specified by %@AI@%range%@AE@% are compared with the%@EH@%
  6527. corresponding bytes in the memory locations beginning at %@AI@%address%@AE@%. If one or
  6528. more pairs of corresponding bytes do not match, each pair of mismatched
  6529. bytes is displayed.%@NL@%
  6530. %@NL@%
  6531. %@CR:MCV65009@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6532. %@NL@%
  6533.      >C 100 01FF 300     %@AI@%;* hexadecimal radix assumed%@AE@%%@NL@%
  6534.      39BB:0102 0A 00 39BB:0302%@NL@%
  6535.      39BB:0108 0A 01 39BB:0308%@NL@%
  6536.      >%@NL@%
  6537. %@NL@%
  6538. %@CR:MCV6500A@%%@4@%The first example (in which hexadecimal is assumed to be the default radix)%@EH@%
  6539. compares the block of memory from 100 to 1FF with the block of memory from
  6540. 300 to 3FF. It indicates that the third and ninth bytes differ in the two
  6541. areas of memory.%@NL@%
  6542. %@NL@%
  6543.      >C arr1(1) L 100  arr2(1)  %@AI@%;* BASIC/FORTRAN notation used%@AE@%%@NL@%
  6544.      >%@NL@%
  6545. %@NL@%
  6546. %@CR:MCV6500B@%%@4@%The second example compares the 100 bytes starting at the address of%@EH@%
  6547. %@AS@%arr1(1)%@AE@%, with the 100 bytes starting at address of %@AS@%arr2(1)%@AE@%. The CodeView
  6548. debugger produces no output in response, so this indicates that the first
  6549. 100 bytes of each array are identical. (In C language, this example would be
  6550. entered as %@AS@%Carr1[0] L 100 arr2[0]%@AE@%.)%@NL@%
  6551. %@NL@%
  6552. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6553. %@AI@%NOTE%@AE@%%@NL@%
  6554.    You can enter the Compare Memory command using any radix you like;%@NL@%
  6555.    however, any output will still be in hexadecimal format.%@NL@%
  6556. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6557. %@NL@%
  6558. %@NL@%
  6559. %@CR:MCV66000@%%@2@%%@AB@%6.6  Search Memory Command%@AE@%%@EH@%%@NL@%
  6560. %@NL@%
  6561. %@CR:MCV66001@%%@4@%The Search Memory command (not to be confused with the Search command%@EH@%
  6562. discussed in Section 11.5%@BO:   78f11@%) scans a specified area of memory, looking for
  6563. specific byte values. It is primarily of interest to programmers using
  6564. assembly mode and to users testing for the presence of specific values
  6565. within a range of data.%@NL@%
  6566. %@NL@%
  6567. %@CR:MCV66002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6568. %@NL@%
  6569. %@CR:MCV66003@%%@4@%The Search Memory command cannot be executed with the mouse.%@EH@%%@NL@%
  6570. %@NL@%
  6571. %@CR:MCV66004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6572. %@NL@%
  6573. %@CR:MCV66005@%%@4@%The Search Memory command cannot be executed with a keyboard command.%@EH@%%@NL@%
  6574. %@NL@%
  6575. %@CR:MCV66006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6576. %@NL@%
  6577. %@CR:MCV66007@%%@4@%To search a block of memory, enter the Search Memory command with the%@EH@%
  6578. following syntax:%@NL@%
  6579. %@NL@%
  6580.      %@AB@%S%@AE@% %@AI@%range%@AE@% %@AI@%list%@AE@%%@NL@%
  6581. %@NL@%
  6582. %@CR:MCV66008@%%@4@%The debugger will search the specified %@AI@%range%@AE@% of memory locations for the%@EH@%
  6583. byte values specified in the %@AI@%list%@AE@%. If bytes with the specified values are
  6584. found, the debugger displays the addresses of each occurrence of bytes in
  6585. the list.%@NL@%
  6586. %@NL@%
  6587. %@CR:MCV66009@%%@4@%The %@AI@%list%@AE@% can have any number of bytes. Each byte value must be separated by%@EH@%
  6588. a space or comma, unless the list is an ASCII string. If the list contains
  6589. more than one byte, the Search Memory command looks for a series of bytes
  6590. that precisely match the order and value of bytes in %@AI@%list%@AE@%. If found, the
  6591. beginning address of each such series is displayed.%@NL@%
  6592. %@NL@%
  6593. %@CR:MCV6600A@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6594. %@NL@%
  6595.      >S buffer L 1500 "error"%@NL@%
  6596.      2BBA:0404%@NL@%
  6597.      2BBA:05E3%@NL@%
  6598.      2BBA:0604%@NL@%
  6599.      >%@NL@%
  6600. %@NL@%
  6601. %@CR:MCV6600B@%%@4@%The first example displays the address of each memory location containing%@EH@%
  6602. the string %@AS@%error%@AE@%. The command searches the first 1500 bytes at the address
  6603. specified by %@AS@%buffer%@AE@%. The string was found at the three addresses displayed
  6604. by the CodeView debugger.%@NL@%
  6605. %@NL@%
  6606.      >S DS:100 200 0A   %@AI@%;* hexadecimal radix assumed%@AE@%%@NL@%
  6607.      3CBA:0132%@NL@%
  6608.      3CBA:01C2%@NL@%
  6609.      >%@NL@%
  6610. %@NL@%
  6611. %@CR:MCV6600C@%%@4@%The second example displays the address of each memory location that%@EH@%
  6612. contains the byte value 0A in the range DS:0100 to DS:0200 (hexadecimal).
  6613. The value was found at two addresses.%@NL@%
  6614. %@NL@%
  6615. %@NL@%
  6616. %@CR:MCV67000@%%@2@%%@AB@%6.7  Port Input Command%@AE@%%@EH@%%@NL@%
  6617. %@NL@%
  6618. %@CR:MCV67001@%%@4@%The Port Input command reads and displays a byte from a specified hardware%@EH@%
  6619. port. It is primarily of interest to assembly-language programmers writing
  6620. hardware-specific programs.%@NL@%
  6621. %@NL@%
  6622. %@CR:MCV67002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6623. %@NL@%
  6624. %@CR:MCV67003@%%@4@%The Port Input command cannot be executed with the mouse.%@EH@%%@NL@%
  6625. %@NL@%
  6626. %@CR:MCV67004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6627. %@NL@%
  6628. %@CR:MCV67005@%%@4@%The Port Input command cannot be executed with a keyboard command.%@EH@%%@NL@%
  6629. %@NL@%
  6630. %@CR:MCV67006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6631. %@NL@%
  6632. %@CR:MCV67007@%%@4@%The Port Input command is executed with the following syntax:%@EH@%%@NL@%
  6633. %@NL@%
  6634.      %@AB@%I%@AE@% %@AI@%port%@AE@%%@NL@%
  6635. %@NL@%
  6636. %@CR:MCV67008@%%@4@%The byte is read and displayed from the specified %@AI@%port%@AE@%, which can be any%@EH@%
  6637. 16-bit address.%@NL@%
  6638. %@NL@%
  6639. %@CR:MCV67009@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6640. %@NL@%
  6641.      >I 2f8   %@AI@%;* hexadecimal radix assumed%@NL@%
  6642.      E8%@NL@%
  6643.      >%@NL@%
  6644. %@NL@%
  6645. %@CR:MCV6700A@%%@4@%The preceding example reads input port, number %@AS@%2F8%@AE@%, and displays the result,%@EH@%
  6646. %@AS@%E8%@AE@%. You may enter the port address using any radix you want, but the result
  6647. will always be displayed in current radix.%@NL@%
  6648. %@NL@%
  6649. %@CR:MCV6700B@%%@4@%The Port Input command is often used in conjunction with the Port Output%@EH@%
  6650. command, which is described in Section 10.5.%@BO:   75046@%%@NL@%
  6651. %@NL@%
  6652. %@NL@%
  6653. %@CR:MCV68000@%%@2@%%@AB@%6.8  Register Command%@AE@%%@EH@%%@NL@%
  6654. %@NL@%
  6655. %@CR:MCV68001@%%@4@%The Register command has two functions. It displays the contents of the%@EH@%
  6656. central processing unit (CPU) registers. It can also change the values of
  6657. the registers. The display features of the Register command are explained
  6658. here. The modification features of the command are explained in Chapter 10%@BO:   6c3f1@%,
  6659. "Modifying Code or Data."%@NL@%
  6660. %@NL@%
  6661. %@CR:MCV68002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6662. %@NL@%
  6663. %@CR:MCV68003@%%@4@%To display the registers with the mouse, point to View on the menu bar,%@EH@%
  6664. press a mouse button and drag the highlight down to the Registers selection,
  6665. then release the button. The register window will appear on the right side
  6666. of the screen. If the register window is already on the screen, the same
  6667. command removes it.%@NL@%
  6668. %@NL@%
  6669. %@CR:MCV68004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6670. %@NL@%
  6671. %@CR:MCV68005@%%@4@%To display the registers using a keyboard command in window mode, press F2.%@EH@%
  6672. The register window will appear on the right side of the screen. If the
  6673. register window is already on the screen, the same command will remove it.%@NL@%
  6674. %@NL@%
  6675. %@CR:MCV68006@%%@4@%In sequential mode, the F2 key will display the current status of the%@EH@%
  6676. registers. (This produces the same effect as entering the Register dialog
  6677. command with no argument.)%@NL@%
  6678. %@NL@%
  6679. %@CR:MCV68007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6680. %@NL@%
  6681. %@CR:MCV68008@%%@4@%To display the registers in the dialog window (or sequentially in sequential%@EH@%
  6682. mode), enter a command line with the following syntax:%@NL@%
  6683. %@NL@%
  6684.      %@AB@%R%@AE@%%@NL@%
  6685. %@NL@%
  6686. %@CR:MCV68009@%%@4@%The current values of all registers and flags are displayed. The instruction%@EH@%
  6687. at the address pointed to by the current CS and IP register values is also
  6688. shown. (The Register command can also be given with arguments, but only when
  6689. used to modify registers, as explained in Chapter 10%@BO:   6c3f1@%, "Modifying Code or
  6690. Data.")%@NL@%
  6691. %@NL@%
  6692. %@CR:MCV6800A@%%@4@%If the display mode is source (%@AB@%S+%@AE@%) or mixed (%@AB@%S&%@AE@%) (see Section 9.1%@BO:   6576d@%, "Set%@EH@%
  6693. Mode Command," for more information), the current source line is also
  6694. displayed by the Register command. If an operand of the instruction contains
  6695. memory expressions or immediate data, the CodeView debugger will evaluate
  6696. operands and show the value to the right of the instruction. This value is
  6697. referred to as the "effective address," and is also displayed at the bottom
  6698. of the register window. If the CS and IP registers are currently at a
  6699. breakpoint location, the register display will indicate the breakpoint
  6700. number.%@NL@%
  6701. %@NL@%
  6702. %@CR:MCV6800B@%%@4@%In sequential mode, the Trace (%@AB@%T%@AE@%), Program Step (%@AB@%P%@AE@%), and Go (%@AB@%G%@AE@%) commands%@EH@%
  6703. show registers in the same format as the Register command.%@NL@%
  6704. %@NL@%
  6705. %@CR:MCV6800C@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6706. %@NL@%
  6707.      >S&%@NL@%
  6708.      mixed%@NL@%
  6709.      >R%@NL@%
  6710.      AX=0005  BX=299E  CX=0000  DX=0000  SP=3800  BP=380E  SI=0070  DI=40D1%@NL@%
  6711.      DS=5067  ES=5067  SS=5067  CS=4684  IP=014F  NV UP EI PL NZ NA PO NC%@NL@%
  6712.      35:                           VARIAN = (N*SUMXSQ-SUMX**2)/(N-1)%@NL@%
  6713.      4684:014F 8B5E06      MOV        BX,Word Ptr [BP+06]     ;BR1  SS:3814=299E%@NL@%
  6714.      >%@NL@%
  6715. %@NL@%
  6716. %@CR:MCV6800D@%%@4@%The example above displays all register and flag values, as well as the%@EH@%
  6717. instruction at the address pointed to by the CS and IP registers. Because
  6718. the mode has been set to mixed (%@AB@%S&%@AE@%), the current source line is also shown.
  6719. The example is from a FORTRAN program, but applies equally well to BASIC and
  6720. C programs.%@NL@%
  6721. %@NL@%
  6722.      >S-%@NL@%
  6723.      assembly%@NL@%
  6724.      >R%@NL@%
  6725.      AX=0005  BX=299E  CX=0000  DX=0000  SP=3800  BP=380E  SI=0070  DI=40D1%@NL@%
  6726.      DS=5067  ES=5067  SS=5067  CS=4684  IP=014F  NV UP EI PL NZ NA PO NC%@NL@%
  6727.      4684:014F 8B5E06       MOV     BX,Word Ptr [BP+06]     ;BR1  SS:3814=299E%@NL@%
  6728.      >%@NL@%
  6729. %@NL@%
  6730. %@CR:MCV6800E@%%@4@%In the example above, the display mode is set to assembly (%@AB@%S-%@AE@%), so no source%@EH@%
  6731. line is shown. Note the breakpoint number at the right of the last line
  6732. indicating that the current address is at Breakpoint 1.%@NL@%
  6733. %@NL@%
  6734. %@NL@%
  6735. %@CR:MCV69000@%%@2@%%@AB@%6.9  8087 Command%@AE@%%@EH@%%@NL@%
  6736. %@NL@%
  6737. %@CR:MCV69001@%%@4@%The 8087 command dumps the contents of the 8087 registers. If you do not%@EH@%
  6738. have an 8087, 80287, or 80387 coprocessor chip on your system, this command
  6739. will dump the contents of the pseudoregisters created by the compiler's
  6740. emulator routines. This command is useful only if you have an 8087, 80287,
  6741. or 80387 chip installed or if your executable file includes math routines
  6742. from a Microsoft 8087-emulator library.%@NL@%
  6743. %@NL@%
  6744. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6745. %@AI@%NOTE%@AE@%%@NL@%
  6746.    This section does not attempt to explain how the registers of the Intel%@NL@%
  6747.    8087 and 80287 processors are organized or how they work. In order to%@NL@%
  6748.    interpret the command output, you must learn about the chip from an Intel%@NL@%
  6749.    reference manual or other book on the subject. Since the Microsoft%@NL@%
  6750.    emulator routines mimic the behavior of the 8087 coprocessor, these%@NL@%
  6751.    references will apply to emulator routines as well as to the chips%@NL@%
  6752.    themselves.%@NL@%
  6753. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6754. %@NL@%
  6755. %@CR:MCV69002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6756. %@NL@%
  6757. %@CR:MCV69003@%%@4@%The 8087 command cannot be executed with the mouse.%@EH@%%@NL@%
  6758. %@NL@%
  6759. %@CR:MCV69004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6760. %@NL@%
  6761. %@CR:MCV69005@%%@4@%The 8087 command cannot be executed with a keyboard command.%@EH@%%@NL@%
  6762. %@NL@%
  6763. %@CR:MCV69006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6764. %@NL@%
  6765. %@CR:MCV69007@%%@4@%To display the status of the 8087 or 80287 chip (or floating-point emulator%@EH@%
  6766. routines) with a dialog command, enter a command line with the following
  6767. syntax:%@NL@%
  6768. %@NL@%
  6769.      %@AB@%7%@AE@%%@NL@%
  6770. %@NL@%
  6771. %@CR:MCV69008@%%@4@%The current status of the chip is displayed when you enter the command. In%@EH@%
  6772. window mode, the output is to the dialog window. If you do not have an 8087
  6773. or 80287 chip and are not linking to an emulator library, the debugger will
  6774. report the error message %@AS@%Floating point not %@AE@%%@AS@%loaded%@AE@%. CodeView reports this
  6775. message each time you give the %@AB@%7%@AE@% command, unless a floating-point
  6776. instruction has been executed.%@NL@%
  6777. %@NL@%
  6778. %@CR:MCV69009@%%@4@%The following example shows a display for a machine that actually has an%@EH@%
  6779. 8087 or 80287 chip. The example at the end of this section shows the same
  6780. display for a machine using an emulator library instead of an actual math
  6781. coprocessor.%@NL@%
  6782. %@NL@%
  6783. %@CR:MCV6900A@%%@4@%%@AB@%8087 Example%@AE@%%@EH@%%@NL@%
  6784. %@NL@%
  6785.      >7%@NL@%
  6786.      cControl 037F  (Projective closure, Round nearest, 64-bit precision)%@NL@%
  6787.              iem=0 pm=1 um=1 om=1 zm=1 dm=1 im=1%@NL@%
  6788.      cStatus  6004  cond=1000 top=4 pe=0 ue=0 oe=0 ze=1 de=0 ie=0%@NL@%
  6789.      Tag     A1FF  instruction=59380  operand=59360  opcode=D9EE%@NL@%
  6790.      Stack         Exp  Mantissa           Value%@NL@%
  6791.      cST(3) special 7FFF 8000000000000000 = + Infinity%@NL@%
  6792.      cST(2) special 7FFF 0101010101010101 = + Not a Number%@NL@%
  6793.      cST(1) valid   4000 C90FDAA22168C235 = +3.141592265110390E+000%@NL@%
  6794.      cST(0) zero    0000 0000000000000000 = +0.000000000000000E+000%@NL@%
  6795.      >%@NL@%
  6796. %@NL@%
  6797. %@CR:MCV6900B@%%@4@%In the example above, the first line of the dump shows the current closure%@EH@%
  6798. method, rounding method, and the precision. The number %@AS@%037F%@AE@% is the
  6799. hexadecimal value in the control register. The rest of the line interprets
  6800. the bits of the number. The closure method can be either projective (as in
  6801. the example) or affine. The rounding method can be either rounding to the
  6802. nearest even number (as in the example), rounding down, rounding up, or
  6803. using the chop method of rounding (truncating toward zero). The precision
  6804. may be 64 bits (as in the example), 53 bits, or 24 bits.%@NL@%
  6805. %@NL@%
  6806. %@CR:MCV6900C@%%@4@%The second line of the display indicates whether each exception mask bit is%@EH@%
  6807. set or cleared. The masks are interrupt-enable mask (%@AS@%iem%@AE@%), precision mask
  6808. (%@AS@%pm%@AE@%), underflow mask (%@AS@%um%@AE@%), overflow mask (%@AS@%om%@AE@%), zero-divide mask (%@AS@%zm%@AE@%),
  6809. denormalized-operand mask (%@AS@%dm%@AE@%), and invalid-operation mask (%@AS@%im%@AE@%).%@NL@%
  6810. %@NL@%
  6811. %@CR:MCV6900D@%%@4@%The third line of the display shows the hexadecimal value of the status%@EH@%
  6812. register ( %@AS@%6004%@AE@% in the example), and then interprets the bits of the
  6813. register. The condition code (%@AS@%cond%@AE@%) in the example is the binary number
  6814. %@AS@%1000%@AE@%. The top of the stack (%@AS@%top%@AE@%) is register 4 (shown in decimal). The
  6815. other bits shown are precision exception (%@AS@%pe%@AE@%), underflow exception (%@AS@%ue%@AE@%),
  6816. overflow exception (%@AS@%oe%@AE@%), zero-divide exception (%@AS@%ze%@AE@%), denormalized-operand
  6817. exception (%@AS@%de%@AE@%), and invalid-operation exception (%@AS@%ie%@AE@%).%@NL@%
  6818. %@NL@%
  6819. %@CR:MCV6900E@%%@4@%The fourth line of the display first shows the 20-bit hexadecimal address%@EH@%
  6820. value of the tag register (%@AS@%A1FF%@AE@% in the example). It then gives the
  6821. hexadecimal offsets of the instruction (%@AS@%59380%@AE@%), the operand (%@AS@%59360%@AE@%), and
  6822. the operation code, or opcode, (%@AS@%D9EE%@AE@%).%@NL@%
  6823. %@NL@%
  6824. %@CR:MCV6900F@%%@4@%The fifth line is a heading for the subsequent lines that contain the%@EH@%
  6825. contents of each 8087 or 80287 stack register. The registers in the example
  6826. contain four types of numbers that may be held in these registers. Starting
  6827. from the bottom, register 0 contains zero. Register 1 contains a valid real
  6828. number. Its exponent (in hexadecimal) is %@AS@%4000%@AE@% and its mantissa is%@AE@%
  6829. %@AS@%C90FDAA22168C235%@AE@%. The number is shown in scientific notation in the
  6830. rightmost column. Register 2 contains a value that cannot be interpreted as
  6831. a number, and register 3 contains infinity.%@NL@%
  6832. %@NL@%
  6833. %@CR:MCV6900G@%%@4@%The %@AS@%c%@AE@% that precedes %@AS@%Control%@AE@%, %@AS@%Status%@AE@%, and each of the %@AS@%ST%@AE@% listings indicates%@EH@%
  6834. that an actual math-coprocessor chip is in use. If emulator routines were in
  6835. use instead of a chip, each %@AS@%c%@AE@% prefix would be replaced by %@AS@%e%@AE@%, as in the next
  6836. example.%@NL@%
  6837. %@NL@%
  6838. %@CR:MCV6900H@%%@4@%%@AB@%Floating-Point Emulator Example%@AE@%%@EH@%%@NL@%
  6839. %@NL@%
  6840.      >7%@NL@%
  6841.      eControl 037F  (Projective closure, Round nearest, 64-bit precision)%@NL@%
  6842.                              iem=0 pm=1 um=1 om=1 zm=1 dm=1 im=1%@NL@%
  6843.      eStatus  6004  cond=1000 top=4 pe=0 ue=0 oe=0 ze=1 de=0 ie=0%@NL@%
  6844.      Tag     A1FF  instruction=59380  operand=59360  opcode=D9EE%@NL@%
  6845.      Stack         Exp  Mantissa           Value%@NL@%
  6846.      eST(3) special 7FFF 8000000000000000 = + Infinity%@NL@%
  6847.      eST(2) special 7FFF 0101010101010101 = + Not a Number%@NL@%
  6848.      eST(1) valid   4000 C90FDAA22168C235 = +3.141592265110390E+000%@NL@%
  6849.      eST(0) zero    0000 0000000000000000 = +0.000000000000000E+000%@NL@%
  6850.      >%@NL@%
  6851. %@NL@%
  6852. %@CR:MCV6900I@%%@4@%Note the %@AS@%e%@AE@% at the beginning of the first, third, sixth, seventh, eighth, and%@EH@%
  6853. ninth lines. Aside from this replacement of the %@AS@%c%@AE@% prefix by %@AS@%e%@AE@%, the emulator
  6854. display is the same as the corresponding display for an 8087 chip.%@NL@%
  6855. %@NL@%
  6856. %@NL@%
  6857. %@CR:MCV70000@%%@1@%%@AB@%Chapter 7  Managing Breakpoints%@AE@%%@EH@%%@NL@%
  6858. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6859. %@NL@%
  6860. %@CR:MCV70001@%%@4@%The CodeView debugger enables you to control program execution by setting%@EH@%
  6861. breakpoints. A breakpoint is an address that stops program execution each
  6862. time the address is encountered. By setting breakpoints at key addresses in
  6863. your program, you can "freeze" program execution and examine the status of
  6864. memory or expressions at that point.%@NL@%
  6865. %@NL@%
  6866. %@CR:MCV70002@%%@4@%The commands listed below control breakpoints:%@EH@%%@NL@%
  6867. %@NL@%
  6868. %@CR:MCV70003@%%@AB@%Command                     Action%@AE@%%@NL@%
  6869. %@NL@%
  6870. Breakpoint Set (%@AB@%BP%@AE@%)         Sets a breakpoint and, optionally, a pass count%@NL@%
  6871.                             and break commands%@NL@%
  6872. %@NL@%
  6873. Breakpoint Clear (%@AB@%BC%@AE@%)       Clears one or more breakpoints%@NL@%
  6874. %@NL@%
  6875. Breakpoint Disable (%@AB@%BD%@AE@%)     Disables one or more breakpoints%@NL@%
  6876. %@NL@%
  6877. Breakpoint Enable (%@AB@%BE%@AE@%)      Enables one or more breakpoints%@NL@%
  6878. %@NL@%
  6879. Breakpoint List (%@AB@%BL%@AE@%)        Lists all breakpoints%@NL@%
  6880. %@NL@%
  6881. %@CR:MCV70004@%%@4@%In addition to these commands, the Watchpoint (%@AB@%WP%@AE@%) and Tracepoint (%@AB@%TP%@AE@%)%@EH@%
  6882. commands can be used to set conditional breakpoints (see Chapter 8%@BO:   5c045@%,
  6883. "Managing Watch Statements," for information on these two commands).%@NL@%
  6884. %@NL@%
  6885. %@NL@%
  6886. %@CR:MCV71000@%%@2@%%@AB@%7.1  Breakpoint Set Command%@AE@%%@EH@%%@NL@%
  6887. %@NL@%
  6888. %@CR:MCV71001@%%@4@%The Breakpoint Set command (%@AB@%BP%@AE@%) creates a breakpoint at a specified address.%@EH@%
  6889. Any time a breakpoint is encountered during program execution, the program
  6890. halts and waits for a new command.%@NL@%
  6891. %@NL@%
  6892. %@CR:MCV71002@%%@4@%The CodeView debugger allows up to 20 breakpoints (0 through 19). Each new%@EH@%
  6893. breakpoint is assigned to the next available number. Breakpoints remain in
  6894. memory until you delete them or until you quit the debugger. They are not
  6895. canceled when you restart the program. Because breakpoints are not
  6896. automatically canceled, you are able to set up a complicated series of
  6897. breakpoints, then execute through the program several times without
  6898. resetting.%@NL@%
  6899. %@NL@%
  6900. %@CR:MCV71003@%%@4@%If you try to set a breakpoint at a comment line or other source line that%@EH@%
  6901. does not correspond to code, the CodeView debugger displays the following
  6902. message:%@NL@%
  6903. %@NL@%
  6904.      %@AS@%No code at this line number%@AE@%%@NL@%
  6905. %@NL@%
  6906. %@CR:MCV71004@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6907. %@NL@%
  6908. %@CR:MCV71005@%%@4@%To set a breakpoint with the mouse, point to the source line or instruction%@EH@%
  6909. where you want to set the breakpoint and then click the left button. The
  6910. line will be displayed in high-intensity text and will remain so until you
  6911. remove or disable the breakpoint.%@NL@%
  6912. %@NL@%
  6913. %@CR:MCV71006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6914. %@NL@%
  6915. %@CR:MCV71007@%%@4@%To set a breakpoint with a keyboard command in window mode, move the cursor%@EH@%
  6916. to the source line or instruction where you want to set a breakpoint. You
  6917. may have to press F6 to move the cursor to the display window. When the
  6918. cursor is on the appropriate source line, press F9. The line will be
  6919. displayed in high-intensity text and will remain so until you remove or
  6920. disable the breakpoint.%@NL@%
  6921. %@NL@%
  6922. %@CR:MCV71008@%%@4@%In sequential mode, the F9 key can be used to set a breakpoint at the%@EH@%
  6923. current location. You must use the dialog version of the command to set a
  6924. breakpoint at any other location.%@NL@%
  6925. %@NL@%
  6926. %@CR:MCV71009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6927. %@NL@%
  6928. %@CR:MCV7100A@%%@4@%To set a breakpoint using a dialog command, enter a command line with the%@EH@%
  6929. following syntax:%@NL@%
  6930. %@NL@%
  6931.      %@AB@%BP%@AE@% «%@AI@%address%@AE@% «%@AI@%passcount%@AE@%» «%@AB@%"%@AE@%%@AI@%commands%@AE@%%@AB@%"%@AE@%»»%@NL@%
  6932. %@NL@%
  6933. %@CR:MCV7100B@%%@4@%If no %@AI@%address%@AE@% is given, a breakpoint is created on the current source line%@EH@%
  6934. in source mode or on the current instruction in assembly mode. You can
  6935. specify the %@AI@%address%@AE@% in the %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% format or as a source line, a
  6936. routine name, or a label. If you give an offset address, the code segment is
  6937. assumed.%@NL@%
  6938. %@NL@%
  6939. %@CR:MCV7100C@%%@4@%The dialog version of the command is more powerful than the mouse or%@EH@%
  6940. keyboard version in that it allows you to give a %@AI@%passcount%@AE@% and a string of
  6941. %@AI@%commands%@AE@%.%@NL@%
  6942. %@NL@%
  6943. %@CR:MCV7100D@%%@4@%The %@AI@%passcount%@AE@% specifies the first time the breakpoint is to be taken. For%@EH@%
  6944. example, if the pass count is 5, the breakpoint will be ignored the first
  6945. four times it is encountered, and taken the fifth time. Thereafter, the
  6946. breakpoint is always taken.%@NL@%
  6947. %@NL@%
  6948. %@CR:MCV7100E@%%@4@%The %@AI@%commands%@AE@% are a list of dialog commands enclosed in quotation marks (%@AB@%" "%@AE@%)%@EH@%
  6949. and separated by semicolons (%@AB@%;%@AE@%). For example, if you specify the commands as
  6950. %@AS@%"? code;T"%@AE@%, the CodeView debugger will automatically display the value of
  6951. the variable %@AS@%code%@AE@% and then execute the Trace command each time the
  6952. breakpoint is encountered. The Trace and Display Expression commands are
  6953. described in Chapter 5%@BO:   3d63b@%, "Executing Code," and Chapter 6%@BO:   43f5c@%, "Examining Data and
  6954. Expressions," respectively.%@NL@%
  6955. %@NL@%
  6956. %@CR:MCV7100F@%%@4@%In window mode, a breakpoint entered with a dialog command has exactly the%@EH@%
  6957. same effect as one created with a window command. The source line or
  6958. instruction corresponding to the breakpoint location is shown in
  6959. high-intensity text.%@NL@%
  6960. %@NL@%
  6961. %@CR:MCV7100G@%%@4@%In sequential mode, information about the current instruction will be%@EH@%
  6962. displayed each time you execute to a breakpoint. The register values, the
  6963. current instruction, and the source line may be shown, depending on the
  6964. display mode. See Chapter 9%@BO:   6542b@%, "Examining Code," for more information about
  6965. display modes.%@NL@%
  6966. %@NL@%
  6967. %@CR:MCV7100H@%%@4@%When a breakpoint address is shown in the assembly-language format, the%@EH@%
  6968. breakpoint number will be shown as a comment to the right of the
  6969. instruction. This comment appears even if the breakpoint is disabled (but
  6970. not if it is deleted).%@NL@%
  6971. %@NL@%
  6972. %@CR:MCV7100I@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6973. %@NL@%
  6974.      >BP .19 10%@NL@%
  6975.      >%@NL@%
  6976. %@NL@%
  6977. %@CR:MCV7100J@%%@4@%The example above creates a breakpoint at line 19 of the current source file%@EH@%
  6978. (or if there is no executable statement at line 19, at the first executable
  6979. statement after line 19). The breakpoint is passed over nine times before
  6980. being taken on the tenth pass.%@NL@%
  6981. %@NL@%
  6982.      >BP STATS 10 "?COUNTER = COUNTER + 1;G"%@NL@%
  6983.      >%@NL@%
  6984. %@NL@%
  6985. %@CR:MCV7100K@%%@4@%The example above creates a breakpoint at the address of the routine %@AS@%STATS%@AE@%.%@EH@%
  6986. The breakpoint is passed over nine times before being taken on the 10th
  6987. pass. Each time execution stops for the breakpoint, the quoted commands are
  6988. executed. The Display Expression command increments %@AS@%COUNTER%@AE@%, then the Go
  6989. command restarts execution. If %@AS@%COUNTER%@AE@% is set to 0 when the breakpoint is
  6990. set, this has the effect of counting the number of times the breakpoint is
  6991. taken.%@NL@%
  6992. %@NL@%
  6993.      >S-       %@AI@%;* FORTRAN example - uses FORTRAN hexadecimal notation%@AE@%%@NL@%
  6994.      assembly%@NL@%
  6995.      >BP #0A94%@NL@%
  6996.      >G%@NL@%
  6997.      AX=0006  BX=304A  CX=000B  DX=465D  SP=3050  BP=3050  SI=00BB  DI=40D1%@NL@%
  6998.      DS=5064  ES=5064  SS=5064  CS=46A2  IP=0A94  NV UP EI PL NZ NA PENC%@NL@%
  6999.      46A2:0A94 7205         JB      __chkstk+13 (0A9B)      ;BR1%@NL@%
  7000.      >%@NL@%
  7001. %@NL@%
  7002. %@CR:MCV7100L@%%@4@%The example above first sets the mode to assembly and then creates a%@EH@%
  7003. breakpoint at the hexadecimal (offset) address %@AS@%#0A94%@AE@% in the default (CS)
  7004. segment. (The same address would be specified as %@AS@%0x0A94%@AE@% with the C
  7005. expression evaluator, and as %@AS@%&H0A9%@AE@% with the BASIC expression evaluator.) The
  7006. Go command (%@AB@%G%@AE@%) is then used to execute to the breakpoint. Note that in the
  7007. output to the Go command, the breakpoint number is shown as an
  7008. assembly-language comment (%@AS@%;BR1%@AE@%) to the right of the current instruction.
  7009. The Go command displays this output only in sequential mode; in window mode
  7010. no assembly-language information appears.%@NL@%
  7011. %@NL@%
  7012. %@NL@%
  7013. %@CR:MCV72000@%%@2@%%@AB@%7.2  Breakpoint Clear Command%@AE@%%@EH@%%@NL@%
  7014. %@NL@%
  7015. %@CR:MCV72001@%%@4@%The Breakpoint Clear command (%@AB@%BC%@AE@%) permanently removes one or more previously%@EH@%
  7016. set breakpoints.%@NL@%
  7017. %@NL@%
  7018. %@CR:MCV72002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7019. %@NL@%
  7020. %@CR:MCV72003@%%@4@%To clear a single breakpoint with the mouse, point to the breakpoint line or%@EH@%
  7021. instruction you want to clear. Breakpoint lines are shown in high-intensity
  7022. text. Press the left mouse button. The line will be shown in normal text to
  7023. indicate that the breakpoint has been removed.%@NL@%
  7024. %@NL@%
  7025. %@CR:MCV72004@%%@4@%To remove all breakpoints with the mouse, point to Run on the menu bar,%@EH@%
  7026. press a mouse button and drag the highlight down to the Clear Breakpoints
  7027. selection, then release the button.%@NL@%
  7028. %@NL@%
  7029. %@CR:MCV72005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7030. %@NL@%
  7031. %@CR:MCV72006@%%@4@%To clear a single breakpoint with a keyboard command, move the cursor to the%@EH@%
  7032. breakpoint line or instruction you want to clear. Breakpoint lines are shown
  7033. in high-intensity text. Press F9. The line will be shown in normal text to
  7034. indicate that the breakpoint has been removed.%@NL@%
  7035. %@NL@%
  7036. %@CR:MCV72007@%%@4@%To remove all breakpoints using a keyboard command, press ALT+R to open the%@EH@%
  7037. Run menu, and then press ALT+C to select Clear Breakpoints.%@NL@%
  7038. %@NL@%
  7039. %@CR:MCV72008@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7040. %@NL@%
  7041. %@CR:MCV72009@%%@4@%To clear breakpoints using a dialog command, enter a command line with the%@EH@%
  7042. following syntax:%@NL@%
  7043. %@NL@%
  7044.      %@AB@%BC%@AE@% %@AI@%list%@AE@%%@NL@%
  7045.      %@AB@%BC *%@NL@%
  7046. %@NL@%
  7047. %@CR:MCV7200A@%%@4@%If %@AI@%list%@AE@% is specified, the command removes the breakpoints named in the list.%@EH@%
  7048. The %@AI@%list%@AE@% can be any combination of integer values from 0 to 19. You can use
  7049. the Breakpoint List command (%@AB@%BL%@AE@%) if you need to see the numbers for each
  7050. existing breakpoint. If an asterisk (%@AB@%*%@AE@%) is given as the argument, all
  7051. breakpoints are removed.%@NL@%
  7052. %@NL@%
  7053. %@CR:MCV7200B@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7054. %@NL@%
  7055.      >BC 0 4 8%@NL@%
  7056.      >%@NL@%
  7057. %@NL@%
  7058. %@CR:MCV7200C@%%@4@%The example above removes breakpoints 0, 4, and 8.%@EH@%%@NL@%
  7059. %@NL@%
  7060.      >BC *%@NL@%
  7061.      >%@NL@%
  7062. %@NL@%
  7063. %@CR:MCV7200D@%%@4@%The example above removes all breakpoints.%@EH@%%@NL@%
  7064. %@NL@%
  7065. %@NL@%
  7066. %@CR:MCV73000@%%@2@%%@AB@%7.3  Breakpoint Disable Command%@AE@%%@EH@%%@NL@%
  7067. %@NL@%
  7068. %@CR:MCV73001@%%@4@%The Breakpoint Disable command (%@AB@%BD%@AE@%) temporarily disables one or more%@EH@%
  7069. existing breakpoints. The breakpoints are not deleted. They can be restored
  7070. at any time using the Breakpoint Enable command (%@AB@%BE%@AE@%).%@NL@%
  7071. %@NL@%
  7072. %@CR:MCV73002@%%@4@%When a breakpoint is disabled in window mode, it is shown in the display%@EH@%
  7073. window with normal text; when enabled, it is shown in high-intensity text.%@NL@%
  7074. %@NL@%
  7075. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7076. %@AI@%NOTE%@AE@%%@NL@%
  7077.    All disabled breakpoints are automatically enabled whenever you restart%@NL@%
  7078.    the program being debugged. The program can be restarted with the Start%@NL@%
  7079.    or Restart selection from the Run menu, or with the Restart dialog%@NL@%
  7080.    command%@AI@%(%@AE@%%@AI@%L%@AE@%%@AI@%). See%@AE@% Chapter 5%@BO:   3d63b@%, "Executing Code."%@NL@%
  7081. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7082. %@NL@%
  7083. %@CR:MCV73003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7084. %@NL@%
  7085. %@CR:MCV73004@%%@4@%The Breakpoint Disable command cannot be executed with the mouse.%@EH@%%@NL@%
  7086. %@NL@%
  7087. %@CR:MCV73005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7088. %@NL@%
  7089. %@CR:MCV73006@%%@4@%The Breakpoint Disable command cannot be executed with a keyboard command.%@EH@%%@NL@%
  7090. %@NL@%
  7091. %@CR:MCV73007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7092. %@NL@%
  7093. %@CR:MCV73008@%%@4@%To disable breakpoints with a dialog command, enter a command line with the%@EH@%
  7094. following syntax:%@NL@%
  7095. %@NL@%
  7096.      %@AB@%BD%@AE@% %@AI@%list%@AE@%%@NL@%
  7097.      %@AB@%BD *%@NL@%
  7098. %@NL@%
  7099. %@CR:MCV73009@%%@4@%If %@AI@%list%@AE@% is specified, the command disables the breakpoints named in the%@EH@%
  7100. list. The %@AI@%list%@AE@% can be any combination of integer values from 0 to 19. Use
  7101. the Breakpoint List command (%@AB@%BL%@AE@%) if you need to see the numbers for each
  7102. existing breakpoint. If an asterisk (%@AB@%*%@AE@%) is given as the argument, all
  7103. breakpoints are disabled.%@NL@%
  7104. %@NL@%
  7105. %@CR:MCV7300A@%%@4@%The window commands for setting and clearing breakpoints can also be used to%@EH@%
  7106. enable or clear disabled breakpoints.%@NL@%
  7107. %@NL@%
  7108. %@CR:MCV7300B@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7109. %@NL@%
  7110.      >BD 0 4 8%@NL@%
  7111.      >%@NL@%
  7112. %@NL@%
  7113. %@CR:MCV7300C@%%@4@%The example above disables breakpoints 0, 4, and 8.%@EH@%%@NL@%
  7114. %@NL@%
  7115.      >BD *%@NL@%
  7116.      >%@NL@%
  7117. %@NL@%
  7118. %@CR:MCV7300D@%%@4@%The example above disables all breakpoints.%@EH@%%@NL@%
  7119. %@NL@%
  7120. %@NL@%
  7121. %@CR:MCV74000@%%@2@%%@AB@%7.4  Breakpoint Enable Command%@AE@%%@EH@%%@NL@%
  7122. %@NL@%
  7123. %@CR:MCV74001@%%@4@%The Breakpoint Enable command (%@AB@%BE%@AE@%) enables breakpoints that have been%@EH@%
  7124. temporarily disabled with the Breakpoint Disable command.%@NL@%
  7125. %@NL@%
  7126. %@CR:MCV74002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7127. %@NL@%
  7128. %@CR:MCV74003@%%@4@%To enable a disabled breakpoint with the mouse, point to the source line or%@EH@%
  7129. instruction of the breakpoint, and click Left. The line will be displayed in
  7130. high-intensity text, and will remain so until you remove or disable the
  7131. breakpoint. This is the same as creating a new breakpoint at that location.%@NL@%
  7132. %@NL@%
  7133. %@CR:MCV74004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7134. %@NL@%
  7135. %@CR:MCV74005@%%@4@%To enable a disabled breakpoint using a keyboard command, move the cursor to%@EH@%
  7136. the source line or instruction of the breakpoint, and press F9. The line is
  7137. displayed in high-intensity text and remains so until you remove or disable
  7138. the breakpoint. This is the same as creating a new breakpoint at that
  7139. location.%@NL@%
  7140. %@NL@%
  7141. %@CR:MCV74006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7142. %@NL@%
  7143. %@CR:MCV74007@%%@4@%To enable breakpoints using a dialog command, enter a command line with the%@EH@%
  7144. following syntax:%@NL@%
  7145. %@NL@%
  7146.      %@AB@%BE%@AE@% %@AI@%list%@AE@%%@NL@%
  7147.      %@AB@%BE *%@NL@%
  7148. %@NL@%
  7149. %@CR:MCV74008@%%@4@%If %@AI@%list%@AE@% is specified, the command enables the breakpoints named in the list.%@EH@%
  7150. The %@AI@%list%@AE@% can be any combination of integer values from 0 to 19. Use the
  7151. Breakpoint List command (%@AB@%BL%@AE@%) if you need to see the numbers for each
  7152. existing breakpoint. If an asterisk (%@AB@%*%@AE@%) is given as the argument, all
  7153. breakpoints are enabled. The CodeView debugger ignores all or part of the
  7154. command if you try to enable a breakpoint that is not disabled.%@NL@%
  7155. %@NL@%
  7156. %@CR:MCV74009@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7157. %@NL@%
  7158.      >BE 0 4 8%@NL@%
  7159.      >%@NL@%
  7160. %@NL@%
  7161. %@CR:MCV7400A@%%@4@%The example above enables breakpoints 0, 4, and 8.%@EH@%%@NL@%
  7162. %@NL@%
  7163.      >BE*%@NL@%
  7164.      >%@NL@%
  7165. %@NL@%
  7166. %@CR:MCV7400B@%%@4@%The example above enables all disabled breakpoints.%@EH@%%@NL@%
  7167. %@NL@%
  7168. %@NL@%
  7169. %@CR:MCV75000@%%@2@%%@AB@%7.5  Breakpoint List Command%@AE@%%@EH@%%@NL@%
  7170. %@NL@%
  7171. %@CR:MCV75001@%%@4@%The Breakpoint List command (%@AB@%BL%@AE@%) lists current information about all%@EH@%
  7172. breakpoints.%@NL@%
  7173. %@NL@%
  7174. %@CR:MCV75002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7175. %@NL@%
  7176. %@CR:MCV75003@%%@4@%The Breakpoint List command cannot be executed with the mouse.%@EH@%%@NL@%
  7177. %@NL@%
  7178. %@CR:MCV75004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7179. %@NL@%
  7180. %@CR:MCV75005@%%@4@%The Breakpoint List command cannot be executed with a keyboard command.%@EH@%%@NL@%
  7181. %@NL@%
  7182. %@CR:MCV75006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7183. %@NL@%
  7184. %@CR:MCV75007@%%@4@%To list breakpoints with a dialog command, enter a command line with the%@EH@%
  7185. following syntax:%@NL@%
  7186. %@NL@%
  7187.      %@AB@%BL%@AE@%%@NL@%
  7188. %@NL@%
  7189. %@CR:MCV75008@%%@4@%The command displays the breakpoint number, the enabled status (%@AS@%e%@AE@% for%@EH@%
  7190. "enabled," %@AS@%d%@AE@% for "disabled"), the address, the routine, and the line number.%@NL@%
  7191. %@NL@%
  7192. %@CR:MCV75009@%%@4@%If the breakpoint does not fall on a line number, an offset is shown from%@EH@%
  7193. the nearest previous line number. The pass count and break commands are
  7194. shown if they have been set. If no breakpoints are currently defined,
  7195. nothing is displayed.%@NL@%
  7196. %@NL@%
  7197. %@CR:MCV7500A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  7198. %@NL@%
  7199.      >BL%@NL@%
  7200.      0 e 56C4:0105  _ARCTAN:10%@NL@%
  7201.      1 d 56C4:011E  _ARCTAN:19             (pass = 10) "T;T"%@NL@%
  7202.      2 e 56C4:00FD  _ARCTAN:9+6%@NL@%
  7203.      >%@NL@%
  7204. %@NL@%
  7205. %@CR:MCV7500B@%%@4@%In the example above, breakpoint 0 is enabled at address %@AS@%56C4:0105%@AE@%. This%@EH@%
  7206. address is in routine %@AS@%ARCTAN%@AE@% and is at line %@AS@%10%@AE@% of the current source file.
  7207. No pass count or break commands have been set.%@NL@%
  7208. %@NL@%
  7209. %@CR:MCV7500C@%%@4@%Breakpoint 1 is currently disabled, as indicated by the %@AS@%d%@AE@% after the%@EH@%
  7210. breakpoint number. It also has a pass count of 10, meaning that the
  7211. breakpoint will not be taken until the 10th time it is encountered. The
  7212. command string at the end of the line indicates that each time the
  7213. breakpoint is taken, the Trace command will automatically be executed twice.%@NL@%
  7214. %@NL@%
  7215. %@CR:MCV7500D@%%@4@%The line number for breakpoint 2 has an offset. The address is six bytes%@EH@%
  7216. beyond the address for line 9 in the current source file. Therefore, the
  7217. breakpoint was probably set in assembly mode, since it would be difficult to
  7218. set a breakpoint anywhere except on a source line in source mode.%@NL@%
  7219. %@NL@%
  7220. %@NL@%
  7221. %@CR:MCV80000@%%@1@%%@AB@%Chapter 8  Managing Watch Statements%@AE@%%@EH@%%@NL@%
  7222. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7223. %@NL@%
  7224. %@CR:MCV80001@%%@4@%Watch Statement commands are among the Microsoft CodeView debugger's most%@EH@%
  7225. powerful features. They enable you to set, delete, and list watch
  7226. statements. Watch statements describe expressions or areas of memory to
  7227. watch. Some watch statements specify conditional breakpoints, which depend
  7228. upon the value of the expression or memory area.%@NL@%
  7229. %@NL@%
  7230. %@CR:MCV80002@%%@4@%Syntax for each CodeView command is always the same, regardless of the%@EH@%
  7231. expression evaluator; however, the method for specifying an %@AI@%argument%@AE@% may
  7232. vary with the language. Therefore, each example in this chapter is repeated
  7233. with C, FORTRAN, and BASIC arguments. The sample screens throughout the text
  7234. that present these examples feature BASIC. At the end of this chapter are C
  7235. and FORTRAN sample screens that incorporate all the previous examples
  7236. (except for Watch Delete and Watch List).%@NL@%
  7237. %@NL@%
  7238. %@NL@%
  7239. %@CR:MCV81000@%%@2@%%@AB@%8.1  Watch Statement Commands%@AE@%%@EH@%%@NL@%
  7240. %@NL@%
  7241. %@CR:MCV81001@%%@4@%The Watch Statement commands are summarized below:%@EH@%%@NL@%
  7242. %@NL@%
  7243. %@CR:MCV81002@%%@AB@%Command                     Action%@AE@%%@NL@%
  7244. %@NL@%
  7245. Watch (%@AB@%W%@AE@%)                   Sets an expression or range of memory to be%@NL@%
  7246.                             watched%@NL@%
  7247. %@NL@%
  7248. Watchpoint (%@AB@%WP%@AE@%)             Sets a conditional breakpoint that will be taken%@NL@%
  7249.                             when the expression becomes nonzero (true)%@NL@%
  7250. %@NL@%
  7251. Tracepoint (%@AB@%TP%@AE@%)             Sets a conditional breakpoint that will be taken%@NL@%
  7252.                             when a given expression or range of memory%@NL@%
  7253.                             changes%@NL@%
  7254. %@NL@%
  7255. Watch Delete (%@AB@%Y%@AE@%)            Deletes one or more watch statements%@NL@%
  7256. %@NL@%
  7257. Watch List (%@AB@%W%@AE@%)              Lists current watch statements%@NL@%
  7258. %@NL@%
  7259. %@CR:MCV81003@%%@4@%Watch statements, like breakpoints, remain in memory until you specifically%@EH@%
  7260. remove them or quit the CodeView debugger. They are not canceled when you
  7261. restart the program being debugged. Therefore, you can set a complicated
  7262. series of watch statements once and then execute through the program several
  7263. times without resetting.%@NL@%
  7264. %@NL@%
  7265. %@CR:MCV81004@%%@4@%In window mode, Watch Statement commands can be entered either in the dialog%@EH@%
  7266. window or with menu selections. Current watch statements are shown in a
  7267. watch window that appears between the menu bar and the source window.%@NL@%
  7268. %@NL@%
  7269. %@CR:MCV81005@%%@4@%In sequential mode, the Watch, Tracepoint, and Watchpoint commands can be%@EH@%
  7270. used, but since there is no watch window, you cannot see the watch
  7271. statements and their values. You must use the Watch List command to examine
  7272. the current watch statements.%@NL@%
  7273. %@NL@%
  7274. %@CR:MCV81006@%%@4@%To set a watch statement containing a local variable, you must be in the%@EH@%
  7275. function where the variable is defined. If the current line is not in the
  7276. function, the CodeView debugger displays the message %@AS@%UNKNOWN SYMBOL%@AE@%. When
  7277. you exit from a function containing a local variable referenced in a watch
  7278. statement, the value of the statement is displayed as %@AS@%UNKNOWN%@AE@% %@AS@%SYMBOL%@AE@%. When
  7279. you reenter the function, the local variable will again have a value. With
  7280. the C and FORTRAN expression evaluators, you can avoid this limitation by
  7281. using the period operator to specify both the function and the variable. For
  7282. example, enter %@AS@%main.x%@AE@% instead of just %@AS@%x%@AE@%.%@NL@%
  7283. %@NL@%
  7284. %@NL@%
  7285. %@CR:MCV82000@%%@2@%%@AB@%8.2  Setting Watch-Expression and Watch-Memory Statements%@AE@%%@EH@%%@NL@%
  7286. %@NL@%
  7287. %@CR:MCV82001@%%@4@%The Watch command is used to set a watch statement that specifies an%@EH@%
  7288. expression (watch-expression statement) or a range of addresses in memory
  7289. (watch-memory statement). The value or values specified by this watch
  7290. statement are shown in the watch window. The watch window is updated to show
  7291. new values each time the value of the watch statement changes during program
  7292. execution. Since the watch window does not exist in sequential mode, you
  7293. must use the Watch List command to examine the values of watch statements.%@NL@%
  7294. %@NL@%
  7295. %@CR:MCV82002@%%@4@%When setting a watch expression, you can specify the format in which the%@EH@%
  7296. value will be displayed. Type the expression followed by a comma and a
  7297. format specifier. If you do not give a format specifier, the CodeView
  7298. debugger displays the value in a default format. See Section 6.1%@BO:   44676@%, "Display
  7299. Expression Command," for more information about type specifiers and the
  7300. default format.%@NL@%
  7301. %@NL@%
  7302. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7303. %@AI@%NOTE%@AE@%%@NL@%
  7304.    If your program directly accesses absolute addresses used by IBM or%@NL@%
  7305.    IBM-compatible computers, you may sometimes get unexpected results with%@NL@%
  7306.    the Display Expression and Dump commands. However, the Watch command will%@NL@%
  7307.    usually show the correct values. This problem can arise if the CodeView%@NL@%
  7308.    debugger and your program begin to use the same memory location.%@NL@%
  7309.    The problem often occurs when a program reads data directly from the%@NL@%
  7310.    screen buffer of the display adapter. If you have an array called %@AS@%screen%@AE@%%@NL@%
  7311.    that is initialized to the starting address of the screen buffer, the%@NL@%
  7312.    command %@AS@%DB screen L 16%@AE@% will display data from the CodeView display rather%@NL@%
  7313.    than from the display of the program you are debugging. The command %@AS@%WB%@AE@%%@NL@%
  7314.    %@AS@%screen L 16%@AE@% will display data from the program's display (provided screen%@NL@%
  7315.    swapping or screen flipping was specified at start-up). The Watch command%@NL@%
  7316.    behaves differently from the Dump command because watch-statement values%@NL@%
  7317.    are updated during program execution, and any values read from the screen%@NL@%
  7318.    buffer will be taken from the output screen rather than from the%@NL@%
  7319.    debugging screen.%@NL@%
  7320. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7321. %@NL@%
  7322. %@CR:MCV82003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7323. %@NL@%
  7324. %@CR:MCV82004@%%@4@%To set a watch-expression statement using the mouse, point to Watch on the%@EH@%
  7325. menu bar, press a mouse button and drag the highlight down to the Add Watch
  7326. selection, and then release the button. A dialog box appears, asking for the
  7327. expression to be watched. Type the expression and press the ENTER key or a
  7328. mouse button.%@NL@%
  7329. %@NL@%
  7330. %@CR:MCV82005@%%@4@%You cannot use the mouse version of the command to specify a range of memory%@EH@%
  7331. to be watched, as you can with the dialog version.%@NL@%
  7332. %@NL@%
  7333. %@CR:MCV82006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7334. %@NL@%
  7335. %@CR:MCV82007@%%@4@%To set a watch-expression statement with a keyboard command, press ALT+W to%@EH@%
  7336. open the Watch menu, and then type %@AB@%A%@AE@% (uppercase or lowercase) to select Add
  7337. Watch. You can also select the Add Watch command directly by pressing
  7338. CONTROL+W. A dialog box appears, asking for the expression to be watched.
  7339. Type the expression and press the ENTER key.%@NL@%
  7340. %@NL@%
  7341. %@CR:MCV82008@%%@4@%You cannot use the keyboard version of the command to specify a range of%@EH@%
  7342. memory to be watched, as you can with the dialog version.%@NL@%
  7343. %@NL@%
  7344. %@CR:MCV82009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7345. %@NL@%
  7346. %@CR:MCV8200A@%%@4@%To set a watch-expression statement with a dialog command, enter a command%@EH@%
  7347. line with the following syntax:%@NL@%
  7348. %@NL@%
  7349.      %@AB@%W?%@AE@% %@AI@%expression%@AE@%«%@AB@%,%@AE@%%@AI@%format%@AE@%»%@NL@%
  7350. %@NL@%
  7351. %@CR:MCV8200B@%%@4@%To set a watch-memory command with a dialog command, enter a command line%@EH@%
  7352. with the following syntax:%@NL@%
  7353. %@NL@%
  7354.      %@AB@%W%@AE@%«%@AI@%type%@AE@%» %@AI@%range%@AE@%%@NL@%
  7355. %@NL@%
  7356. %@CR:MCV8200C@%%@4@%An %@AI@%expression%@AE@% used with the Watch command can be either a simple variable or%@EH@%
  7357. a complex expression using several variables and operators. The expression
  7358. should be no longer than the width of the watch window. The characters
  7359. permitted for %@AI@%format%@AE@% correspond to format arguments used in a C %@AB@%printf%@AE@%
  7360. function call. See Section 6.1%@BO:   44676@%, "Display Expression Command," for more
  7361. information on format arguments.%@NL@%
  7362. %@NL@%
  7363. %@CR:MCV8200D@%%@4@%When watching a memory location, %@AI@%type%@AE@% is a one-letter size specifier from%@EH@%
  7364. the following list:%@NL@%
  7365. %@NL@%
  7366. %@CR:MCV8200E@%%@AB@%Specifier                   Size%@AE@%     %@NL@%
  7367. %@NL@%
  7368. None                        Default type%@NL@%
  7369. %@NL@%
  7370. %@AB@%B%@AE@%                           Byte%@NL@%
  7371. %@NL@%
  7372. %@AB@%A%@AE@%                           ASCII%@NL@%
  7373. %@NL@%
  7374. %@AB@%I%@AE@%                           Integer (signed decimal word)%@NL@%
  7375. %@NL@%
  7376. %@AB@%U%@AE@%                           Unsigned (unsigned decimal word)%@NL@%
  7377. %@NL@%
  7378. %@AB@%WP%@AE@%                          Word%@NL@%
  7379. %@NL@%
  7380. %@AB@%D%@AE@%                           Double word%@NL@%
  7381. %@NL@%
  7382. %@AB@%S%@AE@%                           Short real%@NL@%
  7383. %@NL@%
  7384. %@AB@%L%@AE@%                           Long real%@NL@%
  7385. %@NL@%
  7386. %@AB@%T%@AE@%                           10-byte real%@NL@%
  7387. %@NL@%
  7388. %@CR:MCV8200F@%%@4@%If no type size is specified, the default type used is the last type used by%@EH@%
  7389. a Dump, Enter, Watch Memory, or Tracepoint Memory command. If none of these
  7390. commands has been used during the session, the default type is byte.%@NL@%
  7391. %@NL@%
  7392. %@CR:MCV8200G@%%@4@%The data will be displayed in a format similar to that used by the Dump%@EH@%
  7393. commands (see Section 6.1%@BO:   44676@%, "Display Expression Command," for more
  7394. information on format arguments). The %@AI@%range%@AE@% can be any length, but only one
  7395. line of data will be displayed in the watch window. If you do not specify an
  7396. ending address for the range, the default range is one object.%@NL@%
  7397. %@NL@%
  7398. %@CR:MCV8200H@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7399. %@NL@%
  7400. %@CR:MCV8200I@%%@4@%The following three examples display watch statements in the watch window.%@EH@%%@NL@%
  7401. %@NL@%
  7402.      W? n%@NL@%
  7403. %@NL@%
  7404. %@CR:MCV8200J@%%@4@%The example above displays the current value of the variable %@AS@%n%@AE@%.%@EH@%%@NL@%
  7405. %@NL@%
  7406.      W? higher * 100%@NL@%
  7407. %@NL@%
  7408. %@CR:MCV8200K@%%@4@%The example above displays the value of the expression %@AS@%higher%@AE@%%@AS@%* 100%@AE@%.%@EH@%%@NL@%
  7409. %@NL@%
  7410.      WL chance%@NL@%
  7411. %@NL@%
  7412. %@CR:MCV8200L@%%@4@%The example above displays the value of %@AS@%chance%@AE@%,  a double-precision%@EH@%
  7413. floating-point variable. Exactly how %@AS@%chance%@AE@% is stored in memory is shown
  7414. first. (The command %@AS@%W? chance%@AE@% would display the value of %@AS@%chance%@AE@% but not any
  7415. actual bytes of memory.)%@NL@%
  7416. %@NL@%
  7417. %@CR:MCV8200M@%%@4@%These commands, entered while debugging a BASIC program, produce the watch%@EH@%
  7418. window in Figure 8.1%@FN@%
  7419. Figure 8.1 is found on page 145 of the printed version.%@EF@%. Corresponding C and FORTRAN examples are included with
  7420. other commands in language-specific sections at the end of the chapter.%@AB@%%@NL@%
  7421. %@NL@%
  7422. %@NL@%
  7423. %@CR:MCV83000@%%@2@%%@AB@%8.3  Setting Watchpoints%@AE@%%@EH@%%@NL@%
  7424. %@NL@%
  7425. %@CR:MCV83001@%%@4@%The Watchpoint command is used to set a conditional breakpoint called a%@EH@%
  7426. watchpoint. A watchpoint breaks program execution when the expression
  7427. described by its watch statement becomes true. You can think of watchpoints
  7428. as "break when" points, since the break occurs when the specified expression
  7429. becomes true (nonzero).%@NL@%
  7430. %@NL@%
  7431. %@CR:MCV83002@%%@4@%A watch statement created by the Watchpoint command describes the expression%@EH@%
  7432. that will be watched and compared to 0. The statement remains in memory
  7433. until you delete it or quit the CodeView debugger. Any valid CodeView
  7434. expression can be used as the watchpoint expression as long as the
  7435. expression is not wider than the watch window.%@NL@%
  7436. %@NL@%
  7437. %@CR:MCV83003@%%@4@%In window mode, watchpoint statements and their values are displayed in%@EH@%
  7438. high-intensity text in the watch window. In sequential mode, there is no
  7439. watch window, so the values of watchpoint statements can only be displayed
  7440. with the Watch List command (see Section 8.6%@BO:   63917@% "Listing Watchpoints and
  7441. Tracepoints," for more information).%@NL@%
  7442. %@NL@%
  7443. %@CR:MCV83004@%%@4@%Although watchpoints can be any valid CodeView expression, the command works%@EH@%
  7444. best with expressions that use the relational operators (such as %@AB@%<%@AE@% and %@AB@%>%@AE@% for
  7445. C and BASIC, or %@AB@%.LT.%@AE@% and %@AB@%.GT.%@AE@% for FORTRAN). Relational expressions always
  7446. evaluate to false (zero) or true (nonzero). Care must be taken with other
  7447. kinds of expressions when they are used as watchpoints, because the
  7448. watchpoints will break execution whenever they do not equal precisely zero.
  7449. For example, your program might use a loop variable  I, which ranges from 1
  7450. to 100. If you entered %@AS@%I%@AE@% as a watchpoint, then it would always suspend
  7451. program execution, since %@AS@%I%@AE@% is never equal to 0. However, the relational
  7452. expression %@AS@%I>90%@AE@% (or %@AS@%I.GT.90%@AE@%) would not suspend program execution until %@AS@%I%@AE@%
  7453. exceeded 90.%@NL@%
  7454. %@NL@%
  7455. %@CR:MCV83005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7456. %@NL@%
  7457. %@CR:MCV83006@%%@4@%To set a watchpoint statement with the mouse, point to Watch on the menu%@EH@%
  7458. bar, press a mouse button and drag the highlight down to the Watchpoint
  7459. selection, and then release the button. A dialog box appears, asking for the
  7460. expression to be watched. Type the expression and press the ENTER key or a
  7461. mouse button.%@NL@%
  7462. %@NL@%
  7463. %@CR:MCV83007@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7464. %@NL@%
  7465. %@CR:MCV83008@%%@4@%To execute the Watchpoint command with a keyboard command, press ALT+W to%@EH@%
  7466. open the Watch menu, and then press ALT+W to select Watchpoint. A dialog box
  7467. appears, asking for the expression to be watched. Type the expression and
  7468. press the ENTER key.%@NL@%
  7469. %@NL@%
  7470. %@CR:MCV83009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7471. %@NL@%
  7472. %@CR:MCV8300A@%%@4@%To set a watchpoint using a dialog command, enter a command line with the%@EH@%
  7473. following syntax:%@NL@%
  7474. %@NL@%
  7475.      %@AB@%WP?%@AE@% %@AI@%expression%@AE@%«%@AB@%,%@AE@%%@AI@%format%@AE@%»%@NL@%
  7476. %@NL@%
  7477. %@CR:MCV8300B@%%@4@%The %@AI@%expression%@AE@% can be any valid CodeView expression (usually a relational%@EH@%
  7478. expression). You can enter a format specifier, but there is little reason to
  7479. do so, since the expression value is normally either 1 or 0.%@NL@%
  7480. %@NL@%
  7481. %@CR:MCV8300C@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7482. %@NL@%
  7483. %@CR:MCV8300D@%%@4@%The following dialog commands display two watch statements (watchpoints) in%@EH@%
  7484. the watch window:%@NL@%
  7485. %@NL@%
  7486.      WP? higher > chance      %@AI@%;* BASIC/C%@AE@%%@NL@%
  7487.      WP? higher .gt. chance   %@AI@%;* FORTRAN example%@AE@%%@NL@%
  7488. %@NL@%
  7489. %@CR:MCV8300E@%%@4@%The examples above instruct the CodeView debugger to break execution when%@EH@%
  7490. the variable %@AS@%higher%@AE@% is greater than the variable %@AS@%chance%@AE@%. (Note that BASIC
  7491. and C happen to use the same syntax in this case, but FORTRAN uses its own.)
  7492. After setting this watchpoint, you could use the Go command to execute until
  7493. the condition becomes true.%@NL@%
  7494. %@NL@%
  7495.      WP? n=7 or n=11           %@AI@%;* BASIC example%@AE@%%@NL@%
  7496.      WP? n==7 || n==11         %@AI@%;* C example%@AE@%%@NL@%
  7497.      WP? n.eq.7 .or. n.eq.11   %@AI@%;* FORTRAN example%@AE@%%@NL@%
  7498. %@NL@%
  7499. %@CR:MCV8300F@%%@4@%The examples above instruct the CodeView debugger to break execution when%@EH@%
  7500. the variable %@AS@%n%@AE@% is equal to 7 or 11.%@NL@%
  7501. %@NL@%
  7502. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7503. %@AI@%NOTE%@AE@%%@NL@%
  7504.    BASIC and C will each display a numerical result in response to a Boolean%@NL@%
  7505.    expression (0 being equivalent to false, nonzero to true). However, the%@NL@%
  7506.    corresponding FORTRAN condition will be displayed with either .TRUE. or%@NL@%
  7507.    .FALSE. in the watch window.%@NL@%
  7508. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7509. %@NL@%
  7510. %@CR:MCV8300G@%%@4@%These commands, entered while debugging a BASIC program, produce the watch%@EH@%
  7511. window shown in Figure 8.2%@FN@%
  7512. Figure 8.2 is found on page 148 of the printed version.%@EF@%. Corresponding C and FORTRAN examples are
  7513. included with other commands, at the end of the chapter.%@NL@%
  7514. %@NL@%
  7515. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7516. %@AI@%NOTE%@AE@%%@NL@%
  7517.    Setting watchpoints significantly slows execution of the program being%@NL@%
  7518.    debugged. The CodeView debugger checks if the expression is true each%@NL@%
  7519.    time a source line is executed in source mode, or each time an%@NL@%
  7520.    instruction is executed in assembly mode. Be careful when setting%@NL@%
  7521.    watchpoints near large or nested loops. A loop that executes almost%@NL@%
  7522.    instantly when run from MS-DOS can take many minutes if executed from%@NL@%
  7523.    within the debugger with several watchpoints set.%@NL@%
  7524. %@NL@%
  7525.    Tracepoints do not slow CodeView execution as much as watchpoints, so you%@NL@%
  7526.    should use tracepoints when possible. For example, although you can set a%@NL@%
  7527.    watchpoint on a Boolean variable (%@AS@%WP? moving%@AE@%), a trace-point on the same%@NL@%
  7528.    variable (%@AS@%TP?moving%@AE@%) has essentially the same effect and does not slow%@NL@%
  7529.    execution as much.%@NL@%
  7530. %@NL@%
  7531.    If you enter a seemingly endless loop, press CONTROL+BREAK or CONTROL+C%@NL@%
  7532.    to exit. You will soon learn the size of loop you can safely execute when%@NL@%
  7533.    watchpoints are set.%@NL@%
  7534. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7535. %@NL@%
  7536. %@NL@%
  7537. %@CR:MCV84000@%%@2@%%@AB@%8.4  Setting Tracepoints%@AE@%%@EH@%%@NL@%
  7538. %@NL@%
  7539. %@CR:MCV84001@%%@4@%The Tracepoint command is used to set a conditional breakpoint called a%@EH@%
  7540. tracepoint. A tracepoint breaks program execution when the value of a
  7541. specified expression or range of memory changes.%@NL@%
  7542. %@NL@%
  7543. %@CR:MCV84002@%%@4@%The watch statement created by the Tracepoint command describes the%@EH@%
  7544. expression or memory range to be watched and tested for change. The
  7545. statement remains in memory until you delete it or quit the CodeView
  7546. debugger.%@NL@%
  7547. %@NL@%
  7548. %@CR:MCV84003@%%@4@%In window mode, tracepoint statements and their values are shown in%@EH@%
  7549. high-intensity text in the watch window. In sequential mode, there is no
  7550. watch window, so the values of tracepoint statements can only be displayed
  7551. with the Watch List command (see Section 8.5%@BO:   62b98@%, "Listing Watchpoints and
  7552. Tracepoints," for more information).%@NL@%
  7553. %@NL@%
  7554. %@CR:MCV84004@%%@4@%An expression used with the Tracepoint command must evaluate to an "lvalue."%@EH@%
  7555. In other words, the expression must refer to an area of memory rather than a
  7556. constant. Furthermore, the area of memory must be not more than 128 bytes in
  7557. size. For example, %@AS@%i==10%@AE@% (which is similar to %@AS@%I.EQ.10%@AE@% in FORTRAN and %@AS@%I=10%@AE@%
  7558. in BASIC) would be invalid because it is either 1 (true) or 0 (false) rather
  7559. than a value stored in memory. The expression %@AS@%sym1+sym2%@AE@% is invalid because
  7560. it is the calculated sum of the value of two memory locations. The
  7561. expression %@AS@%buffer%@AE@% would be invalid if %@AS@%buffer%@AE@% is an array of 130 bytes, but
  7562. valid if the array is 120 bytes. (However, using array names this way is not
  7563. valid with BASIC modules because BASIC uses array descriptors.) Note that if
  7564. %@AS@%buffer%@AE@% is declared as an array of 64 bytes, then the Tracepoint command
  7565. given with the expression %@AS@%buffer%@AE@% checks all 64 bytes of the array. The same
  7566. command given with the C expression %@AS@%buffer[32]%@AE@%, or %@AS@%BUFFER(33)%@AE@% in FORTRAN or
  7567. BASIC, means that only one byte (the 33rd) will be checked. (Note that C and
  7568. FORTRAN index the same element differently.)%@NL@%
  7569. %@NL@%
  7570. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7571. %@AI@%NOTE%@AE@%%@NL@%
  7572.    The following is relevant only to C programs.%@NL@%
  7573. %@NL@%
  7574.    Register variables are not considered values. Therefore, if %@AS@%i%@AE@% is declared%@NL@%
  7575.    as %@AS@%register int i%@AE@%, the command %@AS@%TP?%@AE@%%@AS@%i%@AE@% is invalid. However, you can still%@NL@%
  7576.    check for changes in the value of %@AS@%i%@AE@%. Use the Examine Symbols command to%@NL@%
  7577.    learn which register contains the value of %@AS@%i%@AE@% .%@NL@%
  7578. %@NL@%
  7579.    Then learn the value of %@AS@%i%@AE@%. Finally, set up a watchpoint to test the%@NL@%
  7580.    value. For example, use the following sequence of commands:%@NL@%
  7581. %@NL@%
  7582.      >X? i%@NL@%
  7583.      3A79:0264 int              div()%@NL@%
  7584.                  SI        int              i%@NL@%
  7585.      >?i%@NL@%
  7586.      10%@NL@%
  7587.      >WP? @SI%@AI@%!=10%@AE@%%@NL@%
  7588.      >%@NL@%
  7589. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7590. %@NL@%
  7591. %@CR:MCV84005@%%@4@%When setting a tracepoint expression, you can specify the format in which%@EH@%
  7592. the value will be displayed. Type the expression followed by a comma and a
  7593. type specifier. If you do not give a type specifier, the CodeView debugger
  7594. displays the value in a default format. See Section 6.1%@BO:   44676@%,"Display Expression
  7595. Command," for more information about type specifiers and the default format.%@NL@%
  7596. %@NL@%
  7597. %@CR:MCV84006@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7598. %@NL@%
  7599. %@CR:MCV84007@%%@4@%To set a tracepoint-expression statement with the mouse, point to Watch on%@EH@%
  7600. the menu bar, press a mouse button and drag the highlight down to the
  7601. Tracepoint selection, and then release the button. A dialog box appears,
  7602. asking for the expression to be watched. Type the expression, and press the
  7603. ENTER key or a mouse button.%@NL@%
  7604. %@NL@%
  7605. %@CR:MCV84008@%%@4@%You cannot specify a range of memory to be watched with the mouse version of%@EH@%
  7606. the command, as you can with the dialog version.%@NL@%
  7607. %@NL@%
  7608. %@CR:MCV84009@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7609. %@NL@%
  7610. %@CR:MCV8400A@%%@4@%To set a tracepoint-expression statement with a keyboard command, press%@EH@%
  7611. ALT+W to open the Watch menu, and then press ALT+T to select Tracepoint. A
  7612. dialog box appears, asking for the expression to be watched. Type the
  7613. expression and press the ENTER key.%@NL@%
  7614. %@NL@%
  7615. %@CR:MCV8400B@%%@4@%You cannot use the keyboard version of the command to specify a range of%@EH@%
  7616. memory to be watched, as you can with the dialog version.%@NL@%
  7617. %@NL@%
  7618. %@CR:MCV8400C@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7619. %@NL@%
  7620. %@CR:MCV8400D@%%@4@%To set a tracepoint with a dialog command, enter a command line with one of%@EH@%
  7621. the following forms of syntax:%@NL@%
  7622. %@NL@%
  7623.      %@AB@%TP?%@AE@% %@AI@%expression%@AE@%,«%@AI@%format%@AE@%»%@NL@%
  7624.      %@AB@%TP%@AE@%«%@AI@%type%@AE@%» %@AI@%range%@AE@%%@NL@%
  7625. %@NL@%
  7626. %@CR:MCV8400E@%%@4@%The first syntax line above sets a tracepoint expression; the second line%@EH@%
  7627. sets a tracepoint memory.%@NL@%
  7628. %@NL@%
  7629. %@CR:MCV8400F@%%@4@%An %@AI@%expression%@AE@% used with the Tracepoint command can be either a simple%@EH@%
  7630. variable or a complex expression using several variables and operators. The
  7631. expression should not be longer than the width of the watch window. You can
  7632. specify %@AI@%format%@AE@% using a C %@AB@%printf%@AE@% type specifier if you do not want the value
  7633. to be displayed in the default format (decimal for integers or floating
  7634. point for real numbers). See Section 6.1%@BO:   44676@%, "Display Expression Command," for
  7635. more information on format arguments.%@NL@%
  7636. %@NL@%
  7637. %@CR:MCV8400G@%%@4@%In the memory-tracepoint form, %@AI@%range%@AE@% must be a valid address range and %@AI@%type%@AE@%%@EH@%
  7638. must be a one-letter memory-size specifier. If you specify only the start of
  7639. the range, the CodeView debugger displays one object as the default.%@NL@%
  7640. %@NL@%
  7641. %@CR:MCV8400H@%%@4@%Although no more than one line of data will be displayed in the watch%@EH@%
  7642. window, the range to be checked for change can be any size up to 128 bytes.%@NL@%
  7643. %@NL@%
  7644. %@CR:MCV8400I@%%@4@%The data will be displayed in the format used by the Dump commands (see%@EH@%
  7645. Section 6.1%@BO:   44676@%, "Display Expression Command," for more information on format
  7646. arguments). The valid memory-size specifiers are listed below:%@NL@%
  7647. %@NL@%
  7648. %@CR:MCV8400J@%%@AB@%Specifier                   Size%@AE@%     %@NL@%
  7649. %@NL@%
  7650. None                        Default type%@NL@%
  7651. %@NL@%
  7652. %@AB@%B%@AE@%                           Byte%@NL@%
  7653. %@NL@%
  7654. %@AB@%A%@AE@%                           ASCII%@NL@%
  7655. %@NL@%
  7656. %@AB@%I%@AE@%                           Integer (signed decimal word)%@NL@%
  7657. %@NL@%
  7658. %@AB@%U%@AE@%                           Unsigned (unsigned decimal word)%@NL@%
  7659. %@NL@%
  7660. %@AB@%WP%@AE@%                          Word%@NL@%
  7661. %@NL@%
  7662. %@AB@%D%@AE@%                           Double word%@NL@%
  7663. %@NL@%
  7664. %@AB@%S%@AE@%                           Short real%@NL@%
  7665. %@NL@%
  7666. %@AB@%L%@AE@%                           Long real%@NL@%
  7667. %@NL@%
  7668. %@AB@%T%@AE@%                           10-byte real%@NL@%
  7669. %@NL@%
  7670. %@CR:MCV8400K@%%@4@%The default type used if no type size is specified is the last type used by%@EH@%
  7671. a Dump, Enter, Watch Memory, or Tracepoint Memory command. If none of these
  7672. commands has been used during the session, the default type is byte.%@NL@%
  7673. %@NL@%
  7674. %@CR:MCV8400L@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7675. %@NL@%
  7676. %@CR:MCV8400M@%%@4@%The two dialog commands below display watch statements (tracepoints) in the%@EH@%
  7677. watch window.%@NL@%
  7678. %@NL@%
  7679.      TP? sum%@NL@%
  7680. %@NL@%
  7681. %@CR:MCV8400N@%%@4@%The example above instructs the CodeView debugger to suspend program%@EH@%
  7682. execution whenever the value of the variable %@AS@%sum%@AE@% changes.%@NL@%
  7683. %@NL@%
  7684.      TPB n%@NL@%
  7685. %@NL@%
  7686. %@CR:MCV8400O@%%@4@%The example above instructs the CodeView debugger to suspend program%@EH@%
  7687. execution whenever the first byte at the address of %@AS@%n%@AE@% changes; the address
  7688. of this byte and its contents are displayed. The value of %@AS@%n%@AE@% may change
  7689. because of a change in the %@AI@%second%@AE@% byte at the address of %@AS@%n%@AE@%; but that change
  7690. (by itself) would have no effect on this tracepoint.%@NL@%
  7691. %@NL@%
  7692. %@CR:MCV8400P@%%@4@%These commands, entered while debugging a BASIC program, produce the watch%@EH@%
  7693. window in Figure 8.3%@FN@%
  7694. Figure 8.3 is found on page 152 of the printed version.%@EF@%. Corresponding C and FORTRAN examples are included,
  7695. with other commands, at the end of the chapter.%@NL@%
  7696. %@NL@%
  7697. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7698. %@AI@%NOTE%@AE@%%@NL@%
  7699.    Setting tracepoints significantly slows execution of the program being%@NL@%
  7700.    debugged. The CodeView debugger has to check to see if the expression or%@NL@%
  7701.    memory range has changed each time a source line is executed in source%@NL@%
  7702.    mode or each time an instruction is executed in assembly mode. However,%@NL@%
  7703.    tracepoints do not slow execution as much as do watchpoints.%@NL@%
  7704. %@NL@%
  7705.    Be careful when setting tracepoints near large or nested loops. A loop%@NL@%
  7706.    that executes almost instantly when run from the MS-DOS operating system%@NL@%
  7707.    can take many minutes if executed from within the debugger with several%@NL@%
  7708.    tracepoints set. If you enter a seemingly endless loop, press%@NL@%
  7709.    CONTROL+BREAK or CONTROL+C to exit. Often you can tell how far you went%@NL@%
  7710.    in the loop by the value of the tracepoint when you exited.%@NL@%
  7711. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7712. %@NL@%
  7713. %@NL@%
  7714. %@CR:MCV85000@%%@2@%%@AB@%8.5  Deleting Watch Statements%@AE@%%@EH@%%@NL@%
  7715. %@NL@%
  7716. %@CR:MCV85001@%%@4@%The Watch Delete command enables you to delete watch statements that were%@EH@%
  7717. set previously with the Watch, Watchpoint, or Tracepoint command.%@NL@%
  7718. %@NL@%
  7719. %@CR:MCV85002@%%@4@%When you delete a watch statement in window mode, the statement disappears%@EH@%
  7720. and the watch window closes around it. For example, if there are three watch
  7721. statements in the window and you delete statement 1, the window is redrawn
  7722. with one less line. Statement 0 remains unchanged, but statement 2 becomes
  7723. statement 1. If there is only one statement, the window disappears.%@NL@%
  7724. %@NL@%
  7725. %@CR:MCV85003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7726. %@NL@%
  7727. %@CR:MCV85004@%%@4@%To delete a watch statement with the mouse, point to Watch on the menu bar,%@EH@%
  7728. press a mouse button and drag the highlight down to the Delete Watch
  7729. selection, and then release the button. A dialog box appears, containing all
  7730. the watch statements. Point to the statement you want to delete and press
  7731. the ENTER key or a mouse button. The dialog box disappears, and the watch
  7732. window is redrawn without the watch statement.%@NL@%
  7733. %@NL@%
  7734. %@CR:MCV85005@%%@4@%You can also delete all the statements in the watch window at once, simply%@EH@%
  7735. by selecting the Delete All selection.%@NL@%
  7736. %@NL@%
  7737. %@CR:MCV85006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7738. %@NL@%
  7739. %@CR:MCV85007@%%@4@%To execute the Delete Watch command with a keyboard command, press ALT+W to%@EH@%
  7740. open the Watch menu, and then type %@AB@%D%@AE@% (uppercase or lowercase) to select
  7741. Delete Watch. You can also select the Delete Watch command directly by
  7742. pressing CONTROL+U. A dialog box appears, containing all the watch
  7743. statements. Use the UP and DOWN keys to move the cursor to the statement
  7744. you want to delete, and then press the ENTER key. The dialog box disappears,
  7745. and the watch window is redrawn without the watch statement.%@NL@%
  7746. %@NL@%
  7747. %@CR:MCV85008@%%@4@%You can also delete all the statements in the watch window at once, simply%@EH@%
  7748. by selecting the Delete All selection. Do this by pressing %@AB@%L%@AE@% (upppercase or
  7749. lowercase) after the Watch menu is open.%@NL@%
  7750. %@NL@%
  7751. %@CR:MCV85009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7752. %@NL@%
  7753. %@CR:MCV8500A@%%@4@%To delete watch statements with a dialog command, enter a command line with%@EH@%
  7754. the following syntax:%@NL@%
  7755. %@NL@%
  7756.      %@AB@%Y%@AE@% %@AI@%number%@AE@%%@NL@%
  7757. %@NL@%
  7758. %@CR:MCV8500B@%%@4@%When you set a watch statement, it is automatically assigned a number%@EH@%
  7759. (starting with 0). In window mode, the number appears to the left of the
  7760. watch statement in the watch window. In sequential mode, you can use the
  7761. Watch List (%@AB@%W%@AE@%) command to view the numbers of current watch statements.%@NL@%
  7762. %@NL@%
  7763. %@CR:MCV8500C@%%@4@%You can delete existing watch statements by specifying the %@AI@%number%@AE@% of the%@EH@%
  7764. statement you want to delete with the Delete Watch command. (The %@AB@%Y%@AE@% is a
  7765. mnemonic for "yank.")%@NL@%
  7766. %@NL@%
  7767. %@CR:MCV8500D@%%@4@%You can use the asterisk (%@AB@%*%@AE@%) to represent all watch statements.%@EH@%%@NL@%
  7768. %@NL@%
  7769. %@CR:MCV8500E@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7770. %@NL@%
  7771.      >Y 2%@NL@%
  7772.      >%@NL@%
  7773. %@NL@%
  7774. %@CR:MCV8500F@%%@4@%The command above deletes watch statement 2.%@EH@%%@NL@%
  7775. %@NL@%
  7776.      >Y *%@NL@%
  7777.      >%@NL@%
  7778. %@NL@%
  7779. %@CR:MCV8500G@%%@4@%The command above deletes all watch statements and closes the watch window.%@EH@%%@NL@%
  7780. %@NL@%
  7781. %@NL@%
  7782. %@CR:MCV86000@%%@2@%%@AB@%8.6  Listing Watchpoints and Tracepoints%@AE@%%@EH@%%@NL@%
  7783. %@NL@%
  7784. %@CR:MCV86001@%%@4@%The Watch List command lists all previously set watchpoints and tracepoints%@EH@%
  7785. with their assigned numbers and their current values.%@NL@%
  7786. %@NL@%
  7787. %@CR:MCV86002@%%@4@%This command is the only way to examine current watch statements in%@EH@%
  7788. sequential mode. The command has little use in window mode, since watch
  7789. statements are already visible in the watch window as shown in Figure 8.4%@FN@%
  7790. Figure 8.4 is found on page 154 of the printed version.%@EF@%.%@NL@%
  7791. %@NL@%
  7792. %@CR:MCV86003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7793. %@NL@%
  7794. %@CR:MCV86004@%%@4@%The Watch List command cannot be executed with the mouse.%@EH@%%@NL@%
  7795. %@NL@%
  7796. %@CR:MCV86005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7797. %@NL@%
  7798. %@CR:MCV86006@%%@4@%The Watch List command cannot be executed with a keyboard command.%@EH@%%@NL@%
  7799. %@NL@%
  7800. %@CR:MCV86007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7801. %@NL@%
  7802. %@CR:MCV86008@%%@4@%To list watch statements with a dialog command, enter a command line with%@EH@%
  7803. the following syntax:%@NL@%
  7804. %@NL@%
  7805.      >W%@NL@%
  7806. %@NL@%
  7807. %@CR:MCV86009@%%@4@%The display is the same as the display that appears in the watch window in%@EH@%
  7808. window mode shown in Figure 8.5%@FN@%
  7809. Figure 8.5 is found on page 155 of the printed version.%@EF@%.%@NL@%
  7810. %@NL@%
  7811. %@CR:MCV8600A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  7812. %@NL@%
  7813.      >W%@NL@%
  7814.      0) code,c  :  I%@NL@%
  7815.      1) (float)letters/words,f  :  4.777778%@NL@%
  7816.      2) 3F65:0B20  20 20 43 4F 55 4E 54 COUNT%@NL@%
  7817.      3) lines==11 :  0%@NL@%
  7818.      >%@NL@%
  7819. %@NL@%
  7820. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7821. %@AI@%NOTE%@AE@%%@NL@%
  7822.    The command letter for the Watch List command is the same as the command%@NL@%
  7823.    letter for the memory version of the Watch command when no memory size is%@NL@%
  7824.    given. The difference between the commands is that the Watch List command%@NL@%
  7825.    never takes an argument. The Watch command always requires at least one%@NL@%
  7826.    argument.%@NL@%
  7827. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7828. %@NL@%
  7829. %@NL@%
  7830. %@CR:MCV87000@%%@2@%%@AB@%8.7  C Examples%@AE@%%@EH@%%@NL@%
  7831. %@NL@%
  7832. %@CR:MCV87001@%%@4@%The seven examples shown previously in a BASIC screen would be entered in a%@EH@%
  7833. C debugging session as follows:%@NL@%
  7834. %@NL@%
  7835. %@CR:MCV87002@%%@4@%The first three items in the watch window are simple watch statements. They%@EH@%
  7836. display values but never cause execution to break.%@AB@%%@NL@%
  7837. %@NL@%
  7838. %@CR:MCV87003@%%@4@%The next two items are watchpoints; they cause execution to break whenever%@EH@%
  7839. they evaluate to true (nonzero). The fourth item will break execution
  7840. whenever %@AS@%higher%@AE@% is greater than %@AS@%chance%@AE@%, and the fifth item will break
  7841. execution whenever %@AS@%n%@AE@% is equal to 7 or 11.%@NL@%
  7842. %@NL@%
  7843. %@CR:MCV87004@%%@4@%The last two items are tracepoints, which cause execution to break whenever%@EH@%
  7844. any bytes change within a specified area of memory. The sixth item breaks
  7845. execution whenever the value of %@AS@%sum%@AE@% changes; the seventh item breaks
  7846. execution whenever there is a change in the first byte at the address of %@AS@%n%@AE@%.%@NL@%
  7847. %@NL@%
  7848. %@NL@%
  7849. %@CR:MCV88000@%%@2@%%@AB@%8.8  FORTRAN Examples%@AE@%%@EH@%%@NL@%
  7850. %@NL@%
  7851. %@CR:MCV88001@%%@4@%The seven examples shown previously in a BASIC screen would be entered in a%@EH@%
  7852. FORTRAN debugging session as follows:%@NL@%
  7853. %@NL@%
  7854. %@CR:MCV88002@%%@4@%The first three items in the watch window are simple watch statements. They%@EH@%
  7855. display values but never cause execution to break. %@AB@%%@NL@%
  7856. %@NL@%
  7857. %@CR:MCV88003@%%@4@%The next two items are watchpoints; they cause execution to break whenever%@EH@%
  7858. they evaluate to true (nonzero). The fourth item will break execution
  7859. whenever %@AS@%higher%@AE@% is greater than %@AS@%chance%@AE@%, and the fifth item will break
  7860. execution whenever %@AS@%n is equal to %@AE@%%@AS@%7 or 11%@AE@%.%@AS@%%@NL@%
  7861. %@NL@%
  7862. %@CR:MCV88004@%%@4@%The last two items are tracepoints, which cause execution to break whenever%@EH@%
  7863. any bytes change within a specified area of memory. The sixth item breaks
  7864. execution whenever the value of %@AS@%sum%@AE@% changes; the seventh item breaks
  7865. execution whenever there is a change in the first byte at the address of %@AS@%n%@AE@% .%@NL@%
  7866. %@NL@%
  7867. %@NL@%
  7868. %@CR:MCV89000@%%@2@%%@AB@%8.9  Assembly Examples%@AE@%%@EH@%%@NL@%
  7869. %@NL@%
  7870. %@CR:MCV89001@%%@4@%By default, assembly source modules are debugged with the C expression%@EH@%
  7871. evaluator. Therefore, refer to the C examples for appropriate syntax for
  7872. entering watch expressions.%@NL@%
  7873. %@NL@%
  7874. %@CR:MCV89002@%%@4@%In addition, certain C expressions tend to be more useful for debugging%@EH@%
  7875. assembly modules. The following examples show some typical cases used with
  7876. watch and tracepoint commands.%@NL@%
  7877. %@NL@%
  7878. %@CR:MCV89003@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7879. %@NL@%
  7880.      >WW sp L 8%@NL@%
  7881.      >WW bp L 8%@NL@%
  7882.      >W? wo bp+4,d%@NL@%
  7883.      >W? by bp-2,d%@NL@%
  7884.      >TPW arr L 5%@NL@%
  7885.      >%@NL@%
  7886. %@NL@%
  7887. %@CR:MCV89004@%%@4@%The first two examples watch a range of memory. The watch command %@AS@%WW sp L 8%@AE@%%@EH@%
  7888. is particularly useful because it will cause the debugger to watch the stack
  7889. dynamically; the debugger will continually display the first eight words on
  7890. the top of the stack as items are pushed and popped. The expression %@AS@%WW bp L%@AE@%
  7891. %@AS@%8%@AE@% is similar; it causes the debugger to watch the first eight words in
  7892. memory pointed to by %@AB@%BP%@AE@% (the framepointer).%@NL@%
  7893. %@NL@%
  7894. %@CR:MCV89005@%%@4@%The third example, %@AS@%W? wo bp+4,d%@AE@%, is useful if you are using the stack to%@EH@%
  7895. pass parameters. In this case, the position on the stack four bytes above %@AB@%BP%@AE@%
  7896. holds one of three integer parameters. The %@AB@%WO%@AE@% operator returns the same value
  7897. as the assembler expression %@AS@%WORD PTR [bp+4]%@AE@%; the result is displayed in
  7898. decimal.%@NL@%
  7899. %@NL@%
  7900. %@CR:MCV89006@%%@4@%You must use the expression %@AS@%bp+4%@AE@% in order to watch this parameter; you%@EH@%
  7901. cannot specify a parameter by name. The assembler does not emit symbolic
  7902. information for parameters. The fourth command, %@AS@%W? by%@AE@%%@AS@%bp-2,d%@AE@%, is similar to
  7903. the third, but watches a local variable instead of watching a parameter. The
  7904. operator %@AB@%BY%@AE@% returns the same value as the assembler expression %@AS@%BYTE PTR%@AE@%
  7905. %@AS@%[bp-2]%@AE@%.%@NL@%
  7906. %@NL@%
  7907. %@CR:MCV89007@%%@4@%The final example sets a tracepoint on a range of memory, which corresponds%@EH@%
  7908. to the first five words of the array %@AS@%arr%@AE@%. Range arguments for tracepoint and
  7909. watch expressions are particularly useful for large data structures, such as
  7910. arrays.%@NL@%
  7911. %@NL@%
  7912. %@CR:MCV89008@%%@4@%The five examples above produce the screen shown in Figure 8.6%@FN@%
  7913. Figure 8.6 is found on page 157 of the printed version.%@EF@% when entered%@EH@%
  7914. in a CodeView debugging session.%@NL@%
  7915. %@NL@%
  7916. %@NL@%
  7917. %@CR:MCV90000@%%@1@%%@AB@%Chapter 9  Examining Code%@AE@%%@EH@%%@NL@%
  7918. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7919. %@NL@%
  7920. %@CR:MCV90001@%%@4@%Several CodeView commands allow you to examine program code or data related%@EH@%
  7921. to code. The following commands are discussed in this chapter:%@NL@%
  7922. %@NL@%
  7923. %@CR:MCV90002@%%@AB@%Command                     Action%@AE@%%@NL@%
  7924. %@NL@%
  7925. Set Mode (%@AB@%S%@AE@%)                Sets format for code displays%@NL@%
  7926. %@NL@%
  7927. Unassemble (%@AB@%U%@AE@%)              Displays assembly instructions%@NL@%
  7928. %@NL@%
  7929. View (%@AB@%V%@AE@%)                    Displays source lines%@NL@%
  7930. %@NL@%
  7931. Current Location (%@AB@%.%@AE@%)        Displays the current location line%@NL@%
  7932. %@NL@%
  7933. Stack Trace (%@AB@%K%@AE@%)             Displays routines or procedures%@NL@%
  7934. %@NL@%
  7935. %@NL@%
  7936. %@CR:MCV91000@%%@2@%%@AB@%9.1  Set Mode Command%@AE@%%@EH@%%@NL@%
  7937. %@NL@%
  7938. %@CR:MCV91001@%%@4@%The Set Mode command sets the mode in which code is displayed. The two basic%@EH@%
  7939. display modes are source mode in which the program is displayed as source
  7940. lines, and assembly mode in which the program is displayed as
  7941. assembly-language instructions. These two modes can be combined in mixed
  7942. mode in which the program is displayed with both source lines and
  7943. assembly-language instructions.%@NL@%
  7944. %@NL@%
  7945. %@CR:MCV91002@%%@4@%In sequential mode, there are three display modes: source, assembly, and%@EH@%
  7946. mixed. These modes affect the output of commands that display code
  7947. (Register, Trace, Program Step, Go, Execute, and Unassemble).%@NL@%
  7948. %@NL@%
  7949. %@CR:MCV91003@%%@4@%In window mode, these same display modes are available, but affect what kind%@EH@%
  7950. of code appears in the display window.%@NL@%
  7951. %@NL@%
  7952. %@CR:MCV91004@%%@4@%Source and mixed modes are only available if the executable file contains%@EH@%
  7953. symbols in the CodeView format. Programs that do not contain symbolic
  7954. information (including all .COM files) are displayed in assembly mode.%@NL@%
  7955. %@NL@%
  7956. %@CR:MCV91005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7957. %@NL@%
  7958. %@CR:MCV91006@%%@4@%To set the display mode with the mouse, point to View on the menu bar, press%@EH@%
  7959. a mouse button and drag the highlight to either the Source selection for
  7960. source mode, the Mixed selection for mixed mode, or the Assembly selection
  7961. for assembly mode. Then release the button.%@NL@%
  7962. %@NL@%
  7963. %@CR:MCV91007@%%@4@%You can further control the display of assembly-language instructions by%@EH@%
  7964. making selections from the Options menu. See Section 2.1.3.6%@BO:   2918d@% for more
  7965. information.%@NL@%
  7966. %@NL@%
  7967. %@CR:MCV91008@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7968. %@NL@%
  7969. %@CR:MCV91009@%%@4@%To change the display mode with a keyboard command, press F3. This will%@EH@%
  7970. rotate the mode to the next setting; you may need to press F3 twice to get
  7971. the desired mode. This command works in either window or sequential mode. In
  7972. sequential mode, the word %@AS@%source%@AE@%, %@AS@%mixed%@AE@%, or %@AS@%assembly%@AE@% is displayed to
  7973. indicate the new mode.%@NL@%
  7974. %@NL@%
  7975. %@CR:MCV9100A@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7976. %@NL@%
  7977. %@CR:MCV9100B@%%@4@%To set the display mode from the dialog window, enter a command line with%@EH@%
  7978. the following syntax:%@NL@%
  7979. %@NL@%
  7980.      %@AB@%S%@AE@%«%@AB@%+ | - | &%@AE@%»%@NL@%
  7981. %@NL@%
  7982. %@CR:MCV9100C@%%@4@%If the plus sign is specified (%@AB@%S+%@AE@%), source mode is selected, and the word%@EH@%
  7983. %@AS@%source%@AE@% is displayed.%@NL@%
  7984. %@NL@%
  7985. %@CR:MCV9100D@%%@4@%If the minus sign is specified (%@AB@%S-%@AE@%), assembly mode is selected, and the word%@EH@%
  7986. %@AS@%assembly%@AE@% is displayed. In window mode, the display will include any
  7987. assembly options, except the Mixed Source option, previously toggled on from
  7988. the Options menu. The Mixed Source option is always turned off by the %@AB@%S-%@AE@%
  7989. command.%@NL@%
  7990. %@NL@%
  7991. %@CR:MCV9100E@%%@4@%If the ampersand is specified (%@AB@%S&%@AE@%), mixed mode is selected, and the word%@EH@%
  7992. %@AS@%mixed%@AE@% is displayed. In window mode, the display will include any assembly
  7993. options previously toggled on from the Options menu. In addition, the Mixed
  7994. Source option will be turned on by the %@AB@%S&%@AE@% command.%@NL@%
  7995. %@NL@%
  7996. %@CR:MCV9100F@%%@4@%If no argument is specified (%@AB@%S%@AE@%), the current mode (%@AS@%source%@AE@%, %@AS@%assembly%@AE@%, or%@EH@%
  7997. %@AS@%mixed%@AE@%) is displayed.%@NL@%
  7998. %@NL@%
  7999. %@CR:MCV9100G@%%@4@%The Unassemble command in sequential mode is an exception in that it%@EH@%
  8000. displays mixed, source, and assembly with both the source (%@AB@%S+%@AE@%) and mixed
  8001. (%@AB@%S&%@AE@%) modes.%@NL@%
  8002. %@NL@%
  8003. %@CR:MCV9100H@%%@4@%When you enter the dialog version of the Set Mode command, the CodeView%@EH@%
  8004. outputs the name of the new display mode: %@AS@%source%@AE@%, %@AS@%assembly%@AE@%, or %@AS@%mixed%@AE@%.%@NL@%
  8005. %@NL@%
  8006. %@CR:MCV9100I@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8007. %@NL@%
  8008.      >S+%@NL@%
  8009.      source%@NL@%
  8010.      >S-%@NL@%
  8011.      assembly%@NL@%
  8012.      >S&%@NL@%
  8013.      mixed%@NL@%
  8014.      >%@NL@%
  8015. %@NL@%
  8016. %@CR:MCV9100J@%%@4@%The examples above show the source mode being changed to %@AS@%source%@AE@%, %@AS@%assembly%@AE@%,%@EH@%
  8017. and %@AS@%mixed%@AE@%. In window mode, the commands change the format of the display
  8018. window. In sequential mode, the commands change the output from the commands
  8019. that display code (Register, Trace, Program Step, Go, Execute, and
  8020. Unassemble). See the sections below on individual commands for examples of
  8021. how they are affected by the display mode.%@NL@%
  8022. %@NL@%
  8023. %@NL@%
  8024. %@CR:MCV92000@%%@2@%%@AB@%9.2  Unassemble Command%@AE@%%@EH@%%@NL@%
  8025. %@NL@%
  8026. %@CR:MCV92001@%%@4@%The Unassemble command displays the assembly-language instructions of the%@EH@%
  8027. program being debugged. It is most useful in sequential mode, where it is
  8028. the only method of examining a sequence of assembly-language instructions.
  8029. In window mode, it can be used to display a specific portion of
  8030. assembly-language code in the display window.%@NL@%
  8031. %@NL@%
  8032. %@CR:MCV92002@%%@4@%Occasionally, code similar to the following will be displayed:%@EH@%%@NL@%
  8033. %@NL@%
  8034.      FE30   ???   Byte Ptr  [BX + SI]%@NL@%
  8035. %@NL@%
  8036. %@CR:MCV92003@%%@4@%If you attempt to unassemble data, the CodeView debugger may display%@EH@%
  8037. meaningless instructions.%@NL@%
  8038. %@NL@%
  8039. %@CR:MCV92004@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8040. %@NL@%
  8041. %@CR:MCV92005@%%@4@%The Unassemble command has no direct mouse equivalent, but you can view%@EH@%
  8042. unassembled code at any time by changing the mode to assembly or mixed (see
  8043. Section 9.1%@BO:   6576d@%, "Set Mode Command," for more information).%@NL@%
  8044. %@NL@%
  8045. %@CR:MCV92006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8046. %@NL@%
  8047. %@CR:MCV92007@%%@4@%The Unassemble command has no direct keyboard equivalent, but you can view%@EH@%
  8048. unassembled code at any time by changing the mode to assembly or mixed (see
  8049. Section 9.1%@BO:   6576d@%, "Set Mode Command," for more information).%@NL@%
  8050. %@NL@%
  8051. %@CR:MCV92008@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8052. %@NL@%
  8053. %@CR:MCV92009@%%@4@%To display unassembled code using a dialog command, enter a command line%@EH@%
  8054. with the following syntax:%@NL@%
  8055. %@NL@%
  8056.      %@AB@%U%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  8057. %@NL@%
  8058. %@CR:MCV9200A@%%@4@%The effect of the command varies depending on whether you are in sequential%@EH@%
  8059. or window mode.%@NL@%
  8060. %@NL@%
  8061. %@CR:MCV9200B@%%@4@%In sequential mode, if you do not specify %@AI@%address%@AE@% or %@AI@%range%@AE@%, the disassembled%@EH@%
  8062. code begins at the current unassemble address and shows the next eight lines
  8063. of instructions. The unassemble address is the address of the instruction
  8064. after the last instruction displayed by the previous Unassemble command. If
  8065. the Unassemble command has not been used during the session, the unassemble
  8066. address is the current instruction.%@NL@%
  8067. %@NL@%
  8068. %@CR:MCV9200C@%%@4@%If you specify an %@AI@%address%@AE@%, the disassembly starts at that address and shows%@EH@%
  8069. the next eight lines of instructions. If you specify a %@AI@%range%@AE@%, the
  8070. instructions within the range will be displayed.%@NL@%
  8071. %@NL@%
  8072. %@CR:MCV9200D@%%@4@%The sequential mode format of the display depends on the current display%@EH@%
  8073. mode (see Section 9.1%@BO:   6576d@%, "Set Mode Command," for more information). If the
  8074. mode is source (%@AB@%S+%@AE@%) or mixed (%@AB@%S&%@AE@%), the CodeView debugger displays source
  8075. lines mixed with unassembled instructions. One source line is shown for each
  8076. corresponding group of assembly-language instructions. If the display mode
  8077. is assembly, only assembly-language instructions are shown.%@NL@%
  8078. %@NL@%
  8079. %@CR:MCV9200E@%%@4@%In window mode, the Unassemble command changes the mode of the display%@EH@%
  8080. window to assembly. The display format will reflect any options previously
  8081. set from the Options menu. There is no output to the dialog window. If
  8082. %@AI@%address%@AE@% is given, the instructions in the display window will begin at the
  8083. specified address. If %@AI@%range%@AE@% is given, only the starting address will be
  8084. used. If no argument is given, the debugger scrolls down and displays the
  8085. next screen of assembly-language instructions.%@NL@%
  8086. %@NL@%
  8087. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8088. %@AI@%NOTE%@AE@%%@NL@%
  8089.    The 80286 protected-mode mnemonics (also available with the 80386) cannot%@NL@%
  8090.    be displayed with the Unassemble command.%@NL@%
  8091. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8092. %@NL@%
  8093. %@CR:MCV9200F@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8094. %@NL@%
  8095.      >S&%@NL@%
  8096.      mixed%@NL@%
  8097.      >U 0x11%@NL@%
  8098.      49D0:0011 35068E       XOR   AX,__sqrtjmptab+8cd4 (8E06)%@NL@%
  8099.      49D0:0014 189A2300     SBB   Byte Ptr [BP+SI+0023],BL%@NL@%
  8100.      49D0:0018 FC           CLD%@NL@%
  8101.      49D0:0019 49           DEC   CX%@NL@%
  8102.      49D0:001A CD351ED418   INT   35 ;FSTP    DWord Ptr [__fpinit+ee (18D4)]%@NL@%
  8103.      49D0:001F CD3D         INT   3D ;FWAIT%@NL@%
  8104.      7:           A = 0.0%@NL@%
  8105.      49D0:0021 CD35EE       INT   35 ;FLDZ%@NL@%
  8106. %@NL@%
  8107. %@CR:MCV9200G@%%@4@%The sequential mode example above sets the mode to mixed and unassembles%@EH@%
  8108. eight lines of machine code, plus whatever source lines are encountered
  8109. within those lines. The display would be the same if the mode were source.%@NL@%
  8110. %@NL@%
  8111. %@CR:MCV9200H@%%@4@%The example is taken from a FORTRAN debugging session, but produces results%@EH@%
  8112. similar to what would be produced using the same commands with a C or BASIC
  8113. program.%@NL@%
  8114. %@NL@%
  8115.      >S-%@NL@%
  8116.      assembly%@NL@%
  8117.      >U 0x11%@NL@%
  8118.      49D0:0011 35068E       XOR   AX,__sqrtjmptab+8cd4 (8E06)%@NL@%
  8119.      49D0:0014 189A2300     SBB   Byte Ptr [BP+SI+0023],BL%@NL@%
  8120.      49D0:0018 FC           CLD%@NL@%
  8121.      49D0:0019 49 DEC       CX%@NL@%
  8122.      49D0:001A CD351ED418   INT   35 ;FSTP    DWord Ptr [__fpinit+ee (18D4)]%@AE@%%@NL@%
  8123.      49D0:001F CD3D         INT   3D ;FWAIT%@NL@%
  8124.      49D0:0021 CD35EE       INT   35 ;FLDZ%@NL@%
  8125.      >%@NL@%
  8126. %@NL@%
  8127. %@CR:MCV9200I@%%@4@%The sequential mode example above sets the mode to assembly and repeats the%@EH@%
  8128. same command.%@NL@%
  8129. %@NL@%
  8130. %@NL@%
  8131. %@CR:MCV93000@%%@2@%%@AB@%9.3  View Command%@AE@%%@EH@%%@NL@%
  8132. %@NL@%
  8133. %@CR:MCV93001@%%@4@%The View command displays the lines of a text file (usually a source module%@EH@%
  8134. or include file). It is most useful in sequential mode where it is the only
  8135. method of examining a sequence of source lines. In window mode the View
  8136. command can be used to page through the source file or to load a new source
  8137. file.%@NL@%
  8138. %@NL@%
  8139. %@CR:MCV93002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8140. %@NL@%
  8141. %@CR:MCV93003@%%@4@%To load a new source file with the button, point to File on the menu bar,%@EH@%
  8142. press a mouse button and drag the highlight to the Load selection, then
  8143. release the button. A dialog box appears, asking for the name of the file
  8144. you wish to load. Type the name of the file, and press ENTER or a mouse
  8145. button. The new file appears in the display window.%@NL@%
  8146. %@NL@%
  8147. %@CR:MCV93004@%%@4@%The paging capabilities of the View command have no direct mouse equivalent,%@EH@%
  8148. but you can move about in the source file by pointing to the up or down
  8149. arrows on the scroll bars and then clicking different mouse buttons. See
  8150. Section 2.1.2.2%@BO:   21bc1@%, "Controlling Program Execution with the Mouse," for more
  8151. information.%@NL@%
  8152. %@NL@%
  8153. %@CR:MCV93005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8154. %@NL@%
  8155. %@CR:MCV93006@%%@4@%To load a new source file with a keyboard command, press ALT+F to open the%@EH@%
  8156. File menu, then press L to select Load. A dialog box appears, asking for the
  8157. name of the file you wish to load. Type the name of the file, and press
  8158. ENTER. The new file appears in the display window.%@NL@%
  8159. %@NL@%
  8160. %@CR:MCV93007@%%@4@%The paging capabilities of the View command have no direct keyboard%@EH@%
  8161. equivalent, but you can move about in the source file by first putting the
  8162. cursor in the display window with the F6 key, then pressing the PGUP, PGDN,
  8163. HOME, END,%@NL@%
  8164. %@NL@%
  8165. %@CR:MCV93008@%%@4@%UP ARROW, and DOWN ARROW keys. See Section 2.1.1.3%@BO:   1e85f@%, "Controlling Program%@EH@%
  8166. Execution with Keyboard Commands," for more information.%@NL@%
  8167. %@NL@%
  8168. %@CR:MCV93009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8169. %@NL@%
  8170. %@CR:MCV9300A@%%@4@%To display source lines using a dialog command, enter a command line with%@EH@%
  8171. the following syntax:%@NL@%
  8172. %@NL@%
  8173.      %@AB@%V%@AE@% «%@AI@%expression%@AE@%»%@NL@%
  8174. %@NL@%
  8175. %@CR:MCV9300B@%%@4@%Since addresses for the View command are often specified as a line number%@EH@%
  8176. (with an optional source file), a more specific syntax for the command would
  8177. be as follows:%@NL@%
  8178. %@NL@%
  8179.      %@AB@%V%@AE@% «%@AB@%.%@AE@%«%@AI@%filename%@AE@%:»%@AI@%linenumber%@AE@%»%@NL@%
  8180. %@NL@%
  8181. %@CR:MCV9300C@%%@4@%The effect of the command varies, depending on whether you are in sequential%@EH@%
  8182. or window mode.%@NL@%
  8183. %@NL@%
  8184. %@CR:MCV9300D@%%@4@%In sequential mode, the View command displays eight source lines. The%@EH@%
  8185. starting source line is one of the following:%@NL@%
  8186. %@NL@%
  8187. %@CR:MCV9300E@%  ■  The current source line if no argument is given.%@NL@%
  8188. %@NL@%
  8189.   ■  The specified %@AI@%linenumber%@AE@%. If %@AI@%filename%@AE@% is given, the specified file is%@NL@%
  8190.      loaded, and the %@AI@%linenumber%@AE@% refers to lines in it.%@NL@%
  8191. %@NL@%
  8192.   ■  The address that %@AI@%expression%@AE@% evaluates to. For example, %@AI@%expression%@AE@% could%@NL@%
  8193.      be a procedure name or an address in the %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% format. The%@NL@%
  8194.      code segment is assumed if no segment is given.%@NL@%
  8195. %@NL@%
  8196. %@CR:MCV9300F@%%@4@%In sequential mode, the View command is not affected by the current display%@EH@%
  8197. mode (source, assembly, or mixed); source lines are displayed without regard
  8198. to mode.%@NL@%
  8199. %@NL@%
  8200. %@CR:MCV9300G@%%@4@%In window mode, if you enter the View command while the display mode is%@EH@%
  8201. assembly, the CodeView debugger will automatically switch back to source
  8202. mode. If you give %@AI@%linenumber%@AE@% or %@AI@%expression%@AE@%, the display window will be
  8203. redrawn so that the source line corresponding to the given %@AI@%address%@AE@% will
  8204. appear at the top of the source window. If you specify a %@AI@%filename%@AE@% with a
  8205. %@AI@%linenumber%@AE@%, the specified file will be loaded.%@NL@%
  8206. %@NL@%
  8207. %@CR:MCV9300H@%%@4@%If you enter the View command with no arguments, the display will scroll%@EH@%
  8208. down one line short of a page; that is, the source line that was at the
  8209. bottom of the window will be at the top.%@NL@%
  8210. %@NL@%
  8211. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8212. %@AI@%NOTE%@AE@%%@NL@%
  8213.    The View command with no argument is similar to pressing the PGDN key or%@NL@%
  8214.    clicking Right on the down arrow with the mouse. The difference is that%@NL@%
  8215.    pressing the PGDN key enables you to scroll down one more line.%@NL@%
  8216. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8217. %@NL@%
  8218. %@CR:MCV9300I@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8219. %@NL@%
  8220.      >V BUBBLE       %@AI@%;* Example 1, FORTRAN source code%@AE@%%@NL@%
  8221.      51:        IF (N .LE. 1) GOTO 101%@NL@%
  8222.      52:        DO 201 I = 1,N-1%@NL@%
  8223.      53:        DO 301 J = I + 1,N%@NL@%
  8224.      54:        IF (X(I) .LE. X(J)) GOTO 301%@NL@%
  8225.      55:        TEMP = X(I)%@NL@%
  8226.      56:        X(I) = X(J)%@NL@%
  8227.      57:        X(J) = TEMP%@NL@%
  8228.      58:    301 CONTINUE%@NL@%
  8229. %@NL@%
  8230. %@CR:MCV9300J@%%@4@%Example 1 (shown in sequential mode) displays eight source lines, beginning%@EH@%
  8231. at routine %@AS@%BUBBLE%@AE@%.%@NL@%
  8232. %@NL@%
  8233.      >V .math.c:30   %@AI@%;* Example 2, C source code%@AE@%%@NL@%
  8234.      30:                register int j;%@NL@%
  8235.      31:%@NL@%
  8236.      32:                for (j = q; j >= 0; j--)%@NL@%
  8237.      33:                        if (t[j] + p[j] > 9) {%@NL@%
  8238.      34:                                p[j] += t[j] - 10;%@NL@%
  8239.      35:                                p[j-1] += 1;%@NL@%
  8240.      36:                        } else%@NL@%
  8241.      37:                                p[j] += t[j];%@NL@%
  8242.      >%@NL@%
  8243. %@NL@%
  8244. %@CR:MCV9300K@%%@4@%Example 2 loads the source file %@AS@%math.c%@AE@% and displays eight source lines%@EH@%
  8245. starting at line %@AS@%30%@AE@%.%@NL@%
  8246. %@NL@%
  8247. %@CR:MCV9300L@%%@4@%All forms of the View command are supported with all languages that work%@EH@%
  8248. with the CodeView debugger.%@NL@%
  8249. %@NL@%
  8250. %@NL@%
  8251. %@CR:MCV94000@%%@2@%%@AB@%9.4  Current Location Command%@AE@%%@EH@%%@NL@%
  8252. %@NL@%
  8253. %@CR:MCV94001@%%@4@%The Current Location command displays the source line or assembly-language%@EH@%
  8254. instruction corresponding to the current program location.%@NL@%
  8255. %@NL@%
  8256. %@CR:MCV94002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8257. %@NL@%
  8258. %@CR:MCV94003@%%@4@%The Current Location command cannot be executed with the mouse.%@EH@%%@NL@%
  8259. %@NL@%
  8260. %@CR:MCV94004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8261. %@NL@%
  8262. %@CR:MCV94005@%%@4@%The Current Location command cannot be executed with a keyboard command.%@EH@%%@NL@%
  8263. %@NL@%
  8264. %@CR:MCV94006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8265. %@NL@%
  8266. %@CR:MCV94007@%%@4@%To display the current location line using a dialog command, enter a command%@EH@%
  8267. line with the following syntax (a period only):%@NL@%
  8268. %@NL@%
  8269.      %@AB@%.%@AE@%%@NL@%
  8270. %@NL@%
  8271. %@CR:MCV94008@%%@4@%In sequential mode, the command displays the current source line. The line%@EH@%
  8272. is displayed regardless of whether the current debugging mode is source or
  8273. assembly. If the program being debugged has no symbolic information, the
  8274. command will be ignored.%@NL@%
  8275. %@NL@%
  8276. %@CR:MCV94009@%%@4@%In window mode, the command puts the current program location (marked with%@EH@%
  8277. reverse video or a contrasting color) in the center of the display window.
  8278. The display mode (source or assembly) will not be affected. This command is
  8279. useful if you have scrolled through the source code or assembly-language
  8280. instructions so that the current location line is no longer visible.%@NL@%
  8281. %@NL@%
  8282. %@CR:MCV9400A@%%@4@%For example, if you are in window mode and have executed the program being%@EH@%
  8283. debugged to somewhere near the start of the program, but you have scrolled
  8284. the display to a point near the end, the Current Location command returns
  8285. the display to the current program location.%@NL@%
  8286. %@NL@%
  8287. %@CR:MCV9400B@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  8288. %@NL@%
  8289.      >.%@NL@%
  8290.      MINDAT = 1.0E6%@NL@%
  8291.      >%@NL@%
  8292. %@NL@%
  8293. %@CR:MCV9400C@%%@4@%The example above illustrates how to display the current source line in%@EH@%
  8294. sequential mode. The same command in window mode would not produce any
  8295. output, but it could change the text that is shown in the display window.%@NL@%
  8296. %@NL@%
  8297. %@NL@%
  8298. %@CR:MCV95000@%%@2@%%@AB@%9.5  Stack Trace Command%@AE@%%@EH@%%@NL@%
  8299. %@NL@%
  8300. %@CR:MCV95001@%%@4@%The Stack Trace command allows you to display routines that have been called%@EH@%
  8301. during program execution (see note below). The first line of the display
  8302. shows the name of the current routine. The succeeding lines (if any) list
  8303. any other routines that were called to reach the current address. The dialog
  8304. version of the Stack Trace command also displays the source lines where each
  8305. routine was called.%@NL@%
  8306. %@NL@%
  8307. %@CR:MCV95002@%%@4@%For each routine, the values of any arguments are shown in parentheses after%@EH@%
  8308. the routine name. Values are shown in the current radix (the default is
  8309. decimal).%@NL@%
  8310. %@NL@%
  8311. %@CR:MCV95003@%%@4@%The term "stack trace" is used because as each routine is called, its%@EH@%
  8312. address and arguments are stored on (pushed onto) the program stack.
  8313. Therefore, tracing through the stack shows the currently active routines.
  8314. With C and FORTRAN programs, the %@AB@%main%@AE@% routine will always be at the bottom
  8315. of the stack. With BASIC programs, the main program is not listed on the
  8316. stack because BASIC programs have no standard label (such as %@AB@%main%@AE@%)
  8317. corresponding to the first line of a program. Only routines called by the
  8318. main program will be displayed. In assembly-language programs, the bottom
  8319. routine displayed in the stack trace is %@AB@%astart%@AE@% instead of %@AB@%main%@AE@%.%@NL@%
  8320. %@NL@%
  8321. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8322. %@AI@%NOTE%@AE@%%@NL@%
  8323.    This discussion uses the term "routines," which is a general term for%@NL@%
  8324.    functions (C, FORTRAN, Pascal), subroutines (FORTRAN), procedures%@NL@%
  8325.    (Pascal), and subprograms and function procedures (BASIC)──each of which%@NL@%
  8326.    uses the stack to transfer control to an independent program unit. In%@NL@%
  8327.    assembly mode, the term "procedure" may be more accurate. %@AB@%GOSUB%@AE@% and %@AB@%DEF%@AE@%%@NL@%
  8328.    %@AB@%FN%@AE@% routines in BASIC will not work with the Stack Trace command, since%@NL@%
  8329.    they do not follow the same convention for setting up the stack.%@NL@%
  8330.    If you are using the CodeView debugger to debug assembly-language%@NL@%
  8331.    programs, the Stack Trace command will work only if procedures were%@NL@%
  8332.    called with the calling convention used by Microsoft languages. This%@NL@%
  8333.    calling convention is explained in the Microsoft Mixed-Language%@NL@%
  8334.    Programming Guide.%@NL@%
  8335. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8336. %@NL@%
  8337. %@CR:MCV95004@%%@4@%The Stack Trace command does not work reliably until you execute at least to%@EH@%
  8338. the beginning of the main procedure. The main procedure sets up the frame
  8339. pointer (%@AB@%BP%@AE@%), which CodeView uses to locate parameters, local variables, and
  8340. return addresses. If your main module is written in assembly, you must
  8341. execute at least to the beginning of the first procedure called.
  8342. Furthermore, your procedures must follow the standard Microsoft calling
  8343. conventions.%@NL@%
  8344. %@NL@%
  8345. %@CR:MCV95005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8346. %@NL@%
  8347. %@CR:MCV95006@%%@4@%To view a stack trace with the mouse, point to Calls on the menu bar and%@EH@%
  8348. press a mouse button. The Calls menu will appear, showing the current
  8349. routine at the top and other routines below it in the reverse order in which
  8350. they were called; for example, the first routine called (which is always
  8351. %@AB@%main%@AE@% in a C or FORTRAN program) will be at the bottom. The values of any
  8352. routine arguments will be shown in parentheses following the routines.%@NL@%
  8353. %@NL@%
  8354. %@CR:MCV95007@%%@4@%If you want to view one of the routines that was previously called, select%@EH@%
  8355. the routine by dragging down the highlight to the routine you wish to see,
  8356. then releasing the mouse button. (You can also select a routine by clicking
  8357. a selection once the menu is open.) The effect of selecting a routine in the
  8358. Calls menu is to cause the debugger to display that routine. The cursor will
  8359. be on the last statement executed in the routine.%@NL@%
  8360. %@NL@%
  8361. %@CR:MCV95008@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8362. %@NL@%
  8363. %@CR:MCV95009@%%@4@%To view a stack trace with a keyboard command, press ALT+C to open the Calls%@EH@%
  8364. menu. The menu will show the current routine at the top and other routines
  8365. below it in the reverse order in which they were called; for example, the
  8366. first routine called will be at the bottom. The values of any routine
  8367. arguments will be shown in parentheses following the routine.%@NL@%
  8368. %@NL@%
  8369. %@CR:MCV9500A@%%@4@%If you want to view one of the routines that was previously called, select%@EH@%
  8370. the routine by moving the cursor with the arrow keys and then pressing
  8371. ENTER, or by typing the number or letter to the left of the routine. The
  8372. effect of selecting a routine in the Calls menu is to cause the debugger to
  8373. display that routine. The cursor will be on the last statement that was
  8374. executed in the routine.%@NL@%
  8375. %@NL@%
  8376. %@CR:MCV9500B@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8377. %@NL@%
  8378. %@CR:MCV9500C@%%@4@%To display a stack trace with a dialog command, enter a command line with%@EH@%
  8379. the following syntax:%@NL@%
  8380. %@NL@%
  8381.      %@AB@%K%@AE@%%@NL@%
  8382. %@NL@%
  8383. %@CR:MCV9500D@%%@4@%The output from the Stack Trace dialog command lists the routines in the%@EH@%
  8384. reverse order in which they were called. The arguments to each routine are
  8385. shown in parentheses. Finally, the line number from which the routine was
  8386. called is shown.%@NL@%
  8387. %@NL@%
  8388. %@CR:MCV9500E@%%@4@%You can enter the line number as an argument to the View or Unassemble%@EH@%
  8389. command if you want to view code at the point where the routine was called.%@NL@%
  8390. %@NL@%
  8391. %@CR:MCV9500F@%%@4@%In window mode, the output from the Stack Trace dialog command appears in%@EH@%
  8392. the dialog window.%@NL@%
  8393. %@NL@%
  8394. %@CR:MCV9500G@%%@4@%%@AB@%FORTRAN Example%@AE@%%@EH@%%@NL@%
  8395. %@NL@%
  8396.      >K%@NL@%
  8397.      ANALYZE(67,0), line 94%@NL@%
  8398.      COUNTWORDS(0,512), line 73%@NL@%
  8399.      MAIN(2,5098), line 42%@NL@%
  8400.      >%@NL@%
  8401. %@NL@%
  8402. %@CR:MCV9500H@%%@4@%In the example above, the first line of output indicates that the current%@EH@%
  8403. routine is %@AS@%ANALYZE%@AE@%. Its first argument currently has a decimal value of %@AS@%67%@AE@%,
  8404. and its second argument, a value of %@AS@%0%@AE@%. The current location in this routine
  8405. is %@AS@%line 94%@AE@%.%@NL@%
  8406. %@NL@%
  8407. %@CR:MCV9500I@%%@4@%The second line indicates that %@AS@%ANALYZE%@AE@% was called by %@AS@%COUNTWORDS%@AE@%, and that%@EH@%
  8408. its arguments have the values %@AS@%0%@AE@% and %@AS@%512%@AE@%. Routine %@AS@%ANALYZE%@AE@% was called from
  8409. %@AS@%line 73%@AE@% of routine %@AS@%COUNTWORDS%@AE@%.%@NL@%
  8410. %@NL@%
  8411. %@CR:MCV9500J@%%@4@%Likewise, %@AS@%COUNTWORDS%@AE@% was called from %@AS@%line 42%@AE@% of %@AS@%MAIN%@AE@%, and its arguments%@EH@%
  8412. have the values %@AS@%2%@AE@% and %@AS@%5098%@AE@%.%@NL@%
  8413. %@NL@%
  8414. %@CR:MCV9500K@%%@4@%If the radix had been set to 16 or 8 using the Radix (%@AB@%N%@AE@%) command, the%@EH@%
  8415. arguments would be shown in that radix. For example, the last line would be
  8416. shown as %@AS@%MAIN( 2%@AE@%,%@AS@%13ea )%@AE@% in hexadecimal or %@AS@%MAIN( 2%@AE@%,%@AS@%11752 )%@AE@% in octal.%@NL@%
  8417. %@NL@%
  8418. %@CR:MCV9500L@%%@4@%%@AB@%C Example%@AE@%%@EH@%%@NL@%
  8419. %@NL@%
  8420.      >K%@NL@%
  8421.      analyze(67,0), line 94%@NL@%
  8422.      countwords(0,512), line 73%@NL@%
  8423.      main(2,5098)%@NL@%
  8424.      >%@NL@%
  8425. %@NL@%
  8426. %@CR:MCV9500M@%%@4@%As with the FORTRAN example, the example above shows the routines on the%@EH@%
  8427. stack in the reverse order in which they were called. Since %@AS@%analyze%@AE@% is on
  8428. the top, it has been called most recently; in other words, it is the current
  8429. routine.%@NL@%
  8430. %@NL@%
  8431. %@CR:MCV9500N@%%@4@%Each routine is shown with the arguments it was passed, along with the last%@EH@%
  8432. source line that it had been executing. Note that %@AS@%main%@AE@% is shown with the
  8433. command line arguments %@AS@%argc%@AE@% (which is equal to 2) and %@AS@%argv%@AE@% (which is a
  8434. pointer equal to 5,098 decimal). Since the language is C, %@AS@%main%@AE@% will always
  8435. be on the bottom of the stack.%@NL@%
  8436. %@NL@%
  8437. %@CR:MCV9500O@%%@4@%%@AB@%BASIC Example%@AE@%%@EH@%%@NL@%
  8438. %@NL@%
  8439.      >K%@NL@%
  8440.      ROLL#(19122:6040)%@NL@%
  8441.      MAKE#(19122:6040)%@NL@%
  8442.      CALC(19122:5982, 19122:5990)%@NL@%
  8443.      >%@NL@%
  8444. %@NL@%
  8445. %@CR:MCV9500P@%%@4@%As with the FORTRAN example, the example above shows the routines on the%@EH@%
  8446. stack in the reverse order in which they were called. Since %@AS@%ROLL#%@AE@% is on the
  8447. top, it has been called most recently; in other words, it is the current
  8448. routine.%@NL@%
  8449. %@NL@%
  8450. %@CR:MCV9500Q@%%@4@%Each routine is displayed along with the arguments by which it was passed.%@EH@%
  8451. In BASIC, arguments passed to routines are always addresses.%@NL@%
  8452. %@NL@%
  8453. %@CR:MCV9500R@%%@4@%This example shows some features peculiar to BASIC. First of all, there is%@EH@%
  8454. no %@AS@%MAIN%@AE@% displayed because the BASIC compiler does not produce any such
  8455. symbol. Furthermore, each routine will have a type tag if it is a function;
  8456. the tag indicates what the function returns. %@AS@%ROLL#%@AE@% and %@AS@%MAKE#%@AE@% are both
  8457. functions returning a double-precision floating point. A function that
  8458. returned a short integer would have a %@AB@%%%@AE@% type tag. %@AS@%CALC%@AE@% has no type tag since
  8459. it is a sub-program, and therefore does not return a value of any type.%@NL@%
  8460. %@NL@%
  8461. %@NL@%
  8462. %@CR:MCVA0000@%%@1@%%@AB@%Chapter 10  Modifying Code or Data%@AE@%%@EH@%%@NL@%
  8463. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8464. %@NL@%
  8465. %@CR:MCVA0001@%%@4@%The CodeView debugger provides the following commands for modifying code or%@EH@%
  8466. data in memory:%@NL@%
  8467. %@NL@%
  8468. %@CR:MCVA0002@%%@AB@%Command                     Action%@AE@%%@NL@%
  8469. %@NL@%
  8470. Assemble (%@AB@%A%@AE@%)                Modifies code%@NL@%
  8471. %@NL@%
  8472. Enter (%@AB@%E%@AE@%)                   Modifies memory, usually data%@NL@%
  8473. %@NL@%
  8474. Register (%@AB@%R%@AE@%)                Modifies registers and flags%@NL@%
  8475. %@NL@%
  8476. Fill Memory (%@AB@%F%@AE@%)             Fills a block of memory%@NL@%
  8477. %@NL@%
  8478. Move Memory (%@AB@%M%@AE@%)             Copies one block of memory to another%@NL@%
  8479. %@NL@%
  8480. Port Output (%@AB@%O%@AE@%)             Outputs a byte to a hardware port%@NL@%
  8481. %@NL@%
  8482. %@CR:MCVA0003@%%@4@%These commands change code temporarily. You can use the alterations for%@EH@%
  8483. testing in the CodeView debugger, but you cannot save them or permanently
  8484. change the program. To make permanent changes, you must modify the source
  8485. code and recompile.%@NL@%
  8486. %@NL@%
  8487. %@NL@%
  8488. %@CR:MCVA1000@%%@2@%%@AB@%10.1  Assemble Command%@AE@%%@EH@%%@NL@%
  8489. %@NL@%
  8490. %@CR:MCVA1001@%%@4@%The Assemble command assembles 8086-family (8086, 8087, 8088, 80186, 80286,%@EH@%
  8491. 80287, and 80286 and 80386 unprotected) instruction mnemonics and places the
  8492. resulting instruction code into memory at a specified address. The only
  8493. 8086-family mnemonics that cannot be assembled are 80286 protected-mode
  8494. mnemonics. In addition, the debugger will also assemble 80286 instructions
  8495. that utilize the expanded 386 registers.%@NL@%
  8496. %@NL@%
  8497. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8498. %@AI@%NOTE%@AE@%%@NL@%
  8499.    The effects of the Assemble command are temporary. Any instructions that%@NL@%
  8500.    you assemble are lost as soon as you exit the program.%@NL@%
  8501. %@NL@%
  8502.    The instructions you assemble are also lost when you restart the program%@NL@%
  8503.    with the Start or Restart command because the original code is reloaded%@NL@%
  8504.    on top of memory you may have altered.%@NL@%
  8505. %@NL@%
  8506.    To test the results of an Assemble command, you may need to manipulate%@NL@%
  8507.    the %@AB@%IP%@AE@% register (and possibly the %@AB@%CS%@AE@% register) to the starting address%@NL@%
  8508.    of the instructions you have assembled. If you do this, you must use the%@NL@%
  8509.    Current Line command (%@AB@%.%@AE@%) to reset the debugger's internal variables so%@NL@%
  8510.    that it will trace properly.%@NL@%
  8511. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8512. %@NL@%
  8513. %@CR:MCVA1002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8514. %@NL@%
  8515. %@CR:MCVA1003@%%@4@%The Assemble command cannot be executed with the mouse.%@EH@%%@NL@%
  8516. %@NL@%
  8517. %@CR:MCVA1004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8518. %@NL@%
  8519. %@CR:MCVA1005@%%@4@%The Assemble command cannot be executed with a keyboard command.%@EH@%%@NL@%
  8520. %@NL@%
  8521. %@CR:MCVA1006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8522. %@NL@%
  8523. %@CR:MCVA1007@%%@4@%To assemble code using a dialog command, enter a command line with the%@EH@%
  8524. following syntax:%@NL@%
  8525. %@NL@%
  8526.      %@AB@%A%@AE@% «%@AI@%address%@AE@%»%@NL@%
  8527. %@NL@%
  8528. %@CR:MCVA1008@%%@4@%If %@AI@%address%@AE@% is specified, the assembly starts at that address; otherwise the%@EH@%
  8529. current assembly address is assumed.%@NL@%
  8530. %@NL@%
  8531. %@CR:MCVA1009@%%@4@%The assembly address is normally the current address (the address pointed to%@EH@%
  8532. by the CS and IP registers). However, when you use the Assemble command, the
  8533. assembly address is set to the address immediately following the last
  8534. assembled instruction. When you enter any command that executes code (Trace,
  8535. Program Step, Go, or Execute), the assembly address is reset to the current
  8536. address.%@NL@%
  8537. %@NL@%
  8538. %@CR:MCVA100A@%%@4@%When you type the Assemble command, the assembly address is displayed. The%@EH@%
  8539. CodeView debugger then waits for you to enter a new instruction in the
  8540. standard 8086-family instruction-mnemonic form. You can enter instructions
  8541. in uppercase, lowercase, or both.%@NL@%
  8542. %@NL@%
  8543. %@CR:MCVA100B@%%@4@%To assemble a new instruction, type the desired mnemonic and press ENTER.%@EH@%
  8544. The CodeView debugger assembles the instruction into memory and displays the
  8545. next available address. Continue entering new instructions until you have
  8546. assembled all the instructions you want. To conclude assembly and return to
  8547. the CodeView prompt, press ENTER only.%@NL@%
  8548. %@NL@%
  8549. %@CR:MCVA100C@%%@4@%If an instruction you enter contains a syntax error, the debugger displays%@EH@%
  8550. the message %@AS@%^ Syntax error%@AE@%, redisplays the current assembly address, and
  8551. waits for you to enter a correct instruction. The caret symbol in the
  8552. message will point to the first character the CodeView debugger could not
  8553. interpret.%@NL@%
  8554. %@NL@%
  8555. %@CR:MCVA100D@%%@4@%The following eight principles govern entry of instruction mnemonics:%@EH@%%@NL@%
  8556. %@NL@%
  8557. %@CR:MCVA100E@%  1. The far-return mnemonic is %@AB@%RETF%@AE@%.%@NL@%
  8558. %@NL@%
  8559.   2. String mnemonics must explicitly state the string size. For example,%@NL@%
  8560.      %@AB@%MOVSW%@AE@% must be used to move word strings, and %@AB@%MOVSB%@AE@% must be used to move%@NL@%
  8561.      byte strings.%@NL@%
  8562. %@NL@%
  8563.   3. The CodeView debugger automatically assembles short, near, or far jumps%@NL@%
  8564.      and calls, depending on byte displacement to the destination address.%@NL@%
  8565.      These may be overridden with the %@AB@%NEAR%@AE@% or %@AB@%FAR%@AE@% prefix, as shown in the%@NL@%
  8566.      following examples:%@NL@%
  8567. %@NL@%
  8568.         %@AS@%JMP     0x502%@AE@%%@NL@%
  8569.         %@AS@%JMP     NEAR 0x505%@AE@%%@NL@%
  8570.         %@AS@%JMP     FAR  0x50A%@AE@%%@NL@%
  8571. %@NL@%
  8572.      The %@AB@%NEAR%@AE@% prefix can be abbreviated to %@AB@%NE%@AE@%, but the %@AB@%FAR%@AE@% prefix cannot be%@NL@%
  8573.      abbreviated. The examples above use the C notation for hexadecimal%@NL@%
  8574.      numbers. If the FORTRAN option were selected, you would enter the%@NL@%
  8575.      operands as %@AS@%#502%@AE@%, %@AS@%#505%@AE@%, and %@AS@%#50A%@AE@%; if the BASIC option were selected,%@NL@%
  8576.      you would enter them as %@AS@%&H502%@AE@% , %@AS@%&H505%@AE@%, and %@AS@%&H50A%@AE@%.%@NL@%
  8577. %@NL@%
  8578.   4. The CodeView debugger cannot determine whether some operands refer to a%@NL@%
  8579.      word memory location or to a byte memory location. In these cases, the%@NL@%
  8580.      data type must be explicitly stated with the prefix %@AB@%WORD%@AE@%%@AB@%PTR%@AE@% or %@AB@%BYTE%@AE@%%@NL@%
  8581.      %@AB@%PTR%@AE@%. Acceptable abbreviations are %@AB@%WO%@AE@% and %@AB@%BY%@AE@%. Examples are shown below:%@NL@%
  8582. %@NL@%
  8583.         %@AS@%MOV     WORD PTR [BP],1%@AE@%%@NL@%
  8584.         %@AS@%MOV     BYTE PTR [SI-1],symbol%@AE@%%@NL@%
  8585.         %@AS@%MOV     WO PTR [BP],1%@AE@%%@NL@%
  8586.         %@AS@%MOV     BY PTR [SI-1],symbol%@AE@%%@NL@%
  8587. %@NL@%
  8588.   5. The CodeView debugger cannot determine whether an operand refers to a%@NL@%
  8589.      memory location or to an immediate operand. The debugger uses the%@NL@%
  8590.      convention that operands enclosed in square brackets refer to memory.%@NL@%
  8591.      Two examples are shown below:%@NL@%
  8592. %@NL@%
  8593.         %@AS@%MOV     AX,#21%@AE@%%@NL@%
  8594.         %@AS@%MOV     AX,[#21]%@AE@%%@NL@%
  8595. %@NL@%
  8596.      The first statement moves %@AS@%21%@AE@% hexadecimal into %@AS@%AX%@AE@%. The second statement%@NL@%
  8597.      moves the data at offset %@AS@%21%@AE@% hexadecimal into %@AS@%AX%@AE@%. Both statements use%@NL@%
  8598.      the FORTRAN notation for the hexadecimal number 21. If the C option%@NL@%
  8599.      were selected, this number would be represented as %@AS@%0x21%@AE@%, and if the%@NL@%
  8600.      BASIC option were selected, the number would be represented as %@AS@%&H21%@AE@%.%@NL@%
  8601. %@NL@%
  8602.   6. The CodeView debugger  supports all forms of indirect register%@NL@%
  8603.      instructions, as shown in the following examples:%@NL@%
  8604. %@NL@%
  8605.         %@AS@%ADD     BX,[BP+2].[SI-1]%@AE@%%@NL@%
  8606.         %@AS@%POP     [BP+DI]%@AE@%%@NL@%
  8607.         %@AS@%PUSH    [SI]%@AE@%%@NL@%
  8608. %@NL@%
  8609.   7. All instruction-name synonyms are supported. If you assemble%@NL@%
  8610.      instructions and then examine them with the Unassemble command (%@AB@%U%@AE@%), the%@NL@%
  8611.      CodeView debugger may show synonymous instructions, rather than the%@NL@%
  8612.      ones you assembled, as shown in the following examples:%@NL@%
  8613. %@NL@%
  8614.         %@AS@%LOOPZ   &H100%@AE@%%@NL@%
  8615.         %@AS@%LOOPE   &H100%@AE@%%@NL@%
  8616.         %@AS@%JA      &H200%@AE@%%@NL@%
  8617.         %@AS@%JNBE    &H200%@AE@%%@NL@%
  8618. %@NL@%
  8619.      The examples above use the BASIC hexadecimal notation. Instead of using%@NL@%
  8620.      the %@AS@%&H%@AE@% prefix, you would use %@AS@%0x%@AE@% with the C option selected, and %@AS@%#%@AE@% with%@NL@%
  8621.      the FORTRAN option selected.%@NL@%
  8622. %@NL@%
  8623.   8. Do not assemble and execute 8087 or 80287 instructions if your system%@NL@%
  8624.      is not equipped with one of these math coprocessor chips. If you try to%@NL@%
  8625.      execute the %@AB@%WAIT%@AE@% instruction without the appropriate chip, for example,%@NL@%
  8626.      your system will crash.%@NL@%
  8627. %@NL@%
  8628. %@CR:MCVA100F@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  8629. %@NL@%
  8630.      >U #40 L 1%@NL@%
  8631.      39B0:0040 89C3           MOV        BX,AX%@NL@%
  8632.      >A #40%@NL@%
  8633.      39B?0:0040 MOV     CX,AX%@NL@%
  8634.      39B0:0042%@NL@%
  8635.      >U #40 L 1%@NL@%
  8636.      39B0:0040 89C1           MOV        CX,AX%@NL@%
  8637.      >%@AS@%%@NL@%
  8638. %@NL@%
  8639. %@CR:MCVA100G@%%@4@%The example above (in FORTRAN notation) modifies the instruction at address%@EH@%
  8640. %@AS@%40%@AE@% hexadecimal so that it moves data into the %@AS@%CX%@AE@% register instead of the %@AS@%BX%@AE@%
  8641. register (%@AS@%40%@AE@% hexadecimal is notated as %@AS@%0x40%@AE@% in C, and as %@AS@%&H40%@AE@% in BASIC). The
  8642. Unassemble command (%@AB@%U%@AE@%) is used to show the instruction before and after the
  8643. assembly.%@NL@%
  8644. %@NL@%
  8645. %@CR:MCVA100H@%%@4@%You can modify a portion of code for testing, as in the example, but you%@EH@%
  8646. cannot save the modified program. You must modify your source code and
  8647. recompile.%@NL@%
  8648. %@NL@%
  8649. %@NL@%
  8650. %@CR:MCVA2000@%%@2@%%@AB@%10.2  Enter Commands%@AE@%%@EH@%%@NL@%
  8651. %@NL@%
  8652. %@CR:MCVA2001@%%@4@%The CodeView debugger has several commands for entering data to memory. You%@EH@%
  8653. can use these commands to modify either code or data, though code can
  8654. usually be modified more easily with the Assemble command (%@AB@%A%@AE@%). The Enter
  8655. commands are listed below:%@NL@%
  8656. %@NL@%
  8657. %@CR:MCVA2002@%%@AB@%Command                     Command Name%@AE@%%@EH@%%@NL@%
  8658. %@NL@%
  8659. %@AB@%E%@AE@%                           Enter (size is the default type)%@NL@%
  8660. %@NL@%
  8661. %@AB@%EB%@AE@%                          Enter Bytes%@NL@%
  8662. %@NL@%
  8663. %@AB@%EA%@AE@%                          Enter ASCII%@NL@%
  8664. %@NL@%
  8665. %@AB@%EI%@AE@%                          Enter Integers%@NL@%
  8666. %@NL@%
  8667. %@AB@%EU%@AE@%                          Enter Unsigned Integers%@NL@%
  8668. %@NL@%
  8669. %@AB@%EW%@AE@%                          Enter Words%@NL@%
  8670. %@NL@%
  8671. %@AB@%ED%@AE@%                          Enter Double Words%@NL@%
  8672. %@NL@%
  8673. %@AB@%ES%@AE@%                          Enter Short Reals%@NL@%
  8674. %@NL@%
  8675. %@AB@%EL%@AE@%                          Enter Long Reals%@NL@%
  8676. %@NL@%
  8677. %@AB@%ET%@AE@%                          Enter 10-Byte Reals%@NL@%
  8678. %@NL@%
  8679. %@CR:MCVA2003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8680. %@NL@%
  8681. %@CR:MCVA2004@%%@4@%The Enter commands cannot be executed with the mouse.%@EH@%%@NL@%
  8682. %@NL@%
  8683. %@CR:MCVA2005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8684. %@NL@%
  8685. %@CR:MCVA2006@%%@4@%The Enter commands cannot be executed with keyboard commands.%@EH@%%@NL@%
  8686. %@NL@%
  8687. %@CR:MCVA2007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8688. %@NL@%
  8689. %@CR:MCVA2008@%%@4@%To enter data (or code) to memory with a dialog command, enter a command%@EH@%
  8690. line with the following syntax:%@NL@%
  8691. %@NL@%
  8692.      %@AB@%E%@AE@%«%@AI@%type%@AE@%» %@AI@%address%@AE@% «%@AI@%list%@AE@%»%@NL@%
  8693. %@NL@%
  8694. %@CR:MCVA2009@%%@4@%The %@AI@%type%@AE@% is a one-letter specifier that indicates the type of the data to be%@EH@%
  8695. entered. The %@AI@%address%@AE@% indicates where the data will be entered. If no segment
  8696. is given in the address, the data segment (DS) is assumed.%@NL@%
  8697. %@NL@%
  8698. %@CR:MCVA200A@%%@4@%The %@AI@%list%@AE@% can consist of one or more expressions that evaluate to data of the%@EH@%
  8699. size specified by %@AI@%type%@AE@% (the expressions in the list are separated by
  8700. spaces). This data will be entered to memory at %@AI@%address%@AE@%. If one of the
  8701. values in the list is invalid, an error message will be displayed. The
  8702. values preceding the error are entered; values at and following the error
  8703. are not entered.%@NL@%
  8704. %@NL@%
  8705. %@CR:MCVA200B@%%@4@%The expressions in the list are evaluated in the current radix, regardless%@EH@%
  8706. of the size and type of data being entered. For example, if the radix is 10
  8707. and you give the value 10 in a list with the Enter Words command, the
  8708. decimal value 10 will be entered even though word values are normally
  8709. entered in hexadecimal. This means that the Enter Words, Enter Integers, and
  8710. Enter Unsigned Integers commands are identical when used with the list
  8711. method since two-byte data are being entered for each command.%@NL@%
  8712. %@NL@%
  8713. %@CR:MCVA200C@%%@4@%If %@AI@%list%@AE@% is not given, the CodeView debugger will prompt for values to be%@EH@%
  8714. entered to memory. Values entered in response to prompts are accepted in
  8715. hexadecimal for the Enter Bytes, Enter ASCII, Enter Words, and Enter Double
  8716. Words commands. The Enter Integers command accepts signed decimal integers,
  8717. while the Enter Unsigned Integers command accepts unsigned decimal integers.
  8718. The Enter Short Reals, Enter Long Reals, and Enter 10-Byte Reals commands
  8719. accept decimal floating-point values.%@NL@%
  8720. %@NL@%
  8721. %@CR:MCVA200D@%%@4@%With the prompting method of data entry, the CodeView debugger prompts for a%@EH@%
  8722. new value at %@AI@%address%@AE@% by displaying the address and its current value. As
  8723. explained below, you can then replace the value, skip to the next value,
  8724. return to a previous value, or exit the command.%@NL@%
  8725. %@NL@%
  8726. %@CR:MCVA200E@%  1. To replace the value, type the new value after the current value.%@NL@%
  8727. %@NL@%
  8728.   2. To skip to the next value, press the SPACEBAR. Once you have skipped to%@NL@%
  8729.      the next value, you can change its value or skip to the following%@NL@%
  8730.      value. If you pass the end of the display, the CodeView debugger%@NL@%
  8731.      displays a new address to start a new display line.%@NL@%
  8732. %@NL@%
  8733.   3. To return to the preceding value, type a backslash (%@AB@%\%@AE@%). When you return%@NL@%
  8734.      to the preceding value, the debugger starts a new display line with the%@NL@%
  8735.      address and value.%@NL@%
  8736. %@NL@%
  8737.   4. To stop entering values and return to the CodeView prompt, press ENTER.%@NL@%
  8738.      You can exit the command at any time.%@NL@%
  8739. %@NL@%
  8740. %@CR:MCVA200F@%%@4@%Sections 10.2.1%@BO:   707ab@%-10.2.10 discuss the Enter commands in order of the size of%@EH@%
  8741.  
  8742. data they accept.%@NL@%
  8743. %@NL@%
  8744. %@CR:MCVA200G@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8745. %@NL@%
  8746.      >EW PLACE 16 32%@NL@%
  8747. %@NL@%
  8748. %@CR:MCVA200H@%%@4@%The example above shows how to enter two word-sized values at the %@AS@%PLACE%@AE@%%@EH@%
  8749. address.%@NL@%
  8750. %@NL@%
  8751.      >EW PLACE%@NL@%
  8752. %@NL@%
  8753.      3DA5:0B20 00F3.%@AH@% %@AE@%%@NL@%
  8754. %@NL@%
  8755. %@CR:MCVA200I@%%@4@%The example above illustrates the prompting method of entering data. When%@EH@%
  8756. you supply the address where you want to enter data but supply no data, the
  8757. CodeView debugger displays the current value of the address and waits for
  8758. you to enter a new value. The reverse-video space (%@AH@% %@AE@%) in this example and
  8759. the examples below represents the CodeView cursor. You change the value %@AS@%F3%@AE@%
  8760. to the new value 16 (10 hexadecimal) by typing %@AS@%10%@AE@% (without pressing ENTER
  8761. yet). The value must be typed in hexadecimal for the Enter Words command,
  8762. as shown below:%@NL@%
  8763. %@NL@%
  8764.      >EW PLACE%@NL@%
  8765. %@NL@%
  8766.      3DA5:0B20  00F3.10%@AH@% %@AE@%%@NL@%
  8767. %@NL@%
  8768. %@CR:MCVA200J@%%@4@%You can then skip to the next value by pressing the SPACEBAR. The CodeView%@EH@%
  8769. debugger responds by displaying the next value, as shown below:%@NL@%
  8770. %@NL@%
  8771.      >EW PLACE%@NL@%
  8772. %@NL@%
  8773.      3DA5:0B20  00F3.10  4F20.%@AH@% %@AE@%%@AS@%%@NL@%
  8774. %@NL@%
  8775. %@CR:MCVA200K@%%@4@%You can then type another hexadecimal value, such as %@AS@%30%@AE@%:%@EH@%%@NL@%
  8776. %@NL@%
  8777.      >EW PLACE%@NL@%
  8778. %@NL@%
  8779.      3DA5:0B20  00F3.10  4F20.30%@AH@% %@AE@%%@AS@%%@NL@%
  8780. %@NL@%
  8781. %@CR:MCVA200L@%%@4@%To move to the next value, press the SPACEBAR.%@EH@%%@NL@%
  8782. %@NL@%
  8783.      >EW PLACE%@NL@%
  8784. %@NL@%
  8785.      3DA5:0B20  00F3.10  4F20.30  3DC1.%@AH@% %@AE@%%@AS@%%@NL@%
  8786. %@NL@%
  8787. %@CR:MCVA200M@%%@4@%Assume you realize that the last value entered, %@AS@%30%@AE@%, is incorrect. You really%@EH@%
  8788. wanted to enter %@AS@%20%@AE@%. You could return to the previous value by typing a
  8789. backslash. The CodeView debugger starts a new line, starting with the
  8790. previous value. Note that the backslash is not echoed on the screen:%@NL@%
  8791. %@NL@%
  8792.      >EW PLACE%@NL@%
  8793. %@NL@%
  8794.      3DA5:0B20  00F3.10  4F20.30  3DC1.%@NL@%
  8795.      3DA5:0B22  0030.%@AH@% %@AE@%%@AS@%%@NL@%
  8796. %@NL@%
  8797. %@CR:MCVA200N@%%@4@%Type the correct value, %@AS@%20%@AE@%:%@EH@%%@NL@%
  8798. %@NL@%
  8799.      >EW PLACE%@NL@%
  8800. %@NL@%
  8801.      3DA5:0B20  00F3.10  4F20.30  3DC1.%@NL@%
  8802.      3DA5:0B22  0030.20%@AH@% %@AE@%%@AS@%%@NL@%
  8803. %@NL@%
  8804. %@CR:MCVA200O@%%@4@%If this is the last value you want to enter, press ENTER to stop. The%@EH@%
  8805. CodeView prompt reappears, as shown below:%@NL@%
  8806. %@NL@%
  8807.      >EW PLACE%@NL@%
  8808. %@NL@%
  8809.      3DA5:0B20  00F3.10  4F20.30  3DC1.%@NL@%
  8810.      3DA5:0B22  0030.20%@NL@%
  8811.      >%@AH@% %@AE@%%@AS@%%@NL@%
  8812. %@NL@%
  8813. %@NL@%
  8814. %@CR:MCVA2100@%%@3@%%@AB@%10.2.1  Enter Command%@AE@%%@EH@%%@NL@%
  8815. %@NL@%
  8816. %@CR:MCVA2101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8817. %@NL@%
  8818.      %@AB@%E%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  8819. %@NL@%
  8820. %@CR:MCVA2102@%%@4@%The Enter command enters one or more values into memory at the specified%@EH@%
  8821. %@AI@%address%@AE@%. The data are entered in the format of the default type, which is
  8822. the last type specified with a Dump, Enter, Watch Memory, or Tracepoint
  8823. Memory command. If none of these commands has been entered during the
  8824. session, the default type is bytes.%@NL@%
  8825. %@NL@%
  8826. %@CR:MCVA2103@%%@4@%Use this command with caution when entering values in the list format;%@EH@%
  8827. values will be truncated if you enter a word-sized value when the default
  8828. type is actually bytes. If you are not sure of the current default type,
  8829. specify the size in the command.%@NL@%
  8830. %@NL@%
  8831. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8832. %@AI@%NOTE%@AE@%%@NL@%
  8833.    The Execute command and the Enter command have the same command letter%@NL@%
  8834.    (%@AB@%E%@AE@%). The difference is that the Execute command never takes an argument;%@NL@%
  8835.    the Enter command always requires at least one argument.%@NL@%
  8836. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8837. %@NL@%
  8838. %@NL@%
  8839. %@CR:MCVA2200@%%@3@%%@AB@%10.2.2  Enter Bytes Command%@AE@%%@EH@%%@NL@%
  8840. %@NL@%
  8841. %@CR:MCVA2201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8842. %@NL@%
  8843.      %@AB@%EB%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  8844. %@NL@%
  8845. %@CR:MCVA2202@%%@4@%The Enter Bytes command enters one or more byte values into memory at%@EH@%
  8846. %@AI@%address%@AE@%. The optional %@AI@%list%@AE@% can be entered as a list of expressions separated
  8847. by spaces. The expressions are evaluated and entered in the current radix.
  8848. If %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values that must
  8849. be entered in hexadecimal.%@NL@%
  8850. %@NL@%
  8851. %@CR:MCVA2203@%%@4@%The Enter Bytes command can also be used to enter strings, as described in%@EH@%
  8852. Section 10.2.3%@BO:   7124c@%, "Enter ASCII Command."%@NL@%
  8853. %@NL@%
  8854. %@CR:MCVA2204@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8855. %@NL@%
  8856.      >EB 256 10 20 30%@NL@%
  8857.      >%@NL@%
  8858. %@NL@%
  8859. %@CR:MCVA2205@%%@4@%If the current radix is 10, the above example replaces the three bytes at%@EH@%
  8860. DS:256, DS:257, and DS:258 with the decimal values %@AS@%10%@AE@%, %@AS@%20%@AE@%, and %@AS@%30%@AE@%. (These
  8861. three bytes correspond to the hexadecimal addresses DS:0100, DS:0101, and
  8862. DS:0102.)%@NL@%
  8863. %@NL@%
  8864.      >EB 256%@NL@%
  8865. %@NL@%
  8866.      3DA5:0100  130F.A%@NL@%
  8867.      >%@AS@%%@NL@%
  8868. %@NL@%
  8869. %@CR:MCVA2206@%%@4@%The example above replaces the byte at DS:256 (DS:0100 hexadecimal) with 10%@EH@%
  8870. (0A hexadecimal).%@NL@%
  8871. %@NL@%
  8872. %@NL@%
  8873. %@CR:MCVA2300@%%@3@%%@AB@%10.2.3  Enter ASCII Command%@AE@%%@EH@%%@NL@%
  8874. %@NL@%
  8875. %@CR:MCVA2301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8876. %@NL@%
  8877.      %@AB@%EA%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  8878. %@NL@%
  8879. %@CR:MCVA2302@%%@4@%The Enter ASCII command works in the same way as the Enter Bytes command%@EH@%
  8880. (%@AB@%EB%@AE@%) described in Section 10.2.2%@BO:   70cc7@% above. The %@AI@%list%@AE@% version of this command can
  8881. be used to enter a string expression.%@NL@%
  8882. %@NL@%
  8883. %@CR:MCVA2303@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  8884. %@NL@%
  8885.      >EA message "File cannot be found"%@NL@%
  8886.      >%@NL@%
  8887. %@NL@%
  8888. %@CR:MCVA2304@%%@4@%In the example above, the string %@AS@%File cannot be found%@AE@% is entered starting at%@EH@%
  8889. the symbolic address %@AS@%message%@AE@%. (Note that the double quotation marks are
  8890. CodeView string delimiters.)%@NL@%
  8891. %@NL@%
  8892. %@CR:MCVA2305@%%@4@%You can also use the Enter Bytes command to enter a string expression, or%@EH@%
  8893. you can enter nonstring values using the Enter ASCII command.%@NL@%
  8894. %@NL@%
  8895. %@NL@%
  8896. %@CR:MCVA2400@%%@3@%%@AB@%10.2.4  Enter Integers Command%@AE@%%@EH@%%@NL@%
  8897. %@NL@%
  8898. %@CR:MCVA2401@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8899. %@NL@%
  8900.      %@AB@%EI%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  8901. %@NL@%
  8902. %@CR:MCVA2402@%%@4@%The Enter Integers command enters one or more word values into memory at%@EH@%
  8903. %@AI@%address%@AE@% using the signed-integers format. With the CodeView debugger, a
  8904. signed integer can be any decimal integer between -32,768 and 32,767.%@NL@%
  8905. %@NL@%
  8906. %@CR:MCVA2403@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of expressions separated by%@EH@%
  8907. spaces. The expressions are entered and evaluated in the current radix. If
  8908. %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values that must be
  8909. entered in decimal.%@NL@%
  8910. %@NL@%
  8911. %@CR:MCVA2404@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8912. %@NL@%
  8913.      >EI 256 -10 10 -20%@NL@%
  8914.      >%@NL@%
  8915. %@NL@%
  8916. %@CR:MCVA2405@%%@4@%If the current radix is 10, the example above replaces the three integers at%@EH@%
  8917. DS:256, DS:258, and DS:260 with the decimal values %@AS@%-10%@AE@%, 10, and %@AS@%-20%@AE@%. (The
  8918. three addresses correspond to the three hexadecimal addresses DS:0100,
  8919. DS:0102, and DS:0104.)%@NL@%
  8920. %@NL@%
  8921.      >EI 256%@NL@%
  8922. %@NL@%
  8923.      3DA5:0100  130F.-10%@NL@%
  8924.      >%@NL@%
  8925. %@NL@%
  8926. %@CR:MCVA2406@%%@4@%The example above replaces the integer at DS:256 (hexadecimal address%@EH@%
  8927. DS:0100) with %@AS@%-10%@AE@%.%@AS@%%@NL@%
  8928. %@NL@%
  8929. %@NL@%
  8930. %@CR:MCVA2500@%%@3@%%@AB@%10.2.5  Enter Unsigned Integers Command%@AE@%%@EH@%%@NL@%
  8931. %@NL@%
  8932. %@CR:MCVA2501@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8933. %@NL@%
  8934.      %@AB@%EU%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  8935. %@NL@%
  8936. %@CR:MCVA2502@%%@4@%The Enter Unsigned Integers command enters one or more word values into%@EH@%
  8937. memory at %@AI@%address%@AE@% using the unsigned-integers format. With the CodeView
  8938. debugger, an unsigned integer can be any decimal integer between 0 and
  8939. 65,535. The optional %@AI@%list%@AE@% can be entered as a list of expressions separated
  8940. by spaces. The expressions are entered and evaluated in the current radix.
  8941. If %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values that must
  8942. be entered in decimal.%@NL@%
  8943. %@NL@%
  8944. %@CR:MCVA2503@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8945. %@NL@%
  8946.      >EU 256 10 20 30%@NL@%
  8947.      >%@NL@%
  8948. %@NL@%
  8949. %@CR:MCVA2504@%%@4@%If the current radix is 10, the example above replaces the three unsigned%@EH@%
  8950. integers at DS:256, DS:258, and DS:260 with the decimal values %@AS@%10%@AE@%, %@AS@%20%@AE@%, and
  8951. %@AS@%30%@AE@%. (These addresses correspond to the hexadecimal addresses DS:0100,
  8952. DS:0102, and DS:0104.)%@NL@%
  8953. %@NL@%
  8954.      >EU 256%@NL@%
  8955. %@NL@%
  8956.      3DA5:0100  130F.10%@NL@%
  8957.      >%@NL@%
  8958. %@NL@%
  8959. %@CR:MCVA2505@%%@4@%The example above replaces the integer at DS:256 (DS:0100 hexadecimal) with%@EH@%
  8960. %@AS@%10%@AE@%.%@NL@%
  8961. %@NL@%
  8962. %@NL@%
  8963. %@CR:MCVA2600@%%@3@%%@AB@%10.2.6  Enter Words Command%@AE@%%@EH@%%@NL@%
  8964. %@NL@%
  8965. %@CR:MCVA2601@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8966. %@NL@%
  8967.      %@AB@%EW%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  8968. %@NL@%
  8969. %@CR:MCVA2602@%%@4@%The Enter Words command enters one or more word values into memory at%@EH@%
  8970. %@AI@%address%@AE@%.%@NL@%
  8971. %@NL@%
  8972. %@CR:MCVA2603@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of expressions separated by%@EH@%
  8973. spaces. The expressions are entered and evaluated in the current radix. If
  8974. %@AI@%list%@AE@% is not given, CodeView prompts for new values that must be entered in
  8975. hexadecimal.%@NL@%
  8976. %@NL@%
  8977. %@CR:MCVA2604@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8978. %@NL@%
  8979.      >EW 256 10 20 30%@NL@%
  8980.      >%@NL@%
  8981. %@NL@%
  8982. %@CR:MCVA2605@%%@4@%If the current radix is 10, the example above replaces the three words at%@EH@%
  8983. DS:256, DS:258, and DS:260 with the decimal values %@AS@%10%@AE@%, %@AS@%20%@AE@%, and %@AS@%30%@AE@%. (These
  8984. addresses correspond to the hexadecimal addresses DS:0100, DS:0102, and
  8985. DS:0104.)%@NL@%
  8986. %@NL@%
  8987.      >EW 256%@NL@%
  8988. %@NL@%
  8989.      3DA5:0100  130F.A%@NL@%
  8990.      >%@NL@%
  8991. %@NL@%
  8992. %@CR:MCVA2606@%%@4@%The example above replaces the integer at DS:256 (DS:0100 hexadecimal) with%@EH@%
  8993. 10 (0A hexadecimal).%@NL@%
  8994. %@NL@%
  8995. %@NL@%
  8996. %@CR:MCVA2700@%%@3@%%@AB@%10.2.7  Enter Double Words Command%@AE@%%@EH@%%@NL@%
  8997. %@NL@%
  8998. %@CR:MCVA2701@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8999. %@NL@%
  9000.      %@AB@%ED%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  9001. %@NL@%
  9002. %@CR:MCVA2702@%%@4@%The Enter Double Words command enters one or more double-word values into%@EH@%
  9003. memory at %@AI@%address%@AE@%. Double words are displayed and entered in the address%@NL@%
  9004. %@NL@%
  9005. %@CR:MCVA2703@%%@4@%format %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@%──that is, two words separated by a colon (%@AB@%:%@AE@%). If the%@EH@%
  9006. colon is omitted and only one word entered, only the offset portion of the
  9007. address will be changed.%@NL@%
  9008. %@NL@%
  9009. %@CR:MCVA2704@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of expressions separated by%@EH@%
  9010. spaces. The expressions are entered and evaluated in the current radix. If
  9011. %@AI@%list%@AE@% is not given, CodeView prompts for new values that must be entered in
  9012. hexadecimal.%@NL@%
  9013. %@NL@%
  9014. %@CR:MCVA2705@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9015. %@NL@%
  9016.      >ED 256 8700:12008%@NL@%
  9017.      >%@NL@%
  9018. %@NL@%
  9019. %@CR:MCVA2706@%%@4@%If the current radix is 10, the example above replaces the double words at%@EH@%
  9020. DS:256 (DS:0100 hexadecimal) with the decimal address %@AS@%8700:12008%@AE@%
  9021. (hexadecimal address 21FC:2EE8).%@NL@%
  9022. %@NL@%
  9023.      >ED 256%@NL@%
  9024. %@NL@%
  9025.      3DA5:0100  21FC:2EE8.2EE9%@NL@%
  9026.      >%@NL@%
  9027. %@NL@%
  9028. %@CR:MCVA2707@%%@4@%The example above replaces the offset portion of the double word at DS:256%@EH@%
  9029. (DS:0100 hexadecimal) with %@AS@%2EE9%@AE@% hexadecimal. Since the segment portion of
  9030. the address is not provided, the existing segment (%@AS@%21FC%@AE@% hexadecimal) is
  9031. unchanged.%@NL@%
  9032. %@NL@%
  9033. %@NL@%
  9034. %@CR:MCVA2800@%%@3@%%@AB@%10.2.8  Enter Short Reals Command%@AE@%%@EH@%%@NL@%
  9035. %@NL@%
  9036. %@CR:MCVA2801@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  9037. %@NL@%
  9038.      %@AB@%ES%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  9039. %@NL@%
  9040. %@CR:MCVA2802@%%@4@%The Enter Short Reals command enters one or more short-real values into%@EH@%
  9041. memory at %@AI@%address%@AE@%.%@NL@%
  9042. %@NL@%
  9043. %@CR:MCVA2803@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of real numbers separated by%@EH@%
  9044. spaces. The numbers must be entered in decimal, regardless of the current
  9045. radix. If %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values
  9046. that must be entered in decimal. Short-real numbers can be entered either in
  9047. floating-point format or in scientific-notation format.%@NL@%
  9048. %@NL@%
  9049. %@CR:MCVA2804@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9050. %@NL@%
  9051.      >ES 256 23.479 1/4 -1.65E+4 235%@NL@%
  9052.      >%@NL@%
  9053. %@NL@%
  9054. %@CR:MCVA2805@%%@4@%The example above replaces the four numbers at DS:256, DS:260, DS:264, and%@EH@%
  9055. DS:268 with the real numbers %@AS@%23.479%@AE@%, %@AS@%0.25%@AE@%, %@AS@%-1650.0%@AE@%, and %@AS@%235.0%@AE@%. (These
  9056. addresses correspond to the hexadecimal addresses DS:0100, DS:0104, DS:0108,
  9057. and DS:0112.)%@NL@%
  9058. %@NL@%
  9059.      >ES PI%@NL@%
  9060.      3DA5:0064  42 79 74 65   7.215589E+022  3.141593%@NL@%
  9061.      >%@NL@%
  9062. %@NL@%
  9063. %@CR:MCVA2806@%%@4@%The example above replaces the number at the symbolic address %@AS@%PI%@AE@% with%@EH@%
  9064. %@AS@%3.141593%@AE@%.%@NL@%
  9065. %@NL@%
  9066. %@NL@%
  9067. %@CR:MCVA2900@%%@3@%%@AB@%10.2.9  Enter Long Reals Command%@AE@%%@EH@%%@NL@%
  9068. %@NL@%
  9069. %@CR:MCVA2901@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  9070. %@NL@%
  9071.      %@AB@%EL%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  9072. %@NL@%
  9073. %@CR:MCVA2902@%%@4@%The Enter Long Reals command enters one or more long-real values into memory%@EH@%
  9074. at %@AI@%address%@AE@%.%@NL@%
  9075. %@NL@%
  9076. %@CR:MCVA2903@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of real numbers separated by%@EH@%
  9077. spaces. The numbers must be entered in decimal, regardless of the current
  9078. radix. If %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values
  9079. that must be entered in decimal. Long-real numbers can be entered either in
  9080. floating-point format or in scientific-notation format.%@NL@%
  9081. %@NL@%
  9082. %@CR:MCVA2904@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9083. %@NL@%
  9084.      >EL 256 23.479 1/4 -1.65E+4 235%@NL@%
  9085.      >%@NL@%
  9086. %@NL@%
  9087. %@CR:MCVA2905@%%@4@%The example above replaces the four numbers at DS:256, DS:264, DS:272, and%@EH@%
  9088. DS:280 with the real numbers %@AS@%23.479%@AE@%, %@AS@%0.25%@AE@%, %@AS@%-1650.0%@AE@%, and %@AS@%235.0%@AE@% . (These
  9089. addresses correspond to the hexadecimal addresses DS:0100, DS:0108, DS:0110,
  9090. and DS:0118.)%@NL@%
  9091. %@NL@%
  9092.      >EL PI%@NL@%
  9093.      3DA5:0064  42 79 74 65 DC OF 49 40   5.012391E+001  3.141593%@NL@%
  9094.      >%@AS@%%@NL@%
  9095. %@NL@%
  9096. %@CR:MCVA2906@%%@4@%The example above replaces the number at the symbolic address %@AS@%PI%@AE@% with%@EH@%
  9097. %@AS@%3.141593%@AE@%.%@NL@%
  9098. %@NL@%
  9099. %@NL@%
  9100. %@CR:MCVA2A00@%%@3@%%@AB@%10.2.10  Enter 10-Byte Reals Command%@AE@%%@EH@%%@NL@%
  9101. %@NL@%
  9102. %@CR:MCVA2A01@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  9103. %@NL@%
  9104.      %@AB@%ET%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  9105. %@NL@%
  9106. %@CR:MCVA2A02@%%@4@%The Enter 10-Byte Reals command enters one or more 10-byte-real values into%@EH@%
  9107. memory at %@AI@%address%@AE@%.%@NL@%
  9108. %@NL@%
  9109. %@CR:MCVA2A03@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of real numbers separated by%@EH@%
  9110. spaces. The numbers must be entered in decimal, regardless of the current
  9111. radix. If %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values
  9112. that must be entered in decimal. The numbers can be entered either in
  9113. floating-point format or in scientific-notation format.%@NL@%
  9114. %@NL@%
  9115. %@CR:MCVA2A04@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9116. %@NL@%
  9117.      >ET 256 23.479 1/4 -1.65E+4 235%@NL@%
  9118.      >%@NL@%
  9119. %@NL@%
  9120. %@CR:MCVA2A05@%%@4@%The example above replaces the four numbers at DS:256, DS:266, DS:276, and%@EH@%
  9121. DS:286 with the real numbers %@AS@%23.479%@AE@%, %@AS@%0.25%@AE@%, %@AS@%-1650.0%@AE@%, and %@AS@%235.0%@AE@%. (These
  9122. addresses correspond to the hexadecimal addresses DS:0100, DS:010A, DS:0114,
  9123. and DS:011E.)%@NL@%
  9124. %@NL@%
  9125. %@NL@%
  9126.      >ET PI%@NL@%
  9127.      3DA5:0064  42 79 74 65 DC 0F 49 40 7F BD  -3.292601E-193  3.141593%@NL@%
  9128.      >%@NL@%
  9129. %@NL@%
  9130. %@CR:MCVA2A06@%%@4@%The example above replaces the number at the symbolic address %@AS@%PI%@AE@% with%@EH@%
  9131. %@AS@%3.141593%@AE@%.%@NL@%
  9132. %@NL@%
  9133. %@NL@%
  9134. %@CR:MCVA3000@%%@2@%%@AB@%10.3  Fill Memory Command%@AE@%%@EH@%%@NL@%
  9135. %@NL@%
  9136. %@CR:MCVA3001@%%@4@%The Fill Memory command provides an efficient way of filling up a large or%@EH@%
  9137. small block of memory with any values you specify. It is primarily of
  9138. interest to assembly programmers because the command enters values directly
  9139. into memory. However, you may find it useful for initializing large data
  9140. areas such as an array or structure.%@NL@%
  9141. %@NL@%
  9142. %@CR:MCVA3002@%%@4@%You can enter arguments to the Fill Memory command using any radix.%@EH@%%@NL@%
  9143. %@NL@%
  9144. %@CR:MCVA3003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9145. %@NL@%
  9146. %@CR:MCVA3004@%%@4@%The Fill Memory command cannot be executed with a mouse.%@EH@%%@NL@%
  9147. %@NL@%
  9148. %@CR:MCVA3005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9149. %@NL@%
  9150. %@CR:MCVA3006@%%@4@%The Fill Memory command cannot be executed with a keyboard command.%@EH@%%@NL@%
  9151. %@NL@%
  9152. %@CR:MCVA3007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9153. %@NL@%
  9154. %@CR:MCVA3008@%%@4@%To fill an area of memory with values you specify, enter the Fill Memory%@EH@%
  9155. command as follow:%@NL@%
  9156. %@NL@%
  9157.      %@AB@%F%@AE@% %@AI@%range%@AE@% %@AI@%list%@AE@%%@NL@%
  9158. %@NL@%
  9159. %@CR:MCVA3009@%%@4@%The Fill Memory command fills the addresses in the specified %@AI@%range%@AE@% with the%@EH@%
  9160. byte values specified in %@AI@%list%@AE@%. The values in the list are repeated until the
  9161. whole range is filled. (Thus, if you specify only one value, the entire
  9162. range is filled with that same value.) If the %@AI@%list%@AE@% has more values than the
  9163. number of bytes in the %@AI@%range%@AE@%, the command ignores any extra values.%@NL@%
  9164. %@NL@%
  9165. %@CR:MCVA300A@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9166. %@NL@%
  9167.      >F 100 L 100 0   ;* hexadecimal radix assumed%@NL@%
  9168.      >%@NL@%
  9169. %@NL@%
  9170. %@CR:MCVA300B@%%@4@%The first example fills 255 (100 hexadecimal) bytes of memory starting at%@EH@%
  9171. DS:0100 with the value 0. This command could be used to reinitialize the
  9172. program's data without having to restart the program.%@NL@%
  9173. %@NL@%
  9174.      >F table L 64 42 79 74 ;* hexadecimal radix assumed%@NL@%
  9175.      >%@NL@%
  9176. %@NL@%
  9177. %@CR:MCVA300C@%%@4@%The second example fills the 100 (64 hexadecimal) bytes starting at %@AS@%table%@AE@%%@EH@%
  9178. with the following hexadecimal byte values: 42, 79, 74. These three values
  9179. are repeated until all 100 bytes are filled.%@NL@%
  9180. %@NL@%
  9181. %@NL@%
  9182. %@CR:MCVA4000@%%@2@%%@AB@%10.4  Move Memory Command%@AE@%%@EH@%%@NL@%
  9183. %@NL@%
  9184. %@CR:MCVA4001@%%@4@%The Move Memory command enables you to copy all the values in one block of%@EH@%
  9185. memory directly to another block of memory of the same size. This command is
  9186. of most interest to assembly programmers, but it can be used by anyone who
  9187. wants to do large data transfers. For example, you can use this command to
  9188. copy all the values in one array to the elements of another.%@NL@%
  9189. %@NL@%
  9190. %@CR:MCVA4002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9191. %@NL@%
  9192. %@CR:MCVA4003@%%@4@%The Move Memory command cannot be executed with the mouse.%@EH@%%@NL@%
  9193. %@NL@%
  9194. %@CR:MCVA4004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9195. %@NL@%
  9196. %@CR:MCVA4005@%%@4@%The Move Memory command cannot be executed with a keyboard command.%@EH@%%@NL@%
  9197. %@NL@%
  9198. %@CR:MCVA4006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9199. %@NL@%
  9200. %@CR:MCVA4007@%%@4@%To copy the values in one block of memory to another, enter the Move Memory%@EH@%
  9201. command with the following syntax:%@NL@%
  9202. %@NL@%
  9203.      %@AB@%M%@AE@% %@AI@%range%@AE@% %@AI@%address%@AE@%%@NL@%
  9204. %@NL@%
  9205. %@CR:MCVA4008@%%@4@%The values in the block of memory specified by %@AI@%range%@AE@% are copied to a block%@EH@%
  9206. of the same size beginning at %@AI@%address%@AE@%. All data in %@AI@%range%@AE@% are guaranteed to
  9207. be copied completely over to the destination block, even if the two blocks
  9208. overlap. However, if they do overlap, some of the original data in %@AI@%range%@AE@%
  9209. will be altered.%@NL@%
  9210. %@NL@%
  9211. %@CR:MCVA4009@%%@4@%To prevent loss of data, the Move Memory command copies data starting at the%@EH@%
  9212. source block's lowest address whenever the source is at a higher address
  9213. than the destination. If the source is at a lower address, the Move Memory
  9214. command copies data beginning at the source block's highest address.%@NL@%
  9215. %@NL@%
  9216. %@CR:MCVA400A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  9217. %@NL@%
  9218.      >M arr1(1) L arsize arr2(1)  ;* FORTRAN example%@NL@%
  9219.      >%@NL@%
  9220. %@NL@%
  9221. %@CR:MCVA400B@%%@4@%In the example above, the block of memory beginning with the first element%@EH@%
  9222. of %@AS@%arr1%@AE@% and %@AS@%arsize%@AE@% bytes long is copied directly to a block of the same size
  9223. beginning at the address of the first element of %@AS@%arr2%@AE@%. In C, this command
  9224. would be entered as %@AS@%M arr1[0] L arsize arr2[0]%@AE@%.%@NL@%
  9225. %@NL@%
  9226. %@NL@%
  9227. %@CR:MCVA5000@%%@2@%%@AB@%10.5  Port Output Command%@AE@%%@EH@%%@NL@%
  9228. %@NL@%
  9229. %@CR:MCVA5001@%%@4@%The Port Output command sends specific byte values to hardware ports. It is%@EH@%
  9230. primarily of use to assembly programmers writing code that interacts
  9231. directly with hardware.%@NL@%
  9232. %@NL@%
  9233. %@CR:MCVA5002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9234. %@NL@%
  9235. %@CR:MCVA5003@%%@4@%The Port Output command cannot be executed with a mouse.%@EH@%%@NL@%
  9236. %@NL@%
  9237. %@CR:MCVA5004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9238. %@NL@%
  9239. %@CR:MCVA5005@%%@4@%The Port Output command cannot be executed with a keyboard command.%@EH@%%@NL@%
  9240. %@NL@%
  9241. %@CR:MCVA5006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9242. %@NL@%
  9243. %@CR:MCVA5007@%%@4@%To output to a hardware port, enter the Port Output command with the%@EH@%
  9244. following syntax:%@NL@%
  9245. %@NL@%
  9246.      %@AB@%O%@AE@% %@AI@%port byte%@AE@%%@NL@%
  9247. %@NL@%
  9248. %@CR:MCVA5008@%%@4@%The specified %@AI@%byte%@AE@% is sent to the specified %@AI@%port%@AE@% in which %@AI@%port%@AE@% is a 16-bit%@EH@%
  9249. port address.%@NL@%
  9250. %@NL@%
  9251. %@CR:MCVA5009@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  9252. %@NL@%
  9253.      >O 2F8 4F      %@AI@%;* hexadecimal system radix assumed%@AE@%%@NL@%
  9254.      >%@NL@%
  9255. %@NL@%
  9256. %@CR:MCVA500A@%%@4@%The byte value %@AS@%4F%@AE@% hexadecimal is sent to output port %@AS@%2F8%@AE@%.%@EH@%%@NL@%
  9257. %@NL@%
  9258. %@CR:MCVA500B@%%@4@%The example above assumes that the system radix is hexadecimal. However (as%@EH@%
  9259. with all other CodeView commands), you can enter the Port Output command
  9260. using any radix you prefer. Both the %@AI@%port%@AE@% and %@AI@%byte%@AE@% arguments assume system
  9261. radix unless you specify a radix override.%@NL@%
  9262. %@NL@%
  9263. %@CR:MCVA500C@%%@4@%The Port Output command is often used in conjunction with the Port Input%@EH@%
  9264. command discussed in Section 6.7%@BO:   546bf@%.%@NL@%
  9265. %@NL@%
  9266. %@NL@%
  9267. %@CR:MCVA6000@%%@2@%%@AB@%10.6  Register Command%@AE@%%@EH@%%@NL@%
  9268. %@NL@%
  9269. %@CR:MCVA6001@%%@4@%The Register command has two functions: it displays the contents of the%@EH@%
  9270. central processing unit registers and it changes the values of those
  9271. registers. The modification features of the command are explained in this
  9272. section. The display features of the Register command are explained in
  9273. Section 6.8.%@BO:   54cca@%%@NL@%
  9274. %@NL@%
  9275. %@CR:MCVA6002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9276. %@NL@%
  9277. %@CR:MCVA6003@%%@4@%The only register that can be changed with the mouse is the flags register.%@EH@%
  9278. The register's individual bits (called flags) can be set or cleared. To
  9279. change a flag, first make sure the register window is open. The window can
  9280. be opened by selecting Registers from the Options menu or by pressing F2.%@NL@%
  9281. %@NL@%
  9282. %@CR:MCVA6004@%%@4@%The flag values are shown as mnemonics in the bottom of the window. Point to%@EH@%
  9283. the flag you want to change and click either button. The mnemonic word
  9284. representing the flag value will change. The mnemonics for each flag are
  9285. shown in the second and third columns of Table 10.1 below. The color or
  9286. highlighting of the flag will also be reversed when you change a flag. Set
  9287. flags are shown in red on color monitors and in high-intensity text on
  9288. two-color monitors. Cleared flags are shown in light blue on color monitors
  9289. or normal text on two-color monitors.%@NL@%
  9290. %@NL@%
  9291. %@CR:MCVA6005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9292. %@NL@%
  9293. %@CR:MCVA6006@%%@4@%The registers cannot be changed with keyboard commands.%@EH@%%@NL@%
  9294. %@NL@%
  9295. %@CR:MCVA6007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9296. %@NL@%
  9297. %@CR:MCVA6008@%%@4@%To change the value of a register with a dialog command, enter a command%@EH@%
  9298. line with the following syntax:%@NL@%
  9299. %@NL@%
  9300.      %@AB@%R%@AE@% «%@AI@%registername%@AE@%««=»%@AI@%expression%@AE@%»»%@NL@%
  9301. %@NL@%
  9302. %@CR:MCVA6009@%%@4@%To modify the value in a register, type the command letter %@AS@%R%@AE@% followed by%@EH@%
  9303. %@AI@%registername%@AE@%. The CodeView debugger displays the current value of the
  9304. register and prompts for a new value. Press ENTER if you only want to
  9305. examine the value. If you want to change it, type an expression for the new
  9306. value and press ENTER.%@NL@%
  9307. %@NL@%
  9308. %@CR:MCVA600A@%%@4@%As an alternative, you can type both %@AI@%registername%@AE@% and %@AI@%expression%@AE@% in the same%@EH@%
  9309. command. You can use the equal sign (=) between %@AI@%registername%@AE@% and %@AI@%expression%@AE@%,
  9310. but a space has the same effect.%@NL@%
  9311. %@NL@%
  9312. %@CR:MCVA600B@%%@4@%The register name can be any of the following: AX, BX, CX, DX, CS, DS, SS,%@EH@%
  9313. ES, SP, BP, SI, DI, IP, or F (for flags). If you have a 386-based machine
  9314. and have turned the 386 option on, the register name can be one of the
  9315. 32-bit register names shown in table 4.9.%@NL@%
  9316. %@NL@%
  9317. %@CR:MCVA600C@%%@4@%To change a flag value, supply the register name F when you enter the%@EH@%
  9318. Register command. The command displays the value of each flag as a
  9319. two-letter name.%@NL@%
  9320. %@NL@%
  9321. %@CR:MCVA600D@%%@4@%At the end of the list of values, the command displays a dash (-). Enter new%@EH@%
  9322. values after the dash for the flags you wish to change, then press ENTER.
  9323. You can enter flag values in any order. Flags for which new values are not
  9324. entered remain unchanged. If you do not want to change any flags, press
  9325. ENTER.%@NL@%
  9326. %@NL@%
  9327. %@CR:MCVA600E@%%@4@%If you enter an illegal flag name, an error message is displayed. The flags%@EH@%
  9328. preceding the error are changed; flags at and following the error are not
  9329. changed.%@NL@%
  9330. %@NL@%
  9331. %@CR:MCVA600F@%%@4@%The flag values are shown in Table 10.1.%@EH@%%@NL@%
  9332. %@NL@%
  9333. %@CR:MCVAT100@%%@4@%%@AB@%Table 10.1  Flag-Value Mnemonics%@AE@%%@EH@%%@NL@%
  9334. %@NL@%
  9335. %@AB@%Flag Name                Set    Clear%@AE@%
  9336.  
  9337. Overflow                 %@AB@%OV     NV%@AE@%
  9338. Direction                %@AB@%DN     UP%@AE@%
  9339. Interrupt                %@AB@%EI     DI%@AE@%
  9340. Sign                     %@AB@%NG     PL%@AE@%
  9341. Zero                     %@AB@%ZR     NZ%@AE@%
  9342. Auxiliary carry          %@AB@%AC     NA%@AE@%
  9343. Parity                   %@AB@%PE     PO%@AE@%
  9344. Carry                    %@AB@%CY     NC%@AE@%
  9345. %@NL@%
  9346. %@NL@%
  9347. %@CR:MCVA600G@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9348. %@NL@%
  9349.      >R IP 256%@NL@%
  9350.      >%@NL@%
  9351. %@NL@%
  9352. %@CR:MCVA600H@%%@4@%The example above changes the %@AS@%IP%@AE@% register to the value %@AS@%256%@AE@% (0100%@EH@%
  9353. hexadecimal).%@NL@%
  9354. %@NL@%
  9355.      >R AX%@NL@%
  9356.      AX OEOO%@NL@%
  9357.      :%@AH@% %@AE@%%@AS@%%@NL@%
  9358. %@NL@%
  9359. %@CR:MCVA600I@%%@4@%The example above displays the current value of the %@AS@%AX%@AE@% register and prompts%@EH@%
  9360. for a new value (the reverse-video space (%@AH@% %@AE@%) represents the CodeView
  9361. cursor). You can now type any 16-bit value after the colon.%@NL@%
  9362. %@NL@%
  9363.      >R AX%@NL@%
  9364.      AX 0E00%@NL@%
  9365.      :256%@NL@%
  9366.      >%@AH@% %@AE@%%@AS@%%@NL@%
  9367. %@NL@%
  9368. %@CR:MCVA600J@%%@4@%The example above changes the value of %@AS@%AX%@AE@% to 256 (in the current radix).%@EH@%%@NL@%
  9369. %@NL@%
  9370.      >R F UP EI PL%@AS@%%@NL@%
  9371. %@NL@%
  9372. %@CR:MCVA600K@%%@4@%The example above shows the command-line method of changing flag values.%@EH@%%@NL@%
  9373. %@NL@%
  9374.      >R F%@NL@%
  9375.      NV(OV) UP(DN) EI(DI) PL(NG) NZ(ZR) AC(NA) PE(PO) NC(CY) -OV DI ZR%@NL@%
  9376.      >R F%@NL@%
  9377.      OV(NV) UP(DN) DI(EI) PL(NG) ZR(NZ) AC(NA) PE(PO) NC(CY) -%@NL@%
  9378.      >%@NL@%
  9379. %@NL@%
  9380. %@CR:MCVA600L@%%@4@%With the prompting method of changing flag values (shown above), the first%@EH@%
  9381. mnemonic for each flag is the current value, and the second mnemonic (in
  9382. parentheses) is the alternate value. You can enter one or more mnemonics at
  9383. the dash prompt. In the example, the command is given a second time to show
  9384. the results of the first command.%@NL@%
  9385. %@NL@%
  9386. %@NL@%
  9387. %@CR:MCVB0000@%%@1@%%@AB@%Chapter 11  CodeView Control Commands%@AE@%%@EH@%%@NL@%
  9388. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9389. %@NL@%
  9390. %@CR:MCVB0001@%%@4@%This chapter discusses commands that control the operation of the CodeView%@EH@%
  9391. debugger. The commands in this category are listed below:%@NL@%
  9392. %@NL@%
  9393. %@CR:MCVB0002@%%@AB@%Command                     Action%@AE@%%@NL@%
  9394. %@NL@%
  9395. Help (%@AB@%H%@AE@%)                    Displays help%@NL@%
  9396. %@NL@%
  9397. Quit (%@AB@%Q%@AE@%)                    Returns to DOS%@NL@%
  9398. %@NL@%
  9399. Radix (%@AB@%N%@AE@%)                   Changes radix%@NL@%
  9400. %@NL@%
  9401. Redraw (%@AB@%@%@AE@%)                  Redraws screen%@NL@%
  9402. %@NL@%
  9403. Screen Exchange (%@AB@%\%@AE@%)         Switches to output screen%@NL@%
  9404. %@NL@%
  9405. Search (%@AB@%/%@AE@%)                  Searches for regular expression%@NL@%
  9406. %@NL@%
  9407. Shell Escape (%@AB@%!%@AE@%)            Starts new DOS shell%@NL@%
  9408. %@NL@%
  9409. Tab Set (%@AB@%#%@AE@%)                 Sets tab size%@NL@%
  9410. %@NL@%
  9411. Option (%@AB@%O%@AE@%)                  Views or sets CodeView options%@NL@%
  9412. %@NL@%
  9413. Redirection and related     Control redirection of CodeView output or input%@NL@%
  9414. commands
  9415. %@NL@%
  9416. %@NL@%
  9417. %@CR:MCVB1000@%%@2@%%@AB@%11.1  Help Command%@AE@%%@EH@%%@NL@%
  9418. %@NL@%
  9419. %@CR:MCVB1001@%%@4@%CodeView has two help systems: a complete on-line Help system available only%@EH@%
  9420. in window mode and a syntax summary available with sequential mode.%@NL@%
  9421. %@NL@%
  9422. %@CR:MCVB1002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9423. %@NL@%
  9424. %@CR:MCVB1003@%%@4@%To enter the complete on-line Help system with the mouse, point to View on%@EH@%
  9425. the menu bar, press a mouse button and drag the highlight down to a Help
  9426. selection, then release the button. The appropriate help screen will appear.%@NL@%
  9427. %@NL@%
  9428. %@CR:MCVB1004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9429. %@NL@%
  9430. %@CR:MCVB1005@%%@4@%If you are in window mode, press F1 to enter the complete on-line Help%@EH@%
  9431. system. If you are in sequential mode, a syntax-summary screen appears when
  9432. you press F1.%@NL@%
  9433. %@NL@%
  9434. %@CR:MCVB1006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9435. %@NL@%
  9436. %@CR:MCVB1007@%%@4@%If you are in window mode, you can view the complete on-line Help system%@EH@%
  9437. with the following command:%@NL@%
  9438. %@NL@%
  9439.      %@AB@%H%@AE@%%@NL@%
  9440. %@NL@%
  9441. %@CR:MCVB1008@%%@4@%If you are in sequential mode, this command displays a screen containing all%@EH@%
  9442. CodeView dialog commands with the syntax for each. This screen is the only
  9443. help available in sequential mode.%@NL@%
  9444. %@NL@%
  9445. %@NL@%
  9446. %@CR:MCVB2000@%%@2@%%@AB@%11.2  Quit Command%@AE@%%@EH@%%@NL@%
  9447. %@NL@%
  9448. %@CR:MCVB2001@%%@4@%The Quit command terminates CodeView and returns control to DOS.%@EH@%%@NL@%
  9449. %@NL@%
  9450. %@CR:MCVB2002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9451. %@NL@%
  9452. %@CR:MCVB2003@%%@4@%To quit the CodeView debugger with the mouse, point to File on the menu,%@EH@%
  9453. press a mouse button and drag the highlight down to the Exit selection, then
  9454. release the button. The CodeView screen is replaced by the DOS screen with
  9455. the cursor at the DOS prompt.%@NL@%
  9456. %@NL@%
  9457. %@CR:MCVB2004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9458. %@NL@%
  9459. %@CR:MCVB2005@%%@4@%To quit the CodeView debugger with a keyboard command, press ALT+F to open%@EH@%
  9460. the File menu, then press X to select Exit. The CodeView screen is replaced
  9461. by the DOS screen with the cursor at the DOS prompt.%@NL@%
  9462. %@NL@%
  9463. %@CR:MCVB2006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9464. %@NL@%
  9465. %@CR:MCVB2007@%%@4@%To quit the CodeView debugger with a dialog command, enter a command line%@EH@%
  9466. with the following syntax:%@NL@%
  9467. %@NL@%
  9468.      %@AB@%Q%@AE@%%@NL@%
  9469. %@NL@%
  9470. %@CR:MCVB2008@%%@4@%When the command is entered, the CodeView screen is replaced by the DOS%@EH@%
  9471. screen with the cursor at the DOS prompt.%@NL@%
  9472. %@NL@%
  9473. %@NL@%
  9474. %@CR:MCVB3000@%%@2@%%@AB@%11.3  Radix Command%@AE@%%@EH@%%@NL@%
  9475. %@NL@%
  9476. %@CR:MCVB3001@%%@4@%The Radix command changes the current radix for entering arguments and%@EH@%
  9477. displaying the value of expressions. The default radix when you start the
  9478. CodeView debugger is 10 (decimal). Radixes 8 (octal) and 16 (hexadecimal)
  9479. can also be set. Binary and other radixes are not allowed.%@NL@%
  9480. %@NL@%
  9481. %@CR:MCVB3002@%%@4@%The following seven conditions are exceptions; they are not affected by the%@EH@%
  9482. Radix command:%@NL@%
  9483. %@NL@%
  9484. %@CR:MCVB3003@%  1. The radix for entering a new radix is always decimal.%@NL@%
  9485. %@NL@%
  9486.   2. Format specifiers given with the Display Expression command or any of%@NL@%
  9487.      the Watch Statement commands override the current radix.%@NL@%
  9488. %@NL@%
  9489.   3. Addresses output by the Assemble, Dump, Enter, Examine Symbol, and%@NL@%
  9490.      Unassemble commands are always shown in hexadecimal.%@NL@%
  9491. %@NL@%
  9492.   4. In assembly mode, all values are shown in hexadecimal.%@NL@%
  9493. %@NL@%
  9494.   5. The display radix for Dump, Watch Memory, and Tracepoint Memory%@NL@%
  9495.      commands is always hexadecimal if the size is bytes, words, or double%@NL@%
  9496.      words and always decimal if the size is integers, unsigned integers,%@NL@%
  9497.      short reals, long reals, or 10-byte reals.%@NL@%
  9498. %@NL@%
  9499.   6. The input radix for the Enter commands with the prompting method is%@NL@%
  9500.      always hexadecimal if the size is bytes, words, or double words and%@NL@%
  9501.      always decimal if the size is integers, unsigned integers, short reals,%@NL@%
  9502.      long reals, or 10-byte reals. The current radix is used for all values%@NL@%
  9503.      given as part of a list, except real numbers, which must be entered in%@NL@%
  9504.      decimal.%@NL@%
  9505. %@NL@%
  9506.   7. The register display is always in hexadecimal.%@NL@%
  9507. %@NL@%
  9508. %@CR:MCVB3004@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9509. %@NL@%
  9510. %@CR:MCVB3005@%%@4@%You cannot change the input radix with the mouse.%@EH@%%@NL@%
  9511. %@NL@%
  9512. %@CR:MCVB3006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9513. %@NL@%
  9514. %@CR:MCVB3007@%%@4@%You cannot change the input radix with a keyboard command.%@EH@%%@NL@%
  9515. %@NL@%
  9516. %@CR:MCVB3008@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9517. %@NL@%
  9518. %@CR:MCVB3009@%%@4@%To change the input radix with a dialog command, enter a command line with%@EH@%
  9519. the following syntax:%@NL@%
  9520. %@NL@%
  9521.      %@AB@%N%@AE@%«%@AI@%radixnumber%@AE@%»%@NL@%
  9522. %@NL@%
  9523. %@CR:MCVB300A@%%@4@%The %@AI@%radixnumber%@AE@% can be 8 (octal), 10 (decimal), or 16 (hexadecimal). The%@EH@%
  9524. default radix when you start the CodeView debugger is 10 (decimal), unless
  9525. your%@NL@%
  9526. %@NL@%
  9527. %@CR:MCVB300B@%%@4@%main program is written with the Microsoft Macro Assembler, in which case%@EH@%
  9528. the default radix is 16 (hexadecimal). If you give the Radix command with no
  9529. argument, the debugger displays the current radix.%@NL@%
  9530. %@NL@%
  9531. %@CR:MCVB300C@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9532. %@NL@%
  9533.      >N10%@NL@%
  9534.      >N%@NL@%
  9535.      10%@NL@%
  9536.      >? prime%@NL@%
  9537.      107%@NL@%
  9538.      >%@NL@%
  9539. %@NL@%
  9540.      >N8  %@AI@%;* C example%@AE@%%@NL@%
  9541.      >? prime%@NL@%
  9542.      0153%@NL@%
  9543.      >%@NL@%
  9544. %@NL@%
  9545.      >N16 %@AI@%;* FORTRAN example%@AE@%%@NL@%
  9546.      >? prime%@NL@%
  9547.      #006b%@NL@%
  9548.      >%@NL@%
  9549. %@NL@%
  9550.      >N8  %@AI@%;* BASIC example%@AE@%%@NL@%
  9551.      >? prime%@NL@%
  9552.      &O153%@NL@%
  9553.      >%@AS@%%@NL@%
  9554. %@NL@%
  9555. %@CR:MCVB300D@%%@4@%The example above shows how %@AS@%107%@AE@% decimal, stored in the variable %@AS@%prime%@AE@%, would%@EH@%
  9556. be displayed with different radixes. Examples are taken from different
  9557. languages; there is no logical connection between the radix and the language
  9558. used in each example.%@NL@%
  9559. %@NL@%
  9560.      >N8%@NL@%
  9561.      >? 34,i%@NL@%
  9562.      28%@NL@%
  9563.      >N10%@NL@%
  9564.      >? 28,i%@NL@%
  9565.      28%@NL@%
  9566.      >N16%@NL@%
  9567.      >? 1C,i%@NL@%
  9568.      28%@NL@%
  9569.      >%@AS@%%@NL@%
  9570. %@NL@%
  9571. %@CR:MCVB300E@%%@4@%In the example above, the same number is entered in different radixes, but%@EH@%
  9572. the %@AS@%i%@AE@% format specifier is used to display the result as a decimal integer in
  9573. all three cases. See Chapter 6%@BO:   43f5c@%, "Examining Data and Expressions," for more
  9574. information on format specifiers.%@NL@%
  9575. %@NL@%
  9576. %@NL@%
  9577. %@CR:MCVB4000@%%@2@%%@AB@%11.4  Redraw Comm and%@AE@%%@EH@%%@NL@%
  9578. %@NL@%
  9579. %@CR:MCVB4001@%%@4@%The Redraw command can be used only in window mode; it redraws the CodeView%@EH@%
  9580. screen. This command is seldom necessary, but you might need it if the
  9581. output of the program being debugged disturbs the CodeView display
  9582. temporarily.%@NL@%
  9583. %@NL@%
  9584. %@CR:MCVB4002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9585. %@NL@%
  9586. %@CR:MCVB4003@%%@4@%You cannot redraw the screen using the mouse.%@EH@%%@NL@%
  9587. %@NL@%
  9588. %@CR:MCVB4004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9589. %@NL@%
  9590. %@CR:MCVB4005@%%@4@%You cannot redraw the screen using a keyboard command.%@EH@%%@NL@%
  9591. %@NL@%
  9592. %@CR:MCVB4006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9593. %@NL@%
  9594. %@CR:MCVB4007@%%@4@%To redraw the screen with a dialog command, enter a command line with the%@EH@%
  9595. following syntax:%@NL@%
  9596. %@NL@%
  9597.      %@AB@%@%@AE@%%@NL@%
  9598. %@NL@%
  9599. %@NL@%
  9600. %@CR:MCVB5000@%%@2@%%@AB@%11.5  Screen Exchange Command%@AE@%%@EH@%%@NL@%
  9601. %@NL@%
  9602. %@CR:MCVB5001@%%@4@%The Screen Exchange command allows you to switch temporarily from the%@EH@%
  9603. debugging screen to the output screen.%@NL@%
  9604. %@NL@%
  9605. %@CR:MCVB5002@%%@4@%The CodeView debugger will use either screen flipping or screen swapping to%@EH@%
  9606. store the output and debugging screens. See Chapter 1%@BO:    9668@%, "Getting Started,"
  9607. for an explanation of flipping and swapping.%@NL@%
  9608. %@NL@%
  9609. %@CR:MCVB5003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9610. %@NL@%
  9611. %@CR:MCVB5004@%%@4@%To execute the Screen Exchange command with the mouse, open the View menu,%@EH@%
  9612. then select Output. Press any key when you are ready to return to the
  9613. debugging screen.%@NL@%
  9614. %@NL@%
  9615. %@CR:MCVB5005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9616. %@NL@%
  9617. %@CR:MCVB5006@%%@4@%To execute the Screen Exchange command with a keyboard command, press F4.%@EH@%
  9618. Press any key when you are ready to return to the debugging screen.%@NL@%
  9619. %@NL@%
  9620. %@CR:MCVB5007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9621. %@NL@%
  9622. %@CR:MCVB5008@%%@4@%To execute the Screen Exchange command from the dialog window, enter a%@EH@%
  9623. command line with the following syntax:%@NL@%
  9624. %@NL@%
  9625.      %@AB@%\%@AE@%%@NL@%
  9626. %@NL@%
  9627. %@CR:MCVB5009@%%@4@%The output screen will then appear. Press any key when you are ready to%@EH@%
  9628. return to the CodeView debugging screen.%@NL@%
  9629. %@NL@%
  9630. %@NL@%
  9631. %@CR:MCVB6000@%%@2@%%@AB@%11.6  Search Command%@AE@%%@EH@%%@NL@%
  9632. %@NL@%
  9633. %@CR:MCVB6001@%%@4@%The Search command allows you to search for a regular expression in a source%@EH@%
  9634. file. The expression being sought is specified either in a dialog box or as
  9635. an argument to a dialog command. Once you have found an expression, you can
  9636. search for the next or previous occurrence of the expression.%@NL@%
  9637. %@NL@%
  9638. %@CR:MCVB6002@%%@4@%Regular expressions are patterns of characters that may match one or many%@EH@%
  9639. different strings. The use of patterns to match more than one string is
  9640. similar to the DOS method of using wild-card characters in file names.
  9641. Regular expressions are explained in detail in Appendix A%@BO:   d21a7@%.%@NL@%
  9642. %@NL@%
  9643. %@CR:MCVB6003@%%@4@%You can use the Search command without understanding regular expressions.%@EH@%
  9644. Since text strings are the simplest form of regular expressions, you can
  9645. enter a string of characters as the expression you want to find. For
  9646. example, you could enter %@AS@%COUNT%@AE@% if you wanted to search for the word "COUNT"
  9647. in the source file.%@NL@%
  9648. %@NL@%
  9649. %@CR:MCVB6004@%%@4@%The following characters have special meanings in regular expressions:%@EH@%
  9650. backslash (%@AB@%\%@AE@%), asterisk (%@AB@%*%@AE@%), left bracket (%@AB@%[%@AE@%), period (%@AB@%.%@AE@%), dollar sign (%@AB@%$%@AE@%),
  9651. and caret (%@AB@%^%@AE@%). To find strings containing these characters, you must precede
  9652. the characters with a backslash; this cancels their special meanings.%@NL@%
  9653. %@NL@%
  9654. %@CR:MCVB6005@%%@4@%For example, you would use %@AS@%\*%@AE@% to find %@AS@%x*y%@AE@%. The periods in the relational%@EH@%
  9655. operators must also be preceded by a backslash.%@NL@%
  9656. %@NL@%
  9657. %@CR:MCVB6006@%%@4@%The Case Sense selection from the Options menu has no effect on searches for%@EH@%
  9658. regular expressions.%@NL@%
  9659. %@NL@%
  9660. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9661. %@AI@%NOTE%@AE@%%@NL@%
  9662.    When you search for the next occurrence of a regular expression, the%@NL@%
  9663.    CodeView debugger searches to the end of the file, then wraps around and%@NL@%
  9664.    begins again at the start of the file. This can have unexpected results%@NL@%
  9665.    if the expression occurs only once. When you give the command repeatedly,%@NL@%
  9666.    nothing seems to happen. Actually, the debugger is repeatedly wrapping%@NL@%
  9667.    around and finding the same expression each time.%@NL@%
  9668. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9669. %@NL@%
  9670. %@CR:MCVB6007@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9671. %@NL@%
  9672. %@CR:MCVB6008@%%@4@%To find a regular expr with the mouse, point to Search on the menu bar,%@EH@%
  9673. press a mouse button and drag the highlight down to the Find selection, then
  9674. release the button. A dialog box appears, asking for the regular expression
  9675. to be found. Type the expression and press either the ENTER key or a mouse
  9676. button. The CodeView debugger starts searching at the current cursor
  9677. position and puts the cursor at the next line containing the regular
  9678. expression. An error message appears if the expression is not found. If you
  9679. are in assembly mode, the debugger automatically switches to source mode
  9680. when the expression is found.%@NL@%
  9681. %@NL@%
  9682. %@CR:MCVB6009@%%@4@%After you have found a regular expression, you can search for the next or%@EH@%
  9683. previous occurrence of the expression. Point to Search on the menu bar,
  9684. press a mouse button and drag the highlight down to the Next or Previous
  9685. selection, then release the button. The cursor moves to the next or previous
  9686. match of the expression.%@NL@%
  9687. %@NL@%
  9688. %@CR:MCVB600A@%%@4@%You can also search the executable code for a label (such as a routine name%@EH@%
  9689. or an assembly-language label). Point to Search on the menu bar, press a
  9690. mouse button and drag the highlight down to the Label selection, then
  9691. release the button. A dialog box appears, asking for the label to be found.
  9692. Type the label name, and press either ENTER or a mouse button. The cursor
  9693. will move to the line containing the label. This selection differs from
  9694. other search selections because it searches executable code rather than
  9695. source code. The CodeView debugger switches to assembly mode, if necessary,
  9696. to display a label in a library routine or assembly-language module.%@NL@%
  9697. %@NL@%
  9698. %@CR:MCVB600B@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9699. %@NL@%
  9700. %@CR:MCVB600C@%%@4@%To find a regular expression with a keyboard command, press ALT+S to open%@EH@%
  9701. the Search menu, and then press F to select Find. A dialog box appears,
  9702. asking for the regular expression to be found. Type the expression and press
  9703. ENTER. The CodeView debugger starts searching at the current cursor position
  9704. and puts the cursor at the next line containing the regular expression. An
  9705. error message appears if the expression is not found. If you are in assembly
  9706. mode, the debugger automatically switches to source mode when the expression
  9707. is found.%@NL@%
  9708. %@NL@%
  9709. %@CR:MCVB600D@%%@4@%After you have found a regular expression, you can search for the next or%@EH@%
  9710. previous occurrence of the expression. Press ALT+S to open the Search menu
  9711. and then press N to select Next or P to select Previous. The cursor will
  9712. move to the next or previous match of the expression.%@NL@%
  9713. %@NL@%
  9714. %@CR:MCVB600E@%%@4@%You can also search the executable code for a label (such as a routine name%@EH@%
  9715. or an assembly-language label). Press ALT+S to open the Search menu and then
  9716. press L to select Label. A dialog box appears, asking for the label to be
  9717. found. Type the label name and press ENTER. The cursor moves to the line
  9718. containing the label. This selection differs from other search selections
  9719. because it searches executable code rather than source code. The CodeView
  9720. debugger switches to assembly mode, if necessary, to display a label in a
  9721. library routine or assembly-language module.%@NL@%
  9722. %@NL@%
  9723. %@CR:MCVB600F@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9724. %@NL@%
  9725. %@CR:MCVB600G@%%@4@%To find a regular expression using a dialog command, enter a command line%@EH@%
  9726. with the following syntax:%@NL@%
  9727. %@NL@%
  9728.      %@AB@%/%@AE@%«%@AI@%regularexpression%@AE@%»%@NL@%
  9729. %@NL@%
  9730. %@CR:MCVB600H@%%@4@%If %@AI@%regularexpression%@AE@% is given, the CodeView debugger searches the source%@EH@%
  9731. file for the first line containing the expression. If no argument is given,
  9732. the debugger searches for the next occurrence of the last regular expression
  9733. specified.%@NL@%
  9734. %@NL@%
  9735. %@CR:MCVB600I@%%@4@%In window mode, the CodeView debugger starts searching at the current cursor%@EH@%
  9736. position and puts the cursor at the next line containing the regular
  9737. expression. In sequential mode, the debugger starts searching at the last
  9738. source line displayed. It displays the source line in which the expression
  9739. is found. An error message appears if the expression is not found. If you
  9740. are in assembly mode, the CodeView debugger automatically switches to source
  9741. mode when the expression is found.%@NL@%
  9742. %@NL@%
  9743. %@CR:MCVB600J@%%@4@%You cannot search for a label with the dialog version of the Search command,%@EH@%
  9744. but you can use the View command with the label as an argument for the same
  9745. effect.%@NL@%
  9746. %@NL@%
  9747. %@NL@%
  9748. %@CR:MCVB7000@%%@2@%%@AB@%11.7  Shell Escape Command%@AE@%%@EH@%%@NL@%
  9749. %@NL@%
  9750. %@CR:MCVB7001@%%@4@%The Shell Escape command allows you to exit from the CodeView debugger to a%@EH@%
  9751. DOS shell. You can execute DOS commands or programs from within the
  9752. debugger, or you can exit from the debugger to DOS while retaining your
  9753. current debugging context.%@NL@%
  9754. %@NL@%
  9755. %@CR:MCVB7002@%%@4@%The Shell Escape command works by saving the current processes in memory and%@EH@%
  9756. then executing a second copy of COMMAND.COM. The COMSPEC environment
  9757. variable is used to locate a copy of COMMAND.COM.%@NL@%
  9758. %@NL@%
  9759. %@CR:MCVB7003@%%@4@%Opening a shell requires a significant amount of free memory (usually more%@EH@%
  9760. than 200K) because the CodeView debugger, the symbol table, COMMAND.COM, and
  9761. the program being debugged must all be saved in memory. If you do not have
  9762. enough memory, an error message appears. Even if you have enough memory to
  9763. start a new shell, you may not have enough memory left to execute large
  9764. programs from the shell.%@NL@%
  9765. %@NL@%
  9766. %@CR:MCVB7004@%%@4@%If you change directories while working in the shell, make sure you return%@EH@%
  9767. to the original directory before returning to the CodeView debugger. If you
  9768. don't, the debugger may not be able to find and load source files when it
  9769. needs them.%@NL@%
  9770. %@NL@%
  9771. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9772. %@AI@%NOTE%@AE@%%@NL@%
  9773.    In order to use the Shell Escape command, the executable file being%@NL@%
  9774.    debugged must release unneeded memory. Programs created with Microsoft%@NL@%
  9775.    compilers release memory during start-up.%@NL@%
  9776. %@NL@%
  9777.    You cannot use the Shell Escape command with assembler programs unless%@NL@%
  9778.    the program specifically releases memory by using the DOS function call%@NL@%
  9779.    4A hexadecimal (Set Block) or is linked with the /CPARMAXALLOC link%@NL@%
  9780.    option.%@NL@%
  9781. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9782. %@NL@%
  9783. %@CR:MCVB7005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9784. %@NL@%
  9785. %@CR:MCVB7006@%%@4@%To open a DOS shell with the mouse, point to File on the menu bar, press a%@EH@%
  9786. mouse button and drag the highlight down to the DOS Shell selection, then
  9787. release the button. If there is enough memory to open the shell, the DOS
  9788. screen appears. You can execute any DOS command or any program. When you are
  9789. ready to return to the debugging session, type the command %@AS@%exit%@AE@% (in any
  9790. combination of uppercase and lowercase letters). The debugging screen will
  9791. appear with the same status it had when you left it.%@NL@%
  9792. %@NL@%
  9793. %@CR:MCVB7007@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9794. %@NL@%
  9795. %@CR:MCVB7008@%%@4@%To open a DOS shell with a keyboard command, press ALT+F to open the File%@EH@%
  9796. menu, then press D to select DOS Shell. If there is enough memory to open
  9797. the shell, the DOS screen appears. You can execute any DOS internal command
  9798. or any program. When you are ready to return to the debugging session, type
  9799. the command %@AS@%exit%@AE@% (in any combination of uppercase and lowercase letters).
  9800. The debugging screen will appear with the same status it had when you left
  9801. it.%@NL@%
  9802. %@NL@%
  9803. %@CR:MCVB7009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9804. %@NL@%
  9805. %@CR:MCVB700A@%%@4@%To open a DOS shell using a dialog command, enter a command line with the%@EH@%
  9806. following syntax:%@NL@%
  9807. %@NL@%
  9808.      %@AB@%!%@AE@%«%@AI@%command%@AE@%»%@NL@%
  9809. %@NL@%
  9810. %@CR:MCVB700B@%%@4@%If you want to exit to DOS and execute several programs or commands, enter%@EH@%
  9811. the command with no arguments. The CodeView debugger executes a new copy of
  9812. COMMAND.COM, and the DOS screen appears. You can run programs or DOS
  9813. internal commands. When you are ready to return to the debugger, type the
  9814. command %@AS@%exit%@AE@% (in any combination of uppercase and lowercase letters). The
  9815. debugging screen appears with the same status it had when you left it.%@NL@%
  9816. %@NL@%
  9817. %@CR:MCVB700C@%%@4@%If you want to execute a program or DOS internal command from within%@EH@%
  9818. CodeView, enter the Shell Escape command (%@AB@%!%@AE@%) followed by the name of the
  9819. command or the program you want to execute. The output screen appears, and
  9820. the debugger executes the command or program. When the output from the
  9821. command or program is completed, the message %@AS@%Press any key to %@AE@%%@AS@%continue...%@AE@%
  9822. appears at the bottom of the screen. Press a key to make the debugging
  9823. screen reappear with the same status it had when you left it.%@NL@%
  9824. %@NL@%
  9825. %@CR:MCVB700D@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9826. %@NL@%
  9827.      >!%@NL@%
  9828. %@NL@%
  9829. %@CR:MCVB700E@%%@4@%In the above example, the CodeView debugger saves the current debugging%@EH@%
  9830. context and executes a copy of COMMAND.COM. The DOS screen appears, and you
  9831. can enter any number of commands. To return to the debugger, enter %@AS@%exit%@AE@%.%@NL@%
  9832. %@NL@%
  9833.      >!DIR a:*.for%@NL@%
  9834. %@NL@%
  9835. %@CR:MCVB700F@%%@4@%In the example above, the DOS command %@AS@%DIR%@AE@% is executed with the argument%@EH@%
  9836. %@AS@%a:*.for%@AE@%. The directory listing will be followed by a prompt telling you to
  9837. press any key to return to the CodeView debugging screen.%@NL@%
  9838. %@NL@%
  9839.      >!CHKDSK a:%@NL@%
  9840. %@NL@%
  9841. %@CR:MCVB700G@%%@4@%In the example above, the DOS command %@AS@%CHKDSK%@AE@% is executed, and the status of%@EH@%
  9842. the disk in Drive A is displayed in the dialog window. The program name
  9843. specified could be for any executable file, not just that for a DOS program.%@NL@%
  9844. %@NL@%
  9845. %@NL@%
  9846. %@CR:MCVB8000@%%@2@%%@AB@%11.8  Tab Set Command%@AE@%%@EH@%%@NL@%
  9847. %@NL@%
  9848. %@CR:MCVB8001@%%@4@%The Tab Set command sets the width in spaces that the CodeView debugger%@EH@%
  9849. fills for each tab character. The default tab is eight spaces. You might
  9850. want to set a smaller tab size if your source code has so many levels of
  9851. indentation that source lines extend beyond the edge of the screen. This
  9852. command has no effect if your source code was written with an editor that
  9853. indents with spaces rather than tab characters.%@NL@%
  9854. %@NL@%
  9855. %@CR:MCVB8002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9856. %@NL@%
  9857. %@CR:MCVB8003@%%@4@%You cannot set the tab size by using the mouse.%@EH@%%@NL@%
  9858. %@NL@%
  9859. %@CR:MCVB8004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9860. %@NL@%
  9861. %@CR:MCVB8005@%%@4@%You cannot set the tab size by using a keyboard command.%@EH@%%@NL@%
  9862. %@NL@%
  9863. %@CR:MCVB8006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9864. %@NL@%
  9865. %@CR:MCVB8007@%%@4@%To set the tab size with a dialog command, enter a command line with the%@EH@%
  9866. following syntax:%@NL@%
  9867. %@NL@%
  9868.      %@AB@%#%@AE@%%@AI@%number%@AE@%%@NL@%
  9869. %@NL@%
  9870. %@CR:MCVB8008@%%@4@%The %@AI@%number%@AE@% is the new number of characters for each tab character. In window%@EH@%
  9871. mode, the screen is redrawn with the new tab width when you enter the
  9872. command. In sequential mode, any output of source lines reflects the new tab
  9873. size.%@NL@%
  9874. %@NL@%
  9875. %@CR:MCVB8009@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  9876. %@NL@%
  9877.      >.%@NL@%
  9878.      32:                IF (X(I)) .LE. X(J)) GOTO 301%@NL@%
  9879.      >#4%@NL@%
  9880.      >.%@NL@%
  9881.      32:        IF (X(I)) .LE. X(J)) GOTO 301%@NL@%
  9882.      >%@NL@%
  9883. %@NL@%
  9884. %@CR:MCVB800A@%%@4@%In the example above, the Source Line command (%@AB@%.%@AE@%) is used to show the source%@EH@%
  9885. line with the default tab width of eight spaces. Next, the Tab Set command
  9886. is used to set the tab width to four spaces. The Source Line command then
  9887. shows the same line.%@NL@%
  9888. %@NL@%
  9889. %@NL@%
  9890. %@CR:MCVB9000@%%@2@%%@AB@%11.9  Option Command%@AE@%%@EH@%%@NL@%
  9891. %@NL@%
  9892. %@CR:MCVB9001@%%@4@%The Option command allows you to view the state of options in the Option%@EH@%
  9893. menu (Flip/Swap, Bytes Coded, Case Sense, and 386) and to turn any of the
  9894. these options on or off.%@NL@%
  9895. %@NL@%
  9896. %@CR:MCVB9002@%%@4@%For each different kind of source module that you debug, there is a%@EH@%
  9897. different set of default settings. However, the use of the Option command
  9898. overrides any of these settings.%@NL@%
  9899. %@NL@%
  9900. %@CR:MCVB9003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9901. %@NL@%
  9902. %@CR:MCVB9004@%%@4@%To view the state of the options with a mouse, simply point to Options on%@EH@%
  9903. the menu bar and click either button. Each option is displayed. Those
  9904. options that are turned on have a double arrow immediately to the left.
  9905. Options that are turned off have no double arrow.%@NL@%
  9906. %@NL@%
  9907. %@CR:MCVB9005@%%@4@%To change one of the Option settings, drag the highlight down to the option%@EH@%
  9908. you wish to change and release the button. This reverses the state of the
  9909. option. (An option that was on will be turned off and vice versa.)%@NL@%
  9910. %@NL@%
  9911. %@CR:MCVB9006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9912. %@NL@%
  9913. %@CR:MCVB9007@%%@4@%To view the state of the Options menu with a keyboard command, press ALT+O%@EH@%
  9914. to open the Options menu. Each option is displayed. Those options that are
  9915. turned on have a double arrow immediately to the left. Options that are
  9916. turned off have no double arrow.%@NL@%
  9917. %@NL@%
  9918. %@CR:MCVB9008@%%@4@%To change one of the Option settings, press the letter key corresponding to%@EH@%
  9919. the option's mnemonic. This reverses the state of the option. (An option
  9920. that was on will be turned off and vice versa.) You can also reverse an
  9921. option by moving the highlight down with the arrow key and pressing ENTER.%@NL@%
  9922. %@NL@%
  9923. %@CR:MCVB9009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  9924. %@NL@%
  9925. %@CR:MCVB900A@%%@4@%To view or change options with a dialog command, enter a command line with%@EH@%
  9926. the following syntax:%@NL@%
  9927. %@NL@%
  9928.      %@AB@%O%@AE@%«%@AI@%option%@AE@% «%@AB@%+%@AE@% | %@AB@%-%@AE@%»»%@NL@%
  9929. %@NL@%
  9930. %@CR:MCVB900B@%%@4@%In the above display, %@AI@%option%@AE@% is one of the following characters: %@AB@%F%@AE@%, %@AB@%B%@AE@%, %@AB@%C%@AE@%,%@EH@%
  9931. or %@AB@%3%@AE@%. If used, there must be no spaces between the character and the %@AB@%O%@AE@%.
  9932. These characters correspond to the options as shown below:%@NL@%
  9933. %@NL@%
  9934. %@CR:MCVB900C@%%@AB@%Command                     Correspondence%@AE@%%@NL@%
  9935. %@NL@%
  9936. %@AB@%OF%@AE@%                          Flip/Swap option%@NL@%
  9937. %@NL@%
  9938. %@AB@%OB%@AE@%                          Bytes-Coded option%@NL@%
  9939. %@NL@%
  9940. %@AB@%OC%@AE@%                          Case-Sense option%@NL@%
  9941. %@NL@%
  9942. %@AB@%O3%@AE@%                          386 option%@NL@%
  9943. %@NL@%
  9944. %@AB@%O%@AE@%                           All options%@NL@%
  9945. %@NL@%
  9946. %@CR:MCVB900D@%%@4@%The %@AB@%O%@AE@% form of the command (all options) takes no arguments; it displays the%@EH@%
  9947. state of all four options. The other forms of the command (%@AB@%OF%@AE@%, %@AB@%OB%@AE@%, %@AB@%OC%@AE@%, and
  9948. %@AB@%O3%@AE@%) can be used either with no arguments (in which case they display the
  9949. state of the option) or they can take the argument %@AB@%+%@AE@% or %@AB@%-%@AE@%.%@NL@%
  9950. %@NL@%
  9951. %@CR:MCVB900E@%%@4@%The %@AB@%+%@AE@% argument turns the option on. The %@AB@%-%@AE@% argument turns the option off.%@EH@%%@NL@%
  9952. %@NL@%
  9953. %@CR:MCVB900F@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9954. %@NL@%
  9955.      >O%@NL@%
  9956.      Flip/Swap on%@NL@%
  9957.      Bytes Coded on%@NL@%
  9958.      Case Sense off%@NL@%
  9959.      386 off%@NL@%
  9960.      >O3%@NL@%
  9961.      386 off%@NL@%
  9962.      >O3+%@NL@%
  9963.      386 on%@NL@%
  9964.      >OF%@NL@%
  9965.      Flip/Swap on%@NL@%
  9966.      >OF-%@NL@%
  9967.      Flip/Swap off%@NL@%
  9968. %@NL@%
  9969. %@CR:MCVB900G@%%@4@%In the example above, the %@AB@%O%@AE@%, %@AB@%O3%@AE@%, and %@AB@%OF%@AE@% commands are used to view the%@EH@%
  9970. current state of an option. Each of the %@AB@%O3+%@AE@% and %@AB@%OF-%@AE@% commands modifies an
  9971. option and then reports the results of the modification.%@NL@%
  9972. %@NL@%
  9973. %@CR:MCVB900H@%%@4@%The dialog version of the Option command is particularly useful for%@EH@%
  9974. redirected CodeView commands (which cannot access menus) and for making the
  9975. debugger start up with certain options. For example, the following DOS-level
  9976. command line brings up CodeView with the 386 option on and Bytes Coded off:%@NL@%
  9977. %@NL@%
  9978.      CV /c"O3+;OB-" test%@NL@%
  9979. %@NL@%
  9980. %@CR:MCVB900I@%%@4@%This command line could then be placed into a batch file for convenient%@EH@%
  9981. execution.%@NL@%
  9982. %@NL@%
  9983. %@NL@%
  9984. %@CR:MCVBA000@%%@2@%%@AB@%11.10  Redirection Commands%@AE@%%@EH@%%@NL@%
  9985. %@NL@%
  9986. %@CR:MCVBA001@%%@4@%The CodeView debugger provides several options for redirecting commands from%@EH@%
  9987. or to devices or files. Furthermore, the debugger provides several other
  9988. commands, which are relevant only when used with redirected files.%@NL@%
  9989. %@NL@%
  9990. %@CR:MCVBA002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  9991. %@NL@%
  9992. %@CR:MCVBA003@%%@4@%None of the redirection or related commands can be executed with the mouse.%@EH@%%@NL@%
  9993. %@NL@%
  9994. %@CR:MCVBA004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  9995. %@NL@%
  9996. %@CR:MCVBA005@%%@4@%None of the redirection or related commands can be executed with keyboard%@EH@%
  9997. commands.%@NL@%
  9998. %@NL@%
  9999. %@CR:MCVBA006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  10000. %@NL@%
  10001. %@CR:MCVBA007@%%@4@%The redirection commands are entered with dialog commands, as shown in%@EH@%
  10002. Sections 11.10.1%@BO:   7e1b9@%-11.10.4.3 below.%@NL@%
  10003. %@NL@%
  10004. %@NL@%
  10005. %@CR:MCVBA100@%%@3@%%@AB@%11.10.1  Redirecting CodeView Input%@AE@%%@EH@%%@NL@%
  10006. %@NL@%
  10007. %@CR:MCVBA101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  10008. %@NL@%
  10009.      %@AB@%<%@AE@% %@AI@%devicename%@AE@%%@NL@%
  10010. %@NL@%
  10011. %@CR:MCVBA102@%%@4@%The Redirected Input command causes the CodeView debugger to read all%@EH@%
  10012. subsequent command input from a device, such as another terminal or a file.
  10013. The sample session supplied with most versions of the debugger is an example
  10014. of commands being redirected from a file.%@NL@%
  10015. %@NL@%
  10016. %@CR:MCVBA103@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  10017. %@NL@%
  10018.      ><COM1%@NL@%
  10019. %@NL@%
  10020. %@CR:MCVBA104@%%@4@%The example above redirects commands from the device (probably a remote%@EH@%
  10021. terminal) designated as %@AS@%COM1%@AE@% to the CodeView terminal.%@NL@%
  10022. %@NL@%
  10023.      ><INFILE.TXT%@NL@%
  10024. %@NL@%
  10025. %@CR:MCVBA105@%%@4@%The example above redirects command input from file %@AS@%INFILE.TXT%@AE@% to the%@EH@%
  10026. CodeView debugger. You might use this command to prepare a CodeView session
  10027. for someone else to run. You create a text file containing a series of
  10028. commands separated by carriage-return and line-feed combinations or
  10029. semicolons. When you redirect the file, the debugger executes the commands
  10030. to the end of the file. One way to create such a file is to redirect
  10031. commands from the CodeView debugger to a file (see Section 11.10.3%@BO:   7f0f6@% below)
  10032. and then edit the file to eliminate the output and add comments.%@NL@%
  10033. %@NL@%
  10034. %@NL@%
  10035. %@CR:MCVBA200@%%@3@%%@AB@%11.10.2  Redirecting CodeView Output%@AE@%%@EH@%%@NL@%
  10036. %@NL@%
  10037. %@CR:MCVBA201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  10038. %@NL@%
  10039.      «%@AB@%T%@AE@%»%@AB@%>%@AE@%«%@AB@%>%@AE@%»%@AI@%devicename%@AE@%%@NL@%
  10040. %@NL@%
  10041. %@CR:MCVBA202@%%@4@%The Redirected Output command causes the CodeView debugger to write all%@EH@%
  10042. subsequent command output to a device, such as another terminal, a printer,
  10043. or a file. The term "output" includes not only the output from commands but
  10044. also the command characters that are echoed as you type them.%@NL@%
  10045. %@NL@%
  10046. %@CR:MCVBA203@%%@4@%The optional %@AB@%T%@AE@% indicates that the output should be echoed to the CodeView%@EH@%
  10047. screen. Normally, you will want to use the %@AB@%T%@AE@% if you are redirecting output
  10048. to a file so you can see what you are typing. However, if you are
  10049. redirecting output to another terminal, you may not want to see the output
  10050. on the CodeView terminal.%@NL@%
  10051. %@NL@%
  10052. %@CR:MCVBA204@%%@4@%The second greater-than symbol (optional) appends the output to an existing%@EH@%
  10053. file. If you redirect output to an existing file without this symbol, the
  10054. existing file is replaced.%@NL@%
  10055. %@NL@%
  10056. %@CR:MCVBA205@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  10057. %@NL@%
  10058.      >>COM1%@AS@%%@NL@%
  10059. %@NL@%
  10060. %@CR:MCVBA206@%%@4@%In the example above, output is redirected to the device designated as %@AS@%COM1%@AE@%%@EH@%
  10061. (probably a remote terminal). You might want to enter this command, for
  10062. example, when you are debugging a graphics program and want CodeView
  10063. commands to be displayed on a remote terminal while the program display
  10064. appears on the originating terminal.%@NL@%
  10065. %@NL@%
  10066.      >T>OUTFILE.TXT%@NL@%
  10067.      .%@NL@%
  10068.      .%@NL@%
  10069.      .%@NL@%
  10070.      >>CON%@NL@%
  10071.      .%@NL@%
  10072.      .%@NL@%
  10073.      .%@NL@%
  10074. %@NL@%
  10075. %@CR:MCVBA207@%%@4@%In the example above, output is redirected to the file %@AS@%OUTFILE.TXT%@AE@%. This%@EH@%
  10076. command is helpful in keeping a permanent record of a CodeView session. Note
  10077. that the optional %@AB@%T%@AE@% is used so that the session is echoed to the CodeView
  10078. screen as well as to the file. After redirecting some commands to a file,
  10079. output is returned to the console (terminal) with the command %@AS@%>CON%@AE@%.%@AS@%%@NL@%
  10080. %@NL@%
  10081.      >T>>OUTFILE.TXT%@AS@%%@NL@%
  10082. %@NL@%
  10083. %@CR:MCVBA208@%%@4@%If, later in the session, you want to redirect more commands to the same%@EH@%
  10084. file, use the double greater-than symbol, as in the example above, to append
  10085. the output to the existing file.%@NL@%
  10086. %@NL@%
  10087. %@NL@%
  10088. %@CR:MCVBA300@%%@3@%%@AB@%11.10.3  Redirecting CodeView Input and Output%@AE@%%@EH@%%@NL@%
  10089. %@NL@%
  10090. %@CR:MCVBA301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  10091. %@NL@%
  10092.      %@AB@%=%@AE@% %@AI@%devicename%@AE@%%@NL@%
  10093. %@NL@%
  10094. %@CR:MCVBA302@%%@4@%The Redirected Input and Output command causes the CodeView debugger to%@EH@%
  10095. write all subsequent command output to a device and simultaneously to
  10096. receive input from the same device. This command is practical only if the
  10097. device is a remote terminal.%@NL@%
  10098. %@NL@%
  10099. %@CR:MCVBA303@%%@4@%Redirecting input and output works best if you start in sequential mode%@EH@%
  10100. (using the /T option). The CodeView debugger's window interface has little
  10101. purpose in this situation since the remote terminal can act only as a
  10102. sequential (nonwindow) device.%@NL@%
  10103. %@NL@%
  10104. %@CR:MCVBA304@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  10105. %@NL@%
  10106.      >=COM1%@NL@%
  10107. %@NL@%
  10108. %@CR:MCVBA305@%%@4@%In the example above, output and input are redirected to the device%@EH@%
  10109. designated as %@AS@%COM1%@AE@%. This command would be useful if you wanted to enter
  10110. debugging commands and see the debugger output on a remote terminal while
  10111. entering program commands and viewing program output on the terminal where
  10112. the debugger is running.%@NL@%
  10113. %@NL@%
  10114. %@NL@%
  10115. %@CR:MCVBA400@%%@3@%%@AB@%11.10.4  Commands Used with Redirection%@AE@%%@EH@%%@NL@%
  10116. %@NL@%
  10117. %@CR:MCVBA401@%%@4@%The following commands are intended for use when redirecting commands to or%@EH@%
  10118. from a file. Although they are always available, these commands have little
  10119. practical use during a normal debugging session.%@NL@%
  10120. %@NL@%
  10121. %@CR:MCVBA402@%%@AB@%Command                     Action%@AE@%%@NL@%
  10122. %@NL@%
  10123. Comment (%@AB@%*%@AE@%)                 Displays comment%@NL@%
  10124. %@NL@%
  10125. Delay (%@AB@%:%@AE@%)                   Delays execution of commands from a redirected%@NL@%
  10126.                             file%@NL@%
  10127. %@NL@%
  10128. Pause (%@AB@%"%@AE@%)                   Interrupts execution of commands from a%@NL@%
  10129.                             redirected file until a key is pressed%@NL@%
  10130. %@NL@%
  10131. %@NL@%
  10132. %@CR:MCVBA410@%%@4@%%@AB@%11.10.4.1  Comment Command%@AE@%%@EH@%%@NL@%
  10133. %@NL@%
  10134. %@CR:MCVBA411@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  10135. %@NL@%
  10136.      %@AB@%*%@AE@%%@AI@%comment%@AE@%%@NL@%
  10137. %@NL@%
  10138. %@CR:MCVBA412@%%@4@%The Comment command is an asterisk (%@AB@%*%@AE@%) followed by text. The CodeView%@EH@%
  10139. debugger echoes the text of the comment to the screen (or other output
  10140. device). This command is useful in combination with the redirection commands
  10141. when you are saving a commented session or when writing a commented session
  10142. that will be redirected to the debugger.%@NL@%
  10143. %@NL@%
  10144. %@CR:MCVBA413@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  10145. %@NL@%
  10146.      >T>OUTPUT.TXT%@NL@%
  10147.      >* Dump first 20 bytes of screen buffer%@NL@%
  10148.      >D #B800:0 L 20%@NL@%
  10149.      B800:0000 54 17 6F 17 20 17 72 17 65 17 74 17 75 17 72 17 T.o. .r.e.t.u.r.%@NL@%
  10150.      B800:0010 6E 17 20 17                                     n. .%@NL@%
  10151.      >%@NL@%
  10152. %@NL@%
  10153. %@CR:MCVBA414@%%@4@%In the example above, the user is sending a copy of a CodeView session to%@EH@%
  10154. file %@AS@%OUTPUT.TXT%@AE@%. Comments are added to explain the purpose of the command.
  10155. The text file will contain commands, comments, and command output.%@NL@%
  10156. %@NL@%
  10157.      * Dump first 20 bytes of screen buffer%@NL@%
  10158.      D #B800:0 L 20%@NL@%
  10159.      .%@NL@%
  10160.      .%@NL@%
  10161.      .%@NL@%
  10162.      < CON%@NL@%
  10163. %@NL@%
  10164. %@CR:MCVBA415@%%@4@%The example above illustrates another way to use the Comment command. You%@EH@%
  10165. can put comments into a text file of commands that are executed
  10166. automatically when you redirect the file into the CodeView debugger. In this
  10167. example, an editing program was used to create the text file called
  10168. %@AS@%INPUT.TXT%@AE@%.%@NL@%
  10169. %@NL@%
  10170.      ><INPUT.TXT%@NL@%
  10171.      >* Dump first 20 bytes of screen buffer%@NL@%
  10172.      >D #B800:0 L 20%@NL@%
  10173.      B800:0000 54 17 6F 17 20 17 72 17 65 17 74 17 75 17 72 17 T.o. .r.e.t.u.r.%@NL@%
  10174.      B800:0010 6E 17 20 17n. .%@AE@%%@NL@%
  10175.      .%@NL@%
  10176.      .%@NL@%
  10177.      .%@NL@%
  10178.      >< CON%@NL@%
  10179.      >%@NL@%
  10180. %@NL@%
  10181. %@CR:MCVBA416@%%@4@%When you read the file into the debugger by using the Redirected Input%@EH@%
  10182. command, you see the comment, the command, and the output from the command,
  10183. as in the example above.%@NL@%
  10184. %@NL@%
  10185. %@CR:MCVBA420@%%@4@%%@AB@%11.10.4.2  Delay Command%@AE@%%@EH@%%@NL@%
  10186. %@NL@%
  10187. %@CR:MCVBA421@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  10188. %@NL@%
  10189.      %@AB@%:%@AE@%%@NL@%
  10190. %@NL@%
  10191. %@CR:MCVBA422@%%@4@%The Delay command interrupts execution of commands from a redirected file%@EH@%
  10192. and waits about half a second before continuing. You can put multiple Delay
  10193. commands on a single line to increase the length of delay. The delay is the
  10194. same length regardless of the processing speed of the computer.%@NL@%
  10195. %@NL@%
  10196. %@CR:MCVBA423@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  10197. %@NL@%
  10198.      : ;* That was a short delay...%@NL@%
  10199.      ::::: ;* That was a longer delay...%@NL@%
  10200. %@NL@%
  10201. %@CR:MCVBA424@%%@4@%In the example above, the Delay command is used to slow execution of the%@EH@%
  10202. redirected file into the CodeView debugger.%@NL@%
  10203. %@NL@%
  10204. %@CR:MCVBA430@%%@4@%%@AB@%11.10.4.3  Pause Command%@AE@%%@EH@%%@NL@%
  10205. %@NL@%
  10206. %@CR:MCVBA431@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  10207. %@NL@%
  10208.      %@AB@%"%@AE@%%@NL@%
  10209. %@NL@%
  10210. %@CR:MCVBA432@%%@4@%The Pause command interrupts execution of commands from a redirected file%@EH@%
  10211. and waits for the user to press a key. Execution of the redirected commands
  10212. begins as soon as a key is pressed.%@NL@%
  10213. %@NL@%
  10214. %@CR:MCVBA433@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  10215. %@NL@%
  10216.      * Press any key to continue%@NL@%
  10217.      "%@NL@%
  10218. %@NL@%
  10219. %@CR:MCVBA434@%%@4@%In the example above from a text file that might be redirected into the%@EH@%
  10220. CodeView debugger, a Comment command is used to prompt the user to press a
  10221. key. The Pause command is then used to halt execution until the user
  10222. responds.%@NL@%
  10223. %@NL@%
  10224.      >* Press any key to continue%@NL@%
  10225.      >"%@NL@%
  10226. %@NL@%
  10227. %@CR:MCVBA435@%%@4@%The example above shows the output when the text is redirected into the%@EH@%
  10228. debugger. The next CodeView prompt does not appear until the user presses a
  10229. key.%@NL@%
  10230. %@NL@%
  10231. %@NL@%
  10232. %@CR:MCVC0000@%%@1@%%@AB@%Chapter 12  Debugging in Protected Mode%@AE@%%@EH@%%@NL@%
  10233. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10234. %@NL@%
  10235. %@CR:MCVC0001@%%@4@%The protected-mode CodeView debugger (CVP.EXE) supports all the special%@EH@%
  10236. programming features of OS/2 protected mode: dynamic-link libraries,
  10237. multiple processes, and multiple threads within a process. CodeView lets you
  10238. stop execution, then switch between individual processes and threads.%@NL@%
  10239. %@NL@%
  10240. %@CR:MCVC0002@%%@4@%The support for thread debugging is especially powerful because it lets you%@EH@%
  10241. block (or "freeze") selected threads while letting others run. You can set
  10242. breakpoints applicable to all threads or only to a specific thread.%@NL@%
  10243. %@NL@%
  10244. %@CR:MCVC0003@%%@4@%Note that you must use the protected-mode CodeView debugger (CVP.EXE) in%@EH@%
  10245. order to run CodeView in protected mode or debug protected-mode programs.
  10246. Furthermore, before you run CVP you must set IOPL=YES in your CONFIG.SYS
  10247. file.%@NL@%
  10248. %@NL@%
  10249. %@CR:MCVC0004@%%@4@%This chapter deals with the following topics:%@EH@%%@NL@%
  10250. %@NL@%
  10251. %@CR:MCVC0005@%  ■  Using CodeView in real and protected mode%@NL@%
  10252. %@NL@%
  10253.   ■  Debugging dynamic-link libraries%@NL@%
  10254. %@NL@%
  10255.   ■  Debugging multiple processes%@NL@%
  10256. %@NL@%
  10257.   ■  Debugging multiple threads%@NL@%
  10258. %@NL@%
  10259. %@CR:MCVC0006@%%@4@%All the techniques presented in this chapter can be used together. You can%@EH@%
  10260. debug multiple processes, and within each process debug multiple threads.%@NL@%
  10261. %@NL@%
  10262. %@NL@%
  10263. %@CR:MCVC1000@%%@2@%%@AB@%12.1  Using CodeView in Different Modes%@AE@%%@EH@%%@NL@%
  10264. %@NL@%
  10265. %@CR:MCVC1001@%%@4@%Chapters 1-11 assume that the real-mode CodeView debugger (CV.EXE) is%@EH@%
  10266. running in real mode, debugging a real-mode program. This section summarizes
  10267. the major considerations and limitations of other situations.%@NL@%
  10268. %@NL@%
  10269. %@CR:MCVC1002@%%@4@%As noted above, to debug a protected-mode program, you must run CVP.EXE in%@EH@%
  10270. protected mode. You must first set IOPL=YES. This setting enables
  10271. applications to run at Ring 3, giving programs low-level access. CodeView
  10272. needs to run at this level because it does direct-hardware access.%@NL@%
  10273. %@NL@%
  10274. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10275. %@AI@%WARNING%@AE@%%@NL@%
  10276.    If you do not set IOPL=YES before running CVP, CVP fails to run and the%@NL@%
  10277.    system does not give you a clear message explaining why CodeView failed.%@NL@%
  10278.    The system may  become unstable and fail at any time.%@NL@%
  10279. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10280. %@NL@%
  10281. %@CR:MCVC1003@%%@4@%You must also use CVP in order to debug a bound program. The restrictions%@EH@%
  10282. mentioned above apply. Real-mode CodeView cannot debug a bound program.%@NL@%
  10283. %@NL@%
  10284. %@CR:MCVC1004@%%@4@%The real-mode debugger can run in the 3.x compatibility box. However, when%@EH@%
  10285. you run CodeView in the compatibility box, include /S on the command line.
  10286. Otherwise, the mouse pointer does not appear.%@NL@%
  10287. %@NL@%
  10288. %@NL@%
  10289. %@CR:MCVC2000@%%@2@%%@AB@%12.2  Debugging Dynamic-Link Libraries%@AE@%%@EH@%%@NL@%
  10290. %@NL@%
  10291. %@CR:MCVC2001@%%@4@%The protected-mode CodeView debugger (CVP) can debug dynamic-link modules%@EH@%
  10292. but only if it is told what libraries to search at run time. For more
  10293. information on dynamic-link libraries, refer to the %@AI@%Microsoft Operating%@AE@%
  10294. %@AI@%System/2 Programmer's Guide%@AE@%.%@NL@%
  10295. %@NL@%
  10296. %@CR:MCVC2002@%%@4@%When you place a module in a dynamic-link library, neither code nor symbolic%@EH@%
  10297. information for that module is stored in the executable (.EXE) file;
  10298. instead, the code and symbols are stored in the library and are not brought
  10299. together with the main program until run time.%@NL@%
  10300. %@NL@%
  10301. %@CR:MCVC2003@%%@4@%Thus, the protected-mode debugger needs to search the dynamic-link library%@EH@%
  10302. for symbolic information. Because the debugger does not automatically know
  10303. what libraries to look for, CVP has an additional command-line option that
  10304. enables you to specify dynamic-link libraries:%@NL@%
  10305. %@NL@%
  10306. %@CR:MCVC2004@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  10307. %@NL@%
  10308.      %@AB@%/L%@AE@%%@AI@% file%@AE@%%@AB@%%@NL@%
  10309. %@NL@%
  10310. %@CR:MCVC2005@%%@4@%The /L option directs the CodeView debugger to search %@AI@%file%@AE@% for symbolic%@EH@%
  10311. information. When you use this option, at least one space must separate /L
  10312. from %@AI@%file%@AE@%.%@NL@%
  10313. %@NL@%
  10314. %@CR:MCVC2006@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  10315. %@NL@%
  10316.      CVP /L DLIB1.DLL /L GRAFLIB.DLL PROG%@NL@%
  10317. %@NL@%
  10318. %@CR:MCVC2007@%%@4@%In the example above, CVP is invoked to debug the program PROG.EXE. To find%@EH@%
  10319. symbolic information needed for debugging each module, CVP searches the
  10320. libraries %@AS@%DLIB1.DLL%@AE@% and %@AS@%GRAFLIB.DLL%@AE@%, as well as the executable file
  10321. %@AS@%PROG.EXE%@AE@%.%@NL@%
  10322. %@NL@%
  10323. %@NL@%
  10324. %@CR:MCVC3000@%%@2@%%@AB@%12.3  Debugging Multiple Processes%@AE@%%@EH@%%@NL@%
  10325. %@NL@%
  10326. %@CR:MCVC3001@%%@4@%To enable debugging of multiple processes, you must first start up CodeView%@EH@%
  10327. with the /O (offspring) option. The syntax of this option is simple, as it
  10328. takes no arguments.%@NL@%
  10329. %@NL@%
  10330. %@CR:MCVC3002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  10331. %@NL@%
  10332.      %@AB@%/O%@AE@%%@NL@%
  10333. %@NL@%
  10334. %@CR:MCVC3003@%%@4@%If you do not use the /O option (or the option cannot be used), CodeView%@EH@%
  10335. lets your program spawn new processes, but you will not be able to view or
  10336. trace through these processes. They run in the background as far as CodeView
  10337. is concerned.%@NL@%
  10338. %@NL@%
  10339. %@CR:MCVC3004@%%@4@%For example, to debug multiple processes of the program SPACEMAN.EXE you%@EH@%
  10340. would use the following command:%@NL@%
  10341. %@NL@%
  10342.      CVP /O SPACEMAN%@NL@%
  10343. %@NL@%
  10344. %@CR:MCVC3005@%%@4@%The /O option has two limitations:%@EH@%%@NL@%
  10345. %@NL@%
  10346. %@CR:MCVC3006@%  1. You must have OS/2 Version 1.1 or later to use it.%@NL@%
  10347. %@NL@%
  10348.   2. This option is incompatible with the /2 option.%@NL@%
  10349. %@NL@%
  10350. %@CR:MCVC3007@%%@4@%The rest of this section assumes that you have successfully started CodeView%@EH@%
  10351. with the /O option.%@NL@%
  10352. %@NL@%
  10353. %@CR:MCVC3008@%%@4@%Every time your program executes a line of code that spawns a child process,%@EH@%
  10354. CodeView responds by displaying the process ID number (Pid) and asking if
  10355. you wish to debug the child process. The message displayed is similar to the
  10356. following:%@NL@%
  10357. %@NL@%
  10358.      %@AS@%Pid 24 started. Do you wish to debug (y/n)?%@AE@%%@NL@%
  10359. %@NL@%
  10360. %@CR:MCVC3009@%%@4@%To debug the child process, type Y and then press ENTER. Type any other%@EH@%
  10361. letter for no. CodeView takes a different course of action depending on your
  10362. response.%@NL@%
  10363. %@NL@%
  10364. %@CR:MCVC300A@%  ■  If you respond yes, CodeView spawns a new CodeView process. This%@NL@%
  10365.      process controls execution of your program's child process. Each%@NL@%
  10366.      instance of CodeView spawned in this way becomes a separate debugging%@NL@%
  10367.      session.%@NL@%
  10368. %@NL@%
  10369.      A new process runs in the same screen group as its parent process%@NL@%
  10370.      (unless you call the DosStartSession system function). Using CodeView%@NL@%
  10371.      does not change this. However, each new instance of CodeView always%@NL@%
  10372.      runs in its own screen group. Since OS/2 supports a maximum of 16%@NL@%
  10373.      screen groups, the number of child processes that you can debug at one%@NL@%
  10374.      time is limited.%@NL@%
  10375. %@NL@%
  10376.   ■  If you respond no, CodeView lets the program spawn the child process.%@NL@%
  10377.      However, you will not be able to control or trace the child process%@NL@%
  10378.      with CodeView. The child process is active but not accessible to%@NL@%
  10379.      CodeView commands.%@NL@%
  10380. %@NL@%
  10381. %@CR:MCVC300B@%%@4@%You can move between different CodeView processes in the following two ways:%@EH@%
  10382. by using the OS/2 Session Manager or the Process command (%@AB@%|%@AE@%). The Process
  10383. command, in turn, has two forms. You can use this command to view status of
  10384. child processes or to switch directly to the debugging session of the child
  10385. process.%@NL@%
  10386. %@NL@%
  10387. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10388. %@AI@%NOTE%@AE@%%@NL@%
  10389.    You may need to make note of process ID numbers when CodeView spawns a%@NL@%
  10390.    process. CodeView identifies multiple processes only by their ID numbers.%@NL@%
  10391. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10392. %@NL@%
  10393. %@NL@%
  10394. %@CR:MCVC3100@%%@3@%%@AB@%12.3.1  Viewing Status%@AE@%%@EH@%%@NL@%
  10395. %@NL@%
  10396. %@CR:MCVC3101@%%@4@%To view the status of the child processes (of the current process), enter%@EH@%
  10397. the Process command followed by no arguments:%@NL@%
  10398. %@NL@%
  10399.      %@AB@%|%@AE@%%@NL@%
  10400. %@NL@%
  10401. %@CR:MCVC3102@%%@4@%CodeView responds by displaying three fields: process ID number, session%@EH@%
  10402. (screen group) ID number, and yes or no, depending on whether or not each
  10403. process has its own instance of CodeView. The following example shows a
  10404. sample process status for a process with three children:%@NL@%
  10405. %@NL@%
  10406.      001|%@NL@%
  10407.      ProcessID   SessionID    Debugging%@NL@%
  10408.      00024         00006 Yes%@NL@%
  10409.      00026         00006 Yes%@NL@%
  10410.      00028         00006 No%@NL@%
  10411. %@NL@%
  10412. %@CR:MCVC3103@%%@4@%In the example above, only processes 24 and 26 can be debugged. Each of%@EH@%
  10413. these processes corresponds to a different instance of CodeView, and each
  10414. instance runs in a separate screen group. Process 28 is active but cannot be
  10415. debugged.%@NL@%
  10416. %@NL@%
  10417. %@NL@%
  10418. %@CR:MCVC3200@%%@3@%%@AB@%12.3.2  Switching to a Child Process%@AE@%%@EH@%%@NL@%
  10419. %@NL@%
  10420. %@CR:MCVC3201@%%@4@%If a child process can be debugged, you can switch to that process directly%@EH@%
  10421. by using the Process command. Use of this command accomplishes the same end
  10422. as using the Session Manager but is more direct.%@NL@%
  10423. %@NL@%
  10424. %@CR:MCVC3202@%%@4@%To switch to the debugging session for a child process, enter the Process%@EH@%
  10425. command with the following syntax:%@NL@%
  10426. %@NL@%
  10427.      %@AB@%|%@AE@% %@AI@%processID%@AE@%%@AB@%%@NL@%
  10428. %@NL@%
  10429. %@CR:MCVC3203@%%@4@%in which %@AI@%processID%@AE@% is the process ID (Pid) of the process you wish to debug.%@EH@%%@NL@%
  10430. %@NL@%
  10431. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10432. %@AI@%NOTE%@AE@%%@NL@%
  10433.    The Process command only works with direct children. In other words, you%@NL@%
  10434.    can spawn a child which in turns spawns another child. The Process%@NL@%
  10435.    command does not give you direct access to the "grandchild." Instead, you%@NL@%
  10436.    must switch to the intermediate parent.%@NL@%
  10437. %@NL@%
  10438.    To return to debugging a parent or grandparent, you must use the OS/2%@NL@%
  10439.    Session Manager.%@NL@%
  10440. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10441. %@NL@%
  10442. %@NL@%
  10443. %@CR:MCVC4000@%%@2@%%@AB@%12.4  Debugging Multiple Threads%@AE@%%@EH@%%@NL@%
  10444. %@NL@%
  10445. %@CR:MCVC4001@%%@4@%A program running in OS/2 protected mode has one or more threads. Threads%@EH@%
  10446. are the fundamental units of execution; OS/2 can execute a number of
  10447. different threads concurrently. A thread is similar to a process, yet it can
  10448. be created or terminated much faster. Threads begin at a function-definition
  10449. heading in the same program in which they are invoked.%@NL@%
  10450. %@NL@%
  10451. %@CR:MCVC4002@%%@4@%The existence of multiple threads within a program presents a dilemma for%@EH@%
  10452. debugging. For example, thread 1 may be executing source line 23 while
  10453. thread 2 is executing source line 78. Which line of code does the CodeView
  10454. debugger consider to be the current line?%@NL@%
  10455. %@NL@%
  10456. %@CR:MCVC4003@%%@4@%Conversely, you cannot always tell which thread is executing even if you%@EH@%
  10457. know what the current source line is. In OS/2 protected mode, you can write
  10458. a program in which two threads enter the same function.%@NL@%
  10459. %@NL@%
  10460. %@CR:MCVC4004@%%@4@%In Figure 12.1%@FN@%
  10461. Figure 12.1 is found on page 214 of the printed version.%@EF@%, the function %@AS@%main%@AE@% uses the DOSCREATETHREAD system call to%@EH@%
  10462. begin execution of thread 2. The function %@AS@%f2%@AE@% is the entry point of the new
  10463. thread. Thread 2 begins and terminates inside the function %@AS@%f2%@AE@%. Before it
  10464. terminates, however, thread 2 can enter other functions by means of ordinary
  10465. function calls.%@AS@%%@NL@%
  10466. %@NL@%
  10467. %@CR:MCVC4005@%%@4@%Thread 1 begins execution in the function %@AS@%main%@AE@%, and thread 2 begins%@EH@%
  10468. execution in the function %@AS@%f2%@AE@%. Later, both thread 1 and thread 2 enter the
  10469. function %@AS@%f3%@AE@%. (Note that each thread returns to the proper place because each
  10470. thread has its own stack.) When you use the debugger to examine the behavior
  10471. of code within the function %@AS@%f3%@AE@%, how can you tell which thread you are
  10472. tracking?%@AS@%%@NL@%
  10473. %@NL@%
  10474. %@CR:MCVC4006@%%@4@%The protected-mode CodeView debugger solves this dilemma by using a modified%@EH@%
  10475. CodeView prompt and by providing the Thread command, which is only available
  10476. with CVP.%@NL@%
  10477. %@NL@%
  10478. %@CR:MCVC4007@%%@4@%The command prompt for the protected-mode CodeView debugger is preceded by a%@EH@%
  10479. three-digit number indicating the current thread.%@NL@%
  10480. %@NL@%
  10481. %@CR:MCVC4008@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  10482. %@NL@%
  10483.      001>%@NL@%
  10484. %@NL@%
  10485. %@CR:MCVC4009@%%@4@%The example above displays the protected-mode CodeView prompt, indicating%@EH@%
  10486. that thread 1 is the current thread. Thread 1 is always the current thread
  10487. when you begin a program. If the program never calls the DOSCREATETHREAD
  10488. function, thread 1 will remain the only thread. Note that certain C library
  10489. functions (such as BeginThread) call DOSCREATETHREAD for you.%@NL@%
  10490. %@NL@%
  10491. %@CR:MCVC400A@%%@4@%Each thread has its own stack and its own register values. When you change%@EH@%
  10492. the current thread, you see several changes to the CodeView debugger
  10493. display:%@NL@%
  10494. %@NL@%
  10495. %@CR:MCVC400B@%  ■  The CodeView prompt displays a different three-digit number.%@NL@%
  10496. %@NL@%
  10497.   ■  The register contents change.%@NL@%
  10498. %@NL@%
  10499.   ■  The current source line and current instruction both change to reflect%@NL@%
  10500.      the new value of CS:IP. If you are running the debugger in window mode,%@NL@%
  10501.      you are likely to see different code in the display window.%@NL@%
  10502. %@NL@%
  10503.   ■  The Calls menu and the Stack Trace command displays a different group%@NL@%
  10504.      of functions.%@NL@%
  10505. %@NL@%
  10506. %@NL@%
  10507. %@CR:MCVC5000@%%@2@%%@AB@%12.5  The Thread Command%@AE@%%@EH@%%@NL@%
  10508. %@NL@%
  10509. %@CR:MCVC5001@%%@4@%This section discusses the Thread command and lists other CodeView commands%@EH@%
  10510. that may work differently because of multiple threads.%@NL@%
  10511. %@NL@%
  10512. %@CR:MCVC5002@%%@4@%The syntax of the Thread command is displayed below:%@EH@%%@NL@%
  10513. %@NL@%
  10514. %@CR:MCVC5003@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  10515. %@NL@%
  10516.      %@AB@%~%@AE@%«%@AI@%specifier%@AE@%«%@AI@%command%@AE@%» »%@NL@%
  10517. %@NL@%
  10518. %@CR:MCVC5004@%%@4@%In the syntax display above, the %@AI@%specifier%@AE@% determines to which thread or%@EH@%
  10519. threads the command applies. You can specify all threads or just a
  10520. particular thread. The %@AI@%command%@AE@% determines which activity the debugger
  10521. carries out with regard to the specified thread. For example, you can
  10522. execute the thread, freeze its execution, or select it as the current
  10523. thread. If you omit %@AI@%command%@AE@%, the debugger displays the status of the
  10524. specified thread. If you omit both %@AI@%command%@AE@% and %@AI@%specifier%@AE@%, the debugger
  10525. displays the status of all threads.%@NL@%
  10526. %@NL@%
  10527. %@CR:MCVC5005@%%@4@%The status display for threads consists of the two fields%@EH@%%@NL@%
  10528. %@NL@%
  10529.      %@CR:MCVC5006@%%@AI@%thread-id    thread-state%@AE@%%@NL@%
  10530. %@NL@%
  10531. %@CR:MCVC5007@%%@4@%in which %@AI@%thread-id%@AE@% is an integer and %@AI@%thread-state%@AE@% has the value %@AS@%runnable%@AE@% or%@EH@%
  10532. %@AS@%frozen%@AE@%. All threads not frozen by the debugger are displayed as %@AS@%runnable%@AE@%;
  10533. this includes threads that may be blocked for reasons that have nothing to
  10534. do with the debugger, such as a critical section.%@NL@%
  10535. %@NL@%
  10536. %@NL@%
  10537. %@CR:MCVC5100@%%@3@%%@AB@%12.5.1  Legal Values for Specifier%@AE@%%@EH@%%@NL@%
  10538. %@NL@%
  10539. %@CR:MCVC5101@%%@4@%The legal values for %@AI@%specifier%@AE@% are listed below along with their effects.%@EH@%%@NL@%
  10540. %@NL@%
  10541. %@CR:MCVC5102@%%@AB@%Symbol                      Function%@AE@%%@NL@%
  10542. %@NL@%
  10543. (blank)                     Displays the status of all threads.%@NL@%
  10544. %@NL@%
  10545.                             If you omit the %@AI@%specifier%@AE@% field you cannot enter%@NL@%
  10546.                             a %@AI@%command%@AE@%. Instead, you enter the tilde (%@AB@%~%@AE@%) by%@NL@%
  10547.                             itself.%@NL@%
  10548. %@NL@%
  10549. %@AB@%#%@AE@%                           Specifies the last thread that was executed.%@NL@%
  10550. %@NL@%
  10551.                             This thread is not necessarily the current%@NL@%
  10552.                             thread. For example, suppose you are tracing%@NL@%
  10553.                             execution of thread 1, and then switch the%@NL@%
  10554.                             current thread to thread 2. Until you execute%@NL@%
  10555.                             some code in thread 2, the debugger still%@NL@%
  10556.                             considers thread 1 to be the last thread%@NL@%
  10557.                             executed.%@NL@%
  10558. %@NL@%
  10559. %@AB@%*%@AE@%                           Specifies all threads.%@NL@%
  10560. %@NL@%
  10561. %@AI@%n%@AE@%                           Specifies the indicated thread. The value of %@AI@%n%@AE@%%@NL@%
  10562.                             must be a number corresponding to an existing%@NL@%
  10563.                             thread. You can determine corresponding numbers%@NL@%
  10564.                             for all threads by entering the command %@AB@%~*%@AE@%,%@NL@%
  10565.                             which gives status of all threads.%@NL@%
  10566. %@NL@%
  10567. %@AB@%.%@AE@%                           Specifies the current thread.%@NL@%
  10568. %@NL@%
  10569. %@NL@%
  10570. %@CR:MCVC5200@%%@3@%%@AB@%12.5.2  Legal Values fo rCommand%@AE@%%@EH@%%@NL@%
  10571. %@NL@%
  10572. %@CR:MCVC5201@%%@4@%The legal values for %@AI@%command%@AE@% are listed below, along with their effects.%@EH@%%@NL@%
  10573. %@CR:MCVC5202@%%@NL@%
  10574. %@TH:   90   5206  2 28 49 @%
  10575. %@AB@%Command                     Function%@AE@%
  10576.  
  10577. (blank)                     The status of the selected thread (or threads)
  10578.                             is displayed.
  10579.  
  10580. %@AB@%BP%@AE@%                          A breakpoint is set for the specified thread or
  10581.                             threads.
  10582.  
  10583.                             As explained earlier, it is possible to write
  10584.                             your program so that the same function is
  10585.                             executed by more than one thread. By using this
  10586.                             version of the Thread command, you can specify a
  10587.                             breakpoint that applies only to a particular
  10588.                             thread.
  10589.  
  10590.                             The letters %@AB@%BP%@AE@% are followed by normal syntax for
  10591.                             the Breakpoint Set command, as described in
  10592.                             Chapter 7%@BO:   579f3@%, "Managing Breakpoints." Therefore you
  10593.                             can include the optional pass count and command
  10594.                             fields.
  10595.  
  10596. %@AB@%E%@AE@%                           The specified thread is executed in slow motion.
  10597.  
  10598.                             When you specify a single thread with %@AB@%E%@AE@%, the
  10599.                             specified thread becomes the current thread and
  10600.                             is executed without any other threads running in
  10601.                             the background. The command %@AB@%~*E%@AE@%%@AS@%%@AE@%  is a special
  10602.                             case.
  10603.  
  10604.                             It is legal only in source mode and executes the
  10605.                             current thread in slow motion, but lets all
  10606.                             other threads run (except those that are
  10607.                             frozen). You see only the current thread
  10608.                             executing in the debugger display.
  10609.  
  10610. %@AB@%F%@AE@%                           The specified thread (or threads) is frozen.
  10611.  
  10612.                             A frozen thread will not run in the background
  10613.                             or in response to the debugger Go command.
  10614.                             However, if you use the %@AB@%E%@AE@%, %@AB@%G%@AE@%, %@AB@%P%@AE@%, or %@AB@%T%@AE@% variation
  10615.                             of the Thread command, the specified thread is
  10616.                             temporarily unfrozen while the debugger executes
  10617.                             the command.
  10618.  
  10619. %@AB@%G%@AE@%                           Control is passed to the specified thread until
  10620.                             it terminates or until a breakpoint is reached.
  10621.  
  10622.                             If you give the command %@AB@%~*G%@AE@%, all threads execute
  10623.                             concurrently (except for those that are frozen).
  10624.                             If you specify a particular thread, the debugger
  10625.                             temporarily freezes all other threads and
  10626.                             executes the specified thread.
  10627.  
  10628. %@AB@%P%@AE@%                           The debugger executes a program step for the
  10629.                             specified thread.
  10630.  
  10631.                             If you specify a particular thread, the debugger
  10632.                             executes one source line or instruction of the
  10633.                             thread. All other threads are temporarily
  10634.                             frozen. This version of the Thread command does
  10635.                             not change the current thread. Therefore if you
  10636.                             specify a thread other than the current thread,
  10637.                             you will not see immediate results. However, the
  10638.                             subsequent behavior of the current thread may be
  10639.                             affected.
  10640.  
  10641.                             The command %@AB@%~*P%@AE@% is a special case. It is legal
  10642.                             only in source mode, and causes the debugger to
  10643.                             step to the next source line while letting all
  10644.                             other threads run (except for those that are
  10645.                             frozen). You  see only the current thread
  10646.                             execute in the debugger display.
  10647.  
  10648. %@AB@%S%@AE@%                           The specified thread is selected as the current
  10649.                             thread.
  10650.  
  10651.                             This version of the Thread command can apply to
  10652.                             only one thread at a time. Thus, the command %@AB@%~*S%@AE@%
  10653.                             results in an error message. Note that the
  10654.                             command %@AB@%~.S%@AE@% is legal, but has no effect.
  10655.  
  10656. %@AB@%T%@AE@%                           The specified thread is traced.
  10657.  
  10658.                             This version of the Thread command works in a
  10659.                             manner identical to %@AB@%P%@AE@%, described above, except
  10660.                             that %@AB@%T%@AE@% traces through function calls and
  10661.                             interrupts, whereas %@AB@%P%@AE@% does not.
  10662.  
  10663. %@AB@%U%@AE@%                           The specified thread or threads are unfrozen.
  10664.                             This command reverses the effect of a freeze.
  10665. %@TE:   90   5206  2 28 49 @%
  10666. %@NL@%
  10667. %@CR:MCVC5203@%%@4@%With the Thread command, only the %@AB@%S%@AE@% (select) and %@AB@%E%@AE@% (execute) variations cause%@EH@%
  10668. the debugger to switch the current thread. However, when a thread causes
  10669. program execution to stop by hitting a breakpoint, the debugger selects that
  10670. thread as the current thread.%@NL@%
  10671. %@NL@%
  10672. %@CR:MCVC5204@%%@4@%You can prevent the debugger from changing the current thread by including%@EH@%
  10673. the breakpoint command %@AB@%"~.S"%@AE@%. This command directs the debugger to switch
  10674. to the current thread rather than the thread that hit the breakpoint. For
  10675. example, the following command sets a breakpoint at line %@AS@%120%@AE@% and prevents
  10676. the current thread from changing:%@NL@%
  10677. %@NL@%
  10678.      BP .120 "~.S"%@NL@%
  10679. %@NL@%
  10680. %@NL@%
  10681. %@CR:MCVC5300@%%@3@%%@AB@%12.5.3  Entries to the Thread Command%@AE@%%@EH@%%@NL@%
  10682. %@NL@%
  10683. %@CR:MCVC5301@%%@4@%The Thread command can have several possible entries. They are summarized in%@EH@%
  10684. the syntax display below.%@NL@%
  10685. %@NL@%
  10686. %@CR:MCVC5302@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  10687. %@NL@%
  10688.      %@AB@%~{#%@AE@%|%@AB@%*%@AE@%|%@AI@%n%@AE@%|%@AB@%.}%@AE@%«%@AB@%BP%@AE@%|%@AB@%E%@AE@%|%@AB@%F%@AE@%|%@AB@%G%@AE@%|%@AB@%P%@AE@%|%@AB@%S%@AE@%|%@AB@%T%@AE@%|%@AB@%U%@AE@%»%@NL@%
  10689. %@NL@%
  10690. %@CR:MCVC5303@%%@4@%Note that you must include one of the symbols from the first set (which%@EH@%
  10691. gives possible values for the specifier), but you do not have to include a
  10692. symbol from the second set (which gives possible values for the command).%@NL@%
  10693. %@NL@%
  10694. %@CR:MCVC5304@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  10695. %@NL@%
  10696.      004>~%@NL@%
  10697. %@NL@%
  10698. %@CR:MCVC5305@%%@4@%The example above displays the status of all threads, including their%@EH@%
  10699. corresponding numbers.%@NL@%
  10700. %@NL@%
  10701.      004>~2%@NL@%
  10702. %@NL@%
  10703. %@CR:MCVC5306@%%@4@%The example above displays the status of thread 2.%@EH@%%@NL@%
  10704. %@NL@%
  10705.      004>~5S%@NL@%
  10706. %@NL@%
  10707. %@CR:MCVC5307@%%@4@%The example above selects thread 5 as the current thread. Since the current%@EH@%
  10708. thread was 4 (a fact apparent from the CodeView prompt), the current thread
  10709. is changing and therefore the registers and the code displayed can be
  10710. expected to all change.%@NL@%
  10711. %@NL@%
  10712.      005>~3BP .64%@NL@%
  10713. %@NL@%
  10714. %@CR:MCVC5308@%%@4@%The example above sets a breakpoint at source line 64, an action that stops%@EH@%
  10715. program execution only when thread 3 executes to this line.%@NL@%
  10716. %@NL@%
  10717.      005>~1F%@NL@%
  10718. %@NL@%
  10719. %@CR:MCVC5309@%%@4@%The example above freezes thread 1.%@EH@%%@NL@%
  10720. %@NL@%
  10721.      005>~*U%@NL@%
  10722. %@NL@%
  10723. %@CR:MCVC530A@%%@4@%The example above thaws (unfreezes) all threads; any threads that were%@EH@%
  10724. frozen before will now be free to execute whenever the Go command is given.
  10725. If no threads are frozen, this command has no effect.%@NL@%
  10726. %@NL@%
  10727.      005>~2E%@NL@%
  10728. %@NL@%
  10729. %@CR:MCVC530B@%%@4@%The example above selects thread 2 as the current thread, then proceeds to%@EH@%
  10730. execute thread 2 in slow motion.%@NL@%
  10731. %@NL@%
  10732.      002>~3S%@NL@%
  10733.      003>~.F%@NL@%
  10734.      003>~#S%@NL@%
  10735.      002>%@NL@%
  10736. %@NL@%
  10737. %@CR:MCVC530C@%%@4@%The example above selects thread 3 as the current thread, freezes the%@EH@%
  10738. current thread (thread 3), and switches back to thread 2. After switching to
  10739. thread 3, no code was executed; therefore, the debugger considers the
  10740. last-thread-executed symbol (%@AB@%#%@AE@%) to refer to thread 2.%@NL@%
  10741. %@NL@%
  10742. %@NL@%
  10743. %@CR:MCVC5400@%%@3@%%@AB@%12.5.4  Effect of Threads on CodeView Commands%@AE@%%@EH@%%@NL@%
  10744. %@NL@%
  10745. %@CR:MCVC5401@%%@4@%Whether or not you use the Thread Command, the existence of threads affects%@EH@%
  10746. your CodeView debugging session at all times. Particular debugger commands
  10747. are strongly affected. Each of these commands is discussed below.%@NL@%
  10748. %@CR:MCVC5402@%%@NL@%
  10749. %@TH:   41   2613  2 28 48 @%
  10750. %@AB@%Command                     Behavior in Multiple-Thread Programs%@AE@%
  10751.  
  10752. %@AB@%.%@AE@%                           The Current Line command always uses the current
  10753.                             value of CS:IP to determine what the current
  10754.                             instruction is. Thus, the Current Line command
  10755.                             applies to the current thread.
  10756.  
  10757. %@AB@%E%@AE@%                           When the debugger is in source mode, the Execute
  10758.                             command is equivalent to the %@AB@%~*E%@AE@% command; the
  10759.                             current thread is executed in slow motion while
  10760.                             all other threads are also running. When the
  10761.                             debugger is in mixed or assembly mode, the
  10762.                             Execute command is equivalent to the command
  10763.                             %@AB@%~.P%@AE@%, which does not let other threads run
  10764.                             concurrently.
  10765.  
  10766. %@AB@%BP%@AE@%                          The Set Breakpoint command is equivalent to the
  10767.                             %@AB@%~*BP%@AE@% command; the breakpoint applies to all
  10768.                             threads.
  10769.  
  10770. %@AB@%G%@AE@%                           The Go command is equivalent to the %@AB@%~*G%@AE@%%@AS@%%@AE@%
  10771.                             command; control is passed to the operating
  10772.                             system, which executes all threads in the
  10773.                             program except for those that are frozen.
  10774.  
  10775. %@AB@%P%@AE@%                           When the debugger is in source mode, the Program
  10776.                             Step command is equivalent to the command %@AB@%~*P%@AE@%,
  10777.                             which lets other threads run concurrently. When
  10778.                             the debugger is in mixed or assembly mode, the
  10779.                             Program Step command is equivalent to the
  10780.                             command %@AB@%~.P%@AE@%, which lets no other threads run.
  10781.  
  10782. %@AB@%K%@AE@%                           The Stack Trace command displays the stack of
  10783.                             the current thread.
  10784.  
  10785. %@AB@%T%@AE@%                           When the debugger is in source mode, the Trace
  10786.                             command is equivalent to the command %@AB@%~*T%@AE@%, which
  10787.                             lets other threads run concurrently. When the
  10788.                             debugger is in mixed or assembly mode, the Trace
  10789.                             command is equivalent to the command %@AB@%~.T%@AE@%, which
  10790.                             lets no other threads run.
  10791. %@TE:   41   2613  2 28 48 @%
  10792. %@NL@%
  10793. %@CR:MCVC5403@%%@4@%In general, CodeView commands apply to all threads unless the nature of the%@EH@%
  10794. command makes it appropriate to deal with only one thread at a time. In this
  10795. case, the command applies only to the current thread. (For example, since
  10796. each thread has its own stack, the Stack Trace command does not apply to all
  10797. threads.)%@NL@%
  10798. %@NL@%
  10799. %@NL@%
  10800. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10801. %@CR:MCVP2000@%%@1@%%@AB@%Part 2  Utilities%@AE@%%@EH@%%@NL@%
  10802. %@NL@%
  10803. %@CR:MCVP2004@%%@4@%Part 2 describes the use of each of the DOS and OS/2 programming utilities%@EH@%
  10804. (exit codes and messages for these utilities are presented in the
  10805. appendixes).%@NL@%
  10806. %@NL@%
  10807. %@CR:MCVP2005@%%@4@%Some of the material is this part, most notably the information on LINK, is%@EH@%
  10808. presented in partial form in the user's guides for Microsoft compilers.
  10809. However, you will find here the only complete, authoritative reference on
  10810. utility operation and available options.%@NL@%
  10811. %@NL@%
  10812. %@CR:MCVP2006@%%@4@%Chapters 13-17 document utilities you can use to produce either OS/2 or DOS%@EH@%
  10813. programs. Chapters 18-22 document utilities and special concepts-such as
  10814. module-definition files-developed specifically for the creation of OS/2
  10815. programs.%@NL@%
  10816. %@NL@%
  10817. %@NL@%
  10818. %@CR:MCVD0000@%%@1@%%@AB@%Chapter 13  Linking Object Files with LINK%@AE@%%@EH@%%@NL@%
  10819. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10820. %@NL@%
  10821. %@CR:MCVD0001@%%@4@%The Microsoft Segmented-Executable Linker (LINK) is used to combine object%@EH@%
  10822. files into a single executable file. It can be used with object files
  10823. compiled or assembled for 8086/8088, 80286, or 80386 machines. The format of
  10824. input to the linker is the Microsoft Relocatable Object-Module Format (OMF),
  10825. which is based on the Intel 8086 OMF.%@NL@%
  10826. %@NL@%
  10827. %@CR:MCVD0002@%%@4@%The output file from LINK (that is, the executable file) is not bound to%@EH@%
  10828. specific memory addresses. Thus, the operating system can load and execute
  10829. this file at any convenient address. LINK can produce executable files
  10830. containing up to 1 megabyte of code and data.%@NL@%
  10831. %@NL@%
  10832. %@CR:MCVD0003@%%@4@%The following sections explain how to run the linker and specify options%@EH@%
  10833. that control its operation.%@NL@%
  10834. %@NL@%
  10835. %@NL@%
  10836. %@CR:MCVD1000@%%@2@%%@AB@%13.1  Determining Linker Output%@AE@%%@EH@%%@NL@%
  10837. %@NL@%
  10838. %@CR:MCVD1001@%%@4@%The linker can produce either an application that runs under real mode (DOS%@EH@%
  10839. 2.x, 3.x, or 3.x compatibility box), an application that runs under OS/2
  10840. protected mode (or Microsoft Windows), or an OS/2 dynamic-link library. If
  10841. you are developing programs for real mode only, leave the %@AI@%deffile%@AE@% field on
  10842. the LINK command line empty and ignore the following discussion. If you are
  10843. developing programs for OS/2, read this section to understand what kind of
  10844. executable file the linker produces. Chapters 18 and 19 explain in detail
  10845. the terms and concepts mentioned below.%@NL@%
  10846. %@NL@%
  10847. %@CR:MCVD1002@%%@4@%The following rules determine what output the linker produces:%@EH@%%@NL@%
  10848. %@NL@%
  10849. %@CR:MCVD1003@%  1. If no module-definition file or import library resolves any external%@NL@%
  10850.      references, the linker produces a real-mode application. (In other%@NL@%
  10851.      words, the linker creates a real-mode application unless you specify a%@NL@%
  10852.      module-definition file or import library, and that file or library%@NL@%
  10853.      resolves at least one external reference.)%@NL@%
  10854. %@NL@%
  10855.   2. If a module-definition file with a LIBRARY statement is given, the%@NL@%
  10856.      linker produces a dynamic-link library for OS/2 protected mode or%@NL@%
  10857.      Windows.%@NL@%
  10858. %@NL@%
  10859.   3. Otherwise, the linker produces an application for OS/2 protected mode%@NL@%
  10860.      or Windows.%@NL@%
  10861. %@NL@%
  10862. %@CR:MCVD1004@%%@4@%You can therefore produce an OS/2 protected-mode application by linking with%@EH@%
  10863. an import library or a module-definition file, as long as you do not use a
  10864. %@AB@%LIBRARY%@AE@% statement. (The LIBRARY statement is described in Chapter 19%@BO:   c14f2@%,
  10865. "Using Module-Definition Files.") The file DOSCALLS.LIB is an import
  10866. library. Therefore, if you link with DOSCALLS.LIB, you produce either an
  10867. OS/2 application or a dynamic-link library.%@NL@%
  10868. %@NL@%
  10869. %@CR:MCVD1005@%%@4@%When you use a Microsoft high-level language to compile for protected mode,%@EH@%
  10870. it automatically specifies DOSCALLS.LIB as a default library.%@NL@%
  10871. %@NL@%
  10872. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10873. %@AI@%NOTE%@AE@%%@NL@%
  10874.    Throughout this chapter, all references to OS/2 protected mode also apply%@NL@%
  10875.    to Microsoft Windows. Other chapters may make a distinction between%@NL@%
  10876.    protected mode and Windows. Each reference to "library," unless otherwise%@NL@%
  10877.    noted, refers to a standard (object-code) library, not a dynamic-link%@NL@%
  10878.    library.%@NL@%
  10879. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10880. %@NL@%
  10881. %@CR:MCVD1006@%%@4@%The linker produces files that run in protected mode only or in real mode%@EH@%
  10882. only. However, OS/2 applications that make dynamic-link calls only to the
  10883. Family API (a subset of the functions defined in DOSCALLS.LIB) can be made
  10884. to run under DOS 3.x with the BIND utility. (BIND is discussed in Chapter
  10885. 20%@BO:   ccaeb@%).%@NL@%
  10886.  
  10887. %@NL@%
  10888. %@NL@%
  10889. %@CR:MCVD2000@%%@2@%%@AB@%13.2  Specifying Files for Linking%@AE@%%@EH@%%@NL@%
  10890. %@NL@%
  10891. %@CR:MCVD2001@%%@4@%Instead of using high-level-language commands to invoke the linker, you can%@EH@%
  10892. use the LINK command to invoke LINK directly.You can specify the input
  10893. required for this command in one of three ways:%@NL@%
  10894. %@NL@%
  10895. %@CR:MCVD2002@%  1. By placing it on the command line.%@NL@%
  10896. %@NL@%
  10897.   2. By responding to prompts.%@NL@%
  10898. %@NL@%
  10899.   3. By specifying a file containing responses to prompts. This type of file%@NL@%
  10900.      is known as a "response file."%@NL@%
  10901. %@NL@%
  10902. %@CR:MCVD2003@%%@4@%Regardless of the way in which LINK was invoked, press CTRL+C at any time to%@EH@%
  10903. terminate LINK operation and exit back to DOS.%@NL@%
  10904. %@NL@%
  10905. %@NL@%
  10906. %@CR:MCVD2100@%%@3@%%@AB@%13.2.1  Specifying File Names%@AE@%%@EH@%%@NL@%
  10907. %@NL@%
  10908. %@CR:MCVD2101@%%@4@%You can use any combination of uppercase and lowercase letters for the file%@EH@%
  10909. names you specify on the LINK command line or give in response to the LINK
  10910. command prompts. For example, LINK considers the following three file names
  10911. to be equivalent:%@NL@%
  10912. %@NL@%
  10913.      %@CR:MCVD2102@%%@AS@%abcde.fgh%@AE@%%@NL@%
  10914.      %@AS@%AbCdE.FgH%@AE@%%@NL@%
  10915.      %@AS@%ABCDE.fgh%@AE@%%@NL@%
  10916. %@NL@%
  10917. %@CR:MCVD2103@%%@4@%If you specify file names without extensions, LINK uses the following%@EH@%
  10918. default file-name extensions:%@NL@%
  10919. %@NL@%
  10920. %@CR:MCVD2104@%%@AB@%File Type                   Default Extension%@AE@%%@NL@%
  10921. %@NL@%
  10922. Object                      .OBJ%@NL@%
  10923. %@NL@%
  10924. Executable                  .EXE%@NL@%
  10925. %@NL@%
  10926. Map                         .MAP%@NL@%
  10927. %@NL@%
  10928. Library                     .LIB%@NL@%
  10929. %@NL@%
  10930. Module definition           .DEF%@NL@%
  10931. (protected-mode use
  10932. only)
  10933. %@NL@%
  10934. %@CR:MCVD2105@%%@4@%You can override the default extension for a particular command-line field%@EH@%
  10935. or prompt by specifying a different extension. To enter a file name that has
  10936. no extension, type the name followed by a period.%@NL@%
  10937. %@NL@%
  10938. %@CR:MCVD2106@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  10939. %@NL@%
  10940. %@CR:MCVD2107@%%@4@%Consider the following two file specifications:%@EH@%%@NL@%
  10941. %@NL@%
  10942.      %@CR:MCVD2108@%%@AS@%ABC.%@AE@%
  10943.      %@AS@%ABC%@AE@%%@NL@%
  10944. %@NL@%
  10945. %@CR:MCVD2109@%%@4@%If you use the first file specification, LINK assumes that the file has no%@EH@%
  10946. extension. If you use the second file specification, LINK uses the default
  10947. extension for that prompt.%@NL@%
  10948. %@NL@%
  10949. %@NL@%
  10950. %@CR:MCVD2200@%%@3@%%@AB@%13.2.2  Linking with the LINK Command Line%@AE@%%@EH@%%@NL@%
  10951. %@NL@%
  10952. %@CR:MCVD2201@%%@4@%Use the following form of the LINK command to specify input on the command%@EH@%
  10953. line:%@NL@%
  10954. %@NL@%
  10955.      %@AB@%LINK%@AE@% %@AI@%objfiles%@AE@%«%@AB@%,%@AE@%«%@AI@%exefile%@AE@%»«%@AB@%,%@AE@%«%@AI@%mapfile%@AE@%»«%@AB@%,%@AE@%«%@AI@%libraries%@AE@%»«%@AB@%,%@AE@%%@AI@%deffile%@AE@%%@AB@%;%@AE@%%@NL@%
  10956. %@NL@%
  10957. %@CR:MCVD2202@%%@4@%Each of the command-line fields is explained below. In these explanations,%@EH@%
  10958. reference is made to libraries. Unless qualified by the term "dynamic-link,"
  10959. the word "libraries" refers to import libraries and standard (object-code)
  10960. libraries, both of which have the default extension .LIB. (Note that
  10961. dynamic-link libraries have the default extension .DLL, and therefore are
  10962. usually easy to distinguish from other libraries.) You can specify import
  10963. libraries anywhere you can specify standard libraries.You can also combine
  10964. import libraries and standard libraries by using the Library Manager; these
  10965. combined libraries can then be specified in place of standard libraries.%@NL@%
  10966. %@NL@%
  10967. %@CR:MCVD2210@%%@4@%%@AB@%The objfiles field%@AE@%%@EH@%%@NL@%
  10968. %@NL@%
  10969. %@CR:MCVD2211@%%@4@%The %@AI@%objfiles%@AE@% field allows you to specify the names of the object files you%@EH@%
  10970. are linking. At least one object-file name is required. A space or plus sign
  10971. (+) must separate each pair of object-file names. LINK automatically
  10972. supplies the .OBJ extension when you give a filename without an extension.
  10973. If your object file has a different extension, or if it appears in another
  10974. directory or on another disk, you must give the full name──including the
  10975. extension and path name──for the file to be found. If LINK cannot find a
  10976. given object file, and the drive associated with the object file is a
  10977. removable (floppy) drive, LINK displays a message and waits for you to
  10978. change disks.%@NL@%
  10979. %@NL@%
  10980. %@CR:MCVD2212@%%@4@%You may also specify one or more libraries in the %@AI@%objfiles%@AE@% field. To enter a%@EH@%
  10981. library in this field, make sure that you include the .LIB extension;
  10982. otherwise LINK assumes an .OBJ extension. Libraries entered in this field
  10983. are called "load libraries" as opposed to "regular libraries." LINK
  10984. automatically links in every object module in a load library; it does not
  10985. search for unresolved external references first. The effect of entering a
  10986. load library is exactly the same as if you had entered all the names of the
  10987. library's object modules into the %@AI@%objfiles%@AE@% field. This feature is useful if
  10988. you are developing software using many modules and wish to avoid having to
  10989. retype each module on the LINK command line.%@NL@%
  10990. %@NL@%
  10991. %@CR:MCVD2220@%%@4@%%@AB@%The exefile field%@AE@%%@EH@%%@NL@%
  10992. %@NL@%
  10993. %@CR:MCVD2221@%%@4@%The %@AI@%exefile%@AE@% field allows you to specify the name of the executable file. If%@EH@%
  10994. the file name you give does not have an extension, LINK automatically adds
  10995. .EXE as the extension. You can give any file name you like; however, if you
  10996. are specifying an extension, you should always use .EXE because DOS expects
  10997. executable files to have either this extension or the .COM extension.%@NL@%
  10998. %@NL@%
  10999. %@CR:MCVD2230@%%@4@%%@AB@%The mapfile field%@AE@%%@EH@%%@NL@%
  11000. %@NL@%
  11001. %@CR:MCVD2231@%%@4@%The %@AI@%mapfile%@AE@% field allows you to specify the name of the map file if you are%@EH@%
  11002. creating one. To include public symbols and their addresses in the map file,
  11003. specify the /MAP option on the LINK command line. (See Section 13.3.15%@BO:   94a90@%,
  11004. "Listing Public Symbols.") If  you specify a map-filename without an
  11005. extension, LINK automatically adds an extension of .MAP. LINK creates the
  11006. map file in the current working directory unless you specify a path name for
  11007. the map file.%@NL@%
  11008. %@NL@%
  11009. %@CR:MCVD2240@%%@4@%%@AB@%The libraries field%@AE@%%@EH@%%@NL@%
  11010. %@NL@%
  11011. %@CR:MCVD2241@%%@4@%The %@AI@%libraries%@AE@% field allows you to specify the name of a library that you%@EH@%
  11012. want linked to the object file(s). (When LINK finds the name of a library in
  11013. this field, the library is a "regular library," and LINK will link in only
  11014. those object modules needed to resolve external references.) Each time you
  11015. compile a source file for a high-level language, the compiler places the
  11016. name of one or more libraries in the object file that it creates; the linker
  11017. automatically searches for a library with this name. Because of this, you do
  11018. not need to give library names on the LINK command line unless you want to
  11019. add the names of other libraries, search for libraries in different
  11020. locations, or override the use of the library named in the object file.%@NL@%
  11021. %@NL@%
  11022. %@CR:MCVD2250@%%@4@%%@AB@%The deffile field%@AE@%%@EH@%%@NL@%
  11023. %@NL@%
  11024. %@CR:MCVD2251@%%@4@%The %@AI@%deffile%@AE@% field allows you to specify the file name of a module-definition%@EH@%
  11025. file. Leave this field blank if you are linking for real mode. The use of a
  11026. module-definition file is optional for applications, but required for
  11027. dynamic-link libraries. See Chapters 18%@BO:   be41d@% and 19%@BO:   c14f2@% for more information on
  11028. module-definition files.%@NL@%
  11029. %@NL@%
  11030. %@CR:MCVD2252@%%@4@%You may specify command-line options after any field──but before the comma%@EH@%
  11031. that terminates the field. The options are described in sections
  11032. 13.3.1%@BO:   900cf@%-13.3.32. You do not have to give any options when you run the
  11033. linker.%@NL@%
  11034. %@NL@%
  11035. %@CR:MCVD2253@%%@4@%If you include a comma (to indicate where a field would be) but do not put a%@EH@%
  11036. file name before the comma, LINK will select the default for that field.
  11037. However, if you use a comma to include the %@AI@%mapfile%@AE@% field (but do not include
  11038. a name), LINK creates a map file. This file has the same base name as the
  11039. executable file. Use NUL for the map-filename if you do not want to produce
  11040. a map file.%@NL@%
  11041. %@NL@%
  11042. %@CR:MCVD2254@%%@4@%You can also select default responses by using a semicolon (%@AB@%;%@AE@%). The%@EH@%
  11043. semicolon tells LINK to use the defaults for all remaining fields. If you do
  11044. not give all file names on the command line, or if you do not end the
  11045. command line with a semicolon, the linker prompts you for the files you
  11046. omitted, using the prompts described in Section 13.2.3%@BO:   8baf9@%, "Linking with the
  11047. LINK Prompts."%@NL@%
  11048. %@NL@%
  11049. %@CR:MCVD2255@%%@4@%If you do not specify a drive or directory for a file, the linker assumes%@EH@%
  11050. that the file is on the current drive and directory. If you want the linker
  11051. to create files in a location other than the current drive and directory,
  11052. you must specify the new drive and directory for each such file on the
  11053. command line.%@NL@%
  11054. %@NL@%
  11055. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11056. %@AI@%NOTE%@AE@%%@NL@%
  11057.    The OS/2 linker supports overlays only when producing a real-mode%@NL@%
  11058.    application.%@NL@%
  11059. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11060. %@NL@%
  11061. %@CR:MCVD2256@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  11062. %@NL@%
  11063.      LINK FUN+TEXT+TABLE+CARE, ,FUNLIST, XLIB.LIB%@NL@%
  11064. %@NL@%
  11065. %@CR:MCVD2257@%%@4@%The command line above causes LINK to load and link the object modules %@EH@%
  11066. %@AS@%FUN.OBJ%@AE@%, %@AS@%TEXT.OBJ%@AE@%, %@AS@%TABLE.OBJ%@AE@%, and %@AS@%CARE.OBJ%@AE@%, and to search for unresolved
  11067. references in the library file %@AS@%XLIB.LIB%@AE@% and the default libraries. By
  11068. default, the executable file produced by%@AS@%LINK%@AE@% is named %@AS@%FUN.EXE%@AE@%. LINK also
  11069. produces a map file, %@AS@%FUNLIST.MAP%@AE@%.%@NL@%
  11070. %@NL@%
  11071.      LINK FUN,,;%@NL@%
  11072. %@NL@%
  11073. %@CR:MCVD2258@%%@4@%This command line produces a map file named %@AS@%FUN.MAP%@AE@% since a comma appears as%@EH@%
  11074. a placeholder for the %@AI@%mapfile%@AE@% specification on the command line.%@NL@%
  11075. %@NL@%
  11076.      LINK FUN,;%@NL@%
  11077.      LINK FUN;%@NL@%
  11078. %@NL@%
  11079. %@CR:MCVD2259@%%@4@%These command lines do not produce a map file, since commas do not appear as%@EH@%
  11080. placeholders for the %@AI@%mapfile%@AE@% specification.%@NL@%
  11081. %@NL@%
  11082.      LINK MAIN+GETDATA+PRINTIT, , MAIN;%@NL@%
  11083. %@NL@%
  11084. %@CR:MCVD225A@%%@4@%The command in the line above causes LINK to link the files %@AS@%MAIN.OBJ%@AE@%,%@EH@%
  11085. %@AS@%GETDATA.OBJ%@AE@%, and %@AS@%PRINTIT.OBJ%@AE@% into a real-mode executable file since there is
  11086. no module-definition file. A map file named  %@AS@%MAIN.MAP%@AE@% is also produced.%@NL@%
  11087. %@NL@%
  11088.      LINK GETDATA+PRINTIT, , , MODDEF%@NL@%
  11089. %@NL@%
  11090. %@CR:MCVD225B@%%@4@%This command causes LINK to link %@AS@%GETDATA.OBJ%@AE@% and%@AS@%PRINTIT.OBJ%@AE@% into an OS/2%@EH@%
  11091. dynamic-link library if %@AS@%MODDEF.DEF%@AE@% contains a %@AB@%LIBRARY%@AE@% statement. Otherwise,
  11092. an OS/2 protected-mode application is produced.%@NL@%
  11093. %@NL@%
  11094. %@NL@%
  11095. %@CR:MCVD2300@%%@3@%%@AB@%13.2.3  Linking with the LINK Prompts%@AE@%%@EH@%%@NL@%
  11096. %@NL@%
  11097. %@CR:MCVD2301@%%@4@%If you want to use the LINK prompts to specify input to the linker, start%@EH@%
  11098. the linker by typing LINK at the DOS command level. LINK prompts you for the
  11099. input it needs by displaying the following lines, one at a time:%@NL@%
  11100. %@NL@%
  11101.      Object Modules [.OBJ]:%@NL@%
  11102.      Run File [%@AI@%basename%@AE@%.EXE]:%@NL@%
  11103.      List File [NUL.MAP]:%@NL@%
  11104.      Libraries [.LIB]:%@NL@%
  11105.      Definitions File [NUL.DEF]:%@NL@%
  11106. %@NL@%
  11107. %@CR:MCVD2302@%%@4@%LINK waits for you to respond to each prompt before printing the next one.%@EH@%
  11108. Section 13.2.1%@BO:   892c3@% gives the rules for specifying file names in response to
  11109. these prompts.%@NL@%
  11110. %@NL@%
  11111. %@CR:MCVD2303@%%@4@%The responses you give to the LINK command prompts correspond to the fields%@EH@%
  11112. on the LINK command line. (See Section 13.2.2%@BO:   89934@% for a discussion of the LINK
  11113. command line.) The following list shows these correspondences:%@NL@%
  11114. %@NL@%
  11115. %@CR:MCVD2304@%%@AB@%Prompt                      Command-Line Fields%@AE@%%@NL@%
  11116. %@NL@%
  11117. %@AS@%Object Module%@AE@%               %@AI@%objfiles%@AE@%%@NL@%
  11118. %@NL@%
  11119. %@AS@%Run File%@AE@%                    %@AI@%exefile%@AE@%%@NL@%
  11120. %@NL@%
  11121. %@AS@%List File%@AE@%                   %@AI@%mapfile%@AE@%%@NL@%
  11122. %@NL@%
  11123. %@AS@%Libraries%@AE@%                   %@AI@%libraries%@AE@%%@NL@%
  11124. %@NL@%
  11125. %@AS@%Definitions File%@AE@%            %@AI@%deffile%@AE@%%@NL@%
  11126. %@NL@%
  11127. %@CR:MCVD2305@%%@4@%If a plus sign (%@AB@%+%@AE@%) is the last character you type on a response line, the%@EH@%
  11128. prompt appears on the next line, and you can continue typing responses. In
  11129. this case, the plus sign must appear at the end of a complete file or
  11130. library name, path name, or drive name.%@NL@%
  11131. %@NL@%
  11132. %@CR:MCVD2306@%%@4@%To select the default response to the current prompt, type a carriage return%@EH@%
  11133. without giving a file name. The next prompt will appear.%@NL@%
  11134. %@NL@%
  11135. %@CR:MCVD2307@%%@4@%To select default responses to the current prompt and all remaining prompts,%@EH@%
  11136. type a semicolon (%@AB@%;%@AE@%) followed immediately by a carriage return. After you
  11137. enter a semicolon, you cannot respond to any of the remaining prompts for
  11138. that link session. Use this option to save time when you want to use the
  11139. default responses. However, you cannot enter a semicolon in response to the
  11140. %@AS@%Object Modules%@AE@% prompt, because there is no default response for that prompt.%@NL@%
  11141. %@NL@%
  11142. %@CR:MCVD2308@%%@4@%The following list shows the defaults for the other linker prompts:%@EH@%%@NL@%
  11143. %@NL@%
  11144. %@CR:MCVD2309@%%@AB@%Prompt                      Default%@AE@%%@NL@%
  11145. %@NL@%
  11146. %@AS@%Run File%@AE@%                    The name of the first object file submitted for%@NL@%
  11147.                             the %@AS@%Object%@AE@% %@AS@%modules%@AE@% prompt, with the .EXE%@NL@%
  11148.                             extension replacing the .OBJ extension%@NL@%
  11149. %@NL@%
  11150. %@AS@%List File%@AE@%                   The special file name NUL.MAP, which tells LINK%@AI@%%@AE@%%@NL@%
  11151.                             not to create a map file%@NL@%
  11152. %@NL@%
  11153. %@AS@%Libraries%@AE@%                   The default libraries encoded in the object%@NL@%
  11154.                             module (see Section 13.2.5%@BO:   8d60c@%, "How LINK Searches%@NL@%
  11155.                             for Libraries")%@NL@%
  11156. %@NL@%
  11157. %@AS@%Definitions File%@AE@%            The special file name NUL.DEF, which tells LINK%@NL@%
  11158.                             not to use a definitions file%@NL@%
  11159. %@NL@%
  11160. %@NL@%
  11161. %@CR:MCVD2400@%%@3@%%@AB@%13.2.4  Linking with a Response File%@AE@%%@EH@%%@NL@%
  11162. %@NL@%
  11163. %@CR:MCVD2401@%%@4@%To operate the linker with a response file, you must set up the response%@EH@%
  11164. file and type the following:%@NL@%
  11165. %@NL@%
  11166.      %@AB@%LINK @%@AE@%%@AI@%responsefile%@AE@%%@NL@%
  11167. %@NL@%
  11168. %@CR:MCVD2402@%%@4@%Here %@AI@%responsefile%@AE@% specifies the name or pathname of the response file that%@EH@%
  11169. starts the linker. You can also enter the name of a response file after any
  11170. LINK command prompt or at any position in the LINK command line.%@NL@%
  11171. %@NL@%
  11172. %@CR:MCVD2403@%%@4@%A response file contains responses to the LINK prompts. The responses must%@EH@%
  11173. be in the same order as the LINK prompts discussed in Section 13.2.3%@BO:   8baf9@%. Each
  11174. new response must appear on a new line or begin with a comma; however, you
  11175. can extend long responses across more than one line by typing a plus sign
  11176. (+) as the last character of each incomplete line. You may give options at
  11177. the end of any response or place them on one or more separate lines.%@NL@%
  11178. %@NL@%
  11179. %@CR:MCVD2404@%%@4@%LINK treats the input from the response file just as if you had entered it%@EH@%
  11180. in response to prompts or in a command line. It treats any carriage-return
  11181. and line-feed combination in the response file the same as if you had
  11182. pressed ENTER in response to a prompt or included a comma in a command line.%@NL@%
  11183. %@NL@%
  11184. %@CR:MCVD2405@%%@4@%You can use options and command characters in the response file in the same%@EH@%
  11185. way as you would in responses you type at the keyboard. For example, if you
  11186. type a semicolon on the line of the response file corresponding to the %@AS@%Run%@AE@%
  11187. %@AS@%File%@AE@% prompt, LINK uses the default responses for the executable file and for
  11188. the remaining prompts.%@NL@%
  11189. %@NL@%
  11190. %@CR:MCVD2406@%%@4@%When you enter the LINK command with a response file, each LINK prompt is%@EH@%
  11191. displayed on your screen with the corresponding response from your response
  11192. file. If the response file does not include a line with a file name,
  11193. semicolon, or carriage return for each prompt, LINK displays the appropriate
  11194. prompt and waits for you to enter a response. When you type an acceptable
  11195. response, LINK continues.%@NL@%
  11196. %@NL@%
  11197. %@CR:MCVD2407@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  11198. %@NL@%
  11199. %@CR:MCVD2408@%%@4@%Assume that the following response file is named %@AS@%FUN.LNK%@AE@%:%@EH@%%@NL@%
  11200. %@NL@%
  11201.      FUN TEXT TABLE CARE%@NL@%
  11202.      /PAUSE /MAP%@NL@%
  11203.      FUNLIST%@NL@%
  11204.      GRAF.LIB%@NL@%
  11205. %@NL@%
  11206. %@CR:MCVD2409@%%@4@%You can type the following command to run LINK and tell it to use the%@EH@%
  11207. responses in %@AS@%FUN.LNK%@AE@%:%@NL@%
  11208. %@NL@%
  11209.      LINK @FUN.LNK%@NL@%
  11210. %@NL@%
  11211. %@CR:MCVD240A@%%@4@%The response file tells LINK to load the four object modules %@AS@%FUN%@AE@%, %@AS@%TEXT%@AE@%,%@EH@%
  11212. %@AS@%TABLE%@AE@%, and %@AS@%CARE%@AE@%. LINK produces an executable file named %@AS@%FUN.EXE%@AE@% and a map
  11213. file named %@AS@%FUNLIST.MAP%@AE@%. The %@AS@%/PAUSE%@AE@% option tells LINK to pause before it
  11214. produces the executable file so you can swap disks, if necessary. The %@AS@%/MAP%@AE@%
  11215. option tells LINK to include public symbols and addresses in the map file.
  11216. LINK also links any needed routines from the library file %@AS@%GRAF.LIB%@AE@%. See the
  11217. discussions of the /PAUSE and /MAP options in Sections 13.3.28%@BO:   98338@% and
  11218. 13.3.15%@BO:   94620@%, respectively, for more information about these options.%@NL@%
  11219. %@NL@%
  11220. %@NL@%
  11221. %@CR:MCVD2500@%%@3@%%@AB@%13.2.5  How LINK Searches for Libraries%@AE@%%@EH@%%@NL@%
  11222. %@NL@%
  11223. %@CR:MCVD2501@%%@4@%The material in this section does not apply to libraries that LINK finds in%@EH@%
  11224. the %@AI@%objectfiles%@AE@% field, either on the command line or in response to the
  11225. %@AS@%Object Modules%@AE@% prompt. Those libraries are treated simply as a series of
  11226. object files, and LINK does not conduct extensive searches in such cases.%@NL@%
  11227. %@NL@%
  11228. %@CR:MCVD2502@%%@4@%LINK may be directed to find a particular library by the user (who specifies%@EH@%
  11229. a library in the %@AI@%libraries%@AE@% field) or by an object module. (When a compiler
  11230. creates an object module from a higher-level-language program, that object
  11231. module will contain the names of one or more "default" libraries.) However
  11232. the linker is directed to a library, LINK uses the same method for finding
  11233. that library.%@NL@%
  11234. %@NL@%
  11235. %@CR:MCVD2503@%%@4@%If the library name includes a path specification, LINK searches only that%@EH@%
  11236. directory for the library. Libraries specified by object modules (that is,
  11237. default libraries) will normally not include a path specification.%@NL@%
  11238. %@NL@%
  11239. %@CR:MCVD2504@%%@4@%If a library name is given without a path specification, LINK searches in%@EH@%
  11240. the following three locations to find the given library file:%@NL@%
  11241. %@NL@%
  11242. %@CR:MCVD2505@%  1. The current working directory%@NL@%
  11243. %@NL@%
  11244.   2. Any path specifications or drive names that you give on the command%@NL@%
  11245.      line or type in response to the %@AS@%Libraries%@AE@% prompt, in the order in which%@NL@%
  11246.      they appear (see Section 13.2.3%@BO:   8baf9@%)%@NL@%
  11247. %@NL@%
  11248.   3. The locations given by the LIB environment variable%@NL@%
  11249. %@NL@%
  11250. %@CR:MCVD2506@%%@4@%Because object files created by compilers and assemblers usually contain the%@EH@%
  11251. names of all the standard libraries you need, you are not required to
  11252. specify a library on the LINK command line or in response to the LINK
  11253. %@AS@%Libraries%@AE@% prompt unless you want to do one of the following:%@NL@%
  11254. %@NL@%
  11255. %@CR:MCVD2507@%  ■  Add the names of additional libraries to be searched%@NL@%
  11256. %@NL@%
  11257.   ■  Search for libraries in different locations%@NL@%
  11258. %@NL@%
  11259.   ■  Override the use of one or more default libraries%@NL@%
  11260. %@NL@%
  11261. %@CR:MCVD2508@%%@4@%For example, if you have developed your own customized libraries, you might%@EH@%
  11262. want to include one or more of them as additional libraries at linking time.%@NL@%
  11263. %@NL@%
  11264. %@CR:MCVD2510@%%@4@%%@AB@%Searching Additional Libraries%@AE@%%@EH@%%@NL@%
  11265. %@NL@%
  11266. %@CR:MCVD2511@%%@4@%You can tell LINK to search additional libraries by specifying one or more%@EH@%
  11267. library files on the command line or in response to the %@AS@%Libraries%@AE@% prompt.
  11268. LINK searches these libraries before it searches default libraries. It
  11269. searches these libraries in the order you specify.%@NL@%
  11270. %@NL@%
  11271. %@CR:MCVD2512@%%@4@%LINK automatically supplies the .LIB extension if you omit it from a%@EH@%
  11272. library-file name. If you want to link a library file that has a different
  11273. extension, be sure to specify the extension.%@NL@%
  11274. %@NL@%
  11275. %@CR:MCVD2520@%%@4@%%@AB@%Searching Different Locations for Libraries%@AE@%%@EH@%%@NL@%
  11276. %@NL@%
  11277. %@CR:MCVD2521@%%@4@%You can tell LINK to search additional locations for libraries by giving a%@EH@%
  11278. drive name or path specification in the %@AI@%libraries%@AE@% field on the command line
  11279. or in response to the %@AS@%Libraries%@AE@% prompt. You can specify up to 32 additional
  11280. paths. If you give more than 32 paths, LINK ignores the additional paths
  11281. without displaying an error message.%@NL@%
  11282. %@NL@%
  11283. %@CR:MCVD2530@%%@4@%%@AB@%Overriding Libraries Named in Object Files%@AE@%%@EH@%%@NL@%
  11284. %@NL@%
  11285. %@CR:MCVD2531@%%@4@%If you do not want to link with the library whose name is included in the%@EH@%
  11286. object file, you can give the name of a different library instead. You might
  11287. want to specify a different library name in the following cases:%@NL@%
  11288. %@NL@%
  11289. %@CR:MCVD2532@%  ■  If you assigned a "custom" name to a standard library when you set up%@NL@%
  11290.      your libraries%@NL@%
  11291. %@NL@%
  11292.   ■  If you want to link with a library that supports a different math%@NL@%
  11293.      package other than the math package you gave on the compiler command%@NL@%
  11294.      line (or the default)%@NL@%
  11295. %@NL@%
  11296. %@CR:MCVD2533@%%@4@%If you specify a new library name on the LINK command line, the linker%@EH@%
  11297. searches the new library to resolve external references before it searches
  11298. the library specified in the object file.%@NL@%
  11299. %@NL@%
  11300. %@CR:MCVD2534@%%@4@%If you want the linker to ignore the library whose name is included in the%@EH@%
  11301. object file, use the /NOD option. This option tells LINK to information that
  11302. is encoded in the object files created by high-level-language compilers. Use
  11303. this option with caution; see the discussion of the /NOD option in Section
  11304. 13.3.16%@BO:   94e75@% for more information.%@NL@%
  11305. %@NL@%
  11306. %@CR:MCVD2535@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  11307. %@NL@%
  11308.      LINK%@NL@%
  11309. %@NL@%
  11310.      Object Modules [.OBJ]: FUN TEXT TABLE CARE%@NL@%
  11311.      Run File [FUN.EXE]:%@NL@%
  11312.      List File [NUL.MAP]:%@NL@%
  11313.      Libraries [.LIB]: C:\TESTLIB\ NEWLIBV3%@AB@%%@NL@%
  11314. %@NL@%
  11315. %@CR:MCVD2536@%%@4@%This example links four object modules to create an executable file named%@EH@%
  11316. %@AS@%FUN.EXE%@AE@%. LINK searches %@AS@%NEWLIBV3.LIB%@AE@% before searching the default libraries
  11317. to resolve references. To locate %@AS@%NEWLIBV3.LIB%@AE@% and the default libraries,
  11318. the linker searches the current working directory, then the %@AS@%C:\TESTLIB\%@AE@%
  11319. directory, and finally the locations given by the LIB environment variable. %@AS@%%@NL@%
  11320. %@NL@%
  11321. %@NL@%
  11322. %@CR:MCVD2600@%%@3@%%@AB@%13.2.6  LINK Memory Requirements%@AE@%%@EH@%%@NL@%
  11323. %@NL@%
  11324. %@CR:MCVD2601@%%@4@%LINK uses available memory for the link session. If the files to be linked%@EH@%
  11325. create an output file that exceeds available memory, LINK creates a
  11326. temporary disk file to serve as memory. This temporary file is handled in
  11327. one of the following ways, depending on the DOS version:%@NL@%
  11328. %@NL@%
  11329. %@CR:MCVD2602@%  ■  The linker will use the directory specified by the TMP environment%@NL@%
  11330.      variable, for the purpose of creating a temporary file. For example, if%@NL@%
  11331.      the TMP variable were set to %@AS@%C:\TEMPDIR%@AE@%, LINK would put the temporary%@NL@%
  11332.      file in %@AS@%C:\TEMPDIR%@AE@%.%@NL@%
  11333. %@NL@%
  11334.      If there is no TMP environment variable, or if the directory specified%@NL@%
  11335.      by TMP does not exist, then LINK will put the temporary file in the%@NL@%
  11336.      current working directory.%@NL@%
  11337. %@NL@%
  11338.   ■  If the linker is running on DOS Version 3.0 or later, it uses a DOS%@NL@%
  11339.      system call to create a temporary file with a unique name in the%@NL@%
  11340.      temporary-file directory.%@NL@%
  11341. %@NL@%
  11342.   ■  If the linker is running on a version of DOS prior to 3.0, it creates a%@NL@%
  11343.      temporary file named VM.TMP.%@NL@%
  11344. %@NL@%
  11345. %@CR:MCVD2603@%%@4@%When the linker creates a temporary disk file, you see the message%@EH@%%@NL@%
  11346. %@NL@%
  11347.      %@AS@%Temporary file%@AE@% %@AI@%tempfile%@AE@% %@AS@%has been created.%@AE@%%@NL@%
  11348.      %@AS@%Do not change diskette in drive,%@AE@% %@AI@%letter%@AE@%.%@NL@%
  11349. %@NL@%
  11350. %@CR:MCVD2604@%%@4@%In the message displayed above, %@AI@%tempfile%@AE@% is "%@AB@%.\%@AE@%" followed by either VM.TMP%@EH@%
  11351. or a name generated by DOS, and %@AI@%letter%@AE@% is the drive containing the
  11352. temporary file.%@NL@%
  11353. %@NL@%
  11354. %@CR:MCVD2605@%%@4@%The message %@AS@%Do not change diskette in drive%@AE@% will not appear unless the drive%@EH@%
  11355. is a removable disk. After this message appears, do not remove the disk from
  11356. the drive specified by %@AI@%letter%@AE@% until the link session ends. If the disk is
  11357. removed, the operation of LINK is unpredictable, and you may see the
  11358. following message:%@NL@%
  11359. %@NL@%
  11360.      %@AS@%Unexpected end-of-file on scratch file%@AE@%%@NL@%
  11361. %@NL@%
  11362. %@CR:MCVD2606@%%@4@%When this happens, rerun the link session. The temporary file created by%@EH@%
  11363. LINK is a working file only. LINK deletes it at the end of the link session.%@NL@%
  11364. %@NL@%
  11365. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11366. %@AI@%NOTE%@AE@%%@NL@%
  11367.    Do not give any of your own files the name VM.TMP. The linker displays an%@NL@%
  11368.    error message if it encounters an existing file with this name.%@NL@%
  11369. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11370. %@NL@%
  11371. %@NL@%
  11372. %@CR:MCVD3000@%%@2@%%@AB@%13.3  Specifying Linker Options%@AE@%%@EH@%%@NL@%
  11373. %@NL@%
  11374. %@CR:MCVD3001@%%@4@%This section explains how to use linker options to specify and control the%@EH@%
  11375. tasks performed by LINK. All options begin with the linker's option
  11376. character, the forward slash (%@AB@%/%@AE@%).%@NL@%
  11377. %@NL@%
  11378. %@CR:MCVD3002@%%@4@%When you use the LINK command line to invoke LINK, options can appear at the%@EH@%
  11379. end of the line or after individual fields on the line. However, they must
  11380. precede the comma that separates each field from the next.%@NL@%
  11381. %@NL@%
  11382. %@CR:MCVD3003@%%@4@%If you respond to the individual prompts for the LINK command, you can%@EH@%
  11383. specify linker options at the end of any response. When you specify more
  11384. than one option, you can either group the options at the end of a single
  11385. response or distribute the options among several responses. Every option
  11386. must begin with the slash character (%@AB@%/%@AE@%), even if other options precede it on
  11387. the same line. Similarly, in a response file, options can appear on a line
  11388. by themselves or after individual response lines.%@NL@%
  11389. %@NL@%
  11390. %@CR:MCVD3010@%%@4@%%@AB@%Abbreviations%@AE@%%@EH@%%@NL@%
  11391. %@NL@%
  11392. %@CR:MCVD3011@%%@4@%Since linker options are named according to their functions, some of these%@EH@%
  11393. names are quite long. You can abbreviate the options to save space and
  11394. effort. Be sure that your abbreviation is unique so the linker can determine
  11395. which option you want. (The minimum legal abbreviation for each option is
  11396. indicated in the syntax description of the option.)%@NL@%
  11397. %@NL@%
  11398. %@CR:MCVD3012@%%@4@%Abbreviations must begin with the first letter of the option and must be%@EH@%
  11399. continuous through the last letter typed. No gaps or transpositions are
  11400. allowed. Options may be entered as uppercase or lowercase.%@NL@%
  11401. %@NL@%
  11402. %@CR:MCVD3020@%%@4@%%@AB@%Numerical Arguments%@AE@%%@EH@%%@NL@%
  11403. %@NL@%
  11404. %@CR:MCVD3021@%%@4@%Some linker options take numeric arguments. A numeric argument can be any of%@EH@%
  11405. the following:%@NL@%
  11406. %@NL@%
  11407. %@CR:MCVD3022@%  ■  A decimal number from 0 to 65,535.%@NL@%
  11408. %@NL@%
  11409.   ■  An octal number from 0 to 177,777. A number is interpreted as octal if%@NL@%
  11410.      it starts with 0. For example, the number %@AS@%10%@AE@% is interpreted as a%@NL@%
  11411.      decimal number, but the number %@AS@%010%@AE@% is interpreted as an octal number,%@NL@%
  11412.      equivalent to 8 in decimal.%@NL@%
  11413. %@NL@%
  11414.   ■  A hexadecimal number from 0 to FFFF. A number is interpreted as%@NL@%
  11415.      hexa-decimal if it starts with 0X. For example, %@AS@%0X10%@AE@% is a hexadecimal%@NL@%
  11416.      number, equivalent to 16 in decimal.%@NL@%
  11417. %@NL@%
  11418. %@NL@%
  11419. %@CR:MCVD3100@%%@3@%%@AB@%13.3.1  Aligning Segment Data (/A)%@AE@%%@EH@%%@NL@%
  11420. %@NL@%
  11421. %@CR:MCVD3101@%%@AB@%Option%@AE@%%@NL@%
  11422. %@NL@%
  11423.      %@AB@%/A%@AE@%«%@AB@%LIGNMENT%@AE@%»%@AB@%:%@AE@%%@AI@%size%@AE@%%@NL@%
  11424. %@NL@%
  11425. %@CR:MCVD3102@%%@4@%The ALIGNMENT option directs LINK to align segment data in the executable%@EH@%
  11426. file along the boundaries specified by %@AI@%size%@AE@%. The %@AI@%size%@AE@% argument must be a
  11427. power of two. For example,%@NL@%
  11428. %@NL@%
  11429.      /ALIGNMENT:16%@NL@%
  11430. %@NL@%
  11431. %@CR:MCVD3103@%%@4@%indicates an alignment boundary of 16 bytes. The default alignment for%@EH@%
  11432. OS/2-application and dynamic-link segments is 512. This option is used for
  11433. linking Windows applications or protected-mode programs.%@NL@%
  11434. %@NL@%
  11435. %@NL@%
  11436. %@CR:MCVD3200@%%@3@%%@AB@%13.3.2  Running in Batch Mode (/BA)%@AE@%%@EH@%%@NL@%
  11437. %@NL@%
  11438. %@CR:MCVD3201@%%@AB@%Option%@AE@%%@NL@%
  11439. %@NL@%
  11440.      %@AB@%/BA%@AE@%«%@AB@%TCH%@AE@%»%@NL@%
  11441. %@NL@%
  11442. %@CR:MCVD3202@%%@4@%By default, the linker prompts you for a new path name whenever it cannot%@EH@%
  11443. find a library it has been directed to use. It also prompts you if it cannot
  11444. find an object file, and it expects that file to be on a removable disk. If
  11445. the /BA option is used, however, the linker will not prompt you for any
  11446. libraries or object files it cannot find. Instead, the linker will generate
  11447. an error or warning message, if appropriate. The /BA option also prevents
  11448. LINK from printing the sign-on banner and echoing input from response files.%@NL@%
  11449. %@NL@%
  11450. %@CR:MCVD3203@%%@4@%Using this option can cause unresolved external references. It is intended%@EH@%
  11451. primarily for users who use batch or MAKE files for linking many executable
  11452. files with a single command, and who wish to prevent linker operation from
  11453. halting.%@NL@%
  11454. %@NL@%
  11455. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11456. %@AI@%NOTE%@AE@%%@NL@%
  11457.    This option does %@AI@%not%@AE@% prevent the linker from prompting for command-line%@NL@%
  11458.    arguments. You can prevent such prompting only by using a semicolon on%@NL@%
  11459.    the command line.%@NL@%
  11460. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11461. %@NL@%
  11462. %@NL@%
  11463. %@CR:MCVD3300@%%@3@%%@AB@%13.3.3  Producing a .COM File (/BI)%@AE@%%@EH@%%@NL@%
  11464. %@NL@%
  11465.      %@AB@%/BI%@AE@%«%@AB@%NARY%@AE@%»%@NL@%
  11466. %@NL@%
  11467. %@CR:MCVD3301@%%@4@%The /BI option directs the linker to produce a .COM file instead of an .EXE%@EH@%
  11468. file. Not every program can be produced in the .COM format. The following
  11469. restrictions apply:%@NL@%
  11470. %@NL@%
  11471. %@CR:MCVD3302@%  1. The program must consist of only one physical segment. If you have%@NL@%
  11472.      written an assembly-language program, you can declare more than one%@NL@%
  11473.      segment; however, the segments must be in the same group.%@NL@%
  11474. %@NL@%
  11475.   2. The code must have no far-segment references.%@NL@%
  11476. %@NL@%
  11477.      Specifically, segment addresses cannot be used as immediate data for%@NL@%
  11478.      instructions. You could not, for example, use the following%@NL@%
  11479.      instruction:%@NL@%
  11480. %@NL@%
  11481.          %@AS@%mov     ax,CODESEG%@AE@%%@NL@%
  11482. %@NL@%
  11483.   3. Programs for the Windows and OS/2 protected-mode environments cannot be%@NL@%
  11484.      converted to .COM file.%@NL@%
  11485. %@NL@%
  11486. %@CR:MCVD3303@%%@4@%When you use the /BI option, the default file extension of the output file%@EH@%
  11487. is .COM rather than .EXE.%@NL@%
  11488. %@NL@%
  11489. %@NL@%
  11490. %@CR:MCVD3400@%%@3@%%@AB@%13.3.4  Preparing for Debugging (/CO)%@AE@%%@EH@%%@NL@%
  11491. %@NL@%
  11492. %@CR:MCVD3401@%%@AB@%Option%@AE@%%@NL@%
  11493. %@NL@%
  11494.      %@AB@%/CO%@AE@%«%@AB@%DEVIEW%@AE@%»%@NL@%
  11495. %@NL@%
  11496. %@CR:MCVD3402@%%@4@%The /CO option is used to prepare for debugging with the CodeView%@EH@%
  11497. window-oriented debugger. This option tells the linker to prepare a special
  11498. executable file containing symbolic data and line-number information.%@NL@%
  11499. %@NL@%
  11500. %@CR:MCVD3403@%%@4@%You can run this executable file outside the CodeView debugger; the extra%@EH@%
  11501. data in the file will be ignored. However, to keep file size to a minimum,
  11502. use the special-format executable file only for debugging. You can then link
  11503. a separate version without the /CO option after the program is debugged.%@NL@%
  11504. %@NL@%
  11505. %@NL@%
  11506. %@CR:MCVD3500@%%@3@%%@AB@%13.3.5  Setting the Maximum Allocation Space (/CP)%@AE@%%@EH@%%@NL@%
  11507. %@NL@%
  11508. %@CR:MCVD3501@%%@AB@%Option%@AE@%%@NL@%
  11509. %@NL@%
  11510.      %@AB@%/CP%@AE@%«%@AB@%ARMAXALLOC%@AE@%»%@AB@%:%@AE@%%@AI@%number%@AE@%%@NL@%
  11511. %@NL@%
  11512. %@CR:MCVD3502@%%@4@%The /CP option sets the maximum number of 16-byte paragraphs needed by the%@EH@%
  11513. program when it is loaded into memory. The operating system uses this value
  11514. when allocating space for the program before loading it. The option is
  11515. useful when you want to execute another program from within your program and
  11516. you need to reserve space for the executed program. This option is valid
  11517. only when linking real-mode programs.%@NL@%
  11518. %@NL@%
  11519. %@CR:MCVD3503@%%@4@%LINK normally requests the operating system to set the maximum number of%@EH@%
  11520. paragraphs to 65,535. Since this represents more memory than could be
  11521. available under DOS, the operating system always denies the request and
  11522. allocates the largest contiguous block of memory it can find. If the /CP
  11523. option is used, the operating system allocates no more space than the option
  11524. specified. This means any additional space in memory is free for other
  11525. programs.%@NL@%
  11526. %@NL@%
  11527. %@CR:MCVD3504@%%@4@%The %@AI@%number%@AE@% can be any integer value in the range 1 to 65,535. If %@AI@%number%@AE@% is%@EH@%
  11528. less than the minimum number of paragraphs needed by the program, LINK
  11529. ignores your request and sets the maximum value equal to whatever the
  11530. minimum value happens to be. The minimum number of paragraphs needed by a
  11531. program is never less than the number of paragraphs of code and data in the
  11532. program. To free more memory for programs compiled in the medium- and
  11533. large-memory models, link with /CP:1; this leaves no space for the near
  11534. heap.%@NL@%
  11535. %@NL@%
  11536. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11537. %@AI@%NOTE%@AE@%%@NL@%
  11538.    You can change the maximum allocation after linking by using the %@AI@%EXEMOD%@AE@%%@NL@%
  11539.    utility, which modifies the executable-file header, as described in%@NL@%
  11540.    Section 17.1.%@BO:   ba961@% The format of the executable-file header is also discussed%@NL@%
  11541.    in that section, as well as in the %@AI@%Microsoft MS-DOS Programmer's%@AE@%%@NL@%
  11542.    %@AI@%Reference%@AE@% and in other reference books on DOS.%@NL@%
  11543. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11544. %@NL@%
  11545. %@NL@%
  11546. %@CR:MCVD3600@%%@3@%%@AB@%13.3.6  Ordering Segments (/DO)%@AE@%%@EH@%%@NL@%
  11547. %@NL@%
  11548. %@CR:MCVD3601@%%@AB@%Option%@AE@%%@NL@%
  11549. %@NL@%
  11550.      %@AB@%/DO%@AE@%«%@AB@%SSEG%@AE@%»%@NL@%
  11551. %@NL@%
  11552. %@CR:MCVD3602@%%@4@%The /DO option is automatically enabled by a special object-module record in%@EH@%
  11553. Microsoft language libraries. If you are linking to one of these libraries,
  11554. you do not need to specify this option.%@NL@%
  11555. %@NL@%
  11556. %@CR:MCVD3603@%%@4@%This option is also enabled by assembly modules that use the Microsoft Macro%@EH@%
  11557. Assembler directive %@AB@%.DOSSEG%@AE@%.%@NL@%
  11558. %@NL@%
  11559. %@CR:MCVD3604@%%@4@%The /DO option forces segments to be ordered as follows:%@EH@%%@NL@%
  11560. %@NL@%
  11561. %@CR:MCVD3605@%  1. All segments with a class name ending in CODE%@NL@%
  11562. %@NL@%
  11563.   2. All other segments outside DGROUP%@NL@%
  11564. %@NL@%
  11565.   3. DGROUP segments, in the following order:%@NL@%
  11566. %@NL@%
  11567.      a.   Any segments of class BEGDATA (this class name reserved for
  11568.           Microsoft use)%@NL@%
  11569. %@NL@%
  11570.      b.   Any segments not of class BEGDATA, BSS, or STACK%@NL@%
  11571. %@NL@%
  11572.      c.   Segments of class BSS%@NL@%
  11573. %@NL@%
  11574.      d.   Segments of class STACK%@NL@%
  11575. %@NL@%
  11576. %@CR:MCVD3606@%%@4@%Note that when the /DO option is in effect the linker initializes two%@EH@%
  11577. special variables as follows:%@NL@%
  11578. %@NL@%
  11579.      _edata = DGROUP : BSS%@NL@%
  11580.      _end   = DGROUP : STACK%@NL@%
  11581. %@NL@%
  11582. %@CR:MCVD3607@%%@4@%The variables %@AS@%_edata%@AE@% and %@AS@%_end%@AE@% have special meanings for the Microsoft C and%@EH@%
  11583. FORTRAN compilers, so it is not wise to give these names to your own program
  11584. variables. Assembly modules can reference these variables but should not
  11585. change them.%@NL@%
  11586. %@NL@%
  11587. %@NL@%
  11588. %@CR:MCVD3700@%%@3@%%@AB@%13.3.7  Controlling Data Loading (/DS)%@AE@%%@EH@%%@NL@%
  11589. %@NL@%
  11590. %@CR:MCVD3701@%%@AB@%Option%@AE@%%@NL@%
  11591. %@NL@%
  11592.      %@AB@%/DS%@AE@%«%@AB@%ALLOCATE%@AE@%»%@NL@%
  11593. %@NL@%
  11594. %@CR:MCVD3702@%%@4@%By default, LINK loads all data starting at the low end of the data segment.%@EH@%
  11595. At run time, the data segment (DS) register is set to the lowest possible
  11596. address to allow the entire data segment to be used. This option is valid
  11597. only when linking real-mode programs.%@NL@%
  11598. %@NL@%
  11599. %@CR:MCVD3703@%%@4@%Use the /DS option to tell LINK to load all data starting at the high end of%@EH@%
  11600. the data segment instead. In this case, the DS register is set at run time
  11601. to the lowest data-segment address that contains program data.%@NL@%
  11602. %@NL@%
  11603. %@CR:MCVD3704@%%@4@%The /DS option is typically used with the /HI option, discussed in Section%@EH@%
  11604. 13.3.11%@BO:   93a86@%, to take advantage of unused memory within the data segment.%@NL@%
  11605. %@NL@%
  11606. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11607. %@AI@%WARNING%@AE@%%@NL@%
  11608.    This option should be used only with assembly-language programs.%@NL@%
  11609. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11610. %@NL@%
  11611. %@NL@%
  11612. %@CR:MCVD3800@%%@3@%%@AB@%13.3.8  Packing Executable Files (/E)%@AE@%%@EH@%%@NL@%
  11613. %@NL@%
  11614. %@CR:MCVD3801@%%@AB@%Option%@AE@%%@NL@%
  11615. %@NL@%
  11616.      %@AB@%/E%@AE@%«%@AB@%XEPACK%@AE@%»%@NL@%
  11617. %@NL@%
  11618. %@CR:MCVD3802@%%@4@%The /E option directs LINK to remove sequences of repeated bytes (typically%@EH@%
  11619. null characters) and to optimize the load-time-relocation table before
  11620. creating the executable file. (The load-time-relocation table is a table of
  11621. references relative to the start of the program, each of which changes when
  11622. the executable image is loaded into memory and an actual address for the
  11623. entry point is assigned.)%@NL@%
  11624. %@NL@%
  11625. %@CR:MCVD3803@%%@4@%Executable files linked with this option may be smaller, and thus load%@EH@%
  11626. faster, than files linked without this option. However, you cannot use the
  11627. Symbolic Debug Utility (SYMDEB) or the CodeView window-oriented debugger to
  11628. debug packed files. The /EXEPACK option strips symbolic information from the
  11629. input file and notifies you of this with a warning message.%@NL@%
  11630. %@NL@%
  11631. %@CR:MCVD3804@%%@4@%The /E option does not always give a significant saving in disk space and%@EH@%
  11632. may sometimes actually increase file size. Programs that have a large number
  11633. of load-time relocations (about 500 or more) and long streams of repeated
  11634. characters are usually shorter if packed. LINK notifies you if the packed
  11635. file is larger than the unpacked file.%@NL@%
  11636. %@NL@%
  11637. %@NL@%
  11638. %@CR:MCVD3900@%%@3@%%@AB@%13.3.9  Optimizing Far Calls (/F)%@AE@%%@EH@%%@NL@%
  11639. %@NL@%
  11640. %@CR:MCVD3901@%%@AB@%Option%@AE@%%@NL@%
  11641. %@NL@%
  11642.      %@AB@%/F%@AE@%«%@AB@%ARCALLTRANSLATION%@AE@%»%@NL@%
  11643. %@NL@%
  11644. %@CR:MCVD3902@%%@4@%Using the /F option may result in slightly faster code and smaller%@EH@%
  11645. executable-file size. It should be used with the /PACKD option, described in
  11646. Section 13.3.25%@BO:   97257@%, in order to achieve significant results. The gain in speed
  11647. is most apparent for 286- and 386-based machines. Though some assembly
  11648. programs should not be linked with this option, it is generally safe for use
  11649. with high-level-language programs. This option is off by default;
  11650. furthermore, it can always be turned off with the /NOF option described in
  11651. Section 13.3.18.%@BO:   95405@%%@NL@%
  11652. %@NL@%
  11653. %@CR:MCVD3903@%%@4@%The rest of this section describes the low-level details of /F. It is not%@EH@%
  11654. necessary that you understand these details in order to use the option.%@NL@%
  11655. %@NL@%
  11656. %@CR:MCVD3904@%%@4@%The /F option directs the linker to optimize far calls to procedures that%@EH@%
  11657. lie in the same segment as the caller. For example, a medium- or large-model
  11658. program may have a machine instruction that makes a far call to a procedure
  11659. in the same segment. Since the segment address is the same (for both the
  11660. instruction and the procedure it calls), only a near call should be
  11661. necessary.%@NL@%
  11662. %@NL@%
  11663. %@CR:MCVD3905@%%@4@%A near-call instruction does not require an entry in the relocation table,%@EH@%
  11664. whereas a far-call instruction does. Therefore, use of /F (together with
  11665. /PACKD) often results in smaller executable files because the relocation
  11666. table is smaller. Such files will load faster.%@NL@%
  11667. %@NL@%
  11668. %@CR:MCVD3906@%%@4@%When /F has been specified, the linker will optimize code by removing the%@EH@%
  11669. instruction %@AS@%call FAR label%@AE@% and substituting the following sequence:%@NL@%
  11670. %@NL@%
  11671.           push    cs%@NL@%
  11672.           call    NEAR %@AI@%label%@AE@%%@NL@%
  11673.           nop%@NL@%
  11674. %@NL@%
  11675. %@CR:MCVD3907@%%@4@%Upon execution, the called procedure will still return with a far-return%@EH@%
  11676. instruction. However, because both the code segment and the near address are
  11677. on the stack, the far return will be executed correctly. The %@AS@%nop%@AE@% (no-op)
  11678. instruction appears so that exactly five bytes replace the five-byte
  11679. far-call instruction; the linker may in some cases place the %@AS@%nop%@AE@% at the
  11680. beginning of the sequence.%@NL@%
  11681. %@NL@%
  11682. %@CR:MCVD3908@%%@4@%The /F option has no effect on programs that only make near calls. Of the%@EH@%
  11683. high-level Microsoft languages, only small- and compact-model C programs use
  11684. near calls.%@NL@%
  11685. %@NL@%
  11686. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11687. %@AI@%NOTE%@AE@%%@NL@%
  11688.    There is a small risk involved with the /F option: the linker may%@NL@%
  11689.    mistakenly translate a byte in a code segment that happens to have the%@NL@%
  11690.    far-call opcode (9A hexadecimal). If a program linked with /F%@NL@%
  11691.    inexplicably fails, you may want to try linking with this option off.%@NL@%
  11692.    However, object modules produced by Microsoft high-level languages should%@NL@%
  11693.    be safe from this problem because little immediate data is stored in code%@NL@%
  11694.    segments.%@NL@%
  11695. %@NL@%
  11696.    In general, assembly-language programs are safe for use with the /F%@NL@%
  11697.    option if they do not involve advanced system-level code, such as might%@NL@%
  11698.    be found in operating systems or interrupt handlers.%@NL@%
  11699. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11700. %@NL@%
  11701. %@NL@%
  11702. %@CR:MCVD3A00@%%@3@%%@AB@%13.3.10  Viewing the Options List (/HE)%@AE@%%@EH@%%@NL@%
  11703. %@NL@%
  11704. %@CR:MCVD3A01@%%@AB@%Option%@AE@%%@NL@%
  11705. %@NL@%
  11706.      %@AB@%/HE%@AE@%«%@AB@%LP%@AE@%»%@NL@%
  11707. %@NL@%
  11708. %@CR:MCVD3A02@%%@4@%The /HELP option causes LINK to display a list of the available options on%@EH@%
  11709. the screen. This gives you a convenient reminder of the available options.
  11710. Do not give a file name when using the /HELP option.%@NL@%
  11711. %@NL@%
  11712. %@NL@%
  11713. %@CR:MCVD3B00@%%@3@%%@AB@%13.3.11  Controlling Executable-File Loading (/HI)%@AE@%%@EH@%%@NL@%
  11714. %@NL@%
  11715. %@CR:MCVD3B01@%%@AB@%Option%@AE@%%@NL@%
  11716. %@NL@%
  11717.      %@AB@%/HI%@AE@%«%@AB@%GH%@AE@%»%@NL@%
  11718. %@NL@%
  11719. %@CR:MCVD3B02@%%@4@%At load time, the executable file can be placed either as low or as high in%@EH@%
  11720. memory as possible. Use of the /HI option causes DOS to place the executable
  11721. file as high as possible in memory. Without the /HI option, DOS places the
  11722. executable file as low as possible. This option is valid only when linking
  11723. real-mode programs.%@NL@%
  11724. %@NL@%
  11725. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11726. %@AI@%NOTE%@AE@%%@NL@%
  11727.    This option should be used only with assembly-language programs.%@NL@%
  11728. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11729. %@NL@%
  11730. %@NL@%
  11731. %@CR:MCVD3C00@%%@3@%%@AB@%13.3.12  Preparing for Incremental Linking (/INC)%@AE@%%@EH@%%@NL@%
  11732. %@NL@%
  11733. %@CR:MCVD3C01@%%@AB@%Option%@AE@%%@NL@%
  11734. %@NL@%
  11735.      %@AB@%/INC%@AE@%«%@AB@%REMENTAL%@AE@%»%@NL@%
  11736. %@NL@%
  11737. %@CR:MCVD3C02@%%@4@%The /INC option must be used in order to prepare for subsequent linking with%@EH@%
  11738. ILINK. The use of this option produces a .SYM file and an .ILK file, each
  11739. containing extra information needed by ILINK. Note that this option is not
  11740. compatible with the /EXEPACK option. (See Chapter 14%@BO:   9eada@%, "Incremental Linking
  11741. with ILINK," for more information on this option.)%@NL@%
  11742. %@NL@%
  11743. %@NL@%
  11744. %@CR:MCVD3D00@%%@3@%%@AB@%13.3.13  Displaying Linker Process Information (/INF)%@AE@%%@EH@%%@NL@%
  11745. %@NL@%
  11746. %@CR:MCVD3D01@%%@AB@%Option%@AE@%%@NL@%
  11747. %@NL@%
  11748.      %@AB@%/INF%@AE@%«%@AB@%ORMATION%@AE@%»%@NL@%
  11749. %@NL@%
  11750. %@CR:MCVD3D02@%%@4@%The /INF option tells the linker to display information about the linking%@EH@%
  11751. process, including the phase of linking and the names of the object files
  11752. being linked. This option is useful if you want to determine the locations
  11753. of the object files being linked and the order in which they are linked.%@NL@%
  11754. %@NL@%
  11755. %@CR:MCVD3D03@%%@4@%Output from this option is sent to standard output.%@EH@%%@NL@%
  11756. %@NL@%
  11757. %@CR:MCVD3D04@%%@4@%The following is a sample of the linker output when the /INF and /MAP%@EH@%
  11758. options are specified on the LINK command line:%@NL@%
  11759. %@NL@%
  11760.      **** PASS ONE ****%@NL@%
  11761.      TEST.OBJ(test.for)%@NL@%
  11762.      **** LIBRARY SEARCH ****%@NL@%
  11763.      LLIBFOR7.LIB(wr)%@NL@%
  11764.      LLIBFOR7.LIB(fmtout)%@NL@%
  11765.      LLIBFOR7.LIB(ldout)%@NL@%
  11766.         .%@NL@%
  11767.         .%@NL@%
  11768.         .%@NL@%
  11769.      **** ASSIGN ADDRESSES ****%@NL@%
  11770.        1 segment "TEST_TEXT" length 122H bytes%@NL@%
  11771.        2 segment "_DATA" length 912H bytes%@NL@%
  11772.        3 segment "CONST" length 12H bytes%@NL@%
  11773.         .%@NL@%
  11774.         .%@NL@%
  11775.         .%@NL@%
  11776.      **** PASS TWO ****%@NL@%
  11777.      TEST.OBJ(test.for)%@NL@%
  11778.      LLIBFOR7.LIB(wr)%@NL@%
  11779.      LLIBFOR7.LIB(fmtout)%@NL@%
  11780.      LLIBFOR7.LIB(ldout)%@NL@%
  11781.         .%@NL@%
  11782.         .%@NL@%
  11783.         .%@NL@%
  11784.      **** WRITING EXECUTABLE ****%@NL@%
  11785. %@NL@%
  11786. %@NL@%
  11787. %@CR:MCVD3E00@%%@3@%%@AB@%13.3.14  Including Line Numbers in the Map File (/LI)%@AE@%%@EH@%%@NL@%
  11788. %@NL@%
  11789. %@CR:MCVD3E01@%%@AB@%Option%@AE@%%@NL@%
  11790. %@NL@%
  11791.      %@AB@%/LI%@AE@%«%@AB@%NENUMBERS%@AE@%»%@NL@%
  11792. %@NL@%
  11793. %@CR:MCVD3E02@%%@4@%You can include the line numbers and associated addresses of your source%@EH@%
  11794. program in the map file by using the /LI option. Ordinarily the map file
  11795. does not contain line numbers. To produce a map file with line numbers, you
  11796. must give LINK an object file (or files) with line-number information. You
  11797. can use the /Zd option with any Microsoft compiler to include line numbers
  11798. in the object file. If you give LINK an object file without line-number
  11799. information, the /LI option has no effect.%@NL@%
  11800. %@NL@%
  11801. %@CR:MCVD3E03@%%@4@%The /LI option forces LINK to create a map file even if you did not%@EH@%
  11802. explicitly tell the linker to create a map file. By default, the file is
  11803. given the same base name as the executable file, plus the extension .MAP.
  11804. You can override the default name by specifying a new map file on the LINK
  11805. command line or in response to the %@AS@%List File%@AE@% prompt.%@NL@%
  11806. %@NL@%
  11807. %@NL@%
  11808. %@CR:MCVD3F00@%%@3@%%@AB@%13.3.15  Listing Public Symbols (/M)%@AE@%%@EH@%%@NL@%
  11809. %@NL@%
  11810. %@CR:MCVD3F01@%%@AB@%Option%@AE@%%@NL@%
  11811. %@NL@%
  11812.      %@AB@%/M%@AE@%«%@AB@%AP%@AE@%»%@NL@%
  11813. %@NL@%
  11814. %@CR:MCVD3F02@%%@4@%You can list all public (global) symbols defined in the object file(s) by%@EH@%
  11815. using the /M option. When you invoke LINK with the /M option, the map file
  11816. will contain a list of all the symbols sorted by name and a list of all the
  11817. symbols sorted by address. If you do not use this option, the map file
  11818. contains only a list of segments.%@NL@%
  11819. %@NL@%
  11820. %@CR:MCVD3F03@%%@4@%When you use this option, the default for the %@AI@%mapfile%@AE@% field or prompts%@EH@%
  11821. response is no longer NUL. Instead, the default is a name that combines the
  11822. base name of the executable file with a .MAP extension. It is still possible
  11823. for you to specify NUL in the %@AI@%mapfile%@AE@% field (which indicates that no map
  11824. file is to be generated); if you do, then the /M option will have no effect.%@NL@%
  11825. %@NL@%
  11826. %@NL@%
  11827. %@CR:MCVD3G00@%%@3@%%@AB@%13.3.16  Ignoring Default Libraries (/NOD)%@AE@%%@EH@%%@NL@%
  11828. %@NL@%
  11829. %@CR:MCVD3G01@%%@AB@%Option%@AE@%%@NL@%
  11830. %@NL@%
  11831.      %@AB@%/NOD%@AE@%«%@AB@%EFAULTLIBRARYSEARCH%@AE@%»«%@AB@%:%@AE@%%@AI@%filename%@AE@%»%@NL@%
  11832. %@NL@%
  11833. %@CR:MCVD3G02@%%@4@%The /NOD option tells LINK not to search any library specified in the object%@EH@%
  11834. file to resolve external references. If you specify %@AI@%filename%@AE@%, LINK searches
  11835. all libraries specified in the object file except for %@AI@%filename%@AE@%.%@NL@%
  11836. %@NL@%
  11837. %@CR:MCVD3G03@%%@4@%In general, higher-level-language programs do not work correctly without a%@EH@%
  11838. standard library. Thus, if you use the /NOD option, you should explicitly
  11839. specify the name of a standard library.%@NL@%
  11840. %@NL@%
  11841. %@NL@%
  11842. %@CR:MCVD3H00@%%@3@%%@AB@%13.3.17  Ignoring Extended Dictionary (/NOE)%@AE@%%@EH@%%@NL@%
  11843. %@NL@%
  11844. %@CR:MCVD3H01@%%@AB@%Option%@AE@%%@NL@%
  11845. %@NL@%
  11846.      %@AB@%/NOE%@AE@%«%@AB@%XTDICTIONARY%@AE@%»%@NL@%
  11847. %@NL@%
  11848. %@CR:MCVD3H02@%%@4@%The /NOE option prevents the linker from searching the extended dictionary,%@EH@%
  11849. which is an internal list of symbol locations that the linker maintains.
  11850. Normally, the linker consults this list to speed up library searches.The
  11851. effect of the /NOE option is to slow the linker. You often need to use this
  11852. option when a library symbol is redefined. The linker issues error %@AS@%L2044%@AE@% if
  11853. you need to use this option.%@NL@%
  11854. %@NL@%
  11855. %@NL@%
  11856. %@CR:MCVD3I00@%%@3@%%@AB@%13.3.18  Disabling Far-Call Optimization (/NOF)%@AE@%%@EH@%%@NL@%
  11857. %@NL@%
  11858. %@CR:MCVD3I01@%%@AB@%Option%@AE@%%@NL@%
  11859. %@NL@%
  11860.      %@AB@%/NOF%@AE@%«%@AB@%ARCALLTRANSLATION%@AE@%»%@NL@%
  11861. %@NL@%
  11862. %@CR:MCVD3I02@%%@4@%This option normally is not necessary because far-call optimization%@EH@%
  11863. (translation) is turned off by default. However, if an environment variable
  11864. such as LINK (or CL) turns on far-call translation automatically, you can
  11865. use /NOF to turn far-call translation back off again.%@NL@%
  11866. %@NL@%
  11867. %@NL@%
  11868. %@CR:MCVD3J00@%%@3@%%@AB@%13.3.19  Preserving Compatibility (/NOG)%@AE@%%@EH@%%@NL@%
  11869. %@NL@%
  11870. %@CR:MCVD3J01@%%@AB@%Option%@AE@%%@NL@%
  11871. %@NL@%
  11872.      %@AB@%/NOG%@AE@%«%@AB@%ROUPASSOCIATION%@AE@%»%@NL@%
  11873. %@NL@%
  11874. %@CR:MCVD3J02@%%@4@%The /NOG option causes the linker to ignore group associations when%@EH@%
  11875. assigning addresses to data and code items. It is provided primarily for
  11876. compatibility with previous versions of the linker (Versions 2.02 and
  11877. earlier) and early versions of Microsoft language compilers. This option is
  11878. valid only when linking real-mode programs.%@NL@%
  11879. %@NL@%
  11880. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11881. %@AI@%NOTE%@AE@%%@NL@%
  11882.    This option should be used only with assembly-language programs.%@NL@%
  11883. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11884. %@NL@%
  11885. %@NL@%
  11886. %@CR:MCVD3K00@%%@3@%%@AB@%13.3.20  Preserving Case Sensitivity (/NOI)%@AE@%%@EH@%%@NL@%
  11887. %@NL@%
  11888. %@CR:MCVD3K01@%%@AB@%Option%@AE@%%@NL@%
  11889. %@NL@%
  11890.      %@AB@%/NOI%@AE@%«%@AB@%GNORECASE%@AE@%»%@NL@%
  11891. %@NL@%
  11892. %@CR:MCVD3K02@%%@4@%By default, LINK treats uppercase letters and lowercase letters as%@EH@%
  11893. equivalent. Thus %@AS@%ABC%@AE@%, %@AS@%abc%@AE@%, and %@AS@%Abc%@AE@% are considered the same name. When you
  11894. use the /NOI option, the linker distinguishes between uppercase letters and
  11895. lowercase letters, and considers %@AS@%ABC%@AE@%, %@AS@%abc%@AE@%, and %@AS@%Abc%@AE@% to be three separate
  11896. names. Since names in some high-level languages are not case sensitive, this
  11897. option can have minimal importance. However, in some languages──such as
  11898. C──case is significant. If you plan to link your files from other high-level
  11899. languages with C routines, you may want to use this option.%@NL@%
  11900. %@NL@%
  11901. %@NL@%
  11902. %@CR:MCVD3L00@%%@3@%%@AB@%13.3.21  Ordering Segments without Inserting NULL Bytes (/NON)%@AE@%%@EH@%%@NL@%
  11903. %@NL@%
  11904. %@CR:MCVD3L01@%%@4@%%@AB@%Options%@AE@%%@EH@%%@NL@%
  11905. %@NL@%
  11906.      %@AB@%/NON%@AE@%«%@AB@%ULLSDOSSEG»%@AE@%%@NL@%
  11907. %@NL@%
  11908. %@CR:MCVD3L02@%%@4@%The /NON option directs the linker to arrange segments in the same order as%@EH@%
  11909. they are arranged by the /DOSSEG option. The only difference is that the
  11910. /DOSSEG option inserts 16 null bytes at the beginning of the _TEXT segment
  11911. (if it is defined), whereas /NON does not insert these extra bytes.%@NL@%
  11912. %@NL@%
  11913. %@CR:MCVD3L03@%%@4@%If the linker is given both the /DOSSEG and /NON options, the /NON option%@EH@%
  11914. will always take precedence. Therefore, you can use /NON to override the
  11915. /DOSSEG comment record commonly found in run-time libraries. This option is
  11916. for linking protected-mode programs or Windows applications.%@NL@%
  11917. %@NL@%
  11918. %@NL@%
  11919. %@CR:MCVD3M00@%%@3@%%@AB@%13.3.22  Disabling Segment Packing (/NOP)%@AE@%%@EH@%%@NL@%
  11920. %@NL@%
  11921. %@CR:MCVD3M01@%%@AB@%Option%@AE@%%@NL@%
  11922. %@NL@%
  11923.      %@AB@%/NOP%@AE@%«%@AB@%ACKCODE%@AE@%»%@NL@%
  11924. %@NL@%
  11925. %@CR:MCVD3M02@%%@4@%This option is normally not necessary because code-segment packing is turned%@EH@%
  11926. off by default. However, if an environment variable such as LINK (or CL)
  11927. turns on code-segment packing automatically, you can use /NOP to turn
  11928. segment packing back off again.%@NL@%
  11929. %@NL@%
  11930. %@NL@%
  11931. %@CR:MCVD3N00@%%@3@%%@AB@%13.3.23  Setting the Overlay Interrupt (/O)%@AE@%%@EH@%%@NL@%
  11932. %@NL@%
  11933. %@CR:MCVD3N01@%%@AB@%Option%@AE@%%@NL@%
  11934. %@NL@%
  11935.       %@AB@%/O%@AE@%«%@AB@%VERLAYINTERRUPT%@AE@%»%@AB@%:%@AI@%number%@AE@%%@NL@%
  11936. %@NL@%
  11937. %@CR:MCVD3N02@%%@4@%By default, the interrupt number used for passing control to overlays is 63%@EH@%
  11938. (3F hexadecimal). The /O option allows the user to select a different
  11939. interrupt number. This option is valid only when linking real-mode programs.%@NL@%
  11940. %@NL@%
  11941. %@CR:MCVD3N03@%%@4@%The %@AI@%number%@AE@% can be a decimal number from 0 to 255, an octal number from octal%@EH@%
  11942. 0 to octal 0377, or a hexadecimal number from hexadecimal 0 to hexadecimal
  11943. FF. Numbers that conflict with DOS interrupts can be used; however, their
  11944. use is not advised.%@NL@%
  11945. %@NL@%
  11946. %@CR:MCVD3N04@%%@4@%You should use this option only when you want to uses overlays with a%@EH@%
  11947. program that already reserves interrupt 63 for some other purpose.%@NL@%
  11948. %@NL@%
  11949. %@NL@%
  11950. %@CR:MCVD3O00@%%@3@%%@AB@%13.3.24  Packing Contiguous Data Segments (/PACKC)%@AE@%%@EH@%%@NL@%
  11951. %@NL@%
  11952. %@CR:MCVD3O01@%%@AB@%Option%@AE@%%@NL@%
  11953. %@NL@%
  11954.      %@AB@%/PACKC%@AE@%«%@AB@%ODE%@AE@%»«%@AB@%:%@AE@%%@AI@%number%@AE@%»%@NL@%
  11955. %@NL@%
  11956. %@CR:MCVD3O02@%%@4@%This option only affects code segments in medium- and large-model programs.%@EH@%
  11957. It is intended to be used with the /F option, which is described in Section
  11958. 13.3.9.%@BO:   92ae0@% It is not necessary to understand the details of the /PACKC option
  11959. in order to use it. You only need to know that this option, used in
  11960. conjunction with /F, produces slightly faster and more compact code. The
  11961. /PACKC option is off by default, and can always be turned off with the /NOP
  11962. option described in Section 13.3.22.%@BO:   96061@%%@NL@%
  11963. %@NL@%
  11964. %@CR:MCVD3O03@%%@4@%The /PACKC option directs the linker to group together neighboring code%@EH@%
  11965. segments. Segments in the same group are assigned the same segment address;
  11966. offset addresses are adjusted upward accordingly. In other words, all items
  11967. will have the correct physical address whether the /PACKC option is used or
  11968. not. However, /PACKC changes segment and offset addresses so that all items
  11969. in a group share the same segment address.%@NL@%
  11970. %@NL@%
  11971. %@CR:MCVD3O04@%%@4@%The %@AI@%number%@AE@% field specifies the maximum size of groups formed by /PACKC. The%@EH@%
  11972. linker will stop adding segments to a group as soon as it cannot add another
  11973. segment without exceeding %@AI@%number%@AE@%. At that point, the linker starts forming a
  11974. new group. The default for %@AI@%number%@AE@% is 65,530.%@NL@%
  11975. %@NL@%
  11976. %@CR:MCVD3O05@%%@4@%The packaging of code segments provides more opportunities for far-call%@EH@%
  11977. optimization, which is enabled with /F. Generally speaking, /F and /PACKC
  11978. are designed to be used together.%@NL@%
  11979. %@NL@%
  11980. %@CR:MCVD3O06@%%@4@%Programs developed with Microsoft high-level languages can safely use%@EH@%
  11981. /PACKC. The /PACKC option is unsafe only when used with assembly programs
  11982. that make assumptions about the relative order of code segments. For
  11983. example, the following assembly code attempts to calculate the distance
  11984. between %@AS@%CSEG1%@AE@% and %@AS@%CSEG2%@AE@%. This code would produce incorrect results when used
  11985. with /PACKC, because /PACKC causes the two segments to share segment
  11986. address. Therefore the procedure would always return zero.%@NL@%
  11987. %@NL@%
  11988.      CSEG1      SEGMENT PUBLIC 'CODE'%@NL@%
  11989.      .%@NL@%
  11990.      .%@NL@%
  11991.      .%@NL@%
  11992.      CSEG1      ENDS%@NL@%
  11993. %@NL@%
  11994.      CSEG2      SEGMENT PARA PUBLIC 'CODE'%@NL@%
  11995.                 ASSUME  cs:CSEG2%@NL@%
  11996. %@NL@%
  11997.      %@AI@%; Return the length of CSEG1 in AX.;%@AE@%%@NL@%
  11998. %@NL@%
  11999.      codesize   PROC  NEAR%@NL@%
  12000.                 mov   ax,CSEG2   %@AI@%; Load para address of CSEG1;%@AE@%%@NL@%
  12001.                 sub   ax,CSEG1   %@AI@%; Load para address of CSEG2;%@AE@%%@NL@%
  12002.                 mov   cx,4       %@AI@%; Load count, and%@AE@%%@NL@%
  12003.                 shl   ax,c l     %@AI@%; convert distance from paragraphs%@AE@%%@NL@%
  12004.                                  %@AI@%; to bytes;%@AE@%%@NL@%
  12005.      codesize  ENDP%@NL@%
  12006. %@NL@%
  12007.      CSEG2      ENDS%@NL@%
  12008. %@NL@%
  12009. %@NL@%
  12010. %@CR:MCVD3P00@%%@3@%%@AB@%13.3.25  Packing Contiguous Data Segments (/PACKD)%@AE@%%@EH@%%@NL@%
  12011. %@NL@%
  12012. %@CR:MCVD3P01@%%@AB@%Option%@AE@%%@NL@%
  12013. %@NL@%
  12014.      %@AB@%/PACKD%@AE@%«%@AB@%ATA%@AE@%»«%@AB@%:%@AE@%%@AI@%number%@AE@%»%@NL@%
  12015. %@NL@%
  12016. %@CR:MCVD3P02@%%@4@%This option only affects code segments in medium- and large-model programs.%@EH@%
  12017. This option is also safe with all Microsoft high-level language compilers.
  12018. It behaves exactly like /PACKCODE except it applies to data segments, not
  12019. code segments. The linker recognizes data segments as any segment definition
  12020. with a class name which does not end in %@AS@%CODE%@AE@%. The adjacent data segment
  12021. definitions are combined into the same physical segment up to the given
  12022. limit. The default limit is 65,536.%@NL@%
  12023. %@NL@%
  12024. %@CR:MCVD3P03@%%@4@%With large and compact-model programs containing many modules, it may be%@EH@%
  12025. necessary to use this option to get around the limit of 255 physical data
  12026. segments per executable file imposed by OS/2 and Windows. If you get error
  12027. %@AS@%L1073%@AE@% from the liner, try using this option.%@NL@%
  12028. %@NL@%
  12029. %@CR:MCVD3P04@%%@4@%The %@AI@%number%@AE@% field specifies the maximum size of groups formed by /PACKD. The%@EH@%
  12030. linker will stop adding segments to a group as soon as it cannot add another
  12031. segment without exceeding %@AI@%number%@AE@%. At that point, the linker starts forming a
  12032. new group. The default for %@AI@%number%@AE@% is 65,530.%@NL@%
  12033. %@NL@%
  12034. %@CR:MCVD3P05@%%@4@%This option may not be safe with other compilers that do not generate fixup%@EH@%
  12035. records for all far data references. This option is valid for OS/2 and
  12036. Windows programs only.%@NL@%
  12037. %@NL@%
  12038. %@NL@%
  12039. %@CR:MCVD3Q00@%%@3@%%@AB@%13.3.26  Padding Code Segments (/PADC)%@AE@%%@EH@%%@NL@%
  12040. %@NL@%
  12041. %@CR:MCVD3Q01@%%@AB@%Option%@AE@%%@NL@%
  12042. %@NL@%
  12043.      %@AB@%/PADC%@AE@%«%@AB@%ODE%@AE@%»%@AB@%:%@AE@%%@AI@%padsize%@AE@%%@NL@%
  12044. %@NL@%
  12045. %@CR:MCVD3Q02@%%@4@%The /PADC option causes LINK to add filler bytes to the end of each code%@EH@%
  12046. module for subsequent linking with ILINK. The option is followed by a colon
  12047. and the number of bytes to add. (A decimal radix is assumed, but you can
  12048. specify octal or hexadecimal numbers by using a C-language prefix.) Thus%@NL@%
  12049. %@NL@%
  12050.      /PADCODE:256%@NL@%
  12051. %@NL@%
  12052. %@CR:MCVD3Q03@%%@4@%adds an additional 256 bytes to each module. The default size for%@EH@%
  12053. code-module padding is 0 bytes. If you are going to use this option, you
  12054. must also specify the /INC option.%@NL@%
  12055. %@NL@%
  12056. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12057. %@AI@%NOTE%@AE@%%@NL@%
  12058.    Code padding is usually not necessary for large-and medium-memory-model%@NL@%
  12059.    programs, but is recommended for small-compact and mixed-memory-model%@NL@%
  12060.    programs, and for Microsoft Macro Assembler (%@AB@%MASM%@AE@%) programs in which%@NL@%
  12061.    code segments are grouped.%@NL@%
  12062. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12063. %@NL@%
  12064. %@CR:MCVD3Q04@%%@4@%To be recognized as a code segment, a segment must be declared with class%@EH@%
  12065. name 'CODE'. The class name need only end with 'CODE' (Microsoft high-level
  12066. languages automatically use this declaration for code segments.)%@NL@%
  12067. %@NL@%
  12068. %@NL@%
  12069. %@CR:MCVD3R00@%%@3@%%@AB@%13.3.27  Padding Data Segments (/PADD)%@AE@%%@EH@%%@NL@%
  12070. %@NL@%
  12071. %@CR:MCVD3R01@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  12072. %@NL@%
  12073.      %@AB@%/PADD%@AE@%«%@AB@%ATA%@AE@%»%@AB@%:%@AE@%%@AI@%padsize%@AE@%%@NL@%
  12074. %@NL@%
  12075. %@CR:MCVD3R02@%%@4@%The /PADD option performs a function similar to the /PADCODE option, except%@EH@%
  12076. it specifies padding for data segments (or data modules, if the program uses
  12077. small- or medium-memory model). This option is supplied for subsequent
  12078. linking with ILINK. Thus%@NL@%
  12079. %@NL@%
  12080.      /PADDATA:32%@NL@%
  12081. %@NL@%
  12082. %@CR:MCVD3R03@%%@4@%adds an additional 32 bytes to each data module. The default size for%@EH@%
  12083. data-segment padding is 16 bytes. If you are going to use the /PADD option,
  12084. you must also specify the /INC option.%@NL@%
  12085. %@NL@%
  12086. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12087. %@AI@%NOTE%@AE@%%@NL@%
  12088.    If you specify too large a value for %@AI@%padsize%@AE@%, you may exceed the 64K%@NL@%
  12089.    limitation on the size of the default data segment.%@NL@%
  12090. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12091. %@NL@%
  12092. %@NL@%
  12093. %@CR:MCVD3S00@%%@3@%%@AB@%13.3.28  Pausing during Linking (/PAU)%@AE@%%@EH@%%@NL@%
  12094. %@NL@%
  12095. %@CR:MCVD3S01@%%@AB@%Option%@AE@%%@NL@%
  12096. %@NL@%
  12097.      %@AB@%/PAU%@AE@%«%@AB@%SE%@AE@%»%@NL@%
  12098. %@NL@%
  12099. %@CR:MCVD3S02@%%@4@%Unless you instruct it otherwise, LINK performs the linking session from%@EH@%
  12100. beginning to end without stopping. The /PAU option tells LINK to pause in
  12101. the session before it writes the executable (.EXE) file to disk. This option
  12102. allows you to swap disks before LINK writes the executable file.%@NL@%
  12103. %@NL@%
  12104. %@CR:MCVD3S03@%%@4@%If you specify the /PAU option, LINK displays the following message before%@EH@%
  12105. it creates the run file:%@NL@%
  12106. %@NL@%
  12107.      %@AS@%About to generate .EXE file%@AE@%%@NL@%
  12108.      %@AS@%Change diskette in drive%@AE@% %@AI@%letter%@AE@%%@AS@% and press <ENTER>%@AE@%%@NL@%
  12109. %@NL@%
  12110. %@CR:MCVD3S04@%%@4@%The %@AI@%letter%@AE@% corresponds to the current drive. LINK resumes processing when%@EH@%
  12111. you press ENTER .%@NL@%
  12112. %@NL@%
  12113. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12114. %@AI@%NOTE%@AE@%%@NL@%
  12115.    Do not remove the disk that will receive the list file or the disk used%@NL@%
  12116.    for the temporary file.%@NL@%
  12117. %@NL@%
  12118.    If a temporary file is created on the disk you plan to swap, press CTRL+C%@NL@%
  12119.    to terminate the LINK session. Rearrange your files so that the temporary%@NL@%
  12120.    file and the executable file can be written to the same disk. Then try%@NL@%
  12121.    linking again.%@NL@%
  12122. %@NL@%
  12123.    For more information on how LINK determines where to put the temporary%@NL@%
  12124.    file, see Section 13.2.6%@BO:   8ebda@%, "LINK Memory Requirements."%@NL@%
  12125. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12126. %@NL@%
  12127. %@NL@%
  12128. %@CR:MCVD3T00@%%@3@%%@AB@%13.3.29  Specifying User Libraries for Quick Languages (/Q)%@AE@%%@EH@%%@NL@%
  12129. %@NL@%
  12130. %@CR:MCVD3T01@%%@AB@%Option%@AE@%%@NL@%
  12131. %@NL@%
  12132.      %@AB@%/Q%@AE@%«%@AB@%UICKLIB%@AE@%»%@NL@%
  12133. %@NL@%
  12134. %@CR:MCVD3T02@%%@4@%The /Q option directs the linker to produce a "Quick library,"suitable for%@EH@%
  12135. use with Microsoft QuickBASIC or Microsoft QuickC(R) programs, instead of
  12136. producing a stand-alone application. (Stand-alone applications are
  12137. executable files that need only the presence of DOS to run. The linker
  12138. produces these by default.)%@NL@%
  12139. %@NL@%
  12140. %@CR:MCVD3T03@%%@4@%No other option is necessary to enable Quick-library creation. When you use%@EH@%
  12141. /Q, the %@AI@%exefile%@AE@% field refers to a Quick library instead of to an
  12142. application. The default extension for this field is then .QLB instead of
  12143. .EXE. You can use all of the linker features to build a Quick library that
  12144. you would otherwise use to build an application. The principal difference is
  12145. that a Quick library does not require (and should not contain) any
  12146. main-program-level code.%@NL@%
  12147. %@NL@%
  12148. %@CR:MCVD3T04@%%@4@%A Quick library is similar to a standard software library in that both%@EH@%
  12149. contain a collection of routines that may be called upon by a program. The
  12150. two libraries are different, however: a standard library is brought together
  12151. with a program at link time; a Quick library, by contrast, is brought
  12152. together with a program at run time.%@NL@%
  12153. %@NL@%
  12154. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12155. %@AI@%NOTE%@AE@%%@NL@%
  12156.    Two special restrictions apply to use of a Quick library:%@NL@%
  12157. %@NL@%
  12158.    1. Quick libraries can be loaded only by programs created with QuickC or%@NL@%
  12159.    QuickBASIC. These programs have the special code that properly loads a%@NL@%
  12160.    Quick library at run time.%@NL@%
  12161. %@NL@%
  12162.    2. Routines in a Quick library can be called from any module at run time.%@NL@%
  12163.    However, Quick-library routines cannot themselves make calls to routines%@NL@%
  12164.    outside the library. In other words, Quick libraries must be%@NL@%
  12165.    self-contained.%@NL@%
  12166. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12167. %@NL@%
  12168. %@CR:MCVD3T05@%%@4@%The linker creates a Quick library not by linking it to a program, but%@EH@%
  12169. instead by placing into a file all of the object modules to be included and
  12170. by adding a location table of all of the library routines. This table allows
  12171. references to be resolved at run time, after the entire library is loaded
  12172. into memory. For further information on the use of these libraries, consult
  12173. the user's guide for QuickBASIC or QuickC.%@NL@%
  12174. %@NL@%
  12175. %@NL@%
  12176. %@CR:MCVD3U00@%%@3@%%@AB@%13.3.30  Setting Maximum Number of Segments (/SE)%@AE@%%@EH@%%@NL@%
  12177. %@NL@%
  12178. %@CR:MCVD3U01@%%@AB@%Option%@AE@%%@NL@%
  12179. %@NL@%
  12180.      %@AB@%/SE%@AE@%«%@AB@%GMENTS%@AE@%»%@AB@%:%@AE@%%@AI@%number%@AE@%%@NL@%
  12181. %@NL@%
  12182. %@CR:MCVD3U02@%%@4@%The /SE option controls the number of segments the linker allows a program%@EH@%
  12183. to have. The default is 128, but you can set %@AI@%number%@AE@% to any value (decimal,
  12184. octal, or hexadecimal) in the range 1 to 3,072 (decimal). However, the
  12185. number of segment definitions is constrained by memory usage. Therefore, the
  12186. practical limit to the number is around 1,500.%@NL@%
  12187. %@NL@%
  12188. %@CR:MCVD3U03@%%@4@%For each segment, the linker must allocate some space to keep track of%@EH@%
  12189. segment information. By using a relatively low segment limit as a default
  12190. (128), the linker is able to link faster and allocate less storage space.%@NL@%
  12191. %@NL@%
  12192. %@CR:MCVD3U04@%%@4@%When you set the segment limit higher than 128, the linker allocates more%@EH@%
  12193. space for segment information. This option allows you to raise the segment
  12194. limit for programs with a large number of segments. For programs with fewer
  12195. than 128 segments, you can keep the storage requirements of the linker at
  12196. the lowest level possible by setting the segment %@AI@%number%@AE@% field to reflect the
  12197. actual number of segments in the program. If the number of segments
  12198. allocated is too high for the amount of memory LINK has available to it, you
  12199. will see the following error message:%@NL@%
  12200. %@NL@%
  12201.      %@AS@%segment limit too high%@AE@%%@NL@%
  12202. %@NL@%
  12203. %@CR:MCVD3U05@%%@4@%To specify a number of segments that will fit in the amount of memory%@EH@%
  12204. available, set the segment lower and relink the object files.%@NL@%
  12205. %@NL@%
  12206. %@NL@%
  12207. %@CR:MCVD3V00@%%@3@%%@AB@%13.3.31  Controlling Stack Size (/ST)%@AE@%%@EH@%%@NL@%
  12208. %@NL@%
  12209. %@CR:MCVD3V01@%%@AB@%Option%@AE@%%@NL@%
  12210. %@NL@%
  12211.      %@AB@%/ST%@AE@%«%@AB@%ACK%@AE@%»%@AB@%:%@AE@%%@AI@%number%@AE@%%@NL@%
  12212. %@NL@%
  12213. %@CR:MCVD3V02@%%@4@%The /ST option allows you to specify the size of the stack for your program.%@EH@%
  12214. The %@AI@%number%@AE@% is any positive value (decimal, octal,or hexadecimal) up to
  12215. 65,535 (decimal). It represents the size, in bytes, of the stack.%@NL@%
  12216. %@NL@%
  12217. %@CR:MCVD3V03@%%@4@%If you get a stack-overflow message, you may need to increase the size of%@EH@%
  12218. the stack. In contrast, if your program uses the stack very little, you may
  12219. save some space by decreasing the stack size.%@NL@%
  12220. %@NL@%
  12221. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12222. %@AI@%NOTE%@AE@%%@NL@%
  12223.    You can also use the %@AB@%EXEMOD%@AE@% utility, described in Section 17.1%@BO:   ba961@%, to%@NL@%
  12224.    change the default stack size in DOS executable files by modifying the%@NL@%
  12225.    executable-file header. The format of the executable-file header is%@NL@%
  12226.    discussed in that section as well as in the Microsoft MS-DOS programmer's%@NL@%
  12227.    Reference and in other reference books on DOS.%@NL@%
  12228. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12229. %@NL@%
  12230. %@NL@%
  12231. %@CR:MCVD3W00@%%@3@%%@AB@%13.3.32  Issuing Fixup Warnings (/W)%@AE@%%@EH@%%@NL@%
  12232. %@NL@%
  12233. %@CR:MCVD3W01@%%@AB@%Option%@AE@%%@NL@%
  12234. %@NL@%
  12235.      %@AB@%/W%@AE@%«%@AB@%ARNFIXUP%@AE@%»%@NL@%
  12236. %@NL@%
  12237. %@CR:MCVD3W02@%%@4@%The /WARNFIXUP option directs the linker to issue a warning for each segment%@EH@%
  12238. relative fixup of location-type "offset," such that the segment is contained
  12239. within a group but is not at the beginning of the group. The linker will
  12240. include the displacement of the segment from the group in determining the
  12241. final value of the fixup, contrary to what happens with DOS executable
  12242. files. This option is for linking protected-mode programs or Windows
  12243. applications.%@NL@%
  12244. %@NL@%
  12245. %@NL@%
  12246. %@CR:MCVD4000@%%@2@%%@AB@%13.4  Selecting Options with the LINK Environment Variable%@AE@%%@EH@%%@NL@%
  12247. %@NL@%
  12248. %@CR:MCVD4001@%%@4@%You can use the LINK environment variable to cause certain options to be%@EH@%
  12249. used each time you link. The linker checks the environment variable for
  12250. options, if the variable exists.%@NL@%
  12251. %@NL@%
  12252. %@CR:MCVD4002@%%@4@%The linker expects to find options listed in the variable exactly as you%@EH@%
  12253. would type them on the command line. It will not accept other kinds of
  12254. arguments; file names in the environment variable will cause the following
  12255. error message:%@NL@%
  12256. %@NL@%
  12257.      %@AS@%unrecognized option%@AE@%%@NL@%
  12258. %@NL@%
  12259. %@CR:MCVD4003@%%@4@%Each time you link, you can specify other options in addition to the ones%@EH@%
  12260. specified in the LINK environment variable. If you type an option both on
  12261. the command line and in the environment variable, the effect will be the
  12262. same as if the option were given once.%@NL@%
  12263. %@NL@%
  12264. %@CR:MCVD4004@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  12265. %@NL@%
  12266.      %@CR:MCVD4005@%>SET LINK=/NOI /SE:256 /CO
  12267.      >LINK TEST;
  12268.      >LINK /NOD /CO PROG;%@NL@%
  12269. %@NL@%
  12270. %@CR:MCVD4006@%%@4@%In the example above, the file %@AS@%TEST.OBJ%@AE@% is linked with the options %@AS@%/NOI%@AE@%,%@EH@%
  12271. %@AS@%/SE:256%@AE@%, and %@AS@%/CO%@AE@%. The file %@AS@%PROG.OBJ%@AE@% is then linked with the option %@AS@%/NOD%@AE@%,
  12272. in addition to %@AS@%/NOI%@AE@%, %@AS@%/SE:256%@AE@%, and %@AS@%/CO%@AE@%.%@NL@%
  12273. %@NL@%
  12274. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12275. %@AI@%NOTE%@AE@%%@NL@%
  12276.    A command-line option will override the effect of any%@NL@%
  12277.    environment-variable option that it conflicts with. For example, the%@NL@%
  12278.    command-line option%@AS@%/SE:512%@AE@% cancels the effect of the environment-variable%@NL@%
  12279.    option %@AS@%/SE:256%@AE@%.%@NL@%
  12280. %@NL@%
  12281.    The only way to prevent an option in the environment variable from being%@NL@%
  12282.    used is to reset the environment variable itself.%@NL@%
  12283. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12284. %@NL@%
  12285. %@NL@%
  12286. %@CR:MCVD5000@%%@2@%%@AB@%13.5  Linker Operation%@AE@%%@EH@%%@NL@%
  12287. %@NL@%
  12288. %@CR:MCVD5001@%%@4@%LINK performs the following steps to combine object modules and produce an%@EH@%
  12289. executable file:%@NL@%
  12290. %@NL@%
  12291. %@CR:MCVD5002@%  1. Reads the object modules submitted%@NL@%
  12292. %@NL@%
  12293.   2. Searches the given libraries, if necessary, to resolve external%@NL@%
  12294.      references%@NL@%
  12295. %@NL@%
  12296.   3. Assigns addresses to segments%@NL@%
  12297. %@NL@%
  12298.   4. Assigns addresses to public symbols%@NL@%
  12299. %@NL@%
  12300.   5. Reads code and data in the segments%@NL@%
  12301. %@NL@%
  12302.   6. Reads all relocation references in object modules%@NL@%
  12303. %@NL@%
  12304.   7. Performs fixups%@NL@%
  12305. %@NL@%
  12306.   8. Outputs an executable file (executable image and relocation%@NL@%
  12307.      information)%@NL@%
  12308. %@NL@%
  12309. %@CR:MCVD5003@%%@4@%Steps 5, 6, and 7 are performed concurrently──in other words, LINK moves%@EH@%
  12310. back and forth between these steps before it progresses to step 8.%@NL@%
  12311. %@NL@%
  12312. %@CR:MCVD5004@%%@4@%The "executable image" contains the code and data that constitute the%@EH@%
  12313. executable file. The "relocation information" is a list of references
  12314. relative to the start of the program, each of which changes when the
  12315. executable image is loaded into memory and an actual address for the entry
  12316. point is assigned.%@NL@%
  12317. %@NL@%
  12318. %@CR:MCVD5005@%%@4@%The following sections explain the process LINK uses to concatenate segments%@EH@%
  12319. and resolve references to items in memory.%@NL@%
  12320. %@NL@%
  12321. %@NL@%
  12322. %@CR:MCVD5100@%%@3@%%@AB@%13.5.1  Alignment of Segments%@AE@%%@EH@%%@NL@%
  12323. %@NL@%
  12324. %@CR:MCVD5101@%%@4@%LINK uses a segment's alignment type to set the starting address for the%@EH@%
  12325. segment. The alignment types are %@AB@%BYTE, WORD, PARA%@AE@%, and %@AB@%PAGE%@AE@%. These
  12326. correspond to starting addresses at byte, word, paragraph, and page
  12327. boundaries, representing addresses that are multiples of 1, 2, 16, and 256,
  12328. respectively. The default alignment is %@AB@%PARA%@AE@%.%@NL@%
  12329. %@NL@%
  12330. %@CR:MCVD5102@%%@4@%When LINK encounters a segment, it checks the alignment type before copying%@EH@%
  12331. the segment to the executable file. If the alignment is %@AB@%WORD%@AE@%, %@AB@%PARA%@AE@%, or %@AB@%PAGE%@AE@%,
  12332. LINK checks the executable image to see if the last byte copied ends at an
  12333. appropriate boundary. If not, LINK pads the image with extra null bytes.%@NL@%
  12334. %@NL@%
  12335. %@NL@%
  12336. %@CR:MCVD5200@%%@3@%%@AB@%13.5.2  Frame Number%@AE@%%@EH@%%@NL@%
  12337. %@NL@%
  12338. %@CR:MCVD5201@%%@4@%LINK computes a starting address for each segment in a program. The starting%@EH@%
  12339. address is based on a segment's alignment and the sizes of the segments
  12340. already copied to the executable file (as described in Section 13.5.1%@BO:   9b071@%,
  12341. above). The address consists of an offset and a "canonical frame number."
  12342. The canonical frame number specifies the address of the first paragraph in
  12343. memory containing one or more bytes of the segment. (A paragraph is 16 bytes
  12344. of memory; therefore, to compute a physical location in memory, multiply the
  12345. frame number by 16 and add the offset.) The offset is the number of bytes
  12346. from the start of the paragraph to the first byte in the segment. For %@AB@%BYTE%@AE@%
  12347. and %@AB@%WORD%@AE@% alignments, the offset may be nonzero. The offset is always zero
  12348. for %@AB@%PARA%@AE@% and %@AB@%PAGE%@AE@% alignments. (An offset of zero means that the physical
  12349. location is an exact multiple of 16.)%@NL@%
  12350. %@NL@%
  12351. %@CR:MCVD5202@%%@4@%The frame number of a segment can be obtained from the map file created by%@EH@%
  12352. LINK. The first four digits of the start address give the frame number in
  12353. hexadecimal. For example, a start address of %@AS@%0C0A6%@AE@% gives a frame number of
  12354. %@AS@%0C0A%@AE@%.%@NL@%
  12355. %@NL@%
  12356. %@NL@%
  12357. %@CR:MCVD5300@%%@3@%%@AB@%13.5.3  Order of Segments%@AE@%%@EH@%%@NL@%
  12358. %@NL@%
  12359. %@CR:MCVD5301@%%@4@%LINK copies segments to the executable file in the same order that it%@EH@%
  12360. encounters them in the object files. This order is maintained throughout the
  12361. program unless LINK encounters two or more segments having the same class
  12362. name. Segments having identical class names belong to the same class type
  12363. and are copied as a contiguous block to the executable file.%@NL@%
  12364. %@NL@%
  12365. %@CR:MCVD5302@%%@4@%The /DOSSEG option may change the way in which segments are ordered.%@EH@%%@NL@%
  12366. %@NL@%
  12367. %@NL@%
  12368. %@CR:MCVD5400@%%@3@%%@AB@%13.5.4  Combined Segments%@AE@%%@EH@%%@NL@%
  12369. %@NL@%
  12370. %@CR:MCVD5401@%%@4@%LINK uses combine types to determine whether or not two or more segments%@EH@%
  12371. sharing the same segment name should be combined into one large segment. The
  12372. valid combine types are %@AB@%PUBLIC, STACK, COMMON%@AE@%, and %@AB@%PRIVATE.%@AE@%%@NL@%
  12373. %@NL@%
  12374. %@CR:MCVD5402@%%@4@%If a segment has combine type %@AB@%PUBLIC%@AE@%, LINK automatically combines it with%@EH@%
  12375. any other segments having the same name and belonging to the same class.
  12376. When LINK combines segments, it ensures that the segments are contiguous and
  12377. that all addresses in the segments can be accessed using an offset from the
  12378. same frame address. The result is the same as if the segment were defined as
  12379. a whole in the source file.%@NL@%
  12380. %@NL@%
  12381. %@CR:MCVD5403@%%@4@%LINK preserves each individual segment's alignment type. This means that%@EH@%
  12382. even though the segments belong to a single, large segment, the code and
  12383. data in the segments do not lose their original alignment. If the combined
  12384. segments exceed 64K, LINK displays an error message.%@NL@%
  12385. %@NL@%
  12386. %@CR:MCVD5404@%%@4@%If a segment has combine type %@AB@%STACK%@AE@%, then LINK carries out the same combine%@EH@%
  12387. operation as for %@AB@%PUBLIC%@AE@% segments. The only exception is %@AB@%STACK%@AE@% segments cause
  12388. LINK to copy an initial stack-pointer value to the executable file. This
  12389. stack-pointer value is the offset to the end of the first stack segment (or
  12390. combined stack segment) encountered.%@NL@%
  12391. %@NL@%
  12392. %@CR:MCVD5405@%%@4@%If a segment has combine type %@AB@%COMMON%@AE@%, then LINK automatically combines it%@EH@%
  12393. with any other segments having the same name and belonging to the same
  12394. class. When LINK combines %@AB@%COMMON%@AE@% segments, however, it places the start of
  12395. each segment at the same address, creating a series of overlapping segments.
  12396. The result is a single segment no larger than the largest segment combined.%@NL@%
  12397. %@NL@%
  12398. %@CR:MCVD5406@%%@4@%A segment has combine type %@AB@%PRIVATE%@AE@% only if no explicit combine type is%@EH@%
  12399. defined for it in the source file. LINK does not combine private segments.%@NL@%
  12400. %@NL@%
  12401. %@NL@%
  12402. %@CR:MCVD5500@%%@3@%%@AB@%13.5.5  Groups%@AE@%%@EH@%%@NL@%
  12403. %@NL@%
  12404. %@CR:MCVD5501@%%@4@%Groups allow segments to be addressed relative to the same frame address.%@EH@%
  12405. When LINK encounters a group, it adjusts all memory references to items in
  12406. the group so that they are relative to the same frame address.%@NL@%
  12407. %@NL@%
  12408. %@CR:MCVD5502@%%@4@%Segments in a group do not have to be contiguous, belong to the same class,%@EH@%
  12409. or have the same combine type. The only requirement is all segments in the
  12410. group fit within 64K.%@NL@%
  12411. %@NL@%
  12412. %@CR:MCVD5503@%%@4@%Groups do not affect the order in which the segments are loaded. Unless you%@EH@%
  12413. use class names and enter object files in the right order, there is no
  12414. guarantee that the segments will be contiguous. In fact, LINK may place
  12415. segments that do not belong to the group in the same 64K of memory. LINK
  12416. does not explicitly check that all segments in a group fit within 64K of
  12417. memory; however, LINK is likely to encounter a fixup-overflow error if this
  12418. requirement is not met.%@NL@%
  12419. %@NL@%
  12420. %@NL@%
  12421. %@CR:MCVD5600@%%@3@%%@AB@%13.5.6  Fixups%@AE@%%@EH@%%@NL@%
  12422. %@NL@%
  12423. %@CR:MCVD5601@%%@4@%Once the starting address of each segment in a program is known and all%@EH@%
  12424. segment combinations and groups have been established, LINK can "fix up" any
  12425. unresolved references to labels and variables. To fix up unresolved
  12426. references, LINK computes an appropriate offset and segment address and
  12427. replaces the temporary values generated by the assembler with the new
  12428. values.%@NL@%
  12429. %@NL@%
  12430. %@CR:MCVD5602@%%@4@%LINK carries out fixups for the types of references shown in the following%@EH@%
  12431. list:%@NL@%
  12432. %@CR:MCVD5603@%%@NL@%
  12433. %@TH:   43   2426  2 28 48 @%
  12434. %@AB@%Type of Reference           Description%@AE@%
  12435.  
  12436. Short                       Occurs in %@AB@%JMP%@AE@% instructions that attempt to pass
  12437.                             control to labeled instructions in the same
  12438.                             segment or group.
  12439.  
  12440.                             The target instruction must be no more than 128
  12441.                             bytes from the point of reference. LINK computes
  12442.                             a signed, 8-bit number for this reference. It
  12443.                             displays an error message if the target
  12444.                             instruction belongs to a different segment or
  12445.                             group (has a different frame address), or if the
  12446.                             target is more than 128 bytes distant in either
  12447.                             direction.
  12448.  
  12449. Near self relative          Occurs in instructions that access data relative
  12450.                             to the same segment or group.
  12451.  
  12452.                             LINK computes a 16-bit offset for this
  12453.                             reference. It displays an error if the data are
  12454.                             not in the same segment or group.
  12455.  
  12456. Near segment relative       Occurs in instructions that attempt to access
  12457.                             data in a specified segment or group, or
  12458.                             relative to a specified segment register.
  12459.  
  12460.                             LINK computes a 16-bit offset for this
  12461.                             reference. It displays an error message if the
  12462.                             offset of the target within the specified frame
  12463.                             is greater than 64K or less than 0, or if the
  12464.                             beginning of the canonical frame of the target
  12465.                             is not addressable.
  12466.  
  12467. Long                        Occurs in %@AB@%CALL%@AE@% instructions that attempt to
  12468.                             access an instruction in another segment or
  12469.                             group.
  12470.  
  12471.                             LINK computes a 16-bit frame address and 16-bit
  12472.                             offset for this reference. LINK displays an
  12473.                             error message if the computed offset is greater
  12474.                             than 64K or less than 0, or if the beginning of
  12475.                             the canonical frame of the target is not
  12476.                             addressable.
  12477. %@TE:   43   2426  2 28 48 @%
  12478. %@NL@%
  12479. %@CR:MCVD5604@%%@4@%The size of the value to be computed depends on the type of reference. If%@EH@%
  12480. LINK discovers an error in the anticipated size of a reference, it displays
  12481. a fixup-overflow message. This can happen, for example, if a program
  12482. attempts to use a 16-bit offset to reach an instruction which is more than
  12483. 64K away. It can also occur if all segments in a group do not fit within a
  12484. single 64K block of memory.%@NL@%
  12485. %@NL@%
  12486. %@NL@%
  12487. %@CR:MCVD6000@%%@2@%%@AB@%13.6  Using Overlays%@AE@%%@EH@%%@NL@%
  12488. %@NL@%
  12489. %@CR:MCVD6001@%%@4@%You can direct LINK to create an overlaid version of a program. In an%@EH@%
  12490. overlaid version of a program, specified parts of the program (known as
  12491. "overlays") are loaded only if and when they are needed. These parts share
  12492. the same space in memory. Only code is overlaid; data are never overlaid.
  12493. Programs that use overlays usually require less memory, but they run more
  12494. slowly because of the time needed to read and reread the code from disk into
  12495. memory.%@NL@%
  12496. %@NL@%
  12497. %@CR:MCVD6002@%%@4@%When you use overlays, the linker loads in code for the overlay manager.%@EH@%
  12498. This code resides in each of the Microsoft high-level language libraries (so
  12499. you must link with at least one such library), and is between 2K and 3K in
  12500. size.%@NL@%
  12501. %@NL@%
  12502. %@CR:MCVD6003@%%@4@%You specify overlays by enclosing them in parentheses in the list of object%@EH@%
  12503. files that you submit to the linker. Each module in parentheses represents
  12504. one overlay. For example, you could give the following object-file list in
  12505. the %@AI@%objfiles%@AE@% field of the LINK command line:%@NL@%
  12506. %@NL@%
  12507.      a + (b+c) + (e+f) + g + (i)%@NL@%
  12508. %@NL@%
  12509. %@CR:MCVD6004@%%@4@%In this example, the modules %@AS@%(b+c)%@AE@%, %@AS@%(e+f)%@AE@%, and %@AS@%(i)%@AE@% are overlays. The remaining%@EH@%
  12510. modules, and any drawn from the run-time libraries, constitute the resident
  12511. part (or root) of your program. Overlays are loaded into the same region of
  12512. memory, so only one can be resident at a time. Duplicate names in different
  12513. overlays are not supported, so each module can appear only once in a
  12514. program.%@NL@%
  12515. %@NL@%
  12516. %@CR:MCVD6005@%%@4@%The linker replaces calls from the root to an overlay and calls from an%@EH@%
  12517. overlay to another overlay with an interrupt (followed by the module
  12518. identifier and offset). By default, the interrupt number is 63 (3F
  12519. hexadecimal). You can use the /OVERLAYINTERRUPT option of the LINK command
  12520. to change the interrupt number.%@NL@%
  12521. %@NL@%
  12522. %@CR:MCVD6006@%%@4@%The CodeView debugger is now compatible with overlaid modules. In fact, in%@EH@%
  12523. the case of large programs, you may need to use overlays%@NL@%
  12524. %@NL@%
  12525. %@NL@%
  12526. %@CR:MCVD6100@%%@3@%%@AB@%13.6.1  Restrictions on Overlays%@AE@%%@EH@%%@NL@%
  12527. %@NL@%
  12528. %@CR:MCVD6101@%%@4@%You can overlay only modules to which control is transferred and returned by%@EH@%
  12529. a standard 8086 long (32-bit) call/return instruction. Therefore, because
  12530. calls to subroutines modified with the %@AB@%NEAR%@AE@% attribute are short (16-bit)
  12531. calls, you cannot overlay modules containing %@AB@%NEAR%@AE@% subroutines if other
  12532. modules call those subroutines. You cannot use long jumps with the %@AB@%longjmp%@AE@%
  12533. library function. Also, the linker does not produce overlay modules that can
  12534. be called indirectly through function pointers.%@NL@%
  12535. %@NL@%
  12536. %@NL@%
  12537. %@CR:MCVD6200@%%@3@%%@AB@%13.6.2  Overlay-Manager Prompts%@AE@%%@EH@%%@NL@%
  12538. %@NL@%
  12539. %@CR:MCVD6201@%%@4@%The overlay manager is part of the language's run-time library. If you%@EH@%
  12540. specify overlays during linking, the code for the overlay manager is
  12541. automatically linked with the other modules of your program.%@NL@%
  12542. %@NL@%
  12543. %@CR:MCVD6202@%%@4@%When the executable file is run, the overlay manager searches for that file%@EH@%
  12544. whenever another overlay needs to be loaded. The overlay manager first
  12545. searches for the file in the current directory; then, if it does not find
  12546. the file, the manager searches the directories listed in the PATH
  12547. environment variable. When it finds the file, the overlay manager extracts
  12548. the overlay modules specified by the root program. If the overlay manager
  12549. cannot find an overlay file when needed, it prompts the user to enter the
  12550. file name.%@NL@%
  12551. %@NL@%
  12552. %@CR:MCVD6203@%%@4@%Even with overlays, the linker produces only one .EXE file. This file is%@EH@%
  12553. opened again and again as long as the overlay manager needs to extract new
  12554. overlay modules.%@NL@%
  12555. %@NL@%
  12556. %@CR:MCVD6204@%%@4@%For example, assume that an executable program called %@AS@%PAYROLL.EXE%@AE@% uses%@EH@%
  12557. overlays and does not exist in either the current directory or the
  12558. directories specified by PATH. If the user runs %@AS@%PAYROLL.EXE%@AE@% (by entering a
  12559. complete path specification), the overlay manager displays the following
  12560. message when it attempts to load overlay files:%@NL@%
  12561. %@NL@%
  12562.      %@AS@%Cannot find PAYROLL.EXE%@AE@%%@NL@%
  12563.      %@AS@%Please enter new program spec:%@AE@%%@NL@%
  12564. %@NL@%
  12565. %@CR:MCVD6205@%%@4@%The user can then enter the drive or directory, or both, where %@AS@%PAYROLL.EXE%@AE@%%@EH@%
  12566. is located. For example, if the file is located in directory %@AS@%\EMPLOYEE\DATA\%@AE@%
  12567. on drive B, the user could enter %@AS@%B:\EMPLOYEE\DATA\%@AE@% or simply enter
  12568. %@AS@%\EMPLOYEE\DATA\%@AE@% if the current drive is B.%@NL@%
  12569. %@NL@%
  12570. %@CR:MCVD6206@%%@4@%If the user later removes the disk in drive B and the overlay manager needs%@EH@%
  12571. to access the overlay again, it does not find %@AS@%PAYROLL.EXE%@AE@% and displays the
  12572. following message:%@NL@%
  12573. %@NL@%
  12574.      %@AS@%Please insert diskette containing B:\EMPLOYEE\DATA\PAYROLL.EXE%@AE@%%@NL@%
  12575.      %@AS@%in drive B: and strike any key when ready.%@AE@%%@NL@%
  12576. %@NL@%
  12577. %@CR:MCVD6207@%%@4@%After the overlay file has been read from the disk, the overlay manager%@EH@%
  12578. displays the following message:%@NL@%
  12579. %@NL@%
  12580.      %@AS@%Please restore the original diskette.%@AE@%%@NL@%
  12581.      %@AS@%Strike any key when ready.%@AE@%%@NL@%
  12582. %@NL@%
  12583. %@NL@%
  12584. %@CR:MCVE0000@%%@1@%%@AB@%Chapter 14  Incremental Linking with ILINK%@AE@%%@EH@%%@NL@%
  12585. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12586. %@NL@%
  12587. %@CR:MCVE0001@%%@4@%The Microsoft Incremental Linker (ILINK) is a utility that enables you to%@EH@%
  12588. link your application much faster. You can benefit from its use when you
  12589. change a small subset of the modules used to link a program. The program can
  12590. use any memory model, but in the small model LINK is not efficient unless no
  12591. symbolic change address is used. Furthermore, to benefit from ILINK, you
  12592. need to follow certain restrictions that are described in this chapter.
  12593. Should ILINK fail to link your changes into the executable file, it attempts
  12594. to invoke the full linker, LINK, or carry out any other commands you specify
  12595. on the command line. Before you can use ILINK, you must first run the full
  12596. linker with special options.%@NL@%
  12597. %@NL@%
  12598. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12599. %@AI@%NOTE%@AE@%%@NL@%
  12600.    You can use ILINK to develop dynamic-link libraries as well as%@NL@%
  12601.    applications. Everything said in this chapter about applications and%@NL@%
  12602.    executable files applies to dynamic-link libraries as well. This chapter%@NL@%
  12603.    uses the term "library" to refer specifically to an object-code library%@AE@%%@NL@%
  12604.    (a .LIB file).%@NL@%
  12605. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12606. %@NL@%
  12607. %@NL@%
  12608. %@CR:MCVE1000@%%@2@%%@AB@%14.1  Definitions%@AE@%%@EH@%%@NL@%
  12609. %@NL@%
  12610. %@CR:MCVE1001@%%@4@%Incremental linking involves certain specialized concepts. You may need to%@EH@%
  12611. review the following list of terms in order to understand the rest of this
  12612. chapter:%@NL@%
  12613. %@CR:MCVE1002@%%@NL@%
  12614. %@TH:   39   2250  2 28 48 @%
  12615. %@AB@%Term                                       Meaning%@AE@%
  12616.  
  12617. Segment                     A contiguous area of memory up to 64K in size.
  12618.                             See the definitions of "physical segment" and
  12619.                             "logical segment" below.
  12620.  
  12621. Module                      A unit of code or data defined by one source
  12622.                             file. In BASIC, Pascal, and large-memory-model C
  12623.                             and FORTRAN programs, each module corresponds to
  12624.                             a different segment. In small-memory-model
  12625.                             programs, all code modules contribute to one
  12626.                             code segment, and all data modules contribute to
  12627.                             one data segment.
  12628.  
  12629. Memory model                The memory model determines the number of code
  12630.                             and data segments in a program. BASIC programs
  12631.                             are always large memory model.
  12632.  
  12633. Physical segment            A segment listed in the executable file's
  12634.                             segment table. Each physical segment has a
  12635.                             distinct segment address, whereas logical
  12636.                             segments may share a segment address. A physical
  12637.                             segment usually contains one logical segment,
  12638.                             but it can contain more.
  12639.  
  12640. Logical segment             A segment defined in an object module. Each
  12641.                             physical segment other than DGROUP contains
  12642.                             exactly one logical segment, except when you use
  12643.                             the GROUP directive in a MASM module. (Linking
  12644.                             with the /PACKCODE option can also create more
  12645.                             than one logical segment per physical segment.)
  12646.  
  12647. Code symbol                 The address of a function, subroutine, or
  12648.                             procedure.
  12649.  
  12650. Data symbol                 The address of a global or static data object.
  12651.                             The concept of data symbol includes all data
  12652.                             objects except local (stack-allocated) or
  12653.                             dynamically allocated data.
  12654. %@TE:   39   2250  2 28 48 @%
  12655. %@NL@%
  12656. %@CR:MCVE2000@%%@2@%%@AB@%14.2  Guidelines for Using ILINK%@AE@%%@EH@%%@NL@%
  12657. %@NL@%
  12658. %@CR:MCVE2001@%%@4@%Since ILINK can automatically invoke LINK when an incremental link fails,%@EH@%
  12659. you do not have to concern yourself with the following guidelines. However,
  12660. if you are interested in how ILINK works and want to take full advantage of
  12661. ILINK, follow the guidelines presented in this section.%@NL@%
  12662. %@NL@%
  12663. %@CR:MCVE2002@%%@4@%The incremental linker, ILINK, works much faster than the full linker%@EH@%
  12664. because ILINK replaces only those modules that have changed since the last
  12665. linking. It avoids much of the work done by LINK.%@NL@%
  12666. %@NL@%
  12667. %@CR:MCVE2003@%%@4@%To enable incremental linking, follow the major guidelines below. If your%@EH@%
  12668. changes exceed the scope allowed by these guidelines, a full link is
  12669. necessary.%@NL@%
  12670. %@NL@%
  12671. %@CR:MCVE2004@%  1. Do not alter any .LIB files you are using to create the executable%@NL@%
  12672.      file.%@NL@%
  12673. %@NL@%
  12674.   2. Put padding at the end of data and small-memory-model code modules by%@NL@%
  12675.      specifying the /PADCODE and /PADDATA options during full linking with%@NL@%
  12676.      LINK.%@NL@%
  12677. %@NL@%
  12678.      By putting padding at the end of a module, you enable the module to%@NL@%
  12679.      grow without forcing a full relinking. However, if the module is the%@NL@%
  12680.      only module contributing to its physical segment, padding is not%@NL@%
  12681.      necessary.%@NL@%
  12682. %@NL@%
  12683.      You can avoid padding if you have a BASIC, Pascal, FORTRAN, or C%@NL@%
  12684.      program (other than a small-memory-model C program), if you do not call%@NL@%
  12685.      a MASM module that uses the %@AB@%GROUP%@AE@% directive, and if you do not add to%@NL@%
  12686.      the size of the default data segment. (See your language documentation%@NL@%
  12687.      for information about what is placed in the default data segment.)%@NL@%
  12688. %@NL@%
  12689.   3. Do not delete code symbols (functions and procedures) referenced by%@NL@%
  12690.      another module. You can, however, move or add to these symbols.%@NL@%
  12691. %@NL@%
  12692.   4. Do not move or delete data symbols (global data). You can add data%@NL@%
  12693.      symbols at the end of your data definitions, but you cannot add new%@NL@%
  12694.      communal data symbols (for example, C uninitialized variables or BASIC%@NL@%
  12695.      %@AB@%COMMON%@AE@% statements).%@NL@%
  12696. %@NL@%
  12697. %@NL@%
  12698. %@CR:MCVE3000@%%@2@%%@AB@%14.3  The Development Process%@AE@%%@EH@%%@NL@%
  12699. %@NL@%
  12700. %@CR:MCVE3001@%%@4@%To develop a software project with ILINK, follow the steps listed below:%@EH@%%@NL@%
  12701. %@NL@%
  12702. %@CR:MCVE3002@%  1. Use the full linker during early stages of developing your application%@NL@%
  12703.      or dynamic-link library. ILINK produces no significant gain in speed%@NL@%
  12704.      until you have a number of different code and data modules present.%@NL@%
  12705. %@NL@%
  12706.   2. Prepare for incremental linking by using the special liner options%@NL@%
  12707.      mentioned below.%@NL@%
  12708. %@NL@%
  12709.   3. Incrementally link with ILINK after any small changes are made.%@NL@%
  12710. %@NL@%
  12711.   4. Relink with LINK after any major changes are made (for example, if you%@NL@%
  12712.      want to add an entirely new module, greatly expand one of the segments%@NL@%
  12713.      or modules, or redefine symbols that are shared between segments).%@NL@%
  12714. %@NL@%
  12715.   5. Repeat steps 3 and 4 as necessary.%@NL@%
  12716. %@NL@%
  12717. %@CR:MCVE3003@%%@4@%You may find it easiest to use a make file to invoke ILINK and LINK. The%@EH@%
  12718. following sample make file attempts to use ILINK each time, but invokes the
  12719. full linker whenever incremental linking is not possible:%@NL@%
  12720. %@NL@%
  12721.      dog.exe: obj1.obj; obj2.obj; obj3.obj%@NL@%
  12722.          ILINK -e "LINK /incr @dog.lnk" -a dog%@NL@%
  12723. %@NL@%
  12724. %@CR:MCVE3004@%%@4@%Three options──/INCREMENTAL, /PADCODE, and /PADDATA──have been added to LINK%@EH@%
  12725. to allow the use of ILINK. Here is an example of how they might appear on
  12726. the command line:%@NL@%
  12727. %@NL@%
  12728.      LINK /INCREMENTAL /PADDATA:16 /PADCODE:256 @PROJNAME.LNK%@NL@%
  12729. %@NL@%
  12730. %@CR:MCVE3005@%%@4@%These options are described in detail in Sections 13.3.12%@BO:   93dca@%, 13.3.27%@BO:   97ed1@%, and%@EH@%
  12731. 13.3.26%@BO:   978cc@%, respectively.%@NL@%
  12732. %@NL@%
  12733. %@NL@%
  12734. %@CR:MCVE4000@%%@2@%%@AB@%14.4  Running ILINK%@AE@%%@EH@%%@NL@%
  12735. %@NL@%
  12736. %@CR:MCVE4001@%%@4@%You can attempt to link the project with ILINK at any time after the project%@EH@%
  12737. has been linked with the /INCREMENTAL option. The following two sections
  12738. discuss the files needed for linking with ILINK and the command required to
  12739. invoke ILINK.%@NL@%
  12740. %@NL@%
  12741. %@NL@%
  12742. %@CR:MCVE4100@%%@3@%%@AB@%14.4.1  Files Required for Using ILINK%@AE@%%@EH@%%@NL@%
  12743. %@NL@%
  12744. %@CR:MCVE4101@%%@4@%The files that are required for linking using ILINK are ILINK.EXE,%@EH@%
  12745. ILINKSTB.OVL, and your project files that include the following:%@NL@%
  12746. %@NL@%
  12747. %@CR:MCVE4102@%  1. %@AI@%projname%@AE@%.EXE (the file to be incrementally linked)%@NL@%
  12748. %@NL@%
  12749.   2. %@AI@%projname%@AE@%.SYM (the symbol file)%@NL@%
  12750. %@NL@%
  12751.   3. %@AI@%projname%@AE@%.ILK  (the ILINK support file)%@NL@%
  12752. %@NL@%
  12753.   4. *.OBJ  (the changed .OBJ files)%@NL@%
  12754. %@NL@%
  12755. %@CR:MCVE4103@%%@4@%ILINK.EXE and ILINKSTB.OVL should be in a directory listed in the PATH%@EH@%
  12756. environment variable, and the rest of the project files should be in the
  12757. current directory.%@NL@%
  12758. %@NL@%
  12759. %@NL@%
  12760. %@CR:MCVE4200@%%@3@%%@AB@%14.4.2  The ILINK Command Line%@AE@%%@EH@%%@NL@%
  12761. %@NL@%
  12762. %@CR:MCVE4201@%%@4@%The syntax for the ILINK command line is shown below. ILINK options are not%@EH@%
  12763. case sensitive.%@NL@%
  12764. %@NL@%
  12765.      ILINK «/a» «/c» «/v» «/i» «/e "%@AI@%commands%@AE@%"» %@AI@%projname%@AE@%«%@AI@%modulelist%@AE@%»%@NL@%
  12766. %@NL@%
  12767. %@CR:MCVE4202@%%@4@%The /a option specifies that all object files are to be checked to see if%@EH@%
  12768. they have changed since the last linking process. This is done by comparing
  12769. the dates and times of all .OBJ files with those of the executable file. An
  12770. attempt is made to incrementally link all of the files that have changed.%@NL@%
  12771. %@NL@%
  12772. %@CR:MCVE4203@%%@4@%The /c option specifies case sensitivity for all public symbol names.%@EH@%%@NL@%
  12773. %@NL@%
  12774. %@CR:MCVE4204@%%@4@%The /v option specifies verbose mode and directs ILINK to display more%@EH@%
  12775. information. Specifically, when in verbose mode ILINK lists the modules that
  12776. have changed.%@NL@%
  12777. %@NL@%
  12778. %@CR:MCVE4205@%%@4@%The /i option specifies that only an incremental link is to be attempted. If%@EH@%
  12779. the incremental link fails, a full link is not performed.%@NL@%
  12780. %@NL@%
  12781. %@CR:MCVE4206@%%@4@%The /e option specifies a list of commands to be executed if the incremental%@EH@%
  12782. link fails. The commands are enclosed in double quotes, and if more than one
  12783. command is given, they must be separated by spaces and a semicolon.%@NL@%
  12784. %@NL@%
  12785. %@CR:MCVE4207@%%@4@%The %@AI@%projname%@AE@% field contains the name of the executable file that is to be%@EH@%
  12786. incrementally linked.%@NL@%
  12787. %@NL@%
  12788. %@CR:MCVE4208@%%@4@%You can use the optional %@AI@%modulelist%@AE@% field to list all the modules that have%@EH@%
  12789. changed. (No extensions are required.) This field is an alternative to using
  12790. the /a flag.%@NL@%
  12791. %@NL@%
  12792. %@CR:MCVE4209@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  12793. %@NL@%
  12794.      ILINK /i wizard input sort output%@NL@%
  12795. %@NL@%
  12796. %@CR:MCVE420A@%%@4@%In the above example, the altered modules (%@AS@%input%@AE@%, %@AS@%sort%@AE@%, and %@AS@%output%@AE@%) are%@EH@%
  12797. explicitly listed on the command line.%@NL@%
  12798. %@NL@%
  12799.      ILINK /e "link @%s.obj ; rc %s.exe" myproj%@NL@%
  12800. %@NL@%
  12801. %@CR:MCVE420B@%%@4@%In the example above, the characters %@AS@%%s%@AE@% are replaced by %@AI@%projname%@AE@% when the%@EH@%
  12802. command is carried out. If the incremental link fails, ILINK carries out the
  12803. commands %@AS@%link myproj.obj%@AE@% and %@AS@%rc myproj.exe%@AE@%.%@NL@%
  12804. %@NL@%
  12805.      ILINK /a /e "link @%s.lnk ; rc %s.exe" wizard%@NL@%
  12806. %@NL@%
  12807. %@CR:MCVE420C@%%@4@%In the final example above, the /a option directs ILINK to scan all files in%@EH@%
  12808. the project in order to discover which modules have changed. This example
  12809. also lists commands to be executed in case incremental linking fails.%@NL@%
  12810. %@NL@%
  12811. %@NL@%
  12812. %@CR:MCVE5000@%%@2@%%@AB@%14.5  How ILINK Works%@AE@%%@EH@%%@NL@%
  12813. %@NL@%
  12814. %@CR:MCVE5001@%%@4@%Instead of searching for records and resolving external references for the%@EH@%
  12815. entire program, ILINK carries out the following operations:%@NL@%
  12816. %@NL@%
  12817. %@CR:MCVE5002@%  1. ILINK replaces the portion of each module that has changed since the%@NL@%
  12818.      last linking (incremental or full linking).%@NL@%
  12819. %@NL@%
  12820.   2. ILINK alters relocation-table entries for any far (segmented) code%@NL@%
  12821.      symbols that have moved within a segment. For each reference to a far%@NL@%
  12822.      code symbol, such as a far function call, there is an entry in the%@NL@%
  12823.      relocation table in the executable file's header. The relocation table%@NL@%
  12824.      of the application contains full addresses. Therefore, by fixing%@NL@%
  12825.      relocation table entries for a code symbol, ILINK ensures that all%@NL@%
  12826.      references to the symbol will be correct.)%@NL@%
  12827. %@NL@%
  12828. %@CR:MCVE5003@%%@4@%ILINK makes no modification to modules that have not been changed since the%@EH@%
  12829. last linking.%@NL@%
  12830. %@NL@%
  12831. %@NL@%
  12832. %@CR:MCVE6000@%%@2@%%@AB@%14.6  Incremental Violations%@AE@%%@EH@%%@NL@%
  12833. %@NL@%
  12834. %@CR:MCVE6001@%%@4@%There are two kinds of ILINK failures: real errors and incremental%@EH@%
  12835. violations. Real errors are errors that will not be resolved by a full link,
  12836. such as undefined symbols or invalid .OBJ files. If ILINK detects a real
  12837. error, it displays %@AS@%ERROR%@AE@% with an explanation and returns a nonzero error
  12838. code to the operating system. Incremental violations consist of changes that
  12839. are beyond the scope of incremental linking, but can generally be resolved
  12840. by full linking.%@AS@%%@NL@%
  12841. %@NL@%
  12842. %@CR:MCVE6002@%%@4@%Section C.2%@BO:   ddc92@%, "LINK Error Messages," explains real errors in detail. The rest%@EH@%
  12843. of this section describes incremental violations.%@NL@%
  12844. %@NL@%
  12845. %@NL@%
  12846. %@CR:MCVE6100@%%@3@%%@AB@%14.6.1  Changing Libraries%@AE@%%@EH@%%@NL@%
  12847. %@NL@%
  12848. %@CR:MCVE6101@%%@4@%An incremental violation occurs when a library changes. Furthermore, if an%@EH@%
  12849. altered module shares a code segment with a library, ILINK needs access to
  12850. the library as well as to the new module.%@NL@%
  12851. %@NL@%
  12852. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12853. %@AI@%NOTE%@AE@%%@NL@%
  12854.    If you add a function, procedure, or subroutine call to a library that%@NL@%
  12855.    has never been called before, ILINK fails with an undefined-symbol error.%@NL@%
  12856.    Performing a full link should resolve this problem.%@NL@%
  12857. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12858. %@NL@%
  12859. %@NL@%
  12860. %@CR:MCVE6200@%%@3@%%@AB@%14.6.2  Exceeding Code/Data Padding%@AE@%%@EH@%%@NL@%
  12861. %@NL@%
  12862. %@CR:MCVE6201@%%@4@%An incremental violation will occur if two or more modules contribute to the%@EH@%
  12863. same physical segment and either module exceeds its padding. As discussed in
  12864. Section 14.2%@BO:   9fa9a@%, "Guidelines for Using ILINK," padding is the process of
  12865. adding filler bytes to the end of a module. The filler bytes serve as a
  12866. buffer zone whenever the module grows in size──that is, whenever the new
  12867. version of the module is larger than the old.%@NL@%
  12868. %@NL@%
  12869. %@NL@%
  12870. %@CR:MCVE6300@%%@3@%%@AB@%14.6.3  Moving/Deleting Data Symbols%@AE@%%@EH@%%@NL@%
  12871. %@NL@%
  12872. %@CR:MCVE6301@%%@4@%An incremental violation occurs if a data symbol is moved or deleted. To add%@EH@%
  12873. new data symbols without requiring a full link, add the new symbols at the
  12874. end of all other data symbols in the module.%@NL@%
  12875. %@NL@%
  12876. %@NL@%
  12877. %@CR:MCVE6400@%%@3@%%@AB@%14.6.4  Deleting Code Symbols%@AE@%%@EH@%%@NL@%
  12878. %@NL@%
  12879. %@CR:MCVE6401@%%@4@%You can move or add code symbols, but an incremental violation occurs if you%@EH@%
  12880. delete any code symbols from a module. Code symbols can be moved within a
  12881. module but cannot be moved between modules.%@NL@%
  12882. %@NL@%
  12883. %@NL@%
  12884. %@CR:MCVE6500@%%@3@%%@AB@%14.6.5  Changing Segment Definitions%@AE@%%@EH@%%@NL@%
  12885. %@NL@%
  12886. %@CR:MCVE6501@%%@4@%An incremental violation results if you add, delete, or change the order of%@EH@%
  12887. segment definitions. If you are programming in MASM, an incremental
  12888. violation will also result if you alter any %@AB@%GROUP%@AE@% directives.%@NL@%
  12889. %@NL@%
  12890. %@CR:MCVE6502@%%@4@%If you are programming with a high-level language, remember not to add or%@EH@%
  12891. delete modules between incremental links.%@NL@%
  12892. %@NL@%
  12893. %@NL@%
  12894. %@CR:MCVE6600@%%@3@%%@AB@%14.6.6  Adding CodeView Debugger Information%@AE@%%@EH@%%@NL@%
  12895. %@NL@%
  12896. %@CR:MCVE6601@%%@4@%If you included CodeView debugger information for a module the last time you%@EH@%
  12897. ran a full link (by compiling and linking with CodeView debugger support),
  12898. ILINK fully supports CodeView debugger information for the module. ILINK
  12899. maintains symbolic information for current symbols, and it adds information
  12900. for any new symbols. However, if you include CodeView debugger information
  12901. for a module that previously did not have CodeView debugger support, an
  12902. incremental violation results.%@NL@%
  12903. %@NL@%
  12904. %@NL@%
  12905. %@CR:MCVF0000@%%@1@%%@AB@%Chapter 15  Managing Libraries with LIB%@AE@%%@EH@%%@NL@%
  12906. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12907. %@NL@%
  12908. %@CR:MCVF0001@%%@4@%The Microsoft Library Manager (LIB) is a utility designed to help you%@EH@%
  12909. create, organize, and maintain run-time libraries. "Run-time" libraries are
  12910. collections of compiled or assembled functions that provide a common set of
  12911. useful routines. After you have linked a program with a run-time library
  12912. file, that program can call a run-time routine exactly as if the function
  12913. were included in the program. The call to the run-time routine is resolved
  12914. by finding that routine in the library file.%@NL@%
  12915. %@NL@%
  12916. %@CR:MCVF0002@%%@4@%Run-time libraries are created by combining separately compiled object files%@EH@%
  12917. into one library file. Library files are usually identified by their .LIB
  12918. extension, although other extensions are allowed.%@NL@%
  12919. %@NL@%
  12920. %@CR:MCVF0003@%%@4@%In addition to accepting DOS object files and library files, LIB can read%@EH@%
  12921. the contents of 286 XENIX(R) archives and Intel-style libraries and combine
  12922. their contents with DOS libraries. To see how you can add the contents of a
  12923. 286 XENIX archive or an Intel-style library to a DOS library, refer to
  12924. Section 15.2.8%@BO:   ab138@%, "Combining Libraries."%@NL@%
  12925. %@NL@%
  12926. %@CR:MCVF0004@%%@4@%Using LIB, you can create a new library file, add object files to an%@EH@%
  12927. existing library, delete library modules, replace library modules, and
  12928. create object files from library modules. LIB also lets you combine the
  12929. contents of two libraries into one library file.%@NL@%
  12930. %@NL@%
  12931. %@CR:MCVF0005@%%@4@%The command syntax is straightforward: you can give LIB all the input it%@EH@%
  12932. requires directly from the command line. You can also use one of the two
  12933. alternative methods of invoking LIB by responding to prompts or by creating
  12934. a response file, described in Sections 15.1.2%@BO:   a74a1@% and 15.1.3%@BO:   a8274@% below.%@NL@%
  12935. %@NL@%
  12936. %@NL@%
  12937. %@CR:MCVF1000@%%@2@%%@AB@%15.1  Managing Libraries%@AE@%%@EH@%%@NL@%
  12938. %@NL@%
  12939. %@CR:MCVF1001@%%@4@%You run LIB by typing the LIB command on the DOS command line. You can%@EH@%
  12940. specify the input required for this command in one of three ways:%@NL@%
  12941. %@NL@%
  12942. %@CR:MCVF1002@%  1. By placing it on the command line%@NL@%
  12943. %@NL@%
  12944.   2. By responding to prompts%@NL@%
  12945. %@NL@%
  12946.   3. By specifying a file containing responses to prompts (This type of file%@NL@%
  12947.      is known as a "response file.")%@NL@%
  12948. %@NL@%
  12949. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12950. %@AI@%NOTE%@AE@%%@NL@%
  12951.    Once an object file is incorporated into a library, it becomes an object%@NL@%
  12952.    "module." %@AB@%LIB%@AE@% makes a distinction between object files and object%@NL@%
  12953.    modules: an object "file" exists as an independent file, while an object%@NL@%
  12954.    "module" is part of a larger library file. An object file can have a full%@NL@%
  12955.    path name, including a drive designation, directory path name, and%@NL@%
  12956.    file-name extension (usually .OBJ). Object modules have only a name. For%@NL@%
  12957.    example, %@AS@%B:\RUN\SORT.OBJ%@AE@% is an object-file name, while %@AS@%SORT%@AE@% is an%@NL@%
  12958.    object-module name.%@NL@%
  12959. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12960. %@NL@%
  12961. %@NL@%
  12962. %@CR:MCVF1100@%%@3@%%@AB@%15.1.1  Managing Libraries with the LIB Command Line%@AE@%%@EH@%%@NL@%
  12963. %@NL@%
  12964. %@CR:MCVF1101@%%@4@%You can start LIB and specify all the input it needs from the command line.%@EH@%
  12965. In this case, the LIB command line has the following form:%@NL@%
  12966. %@NL@%
  12967.      %@AB@%LIB%@AE@% %@AI@%oldlibrary%@AE@% «%@AI@%options%@AE@%» «%@AI@%commands%@AE@%»«%@AB@%,%@AE@%«%@AI@%listfile%@AE@%»«%@AB@%,%@AE@%« %@AI@%newlibrary%@AE@%»»»«%@AB@%;%@AE@%»%@NL@%
  12968. %@NL@%
  12969. %@CR:MCVF1102@%%@4@%To tell LIB to use the default responses for the remaining fields, use a%@EH@%
  12970. semicolon (%@AB@%;%@AE@%) after any field except the %@AI@%oldlibrary%@AE@% field. The semicolon
  12971. should be the last character on the command line.%@NL@%
  12972. %@NL@%
  12973. %@CR:MCVF1103@%%@4@%Sections 15.1.1.1%@BO:   a3d1a@%-15.1.1.5 below describe the input you give in each%@EH@%
  12974. command-line field.%@NL@%
  12975. %@NL@%
  12976. %@CR:MCVF1110@%%@4@%%@AB@%15.1.1.1  Specifying the Library File%@AE@%%@EH@%%@NL@%
  12977. %@NL@%
  12978. %@CR:MCVF1111@%%@4@%%@AB@%Field%@AE@%%@EH@%%@NL@%
  12979. %@NL@%
  12980.      %@AI@%oldlibrary%@AE@%«%@AB@%;%@AE@%»%@NL@%
  12981. %@NL@%
  12982. %@CR:MCVF1112@%%@4@%The %@AI@%oldlibrary%@AE@% field allows you to specify the name of the existing library%@EH@%
  12983. to be used. Usually library files are named with the .LIB extension. You can
  12984. omit the .LIB extension when you give the library-file name since LIB
  12985. assumes that the file-name extension is .LIB. If your library file does not
  12986. have the .LIB extension, be sure to include the extension when you give the
  12987. library-file name. Otherwise, LIB cannot find the file.%@NL@%
  12988. %@NL@%
  12989. %@CR:MCVF1113@%%@4@%Path names are allowed with the library-file name. You can give LIB the path%@EH@%
  12990. name of a library file in another directory or on another disk. There is no
  12991. default for this field. LIB produces an error message if you do not give a
  12992. file name.%@NL@%
  12993. %@NL@%
  12994. %@CR:MCVF1114@%%@4@%If you give the name of a library file that does not exist, LIB displays the%@EH@%
  12995. following prompt:%@NL@%
  12996. %@NL@%
  12997.      %@AS@%Library file does not exist. Create?%@AE@%%@NL@%
  12998. %@NL@%
  12999. %@CR:MCVF1115@%%@4@%Type Y to create the library file, or N to terminate LIB. This message is%@EH@%
  13000. suppressed if the nonexistent library name you give is followed immediately
  13001. by commands, a comma, or a semicolon.%@NL@%
  13002. %@NL@%
  13003. %@CR:MCVF1116@%%@4@%If you type a library name and follow it immediately with a semicolon (%@AB@%;%@AE@%),%@EH@%
  13004. LIB performs only a consistency check on the given library. A consistency
  13005. check tells you whether all the modules in the library are in usable form.
  13006. LIB prints a message only if it finds an invalid object module; no message
  13007. appears if all modules are intact.%@NL@%
  13008. %@NL@%
  13009. %@CR:MCVF1120@%%@4@%%@AB@%15.1.1.2  Specifying Options%@AE@%%@EH@%%@NL@%
  13010. %@NL@%
  13011. %@CR:MCVF1121@%%@4@%%@AB@%Field%@AE@%%@EH@%%@NL@%
  13012. %@NL@%
  13013.      «%@AI@%options%@AE@%»%@NL@%
  13014. %@NL@%
  13015. %@CR:MCVF1122@%%@4@%The following list gives the options available and the function of each:%@EH@%%@NL@%
  13016. %@CR:MCVF1123@%%@NL@%
  13017. %@TH:   49   3277  2 28 48 @%
  13018. %@AB@%Option                      Function%@AE@%
  13019.  
  13020. %@AB@%/PA%@AE@%«%@AB@%GESIZE%@AE@%»%@AB@%:%@AE@%%@AI@%number%@AE@%          This option allows you to specify the
  13021.                             library-page size of a new library or change the
  13022.                             library-page size of an existing library. The
  13023.                             page size of a library affects the alignment of
  13024.                             modules stored in the library. Modules in the
  13025.                             library are always aligned to start at a
  13026.                             position that is a multiple of the page size (in
  13027.                             bytes) from the beginning of the file. The
  13028.                             default page size for a new library is 16 bytes.
  13029.                             See Section 15.2.11%@BO:   abfb6@%, "Setting the Library Page
  13030.                             Size," for more information. The abbreviation
  13031.                             for this option is /PA.
  13032.  
  13033. %@AB@%/NOI%@AE@%«%@AB@%GNORECASE%@AE@%»             This option tells LIB not to ignore case when
  13034.                             comparing symbols. By default, LIB ignores case.
  13035.                             Using this option allows symbols that are the
  13036.                             same except for case to be put in the same
  13037.                             library. The abbreviation for this option is
  13038.                             /NOI.
  13039.  
  13040.                             Note that if a library is built with /NOI, the
  13041.                             library is internally "marked" to indicate /NOI
  13042.                             is%@AB@%%@AE@% in effect. All libraries built with earlier
  13043.                             versions of LIB are not marked. If you combine
  13044.                             multiple libraries, and any one of them is
  13045.                             marked /NOI, then /NOI is assumed to be in
  13046.                             effect for the output library.
  13047.  
  13048. %@AB@%/I%@AE@%«%@AB@%GNORECASE%@AE@%»               This option tells LIB to ignore case when
  13049.                             comparing symbols, as LIB does by default. Use
  13050.                             this option when you are combining a library
  13051.                             that is marked /NOI with others that are
  13052.                             unmarked and want the new library to be
  13053.                             unmarked. (See the explanation for the /NOI
  13054.                             option above.) The abbreviation for this option
  13055.                             is /I.
  13056.  
  13057. %@AB@%/NOE%@AE@%«%@AB@%XTDICTIONARY%@AE@%»          This option is used to prevent LIB from creating
  13058.                             an extended dictionary. The extended dictionary
  13059.                             is used by LINK to speed up a library search.
  13060.                             Without an extended dictionary, the .LIB
  13061.                             extension is still a valid library, but LINK
  13062.                             takes longer to find modules in this file. Use
  13063.                             it if you get error messages %@AS@%U1172%@AE@% or %@AS@%U4158%@AE@%. The
  13064.                             option /NOE «XTDICTIONARY» also occurs in
  13065.                             LINK. In LINK the option means, "do not read an
  13066.                             extended dictionary."
  13067. %@TE:   49   3277  2 28 48 @%
  13068. %@NL@%
  13069. %@CR:MCVF1130@%%@4@%%@AB@%15.1.1.3  Giving LIB Commands%@AE@%%@EH@%%@NL@%
  13070. %@NL@%
  13071. %@CR:MCVF1131@%%@4@%%@AB@%Field%@AE@%%@EH@%%@NL@%
  13072. %@NL@%
  13073.      «%@AI@%commands%@AE@%»%@NL@%
  13074. %@NL@%
  13075. %@CR:MCVF1132@%%@4@%The %@AI@%commands%@AE@% field allows you to specify the command symbols for%@EH@%
  13076. manipulating modules. To use this field, type a command symbol (such as%@AB@%+%@AE@%, %@AB@%-%@AE@%,
  13077. %@AB@%-+%@AE@%, %@AB@%*%@AE@%, or %@AB@%-*%@AE@%), followed immediately by a module name or an object-file name.
  13078. You can specify more than one operation in this field in any order. LIB does
  13079. not make any changes to %@AI@%oldlibrary%@AE@% if you leave the %@AI@%commands%@AE@% field blank.%@NL@%
  13080. %@CR:MCVF1133@%%@NL@%
  13081. %@TH:   57   3628  3 28 48 @%
  13082. %@AB@%Command%@AE@%
  13083. %@AB@%Symbol                       Meaning%@AE@%
  13084.  
  13085. %@AB@%+%@AE@%                           The add command symbol. A plus sign makes an
  13086.                             object file the last module in the library file.
  13087.                             Immediately following the plus sign, give the
  13088.                             name of the object file. You may use path names
  13089.                             for the object file. LIB automatically supplies
  13090.                             the .OBJ extension so you can omit the extension
  13091.                             from the object-file name.
  13092.  
  13093.                             You can also use the plus sign to combine two
  13094.                             libraries. When you give a library name
  13095.                             following the plus sign, a copy of the contents
  13096.                             of the given library is added to the library
  13097.                             file being modified. You must include the .LIB
  13098.                             extension when you give a library-file name.
  13099.                             Otherwise, LIB uses the default .OBJ extension
  13100.                             when it looks for the file.
  13101.  
  13102. %@AB@%-%@AE@%                           The delete command symbol. A minus sign deletes
  13103.                             a module from the library file. Immediately
  13104.                             following the minus sign, give the name of the
  13105.                             module to be deleted. A module name has no path
  13106.                             name and no extension.
  13107.  
  13108. %@AB@%-+%@AE@%                          The replace command symbol. A minus sign
  13109.                             followed by a plus sign replaces a module in the
  13110.                             library. Following the replacement symbol, give
  13111.                             the name of the module to be replaced. Module
  13112.                             names have no path names and no extensions.
  13113.  
  13114.                             To replace a module, LIB deletes the given
  13115.                             module, then appends the object file having the
  13116.                             same name as the module. The object file is
  13117.                             assumed to have an .OBJ extension and to reside
  13118.                             in the current working directory.
  13119.  
  13120. %@AB@%*%@AE@%                           The copy command symbol. An asterisk followed by
  13121.                             a module name copies a module from the library
  13122.                             file into an object file of the same name. The
  13123.                             module remains in the library file. When LIB
  13124.                             copies the module to an object file, it adds to
  13125.                             the module name the .OBJ extension and the drive
  13126.                             designation and path name of the current working
  13127.                             directory, thus forming a complete object-file
  13128.                             name. You cannot override the .OBJ extension,
  13129.                             drive designation, or path name given to the
  13130.                             object file. However, you can later rename the
  13131.                             file or copy it to any location you like.
  13132.  
  13133. %@AB@%-*%@AE@%                          The move command symbol. A minus sign followed
  13134.                             moves an object module from the library file to
  13135.                             an object file. This operation is equivalent to
  13136.                             copying the module to an object file, as
  13137.                             described above, then deleting the module from
  13138.                             the library.
  13139. %@TE:   57   3628  3 28 48 @%
  13140. %@NL@%
  13141. %@CR:MCVF1140@%%@4@%%@AB@%15.1.1.4  Specifying a Cross-Reference-Listing File%@AE@%%@EH@%%@NL@%
  13142. %@NL@%
  13143. %@CR:MCVF1141@%%@4@%%@AB@%Field%@AE@%%@EH@%%@NL@%
  13144. %@NL@%
  13145.      «%@AI@%listfile%@AE@%»%@NL@%
  13146. %@NL@%
  13147. %@CR:MCVF1142@%%@4@%The %@AI@%listfile%@AE@% field allows you to specify a file name for a%@EH@%
  13148. cross-reference-listing file. You can specify a full path name for the
  13149. listing file to cause it to be created outside your current working
  13150. directory. You can give the listing file any name and any extension. LIB
  13151. does not supply a default extension if you omit the extension. The default
  13152. when you omit the response to this prompt is the special file named  NUL,
  13153. which tells LIB not to create a listing file.%@NL@%
  13154. %@NL@%
  13155. %@CR:MCVF1143@%%@4@%A cross-reference-listing file contains the following two lists:%@EH@%%@NL@%
  13156. %@NL@%
  13157. %@CR:MCVF1144@%  1. An alphabetical list of all public symbols in the library.%@NL@%
  13158. %@NL@%
  13159.      Each symbol name is followed by the module name in which it is%@NL@%
  13160.      referenced.%@NL@%
  13161. %@NL@%
  13162.   2. A list of the modules in the library.%@NL@%
  13163. %@NL@%
  13164.      Under each module name is an alphabetical listing of the public symbols%@NL@%
  13165.      defined in that module.%@NL@%
  13166. %@NL@%
  13167. %@CR:MCVF1150@%%@4@%%@AB@%15.1.1.5  Specifying an Output Library%@AE@%%@EH@%%@NL@%
  13168. %@NL@%
  13169. %@CR:MCVF1151@%%@4@%%@AB@%Field%@AE@%%@EH@%%@NL@%
  13170. %@NL@%
  13171.      «%@AI@%newlibrary%@AE@%»%@NL@%
  13172. %@NL@%
  13173. %@CR:MCVF1152@%%@4@%The %@AI@%newlibrary%@AE@% field allows you to specify the name of the new library file%@EH@%
  13174. that contains the specified changes. You need not give this name unless you
  13175. specify changes to the library in the %@AI@%commands%@AE@% field. The default is the
  13176. current library-file name.%@NL@%
  13177. %@NL@%
  13178. %@CR:MCVF1153@%%@4@%If you do not specify a new library-file name, the original, unmodified%@EH@%
  13179. library is saved in a library file with the same name but with a .BAK
  13180. extension replacing the .LIB extension.%@NL@%
  13181. %@NL@%
  13182. %@CR:MCVF1154@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  13183. %@NL@%
  13184.      LIB LANG-+HEAP;%@NL@%
  13185. %@NL@%
  13186. %@CR:MCVF1155@%%@4@%The example above uses the replace command symbol (%@AB@%-+%@AE@%) to instruct LIB to%@EH@%
  13187. replace the %@AS@%HEAP%@AE@% module in the library %@AS@%LANG.LIB%@AE@%. LIB deletes the %@AS@%HEAP%@AE@%
  13188. module from the library, then appends the object file %@AS@%HEAP.OBJ%@AE@% as a new
  13189. module in the library. The semicolon at the end of the command line tells
  13190. LIB to use the default responses for the remaining prompts. This means no
  13191. listing file is created and the changes are written to the original library
  13192. file instead of a new library file.%@NL@%
  13193. %@NL@%
  13194.      LIB LANG-HEAP+HEAP;%@NL@%
  13195. %@NL@%
  13196.      LIB LANG+HEAP-HEAP;%@NL@%
  13197. %@NL@%
  13198. %@CR:MCVF1156@%%@4@%The examples above perform the same function as the first example in this%@EH@%
  13199. section, but in two separate operations, using the add (%@AB@%+%@AE@%) and delete (%@AB@%-%@AE@%)
  13200. command symbols. The effect is the same for these examples because delete
  13201. operations are always carried out before add operations, regardless of the
  13202. order of the operations in the command line. This order of execution
  13203. prevents confusion when a new version of a module replaces an old version in
  13204. the library file.%@NL@%
  13205. %@NL@%
  13206.      LIB FOR;%@NL@%
  13207. %@NL@%
  13208. %@CR:MCVF1157@%%@4@%The example above causes LIB to perform a consistency check of the library%@EH@%
  13209. file %@AS@%FOR.LIB%@AE@%. No other action is performed. LIB displays any consistency
  13210. errors it finds and returns to the operating-system level.%@NL@%
  13211. %@NL@%
  13212.      LIB LANG,LCROSS.PUB%@NL@%
  13213. %@NL@%
  13214. %@CR:MCVF1158@%%@4@%This example tells LIB to perform a consistency check of the library file%@EH@%
  13215. %@AS@%LANG.LIB%@AE@% and then create a cross-reference-listing file named %@AS@%LCROSS.PUB%@AE@%.%@NL@%
  13216. %@NL@%
  13217.      LIB FIRST -*STUFF *MORE, ,SECOND%@NL@%
  13218. %@NL@%
  13219. %@CR:MCVF1159@%%@4@%This last example instructs LIB to move the module %@AS@%STUFF%@AE@% from the library%@EH@%
  13220. %@AS@%FIRST.LIB%@AE@% to an object file called %@AS@%STUFF.OBJ%@AE@%. The module %@AS@%STUFF%@AE@% is removed
  13221. from the library in the process. The module %@AS@%MORE%@AE@% is copied from the library
  13222. to an object file called %@AS@%MORE.OBJ%@AE@%; the module remains in the library. The
  13223. revised library is called %@AS@%SECOND.LIB%@AE@%. It contains all the modules in
  13224. %@AS@%FIRST.LIB%@AE@% except %@AS@%STUFF%@AE@%,  which was removed by using the move command symbol
  13225. (%@AB@%-*%@AE@%). The original library, %@AS@%FIRST.LIB%@AE@%, remains unchanged.%@NL@%
  13226. %@NL@%
  13227. %@NL@%
  13228. %@CR:MCVF1200@%%@3@%%@AB@%15.1.2  Managing Libraries with the LIB Prompts%@AE@%%@EH@%%@NL@%
  13229. %@NL@%
  13230. %@CR:MCVF1201@%%@4@%If you want to respond to individual prompts to give input to LIB, start LIB%@EH@%
  13231. at the DOS command level by typing LIB. The library manager prompts you for
  13232. the input it needs by displaying the following four messages, one at a time:%@NL@%
  13233. %@NL@%
  13234.      Library name:%@NL@%
  13235.      Operations:%@NL@%
  13236.      List file:%@NL@%
  13237.      Output library:%@NL@%
  13238. %@NL@%
  13239. %@CR:MCVF1202@%%@4@%LIB waits for you to respond to each prompt, then prints the next prompt.%@EH@%%@NL@%
  13240. %@NL@%
  13241. %@CR:MCVF1203@%%@4@%The responses you give to the LIB command prompts correspond to the fields%@EH@%
  13242. on the LIB command line. (See Section 15.1.1%@BO:   a39b0@% for a discussion of the LIB
  13243. command line.) The following list shows these correspondences:%@NL@%
  13244. %@NL@%
  13245. %@CR:MCVF1204@%%@AB@%Prompt                      Command-Line Field%@AE@%%@NL@%
  13246. %@NL@%
  13247. %@AS@%Library name%@AE@%                The %@AI@%oldlibrary%@AE@% field and the options (see%@NL@%
  13248.                             Sections 15.1.1.1%@BO:   a3d1a@% and 15.1.1.2%@BO:   a4409@%, respectively).%@NL@%
  13249.                             If you want to perform a consistency check on%@NL@%
  13250.                             the library, type a semicolon (%@AB@%;%@AE@%) immediately%@NL@%
  13251.                             after the library name.%@NL@%
  13252. %@NL@%
  13253. %@AS@%Operations%@AE@%                  Any of the commands allowed in the %@AI@%commands%@AE@%%@NL@%
  13254.                             field (see Section 15.1.1.3%@BO:   a522b@%).%@NL@%
  13255. %@NL@%
  13256. %@AS@%List file%@AE@%                   The %@AI@%listfile%@AE@% field (see Section 15.1.1.4%@BO:   a6337@%).%@NL@%
  13257. %@NL@%
  13258. %@AS@%Output library%@AE@%              The %@AI@%newlibrary%@AE@% field (see Section 15.1.1.5%@BO:   a67e6@%).%@NL@%
  13259. %@NL@%
  13260. %@CR:MCVF1210@%%@4@%%@AB@%15.1.2.1  Extending Lines%@AE@%%@EH@%%@NL@%
  13261. %@NL@%
  13262. %@CR:MCVF1211@%%@4@%If you have many operations to perform during a library session, use the%@EH@%
  13263. ampersand command symbol (%@AB@%&%@AE@%) to extend the operations line. Give the
  13264. ampersand symbol after an object-module or object-file name; do not put the
  13265. ampersand between an operation's symbol and a name.%@NL@%
  13266. %@NL@%
  13267. %@CR:MCVF1212@%%@4@%The ampersand causes LIB to repeat the %@AS@%Operations%@AE@% prompt, allowing you to%@EH@%
  13268. type more operations.%@NL@%
  13269. %@NL@%
  13270. %@CR:MCVF1220@%%@4@%%@AB@%15.1.2.2  Using Default Responses%@AE@%%@EH@%%@NL@%
  13271. %@NL@%
  13272. %@CR:MCVF1221@%%@4@%After any entry but the first, use a single semicolon (%@AB@%;%@AE@%) followed%@EH@%
  13273. immediately by a carriage return to select default responses to the
  13274. remaining prompts. You can use the semicolon command symbol with the
  13275. command-line and response-file methods of invoking LIB, but it is not
  13276. necessary since LIB supplies the default responses wherever you omit
  13277. responses.%@NL@%
  13278. %@NL@%
  13279. %@CR:MCVF1222@%%@4@%The following list shows the defaults for LIB prompts:%@EH@%%@NL@%
  13280. %@NL@%
  13281. %@CR:MCVF1223@%%@AB@%Prompt                      Default%@AE@%%@NL@%
  13282. %@NL@%
  13283. %@AS@%Operations%@AE@%                  No operation; no change to library file.%@NL@%
  13284. %@NL@%
  13285. %@AS@%List file%@AE@%                   The special file name NUL, which tells LIB not%@NL@%
  13286.                             to create a listing file.%@NL@%
  13287. %@NL@%
  13288. %@AS@%Output library%@AE@%              The current library name. Only if you specify at%@NL@%
  13289.                             least one operation at the %@AS@%Operations%@AE@% prompt%@NL@%
  13290.                             will this prompt appear.%@NL@%
  13291. %@NL@%
  13292. %@NL@%
  13293. %@CR:MCVF1300@%%@3@%%@AB@%15.1.3  Managing Libraries with a Response File%@AE@%%@EH@%%@NL@%
  13294. %@NL@%
  13295. %@CR:MCVF1301@%%@4@%To operate LIB with a response file, you must first set up the response file%@EH@%
  13296. and then type the following at the DOS command line:%@NL@%
  13297. %@NL@%
  13298.      %@AB@%LIB @%@AE@%%@AI@%responsefile%@AE@%%@NL@%
  13299. %@NL@%
  13300. %@CR:MCVF1302@%%@4@%The %@AI@%responsefile%@AE@% is the name of a response file. The response-file name can%@EH@%
  13301. be qualified with a drive and directory specification to name a response
  13302. file from a directory other than the current working directory.%@NL@%
  13303. %@NL@%
  13304. %@CR:MCVF1303@%%@4@%You can also enter the name of a response file at any position in a command%@EH@%
  13305. line or after any of the linker prompts. The input from the response file is
  13306. treated exactly as if it had been entered in command lines or after prompts.
  13307. A carriage-return and line-feed combination in the response file is treated
  13308. the same as pressing ENTER in response to a prompt or using a comma in a
  13309. command line.%@NL@%
  13310. %@NL@%
  13311. %@CR:MCVF1304@%%@4@%Before you use this method, you must set up a response file containing%@EH@%
  13312. responses to the LIB prompts. This method lets you conduct the library
  13313. session without typing responses to prompts at the keyboard.%@NL@%
  13314. %@NL@%
  13315. %@CR:MCVF1305@%%@4@%A response file has one text line for each prompt. Responses must appear in%@EH@%
  13316. the same order as the command prompts appear. Use command symbols in the
  13317. response file the same way you would use responses typed on the keyboard.
  13318. You can type an ampersand at the end of the response to the %@AS@%Operations%@AE@%
  13319. prompt and continue typing operations on the next line.%@NL@%
  13320. %@NL@%
  13321. %@CR:MCVF1306@%%@4@%When you run LIB with a response file, the prompts are displayed with the%@EH@%
  13322. responses from the response file. If the response file does not contain
  13323. responses for all the prompts, LIB uses the default responses.%@NL@%
  13324. %@NL@%
  13325. %@CR:MCVF1307@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  13326. %@NL@%
  13327.      LIBFOR%@NL@%
  13328.      +CURSOR+HEAP-HEAP*FOIBLES%@NL@%
  13329.      CROSSLST%@NL@%
  13330. %@NL@%
  13331. %@CR:MCVF1308@%%@4@%The contents of the above response file cause LIB to delete the module %@AS@%HEAP%@AE@%%@EH@%
  13332. from the %@AS@%LIBFOR.LIB%@AE@% library file, copy the module %@AS@%FOIBLES%@AE@%, place it in an
  13333. object file %@AS@%FOIBLES.OBJ%@AE@%, and append the object files %@AS@%CURSOR.OBJ%@AE@% and %@AS@%HEAP.OBJ%@AE@%
  13334. as the last two modules in the library. LIB creates a
  13335. cross-reference-listing file named %@AS@%CROSSLST%@AE@%.%@NL@%
  13336. %@NL@%
  13337. %@NL@%
  13338. %@CR:MCVF1400@%%@3@%%@AB@%15.1.4  Terminating the LIB Session%@AE@%%@EH@%%@NL@%
  13339. %@NL@%
  13340. %@CR:MCVF1401@%%@4@%You can press CTRL+C at any time during a library session to terminate the%@EH@%
  13341. session and return to DOS. If you notice that you have entered an incorrect
  13342. response at a previous prompt, you should press CTRL+C to exit LIB and begin
  13343. again. You can use the normal DOS editing keys to correct errors at the
  13344. current prompt.%@NL@%
  13345. %@NL@%
  13346. %@NL@%
  13347. %@CR:MCVF2000@%%@2@%%@AB@%15.2  Performing Library-Management Tasks with LIB%@AE@%%@EH@%%@NL@%
  13348. %@NL@%
  13349. %@CR:MCVF2001@%%@4@%You can perform a number of library-management functions with LIB, including%@EH@%
  13350. the following tasks:%@NL@%
  13351. %@NL@%
  13352. %@CR:MCVF2002@%  ■  Create a library file%@NL@%
  13353.   ■  Delete modules%@NL@%
  13354.   ■  Copy a module to a separate object file%@NL@%
  13355.   ■  Move a module out of a library and into an object file (extract module)%@NL@%
  13356.   ■  Append an object file as a module of a library%@NL@%
  13357.   ■  Replace a module in the library file with a new module%@NL@%
  13358.   ■  Produce a listing of all public symbols in the library modules%@NL@%
  13359. %@NL@%
  13360. %@CR:MCVF2003@%%@4@%For each library session, LIB reads and interprets the user's commands in%@EH@%
  13361. the order listed below. It determines whether a new library is being created
  13362. or an existing library is being examined or modified.%@NL@%
  13363. %@NL@%
  13364. %@CR:MCVF2004@%  1. LIB processes any deletion and move commands.%@NL@%
  13365. %@NL@%
  13366.      LIB does not actually delete modules from the existing file. Instead,%@NL@%
  13367.      it marks the selected modules for deletion, creates a new library file,%@NL@%
  13368.      and copies only the modules not marked for deletion into the new%@NL@%
  13369.      library file.%@NL@%
  13370. %@NL@%
  13371.   2. LIB processes any additional commands.%@NL@%
  13372. %@NL@%
  13373.      Like deletions, additions are not performed on the original library%@NL@%
  13374.      file. Instead, the additional modules are appended to the new library%@NL@%
  13375.      file. (If there were no deletion or move commands, a new library file%@NL@%
  13376.      would be created in the addition stage by copying the original library%@NL@%
  13377.      file.)%@NL@%
  13378. %@NL@%
  13379. %@CR:MCVF2005@%%@4@%As LIB carries out these commands, it reads the object modules in the%@EH@%
  13380. library, checks them for validity, and gathers the information necessary to
  13381. build a library index and a listing file. The linker uses the library index
  13382. to search the library.%@NL@%
  13383. %@NL@%
  13384. %@CR:MCVF2006@%%@4@%The listing file contains a list of all public symbols in the index and the%@EH@%
  13385. names of the modules in which they are defined. LIB produces the listing
  13386. file only if you ask for it during the library session.%@NL@%
  13387. %@NL@%
  13388. %@CR:MCVF2007@%%@4@%LIB never makes changes to the original library; it copies the library and%@EH@%
  13389. makes changes to the copy. Therefore, when you terminate LIB for any reason,
  13390. you do not lose your original file. It also means that when you run LIB,
  13391. enough space must be available on your disk for both the original library
  13392. file and the copy.%@NL@%
  13393. %@NL@%
  13394. %@CR:MCVF2008@%%@4@%When you change a library file, LIB lets you specify a different name for%@EH@%
  13395. the file containing the changes. If you use this option, the modified
  13396. library is stored under the name you give, and the original, unmodified
  13397. version is preserved under its own name. If you choose not to give a new
  13398. name, LIB gives the modified file the original library name, but keeps a
  13399. backup copy of the original library file. This copy has the extension .BAK
  13400. instead of .LIB.%@NL@%
  13401. %@NL@%
  13402. %@NL@%
  13403. %@CR:MCVF2100@%%@3@%%@AB@%15.2.1  Creating a Library File%@AE@%%@EH@%%@NL@%
  13404. %@NL@%
  13405. %@CR:MCVF2101@%%@4@%To create a new library file, give the name of the library file you want to%@EH@%
  13406. create in the %@AI@%oldlibrary%@AE@% field of the command line or at the %@AS@%Library name%@AE@%
  13407. prompt. LIB supplies the .LIB extension.%@NL@%
  13408. %@NL@%
  13409. %@CR:MCVF2102@%%@4@%The name of the new library file must not be the name of an existing file.%@EH@%
  13410. If it is, LIB assumes that you want to change the existing file. When you
  13411. give the name of a library file that does not currently exist, LIB displays
  13412. the following prompt:%@NL@%
  13413. %@NL@%
  13414.      %@AS@%Library file does not exist. Create?%@AE@%%@NL@%
  13415. %@NL@%
  13416. %@CR:MCVF2103@%%@4@%Type %@AS@%y%@AE@% to create the file, or %@AS@%n%@AE@% to terminate the library session. This%@EH@%
  13417. message is suppressed if the nonexistent library name you give is followed
  13418. immediately by commands, a comma, or a semicolon.%@NL@%
  13419. %@NL@%
  13420. %@CR:MCVF2104@%%@4@%You can specify a page size for the library when you create it. The default%@EH@%
  13421. page size is 16 bytes. See Section 15.2.11%@BO:   abfb6@%, "Setting the Library-Page Size,"
  13422. for a discussion of this option.%@NL@%
  13423. %@NL@%
  13424. %@CR:MCVF2105@%%@4@%Once you have given the name of the new library file, you can insert object%@EH@%
  13425. modules into the library by using the add +) in the %@AI@%commands%@AE@% field of the
  13426. command line or at the %@AS@%Operations%@AE@% prompt. You can also add the contents of
  13427. another library, if you wish. See Section 15.2.3%@BO:   aa52d@%, "Adding Library Modules,"
  13428. and Section 15.2.8%@BO:   ab138@%, "Combining Libraries," for a discussion of these
  13429. options.%@NL@%
  13430. %@NL@%
  13431. %@NL@%
  13432. %@CR:MCVF2200@%%@3@%%@AB@%15.2.2  Changing a Library File%@AE@%%@EH@%%@NL@%
  13433. %@NL@%
  13434. %@CR:MCVF2201@%%@4@%You can change an existing library file by giving the name of the library%@EH@%
  13435. file at the %@AS@%Library name%@AE@% prompt. All operations you specify in the
  13436. %@AI@%oldlibrary%@AE@% field of the command line or at the %@AS@%Operations%@AE@% prompt are
  13437. performed on that library.%@NL@%
  13438. %@NL@%
  13439. %@CR:MCVF2202@%%@4@%However, LIB lets you keep both the unchanged library file and the newly%@EH@%
  13440. changed version, if you like. You can do this by giving the name of a new
  13441. library file in the %@AI@%newlibrary%@AE@% field or at the %@AS@%Output library%@AE@% prompt. The
  13442. changed library file is stored under the new library-file name, while the
  13443. original library file remains unchanged.%@NL@%
  13444. %@NL@%
  13445. %@CR:MCVF2203@%%@4@%If you don't give a new file name, the changed version of the library file%@EH@%
  13446. replaces the original library file. Even in this case, LIB saves the
  13447. original, unchanged library file with the extension .BAK instead of .LIB.
  13448. Thus, at the end of the session you have two library files: the changed
  13449. version with the .LIB extension and the original, unchanged version with the
  13450. .BAK extension.%@NL@%
  13451. %@NL@%
  13452. %@NL@%
  13453. %@CR:MCVF2300@%%@3@%%@AB@%15.2.3  Adding Library Modules%@AE@%%@EH@%%@NL@%
  13454. %@NL@%
  13455. %@CR:MCVF2301@%%@4@%Use the add command symbol (%@AB@%+%@AE@%) in the %@AI@%commands%@AE@% field of the command line or%@EH@%
  13456. at the %@AS@%Operations%@AE@% prompt to add an object module to a library. Give the name
  13457. of the object file to be added without the .OBJ extension, immediately
  13458. following the plus sign.%@NL@%
  13459. %@NL@%
  13460. %@CR:MCVF2302@%%@4@%LIB strips the drive designation and the extension from the object-file%@EH@%
  13461. specification, leaving only the base name. This becomes the name of the
  13462. object module in the library. For example, if the object file %@AS@%B:\CURSOR%@AE@% is
  13463. added to a library file, the name of the corresponding object module is%@AE@%
  13464. %@AS@%CURSOR.%@AE@%%@NL@%
  13465. %@NL@%
  13466. %@CR:MCVF2303@%%@4@%Object modules are always added to the end of a library file.%@EH@%%@NL@%
  13467. %@NL@%
  13468. %@NL@%
  13469. %@CR:MCVF2400@%%@3@%%@AB@%15.2.4  Deleting Library Modules%@AE@%%@EH@%%@NL@%
  13470. %@NL@%
  13471. %@CR:MCVF2401@%%@4@%Use the delete command symbol (%@AB@%-+%@AE@%) in the %@AI@%commands%@AE@% field of the command line%@EH@%
  13472. or at the %@AS@%Operations%@AE@% prompt to delete an object module from a
  13473. library. After the minus sign, give the name of the module to be deleted. A
  13474. module name does not have a path name or extension; it is simply a name,
  13475. such as %@AS@%CURSOR%@AE@%.%@NL@%
  13476. %@NL@%
  13477. %@NL@%
  13478. %@CR:MCVF2500@%%@3@%%@AB@%15.2.5  Replacing Library Modules%@AE@%%@EH@%%@NL@%
  13479. %@NL@%
  13480. %@CR:MCVF2501@%%@4@%Use the replace command symbol (%@AB@%-+%@AE@%) in the %@AI@%commands%@AE@% field to replace a%@EH@%
  13481. module in the library. Following the replace command symbol, give the name
  13482. of the module to be replaced. Remember that module names do not have path
  13483. names or extensions.%@NL@%
  13484. %@NL@%
  13485. %@CR:MCVF2502@%%@4@%To replace a module, LIB deletes the given module, then appends the object%@EH@%
  13486. file having the same name as the module. The object file is assumed to have
  13487. an .OBJ extension and to reside in the current working directory.%@NL@%
  13488. %@NL@%
  13489. %@NL@%
  13490. %@CR:MCVF2600@%%@3@%%@AB@%15.2.6  Copying Library Modules%@AE@%%@EH@%%@NL@%
  13491. %@NL@%
  13492. %@CR:MCVF2601@%%@4@%To copy a module from the library file into an object file of the same name,%@EH@%
  13493. use the copy command symbol (%@AB@%*%@AE@%) followed by a module name in the %@AI@%commands%@AE@%
  13494. field. The module remains in the library file. When LIB copies the module to
  13495. an object file, it adds the .OBJ extension and the drive designation and
  13496. path name of the current working directory to the module name. This forms a
  13497. complete object-file name. You cannot override the .OBJ extension, drive
  13498. designation, or path name given to the object file, but you can later rename
  13499. the file or copy it to any location you like.%@NL@%
  13500. %@NL@%
  13501. %@NL@%
  13502. %@CR:MCVF2700@%%@3@%%@AB@%15.2.7  Moving Library Modules (Extracting)%@AE@%%@EH@%%@NL@%
  13503. %@NL@%
  13504. %@CR:MCVF2701@%%@4@%Use the move c field to move an object module from the library file to an%@EH@%
  13505. object file. This operation is equivalent to copying the module to an object
  13506. file, then deleting the module from the library.%@NL@%
  13507. %@NL@%
  13508. %@NL@%
  13509. %@CR:MCVF2800@%%@3@%%@AB@%15.2.8  Combining Libraries%@AE@%%@EH@%%@NL@%
  13510. %@NL@%
  13511. %@CR:MCVF2801@%%@4@%You can add another library by using the add command symbol (%@AB@%+%@AE@%) with a%@EH@%
  13512. library-file name instead of an object-file name in the %@AI@%commands%@AE@% field. In
  13513. the %@AI@%commands%@AE@% field or at the %@AS@%Operations%@AE@% prompt, give the add command symbol
  13514. (%@AB@%+%@AE@%) followed by the name of the library whose contents you wish to add to
  13515. the library being changed. When you use this option, you must include the
  13516. .LIB extension of the library-file name. Otherwise, LIB assumes that the
  13517. file is an object file and looks for the file with an .OBJ extension.%@NL@%
  13518. %@NL@%
  13519. %@CR:MCVF2802@%%@4@%In addition to DOS libraries as input, LIB also accepts 286 XENIX archives%@EH@%
  13520. and Intel-format libraries. Therefore, you can use LIB to convert libraries
  13521. from either of these formats to the DOS format.%@NL@%
  13522. %@NL@%
  13523. %@CR:MCVF2803@%%@4@%LIB adds the modules of the library to the end of the library being changed.%@EH@%
  13524. Note that the added library still exists as an independent library. LIB
  13525. copies the modules without deleting them.%@NL@%
  13526. %@NL@%
  13527. %@CR:MCVF2804@%%@4@%Once you have added the contents of a library or libraries, you can save the%@EH@%
  13528. new, combined library under a new name by giving a new name in the
  13529. %@AI@%newlibrary%@AE@% field of the command line or at the %@AS@%Output library%@AE@% prompt. If you
  13530. omit the %@AS@%Output library%@AE@% response, LIB saves the combined library under the
  13531. name of the original library being changed. The original library is saved
  13532. with the same base name and the extension .BAK.%@NL@%
  13533. %@NL@%
  13534. %@NL@%
  13535. %@CR:MCVF2900@%%@3@%%@AB@%15.2.9  Creating a Cross-Reference-Listing File%@AE@%%@EH@%%@NL@%
  13536. %@NL@%
  13537. %@CR:MCVF2901@%%@4@%Create a cross-reference-listing file by giving a name for the listing file%@EH@%
  13538. in the %@AI@%listfile%@AE@% field of the command line or at the %@AS@%List file%@AE@% prompt. If you
  13539. do not give a listing-file name, LIB uses the special file name NUL, which
  13540. means no listing file is created.%@NL@%
  13541. %@NL@%
  13542. %@CR:MCVF2902@%%@4@%You can give the listing file any name and any extension. To cause the%@EH@%
  13543. listing file to be created outside your current working directory, you can
  13544. specify a full path name, including drive designation. LIB does not supply a
  13545. default extension if you omit the extension.%@NL@%
  13546. %@NL@%
  13547. %@CR:MCVF2903@%%@4@%A cross-reference-listing file contains two lists. The first is an%@EH@%
  13548. alphabetical listing of all public symbols in the library. Each symbol name
  13549. is followed by the name of the module in which it is referenced.%@NL@%
  13550. %@NL@%
  13551. %@CR:MCVF2904@%%@4@%The second list is an alphabetical list of the modules in the library. Under%@EH@%
  13552. each module name is an alphabetical listing of the public symbols referenced
  13553. in that module.%@NL@%
  13554. %@NL@%
  13555. %@NL@%
  13556. %@CR:MCVF2A00@%%@3@%%@AB@%15.2.10  Performing Consistency Checks%@AE@%%@EH@%%@NL@%
  13557. %@NL@%
  13558. %@CR:MCVF2A01@%%@4@%When you give only a library name followed by a semicolon in the %@AI@%oldlibrary%@AE@%%@EH@%
  13559. field of the command line or at the %@AS@%Library name%@AE@% prompt, LIB performs a
  13560. consistency check, displaying messages about any errors it finds. No changes
  13561. are made to the library. It is not usually necessary to perform consistency
  13562. checks since LIB automatically checks object files for consistency before
  13563. adding them to the library.%@NL@%
  13564. %@NL@%
  13565. %@CR:MCVF2A02@%%@4@%To produce a cross-reference-listing file with a consistency check, invoke%@EH@%
  13566. LIB, specify the library name followed by a semicolon, and give the name of
  13567. the listing file. LIB then performs the consistency check and creates the
  13568. cross-reference-listing file.%@NL@%
  13569. %@NL@%
  13570. %@NL@%
  13571. %@CR:MCVF2B00@%%@3@%%@AB@%15.2.11  Setting the Library-Page Size%@AE@%%@EH@%%@NL@%
  13572. %@NL@%
  13573. %@CR:MCVF2B01@%%@4@%You can set the library-page size while you are creating a library, and you%@EH@%
  13574. can change the page size of an existing library by adding a page-size option
  13575. after the library-file name in the LIB command line or after the new
  13576. library-file name at the %@AS@%Library name%@AE@% prompt. The option has the following
  13577. form:%@NL@%
  13578. %@NL@%
  13579.      %@AB@%/PA%@AE@%«%@AB@%GESIZE%@AE@%» %@AB@%:%@AE@%%@AI@%number%@AE@%%@NL@%
  13580. %@NL@%
  13581. %@CR:MCVF2B02@%%@4@%The %@AI@%number%@AE@% specifies the new page size. It must be an integer value%@EH@%
  13582. representing a power of 2 between the values 16 and 32,768.%@NL@%
  13583. %@NL@%
  13584. %@CR:MCVF2B03@%%@4@%The page size of a library affects the alignment of modules stored in the%@EH@%
  13585. library. Modules in the library are always aligned to start at a position
  13586. that is a multiple of the page size (in bytes) from the beginning of the
  13587. file. The default page size is 16 bytes for a new library or the current
  13588. page size for an existing library.%@NL@%
  13589. %@NL@%
  13590. ───────────────────────────────────────────────────────────────────────────%@NL@%
  13591. %@AI@%NOTE%@AE@%%@NL@%
  13592.    Because of the indexing technique used by %@AB@%LIB%@AE@%, a library with a large page%@NL@%
  13593.    size can hold more modules than a library with a smaller page size.%@NL@%
  13594.    However, for each module in the library, an average of %@AI@%pagesize%@AE@%/2 bytes%@NL@%
  13595.    of storage space is wasted. In most cases, a small page size is%@NL@%
  13596.    advantageous; you should use a small page size unless you need to put a%@NL@%
  13597.    very large number of modules in a library.%@NL@%
  13598. %@NL@%
  13599.    Another consequence of this indexing technique is that the page size%@NL@%
  13600.    determines the maximum possible size of the %@AB@%.LIB%@AE@% file. Specifically,%@NL@%
  13601.    this limit is %@AI@%number%@AE@% %@AB@%*%@AE@% 65,536. For example, %@AS@%/P:16%@AE@% means that the %@AB@%.LIB%@AE@%%@NL@%
  13602.    file has to be smaller than 1 megabyte (16 %@AB@%*%@AE@% 65,536 bytes).%@NL@%
  13603. ───────────────────────────────────────────────────────────────────────────%@NL@%
  13604. %@NL@%
  13605. %@NL@%
  13606. %@CR:MCVG0000@%%@1@%%@AB@%Chapter 16  NMAKE%@AE@%%@EH@%%@NL@%
  13607. ───────────────────────────────────────────────────────────────────────────%@NL@%
  13608. %@NL@%
  13609. %@CR:MCVG0001@%%@4@%The Microsoft Program-Maintenance Utility (NMAKE) can save you time by%@EH@%
  13610. automating the process of updating project files. NMAKE compares the
  13611. modification dates for one set of files, the target files, to those of
  13612. another set of files, the dependent files. If any of the dependent files
  13613. have changed more recently than the target files, NMAKE executes a specified
  13614. series of commands.%@NL@%
  13615. %@NL@%
  13616. %@CR:MCVG0002@%%@4@%NMAKE is typically used by specifying a project's executable files as target%@EH@%
  13617. files and the project's source files as the dependent files. If any of the
  13618. source files have changed since the executable file was created, NMAKE can
  13619. issue a command to assemble or compile the changed source files and link
  13620. them into the executable file.%@NL@%
  13621. %@NL@%
  13622. %@CR:MCVG0003@%%@4@%NMAKE reads the target- and dependent-file specifications from a%@EH@%
  13623. "description file," also called a "makefile." The description file comprises
  13624. any number of description blocks. Each description block lists one or more
  13625. targets and the dependent files related to those targets. The block also
  13626. gives the commands that NMAKE must execute to bring the targets up to date.
  13627. The description file may also contain macros, inference rules, and
  13628. directives.%@NL@%
  13629. %@NL@%
  13630. %@NL@%
  13631. %@CR:MCVG1000@%%@2@%%@AB@%16.1  Invoking NMAKE%@AE@%%@EH@%%@NL@%
  13632. %@NL@%
  13633. %@CR:MCVG1001@%%@4@%Two methods for invoking NMAKE are available:%@EH@%%@NL@%
  13634. %@NL@%
  13635. %@CR:MCVG1002@%  1. Specify options, macro definitions, and the names of targets to be%@NL@%
  13636.      built on the DOS command line.%@NL@%
  13637. %@NL@%
  13638.   2. Specify options, macro definitions, and the names of targets to be%@NL@%
  13639.      built in a command file, and give the file name on the DOS command%@NL@%
  13640.      line.%@NL@%
  13641. %@NL@%
  13642. %@NL@%
  13643. %@CR:MCVG1100@%%@3@%%@AB@%16.1.1  Using a Command Line to Invoke NMAKE%@AE@%%@EH@%%@NL@%
  13644. %@NL@%
  13645. %@CR:MCVG1101@%%@4@%The syntax for invoking NMAKE from the command line is as follows:%@EH@%%@NL@%
  13646. %@NL@%
  13647.      NMAKE «%@AI@%options%@AE@%» «%@AI@%macrodefinitions%@AE@%» «%@AI@%target...%@AE@%» «%@AI@%filename%@AE@%»%@NL@%
  13648. %@NL@%
  13649. %@CR:MCVG1102@%%@4@%The %@AI@%options%@AE@% field specifies options that modify the action of NMAKE.%@EH@%
  13650. (Options are not required.) They are described in Section 16.2%@BO:   adfed@%.%@NL@%
  13651. %@NL@%
  13652. %@CR:MCVG1103@%%@4@%The optional %@AI@%macrodefinitions%@AE@% field lists macro definitions for NMAKE to%@EH@%
  13653. use. Macros provide a convenient method for replacing a string of text in
  13654. the description file. Macro definitions that contain spaces must be enclosed
  13655. by quotation marks. Macros are discussed in Section 16.3.2%@BO:   b1bf8@%.%@NL@%
  13656. %@NL@%
  13657. %@CR:MCVG1104@%%@4@%The optional %@AI@%target...%@AE@% field specifies the name of one or more targets to%@EH@%
  13658. build. If you do not list any targets, NMAKE builds the first target in the
  13659. description file.%@NL@%
  13660. %@NL@%
  13661. %@CR:MCVG1105@%%@4@%The optional %@AI@%filename%@AE@% field gives the name of the description file from%@EH@%
  13662. which NMAKE reads target- and dependent-file specifications and commands. A
  13663. better way of designating the description file is to use the /F option
  13664. (described in Section 16.2%@BO:   adfed@%). By default, NMAKE looks for a file named
  13665. MAKEFILE in the current directory. If MAKEFILE does not exist, NMAKE uses
  13666. the %@AI@%filename%@AE@% field; it interprets the first string on the command line that
  13667. is not an option or macro definition as the name of the description file,
  13668. provided its file-name extension isn't listed in the .SUFFIXES list. (See
  13669. Section 16.3.5%@BO:   b8373@% for more information on the .SUFFIXES list.)%@NL@%
  13670. %@NL@%
  13671. ───────────────────────────────────────────────────────────────────────────%@NL@%
  13672. %@AI@%NOTE%@AE@%%@NL@%
  13673.    Unless you use the /F option, NMAKE always searches for a file named%@NL@%
  13674.    MAKEFILE in the current directory.%@NL@%
  13675. ───────────────────────────────────────────────────────────────────────────%@NL@%
  13676. %@NL@%
  13677. %@CR:MCVG1106@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  13678. %@NL@%
  13679.      NMAKE /S "program = flash" sort.exe search.exe%@NL@%
  13680. %@NL@%
  13681. %@CR:MCVG1107@%%@4@%This example invokes NMAKE with the /S option, a macro assigning %@AS@%flash%@AE@% to%@EH@%
  13682. %@AS@%program%@AE@%, and two targets, %@AS@%sort.exe%@AE@% and %@AS@%search.exe%@AE@%. By default, NMAKE uses
  13683. the file named MAKEFILE as the description file.%@NL@%
  13684. %@NL@%
  13685. %@NL@%
  13686. %@CR:MCVG1200@%%@3@%%@AB@%16.1.2  Using a Command File to Invoke NMAKE%@AE@%%@EH@%%@NL@%
  13687. %@NL@%
  13688. %@CR:MCVG1201@%%@4@%To invoke NMAKE with a command file, first create the command file, then%@EH@%
  13689. issue a command with the following syntax:%@NL@%
  13690. %@NL@%
  13691.      NMAKE @%@AI@%commandfile%@AE@%%@NL@%
  13692. %@NL@%
  13693. %@CR:MCVG1202@%%@4@%Here %@AI@%commandfile%@AE@% is the name of a file containing the same information that%@EH@%
  13694. would be specified on the command line: options, macro definitions, and
  13695. targets. The command file is not the same as the description file.%@NL@%
  13696. %@NL@%
  13697. %@CR:MCVG1203@%%@4@%A command file is useful for invoking NMAKE with a long string of%@EH@%
  13698. command-line arguments, such as macro definitions, that might exceed the DOS
  13699. limit of 128 characters. NMAKE treats line breaks that occur between
  13700. arguments as spaces. Macro definitions can span multiple lines by ending
  13701. each line except the last with a backslash ( \). Macro definitions that
  13702. contain spaces must be enclosed by quotation marks, just as if they were
  13703. entered directly on the command line.%@NL@%
  13704. %@NL@%
  13705. %@CR:MCVG1204@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  13706. %@NL@%
  13707.      /S "program \%@NL@%
  13708.      = flash" sort.exe search.exe%@NL@%
  13709. %@NL@%
  13710. %@CR:MCVG1205@%%@4@%Assume a file named %@AS@%update%@AE@% contains the text above. The command below%@EH@%
  13711. invokes NMAKE with the description file MAKEFILE, the /S option, the macro
  13712. definition %@AS@%program = flash%@AE@%, and the targets %@AS@%sort.exe%@AE@% and %@AS@%search.exe%@AE@%. Note
  13713. that the backslash ending the line allows the macro definition to span two
  13714. lines.%@NL@%
  13715. %@NL@%
  13716.      NMAKE @update%@NL@%
  13717. %@NL@%
  13718. %@NL@%
  13719. %@CR:MCVG2000@%%@2@%%@AB@%16.2  NMAKE Options%@AE@%%@EH@%%@NL@%
  13720. %@NL@%
  13721. %@CR:MCVG2001@%%@4@%NMAKE accepts a number of command-line options, which are listed below. You%@EH@%
  13722. may specify options in uppercase or lowercase and use either a slash or
  13723. dash. For example, -B, /B, -b, and /b all represent the same option.%@NL@%
  13724. %@CR:MCVG2002@%%@NL@%
  13725. %@TH:   64   3395  2 27 49 @%
  13726. %@CR:MCVG3252@%%@AB@%Option                     Action%@AE@%
  13727.  
  13728. /A                         Executes commands to build all the targets
  13729.                            requested even if they are not out of date.
  13730.  
  13731. /C                         Suppresses the NMAKE copyright message and
  13732.                            prevents nonfatal error or warning messages from
  13733.                            being displayed.
  13734.  
  13735. /D                         Displays the modification date of each file when
  13736.                            the date is checked.
  13737.  
  13738. /E                         Causes environment variables to override macro
  13739.                            definitions within description files.
  13740.  
  13741. /F %@AI@%filename%@AE@%                Specifies %@AI@%filename%@AE@% as the name of the description
  13742.                            file to use. If a dash (-) is entered instead of
  13743.                            a file name, NMAKE accepts input from the
  13744.                            standard input device instead of using a
  13745.                            description file.
  13746.  
  13747.                            If /F is not specified, NMAKE uses the file named
  13748.                            MAKEFILE as the description file. If MAKEFILE
  13749.                            does not exist, NMAKE uses the first string on
  13750.                            the command line that is not an option or macro
  13751.                            definition as the name of the file, provided the
  13752.                            extension is not listed in the .SUFFIXES list
  13753.                            (see Section 16.3.5%@BO:   b8373@%).
  13754.  
  13755. /I                         Ignores exit codes (also called return or
  13756.                            "errorlevel" codes) returned by programs called
  13757.                            from the NMAKE description file. NMAKE continues
  13758.                            executing the rest of the description file
  13759.                            despite the errors.
  13760.  
  13761. /N                         Displays the commands from the description file
  13762.                            that NMAKE would execute but does not execute
  13763.                            these commands. This option is useful for
  13764.                            checking which targets are out of date and for
  13765.                            debugging description files.
  13766.  
  13767. /P                         Prints all macro definitions and target
  13768.                            descriptions.
  13769.  
  13770. /Q                         Returns a zero status code if the target is up to
  13771.                            date and
  13772.                            a nonzero status code if it is not. This option
  13773.                            is useful when invoking NMAKE from within a batch
  13774.                            file.
  13775.  
  13776. /R                         Ignores inference rules and macros contained in
  13777.                            the TOOLS.INI file.
  13778.  
  13779. /S                         Does not display commands as they are executed.
  13780.  
  13781. /T                         Changes the modification dates for out-of-date
  13782.                            target files to the current date. The file
  13783.                            contents are not
  13784.                            modified.
  13785.  
  13786. /X %@AI@%filename%@AE@%                Sends all error output to %@AI@%filename%@AE@%, which can be
  13787.                            either a file or a device. If a dash (-) is
  13788.                            entered instead of a file name, the error output
  13789.                            is sent to the standard output device.
  13790. %@TE:   64   3395  2 27 49 @%
  13791. %@NL@%
  13792. %@CR:MCVG2003@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  13793. %@NL@%
  13794.      NMAKE /f quick /c f1 f2%@NL@%
  13795. %@NL@%
  13796. %@CR:MCVG2004@%%@4@%The example above causes NMAKE to execute the commands in the description%@EH@%
  13797. file %@AS@%quick%@AE@% to update the targets %@AS@%f1%@AE@% and %@AS@%f2%@AE@%. The /c option prevents NMAKE
  13798. from displaying nonfatal error messages and warnings.%@NL@%
  13799. %@NL@%
  13800.      NMAKE  /D /N f1 f1.mak%@NL@%
  13801. %@NL@%
  13802. %@CR:MCVG2005@%%@4@%In the example above, NMAKE updates the target %@AS@%f1%@AE@%. If the current directory%@EH@%
  13803. does not contain a file named MAKEFILE, NMAKE reads the file %@AS@%f1.mak%@AE@% as the
  13804. description file. The /D option displays the modification date of each file
  13805. and the /N option displays the commands without executing them.%@NL@%
  13806. %@NL@%
  13807. %@NL@%
  13808. %@CR:MCVG3000@%%@2@%%@AB@%16.3  Description Files%@AE@%%@EH@%%@NL@%
  13809. %@NL@%
  13810. %@CR:MCVG3001@%%@4@%NMAKE reads a description file to determine what to do. The description file%@EH@%
  13811. may contain any number of description blocks, along with macros, inference
  13812. rules, and directives. These can be in any order.%@NL@%
  13813. %@NL@%
  13814. %@CR:MCVG3002@%%@4@%When NMAKE runs, it builds the first target in the description file by%@EH@%
  13815. default. You can override this default by specifying on the command line the
  13816. names of the targets to build.%@NL@%
  13817. %@NL@%
  13818. %@CR:MCVG3003@%%@4@%The sections that follow describe the elements of a description file.%@EH@%%@NL@%
  13819. %@NL@%
  13820. %@NL@%
  13821. %@CR:MCVG3100@%%@3@%%@AB@%16.3.1  Description Blocks%@AE@%%@EH@%%@NL@%
  13822. %@NL@%
  13823. %@CR:MCVG3101@%%@4@%An NMAKE description file contains one or more description blocks. Each has%@EH@%
  13824. the following form:%@NL@%
  13825. %@NL@%
  13826.     %@CR:MCVG3102@%%@AI@%target... %@AB@%:%@AE@% «%@AI@%dependent%@AE@%...» «%@AB@%;%@AE@% %@AI@%command%@AE@%»«%@AB@%#%@AE@%%@AI@%comment%@AE@%»%@NL@%
  13827.     «%@AI@%command%@AE@%» «%@AB@%#%@AE@%%@AI@%comment%@AE@%» «%@AB@%#%@AE@%%@AI@%comment%@AE@%»  |  «%@AI@%command%@AE@%»      .      .      .%@NL@%
  13828. %@NL@%
  13829. %@CR:MCVG3103@%%@4@%The file to be updated is target; %@AI@%dependent%@AE@% is a file upon which %@AI@%target%@AE@%%@EH@%
  13830. depends; %@AI@%command%@AE@% target; and %@AI@%comment%@AE@% documents what is happening. The line
  13831. containing %@AI@%target%@AE@% and %@AI@%dependent%@AE@% is called the dependency line because %@AI@%target%@AE@%
  13832. depends on %@AI@%dependent%@AE@%.%@NL@%
  13833. %@NL@%
  13834. %@CR:MCVG3104@%%@4@%Each component of a description block is discussed below.%@EH@%%@NL@%
  13835. %@NL@%
  13836. %@CR:MCVG3110@%%@4@%%@AB@%The Target Field%@AE@%%@EH@%%@NL@%
  13837. %@NL@%
  13838. %@CR:MCVG3111@%%@4@%The %@AI@%target%@AE@% field specifies the name of one or more files to update. If you%@EH@%
  13839. specify more than one file, separate the file names by a space. The first
  13840. target name must start in the first column of the line; it may not be
  13841. preceded by any tabs or spaces. Note that the target need not be a file; it
  13842. may be a pseudotarget, as described in Section 16.3.5%@BO:   b8373@%. A target name can
  13843. have a complete path specification, i.e., drive: path filename.ext. If a
  13844. target name is a single letter, then a space must be inserted before the ":"
  13845. to avoid confusion with a path name, such as "a:".%@NL@%
  13846. %@NL@%
  13847. %@CR:MCVG3120@%%@4@%%@AB@%The Dependent Field%@AE@%%@EH@%%@NL@%
  13848. %@NL@%
  13849. %@CR:MCVG3121@%%@4@%The %@AI@%dependent%@AE@% field lists one or more files on which the target depends. If%@EH@%
  13850. you specify more than one file, separate the file names by a space. You can
  13851. specify directories for NMAKE to search for the dependent files by using the
  13852. following form:%@NL@%
  13853. %@NL@%
  13854.      %@AI@%target%@AE@% : {%@AI@%directory1%@AE@%;%@AI@%directory2...%@AE@%}%@AI@%dependent%@AE@%%@NL@%
  13855. %@NL@%
  13856. %@CR:MCVG3122@%%@4@%NMAKE searches the current directory first, then %@AI@%directory1%@AE@%, %@AI@%directory2%@AE@%, and%@EH@%
  13857. so on. If %@AI@%dependent%@AE@% cannot be found in any of these directories, NMAKE looks
  13858. for an inference rule to create the dependent in the current directory. See
  13859. Section 16.3.3%@BO:   b4fe0@% for more information on inference rules.%@NL@%
  13860. %@NL@%
  13861. %@CR:MCVG3123@%%@4@%In the following example, NMAKE first searches the current directory for%@EH@%
  13862. %@AS@%pass.obj%@AE@%, then the %@AS@%\src\alpha%@AE@% directory, and finally the %@AS@%d:\proj%@AE@% directory:%@NL@%
  13863. %@NL@%
  13864.      forward.exe : {\src\alpha;d:\proj}pass.obj%@NL@%
  13865. %@NL@%
  13866. %@CR:MCVG3130@%%@4@%%@AB@%TheCommand Field%@AE@%%@EH@%%@NL@%
  13867. %@NL@%
  13868. %@CR:MCVG3131@%%@4@%The %@AI@%command%@AE@% is used to update the target. This can be any command that can%@EH@%
  13869. be issued on the DOS command line. A semicolon must precede the command if
  13870. it is given on the same line as the target and dependent files. Commands may
  13871. be placed on separate lines following the dependency line, but each line
  13872. must start with at least one space or tab character. Blank lines may be
  13873. intermixed with commands. A long command may span several lines if each line
  13874. ends with a backslash (\). If no commands are specified, NMAKE looks for an
  13875. inference rule to build the target.%@NL@%
  13876. %@NL@%
  13877. %@CR:MCVG3140@%%@4@%%@AB@%The Comment Field%@AE@%%@EH@%%@NL@%
  13878. %@NL@%
  13879. %@CR:MCVG3141@%%@4@%NMAKE considers any text between a number sign (#) and a new-line character%@EH@%
  13880. to be a comment and ignores it. You may place a comment on a line by itself
  13881. or at the end of any line except a command line. In the command section of
  13882. the description file, comments must start in the first column.%@NL@%
  13883. %@NL@%
  13884. %@CR:MCVG3150@%%@4@%%@AB@%Wild-Card Characters%@AE@%%@EH@%%@NL@%
  13885. %@NL@%
  13886. %@CR:MCVG3151@%%@4@%You can use the DOS wild-card characters (* and ?) when specifying target-%@EH@%
  13887. and dependent-file names. NMAKE expands wild cards in target names when it
  13888. reads the description file. It expands wild cards in the dependent names
  13889. when it builds the target. For example, the following description block
  13890. compiles all source files with the .C extension:%@NL@%
  13891. %@NL@%
  13892.      astro.exe : *.c%@NL@%
  13893.           QCL *.c%@NL@%
  13894. %@NL@%
  13895. %@CR:MCVG3160@%%@4@%%@AB@%Escape Character%@AE@%%@EH@%%@NL@%
  13896. %@NL@%
  13897. %@CR:MCVG3161@%%@4@%You can use a caret (^) to escape any DOS or OS/2 file-name character in a%@EH@%
  13898. description file, so that the character takes on its literal meaning and
  13899. does not have any special significance to NMAKE. Specifically, the caret
  13900. escapes the following characters:%@NL@%
  13901. %@NL@%
  13902.      %@CR:MCVG3162@%%@4@%# ( ) $ ^ \ { } ! @ -%@EH@%%@NL@%
  13903. %@NL@%
  13904. %@CR:MCVG3163@%%@4@%For example, NMAKE interprets the specification%@EH@%%@NL@%
  13905. %@NL@%
  13906.      big^#.c%@NL@%
  13907. %@NL@%
  13908. %@CR:MCVG3164@%%@4@%as the file name%@EH@%%@NL@%
  13909. %@NL@%
  13910.      big#.c%@NL@%
  13911. %@NL@%
  13912. %@CR:MCVG3165@%%@4@%Using the caret, you can include a literal new-line character in a%@EH@%
  13913. description file. This capability is primarily useful in macro definitions,
  13914. as in the following example:%@NL@%
  13915. %@NL@%
  13916.      XYZ=abc^%@NL@%
  13917.      def%@NL@%
  13918. %@NL@%
  13919. %@CR:MCVG3166@%%@4@%NMAKE interprets this example as if you had assigned to the XYZ macro the%@EH@%
  13920. C-style string %@AS@%abc\ndef%@AE@%. Note that this effect differs from the use of the
  13921. backslash (\) to continue a line. A new-line character that follows a
  13922. backslash is replaced with a space.%@NL@%
  13923. %@NL@%
  13924. %@CR:MCVG3167@%%@4@%NMAKE ignores a caret that is not followed by any of the characters%@EH@%
  13925. mentioned above, as in the following:%@NL@%
  13926. %@NL@%
  13927.      mno ^: def%@NL@%
  13928. %@NL@%
  13929. %@CR:MCVG3168@%%@4@%In this case, NMAKE ignores the caret and treats the line as%@EH@%%@NL@%
  13930. %@NL@%
  13931.      mno : def%@NL@%
  13932. %@NL@%
  13933. %@CR:MCVG3169@%%@4@%Carets that appear within quotation marks are not treated as escape%@EH@%
  13934. characters.%@NL@%
  13935. %@NL@%
  13936. %@CR:MCVG3170@%%@4@%%@AB@%16.3.1.2  Modifying Commands%@AE@%%@EH@%%@NL@%
  13937. %@NL@%
  13938. %@CR:MCVG3171@%%@4@%Three different characters may be placed in front of a command to modify its%@EH@%
  13939. effect. The character must be preceded by at least one space, and spaces may
  13940. separate the character from the command. You may use more than one character
  13941. to modify a single command. The characters are listed below.%@NL@%
  13942. %@CR:MCVG3172@%%@NL@%
  13943. %@TH:   42   2184  2 27 49 @%
  13944. %@AB@%Character                  Action%@AE@%
  13945.  
  13946. Dash (-)                   Turns off error checking for the command. If the
  13947.                            dash is followed by a number, NMAKE halts only if
  13948.                            the error level returned by the command is
  13949.                            greater than the number. In the following
  13950.                            example, if the program %@AS@%flash%@AE@% returned an error
  13951.                            code NMAKE would not halt, but would continue to
  13952.                            execute commands:
  13953.  
  13954.                            %@AS@%light.lst:light.txt%@AE@%
  13955.                            %@AS@%  -flash light.txt%@AE@%
  13956.  
  13957. At sign(@)                 Prevents NMAKE from displaying the command as it
  13958.                            executes. In the example below, NMAKE does not
  13959.                            display the ECHO command line:
  13960.  
  13961.                            %@AS@%sort.exe:sort.obj%@AE@%
  13962.                            %@AS@%   @ECHO sorting%@AE@%
  13963.  
  13964.                            The output of the ECHO command, however, appears
  13965.                            as usual. (This modifier does not work with DOS
  13966.                            2.1.)
  13967.  
  13968. Exclamation                Causes the command to be executed for each
  13969. point (!)                  dependent file if the command uses one of the
  13970.                            special macros $? or $**. The $? macro refers to
  13971.                            all dependent files that are out of date with
  13972.                            respect to the target, while $** refers to all
  13973.                            dependent files in the description block. (See
  13974.                            Section 16.3.2%@BO:   b1bf8@% for more information on macros.)
  13975.                            For example,
  13976.  
  13977.                            %@AS@%print: hop.asm skip.bas jump.c%@AE@%
  13978.                            %@AS@%   !print $** lpt1:%@AE@%
  13979.  
  13980.                            causes the following three commands to be
  13981.                            generated:
  13982.  
  13983.                            %@AS@%print hop.asm lpt1:%@AE@%
  13984.                            %@AS@%print skip.bas lpt1:%@AE@%
  13985.                            %@AS@%print jump.c lpt1:
  13986. %@TE:   42   2184  2 27 49 @%
  13987. %@NL@%
  13988. %@CR:MCVG3180@%%@4@%%@AB@%16.3.1.3  Specifying a Target in Multiple Description Blocks%@AE@%%@EH@%%@NL@%
  13989. %@NL@%
  13990. %@CR:MCVG3181@%%@4@%You can specify more than one description block for the same target by using%@EH@%
  13991. two colons (::) as the separator instead of one. For example:%@NL@%
  13992. %@NL@%
  13993.      target.lib :: a.asm b.asm c.asm%@NL@%
  13994.         ML a.asm b.asm c.asm%@NL@%
  13995.         LIB target -+a.obj -+b.obj -+c.obj;%@NL@%
  13996.      target.lib :: d.c e.c%@NL@%
  13997.         QCL /c d.c e.c%@NL@%
  13998.         LIB target -+d.obj -+e.obj;%@NL@%
  13999. %@NL@%
  14000. %@CR:MCVG3182@%%@4@%These two description blocks both update the library named %@AS@%target.lib%@AE@%. If%@EH@%
  14001. any of the assembly-language files have changed more recently than the
  14002. library file, NMAKE executes the commands in the first block to assemble the
  14003. source files and update the library. Similarly, if any of the C-language
  14004. files have changed, NMAKE executes the second group of commands that compile
  14005. the C files and then update the library.%@NL@%
  14006. %@NL@%
  14007. %@CR:MCVG3183@%%@4@%If you use a single colon in the above example, NMAKE issues an error%@EH@%
  14008. message. It is legal, however, to use single colons if commands are listed
  14009. in only one block. In this case, dependency lines are cumulative. For
  14010. example,%@NL@%
  14011. %@NL@%
  14012.      target: jump.bas%@NL@%
  14013.      target: up.c%@NL@%
  14014.        %@AI@%commands%@AE@%%@NL@%
  14015. %@NL@%
  14016. %@CR:MCVG3184@%%@4@%is equivalent to%@EH@%%@NL@%
  14017. %@NL@%
  14018.      target: jump.bas up.c%@NL@%
  14019.        %@AI@%commands%@AE@%%@NL@%
  14020. %@NL@%
  14021. %@NL@%
  14022. %@CR:MCVG3200@%%@3@%%@AB@%16.3.2  Macros%@AE@%%@EH@%%@NL@%
  14023. %@NL@%
  14024. %@CR:MCVG3201@%%@4@%Macros provide a convenient way to replace a string in the description file%@EH@%
  14025. with another string. The text is automatically replaced each time NMAKE is
  14026. invoked. This feature makes it easy to change text used throughout the
  14027. description file without having to edit every line that uses the text.%@NL@%
  14028. %@NL@%
  14029. %@CR:MCVG3202@%%@4@%Macros can be used in a variety of situations, including the following:%@EH@%%@NL@%
  14030. %@NL@%
  14031. %@CR:MCVG3203@%  ■  To create a standard description file for several projects. The macro%@NL@%
  14032.      represents the file names used in commands. These file names are then%@NL@%
  14033.      defined when you run NMAKE. When you switch to a different project,%@NL@%
  14034.      changing the macro changes the file names NMAKE uses throughout the%@NL@%
  14035.      description file.%@NL@%
  14036. %@NL@%
  14037.   ■  To control the options that NMAKE passes to the compiler, assembler, or%@NL@%
  14038.      linker. When you use a macro to specify the options, you can quickly%@NL@%
  14039.      change the options used throughout the description file in one easy%@NL@%
  14040.      step.%@NL@%
  14041. %@NL@%
  14042. %@CR:MCVG3210@%%@4@%%@AB@%16.3.2.1  Macro Definitions%@AE@%%@EH@%%@NL@%
  14043. %@NL@%
  14044. %@CR:MCVG3211@%%@4@%A macro definition uses the following form:%@EH@%%@NL@%
  14045. %@NL@%
  14046.      %@AI@%macroname%@AE@% = %@AI@%string%@AE@%%@NL@%
  14047. %@NL@%
  14048. %@CR:MCVG3212@%%@4@%The %@AI@%macroname%@AE@% may be any combination of alphanumeric characters and the%@EH@%
  14049. underscore (_) character. The %@AI@%string%@AE@% may be any valid string.%@NL@%
  14050. %@NL@%
  14051. %@CR:MCVG3213@%%@4@%You can define macros on the NMAKE command line or in the description file.%@EH@%
  14052. Because of the way DOS parses command lines, the rules for the two methods
  14053. are slightly different.%@NL@%
  14054. %@NL@%
  14055. %@CR:MCVG3220@%%@4@%%@AB@%Defining Macros in Description Files%@AE@%%@EH@%%@NL@%
  14056. %@NL@%
  14057. %@CR:MCVG3221@%%@4@%In NMAKE description files, define each macro on a separate line. The first%@EH@%
  14058. character of the macro name must be the first character on the line. NMAKE
  14059. ignores spaces following %@AI@%macroname%@AE@% or preceding %@AI@%string%@AE@%. The %@AI@%string%@AE@% may be a
  14060. null string and may contain embedded spaces. Do not enclose %@AI@%string%@AE@% in
  14061. quotation marks; NMAKE will consider them part of the string.%@NL@%
  14062. %@NL@%
  14063. %@CR:MCVG3230@%%@4@%%@AB@%Defining Macros on the NMAKE Command Line%@AE@%%@EH@%%@NL@%
  14064. %@NL@%
  14065. %@CR:MCVG3231@%%@4@%On the command line, no spaces may surround the equal sign. Spaces cause DOS%@EH@%
  14066. to treat %@AI@%macroname%@AE@% and %@AI@%string%@AE@% as separate tokens. Strings that contain
  14067. embedded spaces must be enclosed in double quotation marks. Alternatively,
  14068. you can enclose the entire macro definition──%@AI@%macroname%@AE@% and %@AI@%string%@AE@%──in
  14069. quotation marks. The %@AI@%string%@AE@% may be a null string. C command line macro
  14070. definitions override definitions of the same macro in the description file.%@NL@%
  14071. %@NL@%
  14072. %@CR:MCVG3232@%%@4@%After you have defined a macro, use the following to include it in a%@EH@%
  14073. dependency line or command:%@NL@%
  14074. %@NL@%
  14075.      $(%@AI@%macroname%@AE@%)%@NL@%
  14076. %@NL@%
  14077. %@CR:MCVG3233@%%@4@%The parentheses are not required if %@AI@%macroname%@AE@% is only one character long. If%@EH@%
  14078. you want to use a dollar sign ($) in the file but do not want to invoke a
  14079. macro, enter two dollar signs ($$), or use the caret (^) as an escape
  14080. character preceding the dollar sign.%@NL@%
  14081. %@NL@%
  14082. %@CR:MCVG3234@%%@4@%When NMAKE runs, it replaces all occurrences of $(%@AI@%macroname%@AE@%) with %@AI@%string%@AE@%. If%@EH@%
  14083. the macro is undefined──that is, if its name does not appear to the left of
  14084. an equal sign in the file or on the NMAKE command line, NMAKE treats it as a
  14085. null string. Once a macro is defined, the only way to cancel its definition
  14086. is to use the %@AB@%!UNDEF%@AE@% directive (see Section 16.3.4%@BO:   b66d0@%).%@NL@%
  14087. %@NL@%
  14088. %@CR:MCVG3235@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  14089. %@NL@%
  14090. %@CR:MCVG3236@%%@4@%Assume the following text is in a file named MAKEFILE:%@EH@%%@NL@%
  14091. %@NL@%
  14092.      program = flash%@NL@%
  14093.      c = LINK%@NL@%
  14094.      options =%@NL@%
  14095. %@NL@%
  14096.      $(program).exe : $(program).obj%@NL@%
  14097.         $c  $(options)  $(program).obj;%@NL@%
  14098. %@NL@%
  14099. %@CR:MCVG3237@%%@4@%When you invoke NMAKE, it interprets the description block as the following:%@EH@%%@NL@%
  14100. %@NL@%
  14101.      flash.exe : flash.obj%@NL@%
  14102.         LINK    flash.obj;%@NL@%
  14103. %@NL@%
  14104. %@CR:MCVG3240@%%@4@%%@AB@%16.3.2.1  Macro Substitutions%@AE@%%@EH@%%@NL@%
  14105. %@NL@%
  14106. %@CR:MCVG3241@%%@4@%Just as macros allow you to substitute text in a description file, you can%@EH@%
  14107. also substitute text within a macro itself. Use the following form:%@NL@%
  14108. %@NL@%
  14109.      $(%@AI@%macroname%@AE@%:%@AI@%string1%@AE@% = %@AI@%string2%@AE@%)%@NL@%
  14110. %@NL@%
  14111. %@CR:MCVG3242@%%@4@%Every occurrence of %@AI@%string1%@AE@% is replaced by %@AI@%string2%@AE@% in the macro %@AI@%macroname%@AE@%.%@EH@%
  14112. Spaces between the colon and %@AI@%string1%@AE@% are considered part of %@AI@%string1%@AE@%. Any
  14113. spaces following %@AI@%string1%@AE@% or preceding %@AI@%string2%@AE@% are ignored. If %@AI@%string2%@AE@% is a
  14114. null string, all occurrences of %@AI@%string1%@AE@% are deleted from the %@AI@%macroname%@AE@%
  14115. macro.%@NL@%
  14116. %@NL@%
  14117. %@CR:MCVG3243@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  14118. %@NL@%
  14119.      SRCS = prog.c sub1.c sub2.c%@NL@%
  14120. %@NL@%
  14121.      DUP : $(SRCS)%@NL@%
  14122.          echo $(srcs)%@NL@%
  14123.          echo $(srcs:.c=.obj)%@NL@%
  14124. %@NL@%
  14125. %@CR:MCVG3244@%%@4@%Note that the special macro $** stands for the names of all the dependent%@EH@%
  14126. files (see Section 16.3.2.3%@BO:   b4c9e@%). If the description file above is invoked with
  14127. a command line that specifies both targets, NMAKE will execute the following
  14128. commands:%@NL@%
  14129. %@NL@%
  14130.          echo prog.c sub1.c sub2.c%@NL@%
  14131.      prog.c sub1.c sub2.c%@NL@%
  14132.          echo prog.obj sub1.obj sub2.obj%@NL@%
  14133.      prog.obj sub1.obj sub2.obj%@NL@%
  14134. %@NL@%
  14135. %@CR:MCVG3245@%%@4@%The macro substitution does not alter the definition of the macro %@AS@%SRCS%@AE@%, but%@EH@%
  14136. replaces the listed characters. When NMAKE builds the target %@AS@%prog.exe%@AE@%, it
  14137. picks up the definition for the special macro $** (that is, the list of
  14138. dependents) from the dependency line, which specifies the macro substitution
  14139. in %@AS@%SRCS%@AE@%. The same is true for the second target, %@AS@%DUP%@AE@%. In this case, however,
  14140. no macro substitution is requested, so %@AS@%SRCS%@AE@% retains its original value, and
  14141. $** represents the names of the C source files.%@NL@%
  14142. %@NL@%
  14143. %@CR:MCVG3250@%%@4@%%@AB@%16.3.2.2  Special Macros%@AE@%%@EH@%%@NL@%
  14144. %@NL@%
  14145. %@CR:MCVG3251@%%@4@%Several macros have special meaning. These macros are listed below with%@EH@%
  14146. their values:%@NL@%
  14147. %@NL@%
  14148. %@TH:   46   2323  2 27 49 @%
  14149. %@AB@%Macro                      Value%@AE@%
  14150.  
  14151. $*                         The target name with the extension deleted.
  14152.  
  14153. $@                         The full name of the current target.
  14154.  
  14155. $**                        The complete list of dependent files.
  14156.  
  14157. $<                         The dependent file that is out of date with
  14158.                            respect to the target (evaluated only for
  14159.                            inference rules).
  14160.  
  14161. $?                         The list of dependents that are out of date with
  14162.                            respect to the target.
  14163.  
  14164. $$@                        The target NMAKE is currently evaluating. This is
  14165.                            a dynamic dependency parameter that can be used
  14166.                            only in dependency lines. See "Examples," below,
  14167.                            for a typical use of this macro.
  14168.  
  14169. $(CC)                      The command to invoke the C compiler. By default,
  14170.                            NMAKE predefines this macro as %@AS@%CC = cl%@AE@%, which
  14171.                            invokes the Microsoft C Optimizing Compiler. To
  14172.                            redefine the macro to invoke the QuickC compiler,
  14173.                            use
  14174.  
  14175.                            %@AS@%CC = qcl%@AE@%
  14176.  
  14177.                            You might want to place the above definition in
  14178.                            your TOOLS.INI file to avoid having to redefine
  14179.                            it for each description file.
  14180.  
  14181. $(AS)                      The command that invokes the Microsoft Macro
  14182.                            Assembler. NMAKE predefines this macro as
  14183.                            %@AS@%AS = masm%@AE@%.
  14184.  
  14185. $(MAKE)                    The name with which the NMAKE utility was
  14186.                            invoked. This macro is used to invoke NMAKE
  14187.                            recursively. It causes the line on which it
  14188.                            appears to be executed even if the /N option is
  14189.                            on. You may redefine this macro if you want to
  14190.                            execute another program.
  14191.  
  14192. $(MAKEFLAGS)               The NMAKE options currently in effect. If you
  14193.                            invoke NMAKE recursively, you should use the
  14194.                            command: %@AS@%$(MAKE)%@AE@%. You cannot redefine this macro.
  14195. %@TE:   46   2323  2 27 49 @%
  14196. %@NL@%
  14197. %@CR:MCVG3253@%%@4@%You can append characters to any of the first six macros in the above list%@EH@%
  14198. to modify its meaning. Appending a D specifies the directory part of the
  14199. file name only, an F specifies the file name, a B specifies just the base
  14200. name, and an R specifies the complete file name without the extension. If
  14201. you add one of these characters, you must enclose the macro name in
  14202. parentheses. (The special macros $$@ and $** are the only exceptions to the
  14203. rule that macro names more than one character long must be enclosed in
  14204. parentheses.)%@NL@%
  14205. %@NL@%
  14206. %@CR:MCVG3254@%%@4@%For example, assume that $@ has the value %@AS@%C:\SOURCE\PROG\SORT.OBJ%@AE@%. The list%@EH@%
  14207. below shows the effect the special characters have when combined with $@:%@NL@%
  14208. %@NL@%
  14209. %@CR:MCVG3255@%%@AB@%Macro                      Value%@AE@%%@NL@%
  14210. %@NL@%
  14211. $(@D)                      %@AS@%C:\SOURCE\PROG%@AE@%%@NL@%
  14212. %@NL@%
  14213. $(@F)                      %@AS@%SORT.OBJ%@AE@%%@NL@%
  14214. %@NL@%
  14215. $(@B)                      %@AS@%SORT%@AE@%%@NL@%
  14216. %@NL@%
  14217. $(@R)                      %@AS@%C:\SOURCE\PROG\SORT%@AE@%%@NL@%
  14218. %@NL@%
  14219. %@CR:MCVG3256@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  14220. %@NL@%
  14221.      trig.lib : sin.obj cos.obj arctan.obj%@NL@%
  14222.              !LIB trig.lib -+$?;%@NL@%
  14223. %@NL@%
  14224. %@CR:MCVG3257@%%@4@%In the example above, the macro $? represents the names of all dependents%@EH@%
  14225. that are more recent than the target. The exclamation point causes NMAKE to
  14226. execute the LIB command once for each dependent in the list. As a result of
  14227. this description, the LIB command is executed up to three times, each time
  14228. replacing a module with a newer version.%@NL@%
  14229. %@NL@%
  14230.      # Include files depend on versions in current directory%@NL@%
  14231.      DIR=c:\include%@NL@%
  14232.      $(DIR)\globals.h : globals.h%@NL@%
  14233.           COPY globals.h $@%@NL@%
  14234.      $(DIR)\types.h : types.h%@NL@%
  14235.           COPY types.h $@%@NL@%
  14236.      $(DIR)\macros.h : macros.h%@NL@%
  14237.           COPY macros.h $@%@NL@%
  14238. %@NL@%
  14239. %@CR:MCVG3258@%%@4@%This example shows the use of NMAKE to update a group of include files. In%@EH@%
  14240. the description file above, each of the files %@AS@%globals.h%@AE@%, %@AS@%types.h%@AE@%, and
  14241. %@AS@%macros.h%@AE@% in the directory %@AS@%c:\include%@AE@% depends on its counterpart in the
  14242. current directory. If one of the include files is out of date, NMAKE
  14243. replaces it with the file of the same name from the current directory.%@NL@%
  14244. %@NL@%
  14245. %@CR:MCVG3259@%%@4@%The description file below, which uses the special macro $$@, is equivalent.%@EH@%%@NL@%
  14246. %@NL@%
  14247.      # Include files depend on versions in current directory%@NL@%
  14248.      DIR=c:\include%@NL@%
  14249.      $(DIR)\globals.h $(DIR)\types.h $(DIR)\macros.h: $$(@F)%@NL@%
  14250.           !COPY $? $@%@NL@%
  14251. %@NL@%
  14252. %@CR:MCVG325A@%%@4@%In this example, the special macro $$(@F) signifies the file name (without%@EH@%
  14253. the directory) of the current target.%@NL@%
  14254. %@NL@%
  14255. %@CR:MCVG325B@%%@4@%When NMAKE executes the description, it evaluates the three targets, one at%@EH@%
  14256. a time, with respect to their dependents. Thus, NMAKE first checks whether
  14257. %@AS@%c:\include\globals.h%@AE@% is out of date compared with %@AS@%globals.h%@AE@% in the current
  14258. directory. If so, it executes the command to copy the dependent file
  14259. %@AS@%globals.h%@AE@% to the target. NMAKE repeats the procedure for the other two
  14260. targets. Note that in the command line, the macro $? refers to the dependent
  14261. for this target. The macro $@ means the full name of the target.%@NL@%
  14262. %@NL@%
  14263. %@CR:MCVG3260@%%@4@%%@AB@%16.3.2.3  Precedence of Macro Definitions%@AE@%%@EH@%%@NL@%
  14264. %@NL@%
  14265. %@CR:MCVG3261@%%@4@%If the same macro is defined in more than one place, the rule with the%@EH@%
  14266. highest priority is used. The priority from highest to lowest is as follows:%@NL@%
  14267. %@NL@%
  14268. %@CR:MCVG3262@%  1. Definitions on the command line%@NL@%
  14269. %@NL@%
  14270.   2. Definitions in the description file or in an include file%@NL@%
  14271. %@NL@%
  14272.   3. Definitions by an environment variable%@NL@%
  14273. %@NL@%
  14274.   4. Definitions in the TOOLS.INI file%@NL@%
  14275. %@NL@%
  14276.   5. Predefined macros such as CC and AS%@NL@%
  14277. %@NL@%
  14278. %@CR:MCVG3263@%%@4@%If NMAKE is invoked with the /E option, which causes environment variables%@EH@%
  14279. to override macro definitions, macros defined by environment variables take
  14280. precedence over those defined in a description file.%@NL@%
  14281. %@NL@%
  14282. %@NL@%
  14283. %@CR:MCVG3300@%%@3@%%@AB@%16.3.3  Inference Rules%@AE@%%@EH@%%@NL@%
  14284. %@NL@%
  14285. %@CR:MCVG3301@%%@4@%Inference rules are templates that NMAKE uses to generate files with a given%@EH@%
  14286. extension. When NMAKE encounters a description block with no commands, it
  14287. looks for an inference rule that specifies how to create the target from the
  14288. dependent files, given the two file extensions. Similarly, if a dependent
  14289. file does not exist, NMAKE looks for an inference rule that specifies how to
  14290. create the dependent from another file with the same base name.%@NL@%
  14291. %@NL@%
  14292. %@CR:MCVG3302@%%@4@%The use of inference rules eliminates the need to put the same commands in%@EH@%
  14293. several description blocks. For example, you can use inference rules to
  14294. specify a single QCL command that changes any C source file (which has an
  14295. extension of .C) to an object file (which has an extension of .OBJ).%@NL@%
  14296. %@NL@%
  14297. %@CR:MCVG3303@%%@4@%Inference rules have the following form:%@EH@%%@NL@%
  14298. %@NL@%
  14299.      .%@AI@%fromext%@AE@%.%@AI@%toext%@AE@%:%@NL@%
  14300.             %@AI@%command%@AE@%%@NL@%
  14301.              «%@AI@%command%@AE@%»%@NL@%
  14302.              .%@NL@%
  14303.              .%@NL@%
  14304.              .%@NL@%
  14305. %@NL@%
  14306. %@CR:MCVG3304@%%@4@%In this format, %@AI@%command%@AE@% specifies one of the commands involved in converting%@EH@%
  14307. a file with the extension %@AI@%fromext%@AE@% to a file with the extension %@AI@%toext%@AE@%. Using
  14308. the earlier example of converting C source files to object files, the
  14309. inference rule looks as follows:%@NL@%
  14310. %@NL@%
  14311.      .C.OBJ:%@NL@%
  14312.         QCL -c $<;%@NL@%
  14313. %@NL@%
  14314. %@CR:MCVG3305@%%@4@%The special macro $< represents the name of a dependent that is out of date%@EH@%
  14315. relative to the target.%@NL@%
  14316. %@NL@%
  14317. %@CR:MCVG3310@%%@4@%%@AB@%Path Specifications%@AE@%%@EH@%%@NL@%
  14318. %@NL@%
  14319. %@CR:MCVG3311@%%@4@%You can specify a single path for each of the extensions, using the%@EH@%
  14320. following form:%@NL@%
  14321. %@NL@%
  14322.      {%@AI@%frompath%@AE@%}.%@AI@%fromext%@AE@%{%@AI@%topath%@AE@%}.%@AI@%toext%@AE@%%@NL@%
  14323.             %@AI@%commands%@AE@%%@NL@%
  14324. %@NL@%
  14325. %@CR:MCVG3312@%%@4@%NMAKE takes the files with the %@AI@%fromext%@AE@% extension it finds in the directory%@EH@%
  14326. specified by %@AI@%frompath%@AE@% and uses %@AI@%commands%@AE@% to create files with the %@AI@%toext%@AE@%
  14327. extension in the directory specified by %@AI@%topath%@AE@%.%@NL@%
  14328. %@NL@%
  14329. %@CR:MCVG3313@%%@4@%If NMAKE finds a description block without commands, it looks for an%@EH@%
  14330. inference rule that matches both extensions. NMAKE searches for inference
  14331. rules in the following order:%@NL@%
  14332. %@NL@%
  14333. %@CR:MCVG3314@%  1. In the current description file.%@NL@%
  14334. %@NL@%
  14335.   2. In the tools-initialization file, TOOLS.INI. NMAKE first looks for the%@NL@%
  14336.      TOOLS.INI file in the current working directory and then in the%@NL@%
  14337.      directory indicated by the INIT environment variable. If it finds the%@NL@%
  14338.      file, NMAKE looks for the inference rules following the line that%@NL@%
  14339.      begins with the tag [nmake]. This begins a section that can contain all%@NL@%
  14340.      default macros, .SUFFIXES lists, and inference rules.%@NL@%
  14341. %@NL@%
  14342. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14343. %@AI@%NOTE%@AE@%%@NL@%
  14344.    NMAKE applies an inference rule only if the base name of the file it is%@NL@%
  14345.    trying to create matches the base name of a file that already exists.%@NL@%
  14346.    In effect, this means that inference rules are useful only when there is%@NL@%
  14347.    a one-to-one correspondence between the files with the "from" extension%@NL@%
  14348.    and the files with the "to" extension. You cannot, for example, define an%@NL@%
  14349.    inference rule that inserts a number of modules into a library.%@NL@%
  14350. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14351. %@NL@%
  14352. %@CR:MCVG3320@%%@4@%%@AB@%Predefined Inference Rules%@AE@%%@EH@%%@NL@%
  14353. %@NL@%
  14354. %@CR:MCVG3321@%%@4@%NMAKE uses three predefined inference rules, summarized in Table 16.1. Note%@EH@%
  14355. that these rules use the macro CC, which invokes the Microsoft C Optimizing
  14356. Compiler by default. If you plan to rely on inference rules to build your
  14357. targets, you should redefine CC to invoke the QuickC compiler, as shown in
  14358. the list in Section 16.3.2.3%@BO:   b4c9e@%.%@NL@%
  14359. %@NL@%
  14360. %@CR:MCVGT100@%%@4@%%@AB@%Table 16.1  Predefined Inference Rules%@AE@%%@EH@%%@NL@%
  14361. %@NL@%
  14362. %@AB@%Inference           Rule                  Command        Default Action%@AE@%%@NL@%
  14363. %@NL@%
  14364. .c.obj              $(CC) $(CFLAGS)       %@AS@%/c $*.c        CL /c $*.c%@AE@%%@NL@%
  14365. .c.exe              $(CC) $(CFLAGS)       %@AS@%$*.c           CL $*.c%@AE@%%@NL@%
  14366. .asm.obj            $(AS) $(AFLAGS)       %@AS@%$*;            masm $*;%@AE@%%@NL@%
  14367. %@NL@%
  14368. %@CR:MCVG3322@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  14369. %@NL@%
  14370.      .OBJ.EXE:%@NL@%
  14371.         LINK $<;%@NL@%
  14372. %@NL@%
  14373.      EXAMPLE1.EXE: EXAMPLE1.OBJ%@NL@%
  14374. %@NL@%
  14375.      EXAMPLE2.EXE: EXAMPLE2.OBJ%@NL@%
  14376.         LINK /CO EXAMPLE2,,,LIBV3.LIB%@NL@%
  14377. %@NL@%
  14378. %@CR:MCVG3323@%%@4@%In the sample description file above, the first line defines an inference%@EH@%
  14379. rule that executes the LINK command on the second line to create an
  14380. executable file whenever a change is made in the corresponding object file.
  14381. The file name in the inference rule is specified with the special macro $<
  14382. so that the rule applies to any .OBJ file that has an out-of-date executable
  14383. file.%@NL@%
  14384. %@NL@%
  14385. %@CR:MCVG3324@%%@4@%When NMAKE does not find any commands in the first description block, it%@EH@%
  14386. checks for a rule that may apply and finds the rule defined on the first two
  14387. lines of the description file. NMAKE applies the rule, replacing the $<
  14388. macro with %@AS@%EXAMPLE1.OBJ%@AE@% when it executes the command, so that the LINK
  14389. command becomes%@NL@%
  14390. %@NL@%
  14391.      LINK EXAMPLE1.OBJ;%@NL@%
  14392. %@NL@%
  14393. %@CR:MCVG3325@%%@4@%NMAKE does not search for an inference rule when examining the second%@EH@%
  14394. description block because a command is explicitly given.%@NL@%
  14395. %@NL@%
  14396. %@NL@%
  14397. %@CR:MCVG3400@%%@3@%%@AB@%16.3.4  Directives%@AE@%%@EH@%%@NL@%
  14398. %@NL@%
  14399. %@CR:MCVG3401@%%@4@%Using directives, you can construct description files that are similar to%@EH@%
  14400. batch files. NMAKE provides directives that specify conditional execution of
  14401. commands, display error messages, include the contents of other files, and
  14402. turn on or off some of NMAKE's options.%@NL@%
  14403. %@NL@%
  14404. %@CR:MCVG3402@%%@4@%Each directive begins with an exclamation point (!) in the first column of%@EH@%
  14405. the description file. Spaces can be placed between the exclamation point and
  14406. the directive keyword. The list below describes the directives.%@NL@%
  14407. %@NL@%
  14408. %@CR:MCVG3403@%%@NL@%
  14409. %@TH:   52   3548  2 27 49 @%
  14410. %@AB@%Directive                           Description%@AE@%
  14411.  
  14412. %@AB@%!IF%@AE@% %@AI@%expression%@AE@%                      Executes the statements between the %@AB@%!IF%@AE@%
  14413.                                     keyword and the next %@AB@%!ELSE%@AE@% or %@AB@%!ENDIF%@AE@%
  14414.                                     directive if %@AI@%constantexpression%@AE@%
  14415.                                     evaluates to a nonzero value.
  14416.  
  14417. %@AB@%!ELSE%@AE@%                               Executes the statements between the%@AB@%!ELSE%@AE@%
  14418.                                     and %@AB@%!ENDIF%@AE@% directives if the statements
  14419.                                     preceding the%@AB@%!ELSE%@AE@% directive were not
  14420.                                     executed.
  14421.  
  14422. %@AB@%!ENDIF%@AE@%                              Marks the end of the %@AB@%!IF%@AE@%, %@AB@%!IFDEF%@AE@%, or
  14423.                                     %@AB@%!IFNDEF%@AE@% block of statements.
  14424.  
  14425. %@AB@%!IFDEF%@AE@% %@AI@%macroname%@AE@%                    Executes the statements between
  14426.                                     the%@AB@%!IFDEF%@AE@% keyword and the next%@AB@%!ELSE%@AE@% or
  14427.                                     %@AB@%!ENDIF%@AE@% directive if %@AI@%macroname%@AE@% is defined
  14428.                                     in the description file. NMAKE considers
  14429.                                     a macro with a null value to be defined.
  14430.  
  14431. %@AB@%!IFNDEF%@AE@% %@AI@%macroname%@AE@%                   Executes the statements between the
  14432.                                     %@AB@%!IFNDEF%@AE@% keyword and the next %@AB@%!ELSE%@AE@% or
  14433.                                     %@AB@%!ENDIF%@AE@% directive if %@AI@%macroname%@AE@% is not
  14434.                                     defined in the description file.
  14435.  
  14436. %@AB@%!UNDEF%@AE@% %@AI@%macroname%@AE@%                    Marks %@AI@%macroname%@AE@% as being undefined in
  14437.                                     NMAKE's symbol table.
  14438.  
  14439. %@AB@%!ERROR%@AE@% %@AI@%text%@AE@%                         Causes %@AI@%text%@AE@% to be printed and then stops
  14440.                                     execution.
  14441.  
  14442. !%@AB@%INCLUDE%@AE@% %@AI@%filename%@AE@%                   Reads and evaluates the file %@AI@%filename%@AE@%
  14443.                                     before continuing with the current
  14444.                                     description file. If %@AI@%filename%@AE@% is
  14445.                                     enclosed by angle brackets (< >), NMAKE
  14446.                                     searches for the file in the directories
  14447.                                     specified by the INCLUDE macro;
  14448.                                     otherwise it looks in the current
  14449.                                     directory only. The INCLUDE macro is
  14450.                                     initially set to the value of the
  14451.                                     INCLUDE environment variable.
  14452.  
  14453. !%@AB@%CMDSWITCHES: {%@AE@%%@AB@%+%@AE@%|%@AB@%-%@AE@%}%@AI@%opt%@AE@%.             Turns on or off one of four NMAKE
  14454.                                     options: /D, /I, /N, and /S. If no
  14455.                                     options are specified, the options are
  14456.                                     reset to the way they were when NMAKE
  14457.                                     was started. Turn an option on by
  14458.                                     preceding it with a plus sign (+), or
  14459.                                     turn it off by preceding it with a minus
  14460.                                     sign (-). Using this directive updates
  14461.                                     the MAKEFLAGS macro.
  14462. %@TE:   52   3548  2 27 49 @%
  14463. %@NL@%
  14464. %@CR:MCVG3404@%%@4@%The %@AI@%constantexpression%@AE@% used with the !IF directive may consist of integer%@EH@%
  14465. constants, string constants, or program invocations. Integer constants can
  14466. use the C unary operators for numerical negation (-), one's complement (~),
  14467. and logical negation (!). They may also use any of the C binary operators
  14468. listed below:%@NL@%
  14469. %@CR:MCVG3405@%%@NL@%
  14470. %@TH:   37   1031  2 27 49 @%
  14471. %@AB@%Operator                   Description%@AE@%
  14472.  
  14473. %@AB@%+%@AE@%                          Addition
  14474.  
  14475. %@AB@%-%@AE@%                          Subtraction
  14476.  
  14477. %@AB@%*%@AE@%                          Multiplication
  14478.  
  14479. %@AB@%/%@AE@%                          Division
  14480.  
  14481. %@AB@%%%@AE@%                          Modulus
  14482.  
  14483. %@AB@%&%@AE@%                          Bitwise AND
  14484.  
  14485. %@AB@%|-%@AE@%                         Bitwise OR
  14486.  
  14487. %@AB@%^^%@AE@%                         Bitwise XOR
  14488.  
  14489. %@AB@%&&%@AE@%                         Logical AND%@AB@%
  14490.  
  14491. %@AB@%|-|-%@AE@%                       Logical OR
  14492.  
  14493. %@AB@%<<%@AE@%                         Left shift
  14494.  
  14495. %@AB@%>>%@AE@%                         Right shift
  14496.  
  14497. %@AB@%==%@AE@%                         Equality
  14498.  
  14499. %@AB@%!=%@AE@%                         Inequality
  14500.  
  14501. %@AB@%<%@AE@%                          Less than
  14502.  
  14503. %@AB@%>%@AE@%                          Greater than
  14504.  
  14505. %@AB@%<=%@AE@%                         Less than or equal to
  14506.  
  14507. %@AB@%>=%@AE@%                         Greater than or equal to
  14508. %@TE:   37   1031  2 27 49 @%
  14509. %@NL@%
  14510. %@CR:MCVG3406@%%@4@%You can use parentheses to group expressions. Values are assumed to be%@EH@%
  14511. decimal values unless specified with a leading 0 (octal) or leading 0x
  14512. (hexadecimal). Use the equality (%@AB@%==%@AE@%) operator to compare two strings for
  14513. equality or the inequality (%@AB@%!=%@AE@%) operator to compare for inequality. Strings
  14514. are enclosed by quotes. Program invocations must be in square brackets ([
  14515. ]).%@NL@%
  14516. %@NL@%
  14517. %@CR:MCVG3407@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  14518. %@NL@%
  14519.      !INCLUDE <infrules.txt>%@NL@%
  14520.      !CMDSWITCHES +D%@NL@%
  14521.      winner.exe:winner.obj%@NL@%
  14522.      !IFDEF debug%@NL@%
  14523.      !  IF "$(debug)"=="y"%@NL@%
  14524.           LINK /CO winner.obj;%@NL@%
  14525.      !  ELSE%@NL@%
  14526.           LINK winner.obj;%@NL@%
  14527.      !  ENDIF%@NL@%
  14528.      !ELSE%@NL@%
  14529.      !  ERROR Macro named debug is not defined.%@NL@%
  14530.      !ENDIF%@NL@%
  14531. %@NL@%
  14532. %@CR:MCVG3408@%%@4@%The %@AB@%!INCLUDE%@AE@% directive causes the file %@AS@%INFRULES.TXT%@AE@% to be read and evaluated%@EH@%
  14533. as if it were a part of the description file. The %@AB@%!CMDSWITCHES%@AE@% directive
  14534. turns on the /D option, which displays the dates of the files as they are
  14535. checked. If %@AS@%winner.exe%@AE@% is out of date with respect to %@AS@%winner.obj%@AE@%, the
  14536. %@AB@%!IFDEF%@AE@% directive checks to see if the macro %@AS@%debug%@AE@% is defined. If it is
  14537. defined, the %@AB@%!IF%@AE@% directive checks to see if it is set to %@AS@%y%@AE@%. If it is, then
  14538. the linker is invoked with the /CO option; otherwise it is invoked without
  14539. it. If the %@AS@%debug%@AE@% macro is not defined, the %@AB@%!ERROR%@AE@% directive prints the
  14540. message and NMAKE stops executing.%@NL@%
  14541. %@NL@%
  14542. %@NL@%
  14543. %@CR:MCVG3500@%%@3@%%@AB@%16.3.5  Pseudotargets%@AE@%%@EH@%%@NL@%
  14544. %@NL@%
  14545. %@CR:MCVG3501@%%@4@%A "pseudotarget" is a target that is not a file but instead is a name that%@EH@%
  14546. serves as a "handle" for building a group of files or executing a group of
  14547. commands. In the following example, %@AS@%UPDATE%@AE@% is a pseudotarget.%@NL@%
  14548. %@NL@%
  14549.      UPDATE: *.*%@NL@%
  14550.           !copy $** a:\product%@NL@%
  14551. %@NL@%
  14552. %@CR:MCVG3502@%%@4@%When NMAKE evaluates a pseudotarget, it always considers the dependents out%@EH@%
  14553. of date. In the description above, NMAKE copies each of the dependent files
  14554. to the specified drive and directory.%@NL@%
  14555. %@NL@%
  14556. %@CR:MCVG3503@%%@4@%The NMAKE utility includes four predefined pseudotargets that provide%@EH@%
  14557. special rules within a description file. The list below describes these
  14558. pseudotargets.%@NL@%
  14559. %@CR:MCVG3504@%%@NL@%
  14560. %@TH:   50   2874  2 27 49 @%
  14561. %@AB@%Pseudotarget               Action%@AE@%
  14562.  
  14563. .SILENT:                   Does not display lines as they are executed. Same
  14564.                            effect as invoking NMAKE with the /S option.
  14565.  
  14566. .IGNORE:                   Ignores exit codes returned by programs called
  14567.                            from the description file. Same effect as
  14568.                            invoking NMAKE with the /I option.
  14569.  
  14570. .SUFFIXES:%@AI@%list%@AE@%             Lists file suffixes for NMAKE to try if it needs
  14571.                            to build a target file for which no dependents
  14572.                            are specified. NMAKE searches the current
  14573.                            directory for a file with the same name as the
  14574.                            target file and a suffix from the list. If NMAKE
  14575.                            finds such a file, and if an inference rule
  14576.                            applies to the file, then NMAKE treats the file
  14577.                            as a dependent of the target. The order of the
  14578.                            suffixes in the list defines the order in which
  14579.                            NMAKE searches for the files. The list is
  14580.                            predefined as follows:
  14581.  
  14582.                            %@AS@%.SUFFIXES: .obj .exe .c .asm%@AE@%
  14583.  
  14584.                            To add suffixes to the list, specify .SUFFIXES:
  14585.                            followed by the new suffixes. To clear the list,
  14586.                            specify .SUFFIXES:
  14587.  
  14588. PRECIOUS: %@AI@%target%@AE@%...        Tells NMAKE not to delete %@AI@%target%@AE@% if the commands
  14589.                            that build it are quit or interrupted. Using this
  14590.                            pseudotarget overrides the NMAKE default. By
  14591.                            default, NMAKE deletes the target if it cannot be
  14592.                            sure the target was built successfully. For
  14593.                            example:
  14594.  
  14595.                            %@AS@%.PRECIOUS: tools.lib%@AE@%
  14596.                            %@AS@%tools.lib : a2z.obj z2a.obj%@AE@%
  14597.                            %@AS@%        .%@AE@%
  14598.                            %@AS@%        .%@AE@%
  14599.                            %@AS@%        .%@AE@%
  14600.  
  14601.                            If the commands (not shown here) to build
  14602.                            %@AS@%tools.lib%@AE@% are interrupted, leaving an incomplete
  14603.                            file, NMAKE does not delete the partially built
  14604.                            %@AS@%tools.lib%@AE@% because it is listed with .PRECIOUS.
  14605.  
  14606.                            Note, however, that .PRECIOUS is useful only in
  14607.                            limited circumstances. Most professional
  14608.                            development tools, including those provided by
  14609.                            Microsoft, have their own interrupt handlers and
  14610.                            "clean up" when errors occur.
  14611. %@TE:   50   2874  2 27 49 @%
  14612. %@NL@%
  14613. %@CR:MCVG4000@%%@2@%%@AB@%16.4  Response-File Generation%@AE@%%@EH@%%@NL@%
  14614. %@NL@%
  14615. %@CR:MCVG4001@%%@4@%At times, you may need to issue a command in the description file that has a%@EH@%
  14616. list of arguments that exceeds the DOS limit of 128 characters. NMAKE can
  14617. generate response files for use with other programs.%@NL@%
  14618. %@NL@%
  14619. %@CR:MCVG4002@%%@4@%The syntax for creating a response file is%@EH@%%@NL@%
  14620. %@NL@%
  14621.      %@AI@%target%@AE@% : %@AI@%dependents%@AE@%%@NL@%
  14622.        %@AI@%command%@AE@% @<< «%@AI@%filename%@AE@%»%@NL@%
  14623.      %@AI@%response-file-text%@AE@%%@NL@%
  14624.      <<%@AI@%%@NL@%
  14625. %@NL@%
  14626. %@CR:MCVG4003@%%@4@%All of the text between the two sets of double brackets (<<) is placed in a%@EH@%
  14627. response file and given the name %@AI@%filename%@AE@%. The response file can be referred
  14628. to at a later time using %@AI@%filename%@AE@%. If %@AI@%filename%@AE@% is not given, NMAKE gives the
  14629. file a unique name in the directory specified by the TMP environment
  14630. variable if it is defined; otherwise it creates it in the current directory.
  14631. Note that the at sign (@) is not part of the NMAKE syntax but is the typical
  14632. response-file character for utilities such as LIB and LINK.%@NL@%
  14633. %@NL@%
  14634. %@CR:MCVG4004@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  14635. %@NL@%
  14636.      math.lib : add.obj sub.obj mul.obj div.obj%@NL@%
  14637.        LIB @<<%@NL@%
  14638.      math.lib%@NL@%
  14639.      -+add.obj-+sub.obj-+mul.obj-+div.obj%@NL@%
  14640.      listing%@NL@%
  14641.      <<%@NL@%
  14642. %@NL@%
  14643. %@CR:MCVG4005@%%@4@%The above example creates a response file and uses it to invoke the%@EH@%
  14644. Microsoft Library Manager LIB. The response file specifies which library to
  14645. use, the commands to execute, and the listing file to produce. The response
  14646. file contains the following:%@NL@%
  14647. %@NL@%
  14648.      math.lib%@NL@%
  14649.      -+add.obj-+sub.obj-+mul.obj-+div.obj%@NL@%
  14650.      listing%@NL@%
  14651. %@NL@%
  14652. %@NL@%
  14653. %@CR:MCVG5000@%%@2@%%@AB@%16.5  Differences between NMAKE and MAKE%@AE@%%@EH@%%@NL@%
  14654. %@NL@%
  14655. %@CR:MCVG5001@%%@4@%NMAKE differs from MAKE in the following ways:%@EH@%%@NL@%
  14656. %@NL@%
  14657. %@CR:MCVG5002@%  ■  It accepts command-line arguments from a file.%@NL@%
  14658. %@NL@%
  14659.   ■  It provides more command-line options.%@NL@%
  14660. %@NL@%
  14661.   ■  It no longer evaluates targets sequentially. Instead, it updates the%@NL@%
  14662.      targets you specify when you invoke NMAKE, regardless of their%@NL@%
  14663.      positions in the description file. If no targets are specified, NMAKE%@NL@%
  14664.      updates the first target in the file.%@NL@%
  14665. %@NL@%
  14666.   ■  It provides more special macros.%@NL@%
  14667. %@NL@%
  14668.   ■  It permits substitutions within macros.%@NL@%
  14669. %@NL@%
  14670.   ■  It supports directives placed in the description file.%@NL@%
  14671. %@NL@%
  14672.   ■  It allows you to specify include files in the description file.%@NL@%
  14673. %@NL@%
  14674. %@CR:MCVG5003@%%@4@%MAKE assumed that all targets in the description file would be built.%@EH@%
  14675. Because NMAKE builds the first target in the file unless you specify
  14676. otherwise, you may need to change your old description files to work with
  14677. the new utility.%@NL@%
  14678. %@NL@%
  14679. %@CR:MCVG5004@%%@4@%Description files written for use with MAKE typically list a series of%@EH@%
  14680. subordinate targets followed by a higher-level target that depends on the
  14681. subordinates. As MAKE executed, it would build the targets sequentially,
  14682. creating the highest-level target at the end.%@NL@%
  14683. %@NL@%
  14684. %@CR:MCVG5005@%%@4@%The easiest way to convert these description files is to create a new%@EH@%
  14685. description block at the top of the file. Give this block a pseudotarget
  14686. named ALL and set its dependents to all of the other targets in the file.
  14687. When NMAKE executes the description, it will assume you want to build the
  14688. target ALL and consequently will build all targets in the file.%@NL@%
  14689. %@NL@%
  14690. %@CR:MCVG5006@%%@4@%Alternatively, if your description file already contains a block that builds%@EH@%
  14691. a single, top-level target, you can simply make that block the first in the
  14692. file.%@NL@%
  14693. %@NL@%
  14694. %@CR:MCVG5007@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  14695. %@NL@%
  14696.      one.obj: one.c%@NL@%
  14697. %@NL@%
  14698.      two.obj: two.c%@NL@%
  14699. %@NL@%
  14700.      three.obj: three.c%@NL@%
  14701. %@NL@%
  14702.      prog1.exe: one.obj two.obj three.obj%@NL@%
  14703.           link one two three, prog1;%@NL@%
  14704. %@NL@%
  14705.      x.obj: x.c%@NL@%
  14706. %@NL@%
  14707.      y.obj: y.c%@NL@%
  14708. %@NL@%
  14709.      z.obj: z.c%@NL@%
  14710. %@NL@%
  14711.      xyz.exe: x.obj y.obj z.obj%@NL@%
  14712.           link x y z, xyz;%@NL@%
  14713. %@NL@%
  14714. %@CR:MCVG5008@%%@4@%Assume the above is an old MAKE description file named MAKEFILE. Note that%@EH@%
  14715. it builds two top-level targets, %@AS@%prog1.exe%@AE@% and %@AS@%xyz.exe%@AE@%. To use this file
  14716. with the new NMAKE, insert the following as the first line in the file:%@NL@%
  14717. %@NL@%
  14718.      ALL : prog1.exe xyz.exe%@NL@%
  14719. %@NL@%
  14720. %@CR:MCVG5009@%%@4@%With the addition of this line, %@AS@%ALL%@AE@% becomes the first target in the file.%@EH@%
  14721. Since NMAKE, by default, builds the first target, you can invoke NMAKE with%@NL@%
  14722. %@NL@%
  14723.      NMAKE%@NL@%
  14724. %@NL@%
  14725. %@CR:MCVG500A@%%@4@%and it will build both %@AS@%prog1.exe%@AE@% and %@AS@%xyz.exe%@AE@%.%@EH@%%@NL@%
  14726. %@NL@%
  14727. %@NL@%
  14728. %@CR:MCVH0000@%%@1@%%@AB@%Chapter 17  Using Other Utilities%@AE@%%@EH@%%@NL@%
  14729. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14730. %@NL@%
  14731. %@CR:MCVH0001@%%@4@%The following utilities allow you to modify files and change the operating%@EH@%
  14732. environment:%@NL@%
  14733. %@NL@%
  14734. %@CR:MCVH0002@%  ■  Microsoft EXE File Header Utility (EXEMOD)%@NL@%
  14735. %@NL@%
  14736.      Modifies header information in executable files.%@NL@%
  14737. %@NL@%
  14738.   ■  Microsoft Environment Expansion Utility (SETENV)%@NL@%
  14739. %@NL@%
  14740.      Enlarges the DOS environment table in IBM PC-DOS Versions 2.0, 2.1,%@NL@%
  14741.      3.0, and 3.1. SETENV allows you to use more, larger environment%@NL@%
  14742.      variables.%@NL@%
  14743. %@NL@%
  14744.   ■  Microsoft Debug Information Compactor Utility (CVPACK)%@NL@%
  14745. %@NL@%
  14746.      Compresses executable files by reducing the size of CodeView debugging%@NL@%
  14747.      information within the files.%@NL@%
  14748. %@NL@%
  14749. %@CR:MCVH0003@%%@4@%The following sections explain how to use the  EXEMOD, SETENV, and CVPACK%@EH@%
  14750. utilities.%@NL@%
  14751. %@NL@%
  14752. %@NL@%
  14753. %@CR:MCVH1000@%%@2@%%@AB@%17.1  Modifying Program Headers with the EXEMOD Utility%@AE@%%@EH@%%@NL@%
  14754. %@NL@%
  14755. %@CR:MCVH1001@%%@4@%The EXEMOD utility allows you to modify fields in the header of an%@EH@%
  14756. executable file. Some of the options available with EXEMOD are the same as
  14757. LINK options, except that they work on files that have already been linked.
  14758. Unlike the LINK options, the EXEMOD options require that values be specified
  14759. as hexadecimal numbers.%@NL@%
  14760. %@NL@%
  14761. %@CR:MCVH1002@%%@4@%To display the current status of the header fields, type the following:%@EH@%%@NL@%
  14762. %@NL@%
  14763.      EXEMOD %@AI@%executablefile%@AE@%%@NL@%
  14764. %@NL@%
  14765. %@CR:MCVH1003@%%@4@%To modify one or more of the fields in the file header, type the following:%@EH@%%@NL@%
  14766. %@NL@%
  14767.      EXEMOD %@AI@%executablefile%@AE@% «%@AI@%options%@AE@%»%@NL@%
  14768. %@NL@%
  14769. %@CR:MCVH1004@%%@4@%EXEMOD expects %@AI@%executablefile%@AE@% to be the name of an existing file with the%@EH@%
  14770. .EXE extension. If the file name is given without an extension, EXEMOD
  14771. appends .EXE and searches for that file. If you supply a file with an
  14772. extension other than .EXE, EXEMOD displays the following error message:%@NL@%
  14773. %@NL@%
  14774.      %@AS@%exemod: file not .EXE%@AE@%%@NL@%
  14775. %@NL@%
  14776. %@CR:MCVH1005@%%@4@%The EXEMOD options are shown with the forward slash (%@AB@%/%@AE@%) designator, but a%@EH@%
  14777. dash (%@AB@%-%@AE@%) may also be used. Options can be given in either uppercase or
  14778. lowercase, but they cannot be abbreviated. The EXEMOD options and their
  14779. effects are described in the following list:%@NL@%
  14780. %@CR:MCVH1006@%%@NL@%
  14781. %@TH:   30   1992  2 28 48 @%
  14782. %@AB@%Option                      Effect%@AE@%
  14783.  
  14784. %@AB@%/H%@AE@%                          Displays the current status of the DOS program
  14785.                             header. Its effect is the same as entering
  14786.                             EXEMOD with an %@AI@%executablefile%@AE@% specification but
  14787.                             without options. The /H option should not be
  14788.                             used with other options.
  14789.  
  14790. %@AB@%/STACK%@AE@% %@AI@%hexnum%@AE@%               Allows you to set the size of the stack (in
  14791.                             bytes) for your program by setting the initial
  14792.                             SP (stack pointer) value to %@AI@%hexnum%@AE@%. The minimum
  14793.                             allocation value is adjusted upward, if
  14794.                             necessary. This option has the same effect as
  14795.                             the LINK /STACK option, except it works on files
  14796.                             that are already linked.
  14797.  
  14798. %@AB@%/MIN%@AE@% %@AI@%hexnum%@AE@%                 Sets the minimum allocation value (that is, the
  14799.                             minimum number of 16-byte paragraphs needed by
  14800.                             the program when it is loaded into memory) to
  14801.                             %@AI@%hexnum%@AE@%. The actual value set may be different
  14802.                             from the requested value if adjustments are
  14803.                             necessary to accommodate the stack.
  14804.  
  14805. %@AB@%/MAX%@AE@% %@AI@%hexnum%@AE@%                 Sets the maximum allocation value (that is, the
  14806.                             maximum number of 16-byte paragraphs used by the
  14807.                             program when it is loaded into memory) to
  14808.                             %@AI@%hexnum%@AE@%. The maximum allocation value must be
  14809.                             greater than or equal to the minimum allocation
  14810.                             value. This option has the same effect as the
  14811.                             LINK /CPARMAXALLOC option.
  14812. %@TE:   30   1992  2 28 48 @%
  14813. %@NL@%
  14814. %@CR:MCVH1007@%%@4@%For each of the options listed above, %@AI@%hexnum%@AE@% is a number entered using%@EH@%
  14815. hexadecimal digits (uppercase or lowercase); no prefix is needed.%@NL@%
  14816. %@NL@%
  14817. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14818. %@AI@%NOTE%@AE@%%@NL@%
  14819.    Use of the %@AB@%/STACK%@AE@% option on programs developed with other than Microsoft%@NL@%
  14820.    compilers or assemblers may cause the programs to fail, or %@AB@%EXEMOD%@AE@% may%@NL@%
  14821.    return an error message.%@NL@%
  14822. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14823. %@NL@%
  14824. %@CR:MCVH1008@%%@4@%EXEMOD works on packed files. When it recognizes a packed file, it prints%@EH@%
  14825. the message%@NL@%
  14826. %@NL@%
  14827.      %@AS@%packed file%@AE@%%@NL@%
  14828. %@NL@%
  14829. %@CR:MCVH1009@%then continues to modify the file header.%@NL@%
  14830. %@NL@%
  14831. %@CR:MCVH100A@%%@4@%When packed files are loaded, they are expanded to their unpacked state in%@EH@%
  14832. memory. If the EXEMOD /STACK option is used on a packed file, the value
  14833. changed is the value that SP has after expansion. If either the /MIN or the
  14834. /STACK option is used, the value is corrected as necessary to accommodate
  14835. unpacking of the modified stack. The /MAX option operates as it would for
  14836. unpacked files.%@NL@%
  14837. %@NL@%
  14838. %@CR:MCVH100B@%%@4@%If the header of a packed file is displayed, the CS:IP and SS:SP values are%@EH@%
  14839. displayed as they are after expansion. These values are not the same as the
  14840. actual values in the header of the packed file.%@NL@%
  14841. %@NL@%
  14842. %@CR:MCVH100C@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  14843. %@NL@%
  14844.      Microsoft (R) EXE File Header Utility  Version 4.02%@NL@%
  14845.      Copyright (C) Microsoft Corp 1985.  All rights reserved.%@NL@%
  14846. %@NL@%
  14847.      TEST.EXE                           (hex)           (dec)%@NL@%
  14848. %@NL@%
  14849.      .EXE size (bytes)                   439D           17309%@NL@%
  14850.      Minimum load size (bytes)           419D           16797%@NL@%
  14851.      Overlay number                         0               0%@NL@%
  14852.      Initial CS:IP                  0403:0000%@NL@%
  14853.      Initial SS:SP                  0000:0000               0%@NL@%
  14854.      Minimum allocation (para)              0               0%@NL@%
  14855.      Maximum allocation (para)           FFFF           65535%@NL@%
  14856.      Header size (para)                    20              32%@NL@%
  14857.      Relocation table offset               1E              30%@NL@%
  14858.      Relocation entries                     1               1%@NL@%
  14859. %@NL@%
  14860. %@CR:MCVH100D@%%@4@%The display above shows how EXEMOD would display the current file header for%@EH@%
  14861. file %@AS@%TEST.EXE%@AE@%. Note that %@AS@%(para)%@AE@% refers to paragraphs, which are units of 16
  14862. bytes. To translate paragraphs to bytes, multiply by 16. The meaning of each
  14863. field is given below.%@NL@%
  14864. %@NL@%
  14865. %@CR:MCVH100E@%%@4@%.EXE size is the size of the file as stored on disk. %@AS@%Minimum load size%@AE@% is%@EH@%
  14866. the total amount of memory that DOS must provide in order for the program to
  14867. execute.%@NL@%
  14868. %@NL@%
  14869. %@CR:MCVH100F@%%@4@%%@AS@%Overlay number%@AE@% is the ordinal number of the overlay as generated by LINK.%@EH@%
  14870. (If the executable file does not use overlays, there is exactly one overlay
  14871. module, the root.) Since EXEMOD looks only at the beginning of the file, the
  14872. overlay number displayed is normally 0.%@NL@%
  14873. %@NL@%
  14874. %@CR:MCVH100G@%%@4@%%@AS@%Initial CS:IP%@AE@% and %@AS@%Initial SS:SP%@AE@% indicate the initial values of the%@EH@%
  14875. instruction pointer and the stack pointer, respectively. The values of CS
  14876. and SS are relative to the beginning of the load module and are changed once
  14877. the file is actually loaded into memory. The offset address of the stack
  14878. pointer (SP) indicates the amount of room available for the stack to grow
  14879. downward before reaching SS. (Some of this room may be needed by other
  14880. segments, however.) The initial value of SP can be changed with EXEMOD.%@NL@%
  14881. %@NL@%
  14882. %@CR:MCVH100H@%%@4@%%@AS@%Minimum allocation%@AE@% indicates the amount of memory that the file requires, in%@EH@%
  14883. addition to the memory that DOS uses to load the file itself. If DOS is
  14884. unable to allocate this amount of memory, it does not execute the file. This
  14885. value can be changed with EXEMOD.%@NL@%
  14886. %@NL@%
  14887. %@CR:MCVH100I@%%@4@%%@AS@%Maximum allocation%@AE@% indicates the amount of memory the file requests, in%@EH@%
  14888. addition to memory used to load the file itself. If the amount specified is
  14889. not available, DOS allocates all available memory. This value can be changed
  14890. with EXEMOD.%@NL@%
  14891. %@NL@%
  14892. %@CR:MCVH100J@%%@4@%%@AS@%Header size%@AE@% gives the size of all header information, including relocation%@EH@%
  14893. entries.%@NL@%
  14894. %@NL@%
  14895. %@CR:MCVH100K@%%@4@%%@AS@%Relocation table offset%@AE@% indicates the number of bytes from the beginning of%@EH@%
  14896. the file to the relocation entries.%@NL@%
  14897. %@NL@%
  14898. %@CR:MCVH100L@%%@4@%%@AS@%Relocation entries%@AE@% gives the number of relocation entries. Each of these%@EH@%
  14899. entries is a piece of information used to adjust segment addresses in the
  14900. load module (the portion of the file that is actually loaded into memory).
  14901. DOS adds the load address to each segment address so that the segment
  14902. address refers to a true location in physical memory.%@NL@%
  14903. %@NL@%
  14904. %@CR:MCVH100M@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  14905. %@NL@%
  14906.      >EXEMOD TEST.EXE%@NL@%
  14907. %@NL@%
  14908. %@CR:MCVH100N@%%@4@%The command in the above example generates the display in the previous%@EH@%
  14909. example for the file %@AS@%TEST.EXE%@AE@%.%@NL@%
  14910. %@NL@%
  14911.      EXEMOD TEST.EXE /STACK FF /MIN FF /MAX FFF%@NL@%
  14912. %@NL@%
  14913. %@CR:MCVH100O@%%@4@%The example above uses the EXEMOD command line to modify the header fields%@EH@%
  14914. in %@AS@%TEST.EXE%@AE@%.%@NL@%
  14915. %@NL@%
  14916.      >EXEMOD TEST.EXE%@NL@%
  14917. %@NL@%
  14918.      Microsoft (R) EXE File Header Utility  Version 4.02%@NL@%
  14919.      Copyright (C) Microsoft Corp 1985.  All rights reserved.%@NL@%
  14920. %@NL@%
  14921.      TEST.EXE                           (hex)           (dec)%@NL@%
  14922. %@NL@%
  14923.      .EXE size (bytes)                   439D           17309%@NL@%
  14924.      Minimum load size (bytes)           528D           20877%@NL@%
  14925.      Overlay number                         0               0%@NL@%
  14926.      Initial CS:IP                  0403:0000%@NL@%
  14927.      Initial SS:SP                  0000:00FF             256%@NL@%
  14928.      Minimum allocation (para)             FF             256%@NL@%
  14929.      Maximum allocation (para)            FFF            4095%@NL@%
  14930.      Header size (para)                    20              32%@NL@%
  14931.      Relocation table offset               1E              30%@NL@%
  14932.      Relocation entries                     1               1%@NL@%
  14933. %@NL@%
  14934. %@CR:MCVH100P@%%@4@%The last example shows the current status of the header for %@AS@%TEST.EXE%@AE@% after%@EH@%
  14935. being altered by the previous example.%@NL@%
  14936. %@NL@%
  14937. %@NL@%
  14938. %@CR:MCVH2000@%%@2@%%@AB@%17.2  Enlarging the DOS Environment with the SETENV Utility%@AE@%%@EH@%%@NL@%
  14939. %@NL@%
  14940. %@CR:MCVH2001@%%@4@%The SETENV utility allows you to allocate more operating-environment space%@EH@%
  14941. to DOS by modifying a copy of COMMAND.COM.%@NL@%
  14942. %@NL@%
  14943. %@CR:MCVH2002@%%@4@%Normally, DOS Versions 2.0 and later allocate 160 bytes (10 paragraphs) for%@EH@%
  14944. the environment table. This may not be enough space if you want to set
  14945. numerous environment variables using the SET or PATH command. For example,
  14946. if you have a hard disk with several levels of subdirectories, a single
  14947. environment variable might take 40 or 50 characters. Since each character
  14948. uses 1 byte, you could easily require more than 160 bytes if you want to set
  14949. several environment variables.%@NL@%
  14950. %@NL@%
  14951. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14952. %@AI@%NOTE%@AE@%%@NL@%
  14953.    %@AB@%SETENV%@AE@% works with most MS-DOS and PC-DOS operating systems, Versions 2.0
  14954.    through 3.1. If the %@AB@%SETENV%@AE@% utility does not work with your version of
  14955.    %@AB@%COMMAND.COM%@AE@%, please contact Microsoft Technical Support.
  14956. %@NL@%
  14957.    If you use DOS 3.2 or later, you can set the environment space with the
  14958.    DOS %@AB@%SHELL%@AE@% command. For example, the following command sets the
  14959.    environment size at 3000 bytes when placed in %@AB@%CONFIG.SYS%@AE@%:
  14960. %@NL@%
  14961.        SHELL = COMMAND.COM /E:3000 /P%@NL@%
  14962. %@NL@%
  14963.    See your DOS manual for further information.%@NL@%
  14964. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14965. %@NL@%
  14966. To enlarge the environment table, you can modify a copy of COMMAND.COM using
  14967. SETENV. Make sure you work on a copy, and retain an unmodified version of
  14968. COMMAND.COM for backup.%@NL@%
  14969. %@NL@%
  14970. %@CR:MCVH2003@%%@4@%The command line for modifying the environment table is as follows:%@EH@%%@NL@%
  14971. %@NL@%
  14972.      SETENV %@AI@%filename%@AE@% «%@AI@%environmentsize%@AE@%»%@NL@%
  14973. %@NL@%
  14974. %@CR:MCVH2004@%%@4@%Normally, %@AI@%filename%@AE@% specifies COMMAND.COM. It must be a valid, unmodified%@EH@%
  14975. copy of COMMAND.COM, though it can be renamed. The optional %@AI@%environmentsize%@AE@%
  14976. is a decimal number specifying the size in bytes of the new allocation;
  14977. %@AI@%environmentsize%@AE@% must be a number greater than or equal to 160 and less than
  14978. or equal to 65,520. The specified %@AI@%environmentsize%@AE@% is rounded up to the
  14979. nearest multiple of 16 (the size of a paragraph).%@NL@%
  14980. %@NL@%
  14981. %@CR:MCVH2005@%%@4@%If %@AI@%environmentsize%@AE@% is not given, SETENV reports the value currently%@EH@%
  14982. allocated by the COMMAND.COM file.%@NL@%
  14983. %@NL@%
  14984. %@CR:MCVH2006@%%@4@%After modifying COMMAND.COM, you must reboot so that the environment table%@EH@%
  14985. is set to the new size.%@NL@%
  14986. %@NL@%
  14987. %@CR:MCVH2007@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  14988. %@NL@%
  14989.      >SETENV COMMAND.COM%@NL@%
  14990. %@NL@%
  14991.      Microsoft (R) Environment Expansion Utility  Version 2.10%@NL@%
  14992.      Copyright (C) Microsoft Corp 1985,1986.  All rights reserved.%@NL@%
  14993. %@NL@%
  14994.      command.com: Environment allocation = 160%@NL@%
  14995. %@NL@%
  14996. %@CR:MCVH2008@%%@4@%In the example above, no environment size is specified, so SETENV reports%@EH@%
  14997. the current size of the environment table.%@NL@%
  14998. %@NL@%
  14999.      >SETENV COMMAND.COM 605%@NL@%
  15000. %@NL@%
  15001. %@CR:MCVH2009@%%@4@%In the example above, an environment size of 605 bytes is requested. Since%@EH@%
  15002. 605 bytes is not on a paragraph boundary (a multiple of 16), SETENV rounds
  15003. the request up to 608 bytes. COMMAND.COM is modified so that it
  15004. automatically sets an environment table of 608 bytes (38 paragraphs). You
  15005. must reboot to set the new environment-table size.%@NL@%
  15006. %@NL@%
  15007. %@NL@%
  15008. %@CR:MCVH3000@%%@2@%%@AB@%17.3  Saving Memory with the CVPACK Utility%@AE@%%@EH@%%@NL@%
  15009. %@NL@%
  15010. %@CR:MCVH3001@%%@4@%After you compile and link a program with CodeView debugging information,%@EH@%
  15011. you can use the Microsoft Debug Information Compactor Utility (CVPACK) to
  15012. reduce the size of the executable file. CVPACK compresses information in the
  15013. file, and allows the CodeView debugger to load larger programs without
  15014. running out of memory.%@NL@%
  15015. %@NL@%
  15016. %@CR:MCVH3002@%%@4@%The CVPACK utility has the following command line:%@EH@%%@NL@%
  15017. %@NL@%
  15018.      %@CR:MCVH3003@%CVPACK «/p» %@AI@%exefile%@AE@%%@NL@%
  15019. %@NL@%
  15020. %@CR:MCVH3004@%%@4@%The /p option results in the most effective possible packing but causes%@EH@%
  15021. CVPACK to take longer to execute. When the /p option is specified, unused
  15022. debugging information is discarded, and the packed information is sorted
  15023. within the file. When the /p option is not specified, packed information is
  15024. simply appended to the end of the file.%@NL@%
  15025. %@NL@%
  15026. %@CR:MCVH3005@%%@4@%To debug a file that has been altered with CVPACK, you must use Version 2.10%@EH@%
  15027. or later of the CodeView debugger.%@NL@%
  15028. %@NL@%
  15029. %@NL@%
  15030. %@CR:MCVI0000@%%@1@%%@AB@%Chapter 18  Linking for Windows and OS/2 Systems%@AE@%%@EH@%%@NL@%
  15031. ───────────────────────────────────────────────────────────────────────────%@NL@%
  15032. %@NL@%
  15033. %@CR:MCVI0001@%%@4@%This chapter covers concepts important to linking for Windows and OS/2%@EH@%
  15034. systems, such as dynamic-linking and import libraries. Section 18.6%@BO:   c0e10@%
  15035. describes the IMPLIB utility for creating import libraries.%@NL@%
  15036. %@NL@%
  15037. %@CR:MCVI0002@%%@4@%In most respects, linking a program using the Microsoft Segmented-Executable%@EH@%
  15038. Linker (LINK) for the OS/2 environment is similar to linking a program for
  15039. the DOS 3.x environment. The principal difference is that most programs
  15040. created for the DOS 3.x environment run as stand-alone applications, whereas
  15041. programs that run under OS/2 protected mode generally call one or more
  15042. "dynamic-link libraries."%@NL@%
  15043. %@NL@%
  15044. %@NL@%
  15045. %@CR:MCVI1000@%%@2@%%@AB@%18.1  Dynamic-Link Libraries%@AE@%%@EH@%%@NL@%
  15046. %@NL@%
  15047. %@CR:MCVI1001@%%@4@%A dynamic-link library contains executable code for common functions, just%@EH@%
  15048. as an ordinary library does. Yet code for dynamic-link functions is not
  15049. linked into the executable (.EXE) file. Instead, the library itself is
  15050. loaded into memory at run time, along with the .EXE file.%@NL@%
  15051. %@NL@%
  15052. %@CR:MCVI1002@%%@4@%Each .DLL file (dynamic-link library) must use "export definitions" to make%@EH@%
  15053. its functions directly available to other modules. At run time, functions
  15054. not exported can only be called from within the same file. Each export
  15055. definition specifies a function name.%@NL@%
  15056. %@NL@%
  15057. %@CR:MCVI1003@%%@4@%Conversely, the .EXE file must use "import definitions" that tell where each%@EH@%
  15058. dynamic-link function can be found. Otherwise, OS/2 would not know what
  15059. dynamic-link libraries to load when the program is run. Each import
  15060. definition specifies a function name and the .DLL file where the function
  15061. resides.%@NL@%
  15062. %@NL@%
  15063. %@CR:MCVI1004@%%@4@%Assume the simplest case, in which you create one application and one%@EH@%
  15064. dynamic-link library. The linker requires export and import definitions for
  15065. dynamic-link function calls. The OS/2 operating system provides two ways for
  15066. you to supply these definitions:%@NL@%
  15067. %@NL@%
  15068. %@CR:MCVI1005@%  ■  You create one module-definition file (.DEF extension) with export%@NL@%
  15069.      definitions for the .DLL file and another module-definition file with%@NL@%
  15070.      import definitions for the .EXE file. The module-definition files%@NL@%
  15071.      provide these definitions in an ASCII format.%@NL@%
  15072. %@NL@%
  15073.   ■  You create one module-definition file (.DEF extension) for the .DLL%@NL@%
  15074.      file and then generate an import library to be linked to the .EXE file.%@NL@%
  15075. %@NL@%
  15076. %@CR:MCVI1006@%%@4@%The next two sections consider each of these methods in turn. Chapter 19%@BO:   c14f2@%,%@EH@%
  15077. "Using Module-Definition Files," gives a complete description of
  15078. module-definition files.%@NL@%
  15079. %@NL@%
  15080. %@NL@%
  15081. %@CR:MCVI2000@%%@2@%%@AB@%18.2  Linking without an Import Library%@AE@%%@EH@%%@NL@%
  15082. %@NL@%
  15083. %@CR:MCVI2001@%%@4@%Figure 18.1%@FN@%
  15084. Figure 18.1 is found on page 316 of the printed version.%@EF@% illustrates the first way to supply definitions for dynamic-link%@EH@%
  15085. function calls, in which each of the two files──the .DLL file and the .EXE
  15086. file──has a corresponding module-definition file. (A module-definition file
  15087. has a .DEF default extension.)%@NL@%
  15088. %@NL@%
  15089. %@CR:MCVI2002@%%@4@%The two major steps are described below.%@EH@%%@NL@%
  15090. %@NL@%
  15091. %@CR:MCVI2003@%  1. Object files (and possibly standard-library files) are linked together%@NL@%
  15092.      with a module-definition file to create a dynamic-link library. A%@NL@%
  15093.      module-definition file for a dynamic-link library has at least two%@NL@%
  15094.      statements. The first is a %@AB@%LIBRARY%@AE@% statement, which directs the linker%@NL@%
  15095.      to create a .DLL rather than an .EXE file. The second statement is a%@NL@%
  15096.      list of export definitions.%@NL@%
  15097. %@NL@%
  15098.   2. Object files (and possibly standard-library files) are linked together%@NL@%
  15099.      with a module-definition file to create an application. The%@NL@%
  15100.      module-definition file for this application contains a list of import%@NL@%
  15101.      definitions. Each definition in this list contains both a function name%@NL@%
  15102.      and the name of a dynamic-link library.%@NL@%
  15103. %@NL@%
  15104. %@NL@%
  15105. %@CR:MCVI3000@%%@2@%%@AB@%18.3  Linking with an Import Library%@AE@%%@EH@%%@NL@%
  15106. %@NL@%
  15107. %@CR:MCVI3001@%%@4@%Figure 18.2%@FN@%
  15108. Figure 18.2 is found on page 317 of the printed version.%@EF@% illustrates the second way to supply definitions for%@EH@%
  15109. dynamic-link function calls, in which a module-definition file is supplied
  15110. for the dynamic-link library and an import library is supplied for the
  15111. application.%@NL@%
  15112. %@NL@%
  15113. %@CR:MCVI3002@%%@4@%The three major steps are explained below.%@EH@%%@NL@%
  15114. %@NL@%
  15115. %@CR:MCVI3003@%  1. Object files are linked to produce a .DLL file. This step is identical%@NL@%
  15116.      to the first step in the section above. Note that the module-definition%@NL@%
  15117.      file contains export definitions.%@NL@%
  15118. %@NL@%
  15119.   2. The IMPLIB utility is used to generate an import library. IMPLIB takes%@NL@%
  15120.      as input the same module-definition file used in the first step. IMPLIB%@NL@%
  15121.      knows the name of the library module (which by default has the same%@NL@%
  15122.      base name as the .DEF file), and it determines the name of each%@NL@%
  15123.      exported function by examining export definitions. For each export%@NL@%
  15124.      definition in the .DEF file, IMPLIB generates a corresponding import%@NL@%
  15125.      definition.%@NL@%
  15126. %@NL@%
  15127.   3. The .LIB file generated by IMPLIB is used as input to LINK, which%@NL@%
  15128.      creates an application. This .LIB file does not use the same file%@NL@%
  15129.      format as a .DEF file, but it fulfills the same purpose: to provide the%@NL@%
  15130.      linker with information about imported dynamic-link functions.%@NL@%
  15131. %@NL@%
  15132. %@CR:MCVI3004@%%@4@%The .LIB file generated by IMPLIB is called an import library. Import%@EH@%
  15133. libraries are similar in most respects to ordinary libraries; you specify
  15134. import libraries and ordinary libraries in the same command-line field of
  15135. LINK, and you can append the two kinds of libraries together (by using the
  15136. Library Manager). Furthermore, both kinds of libraries resolve external
  15137. references at link time. The only difference is import libraries do not
  15138. contain executable code, merely records that describe where the executable
  15139. code can be found at run time.%@NL@%
  15140. %@NL@%
  15141. %@CR:MCVI3005@%%@4@%The cases considered in this section have been simple ones. Dynamic linking%@EH@%
  15142. is flexible and supports more complicated cases. An application can make
  15143. calls to more than one dynamic-link library. Furthermore, module-definition
  15144. files for libraries can import functions as well as export them. It is
  15145. possible for a .DLL file to call another .DLL file, and so on, to any level
  15146. of complexity; the result may be a situation in which many files are loaded
  15147. at run time.%@NL@%
  15148. %@NL@%
  15149. %@NL@%
  15150. %@CR:MCVI4000@%%@2@%%@AB@%18.4  Why Use Import Libraries?%@AE@%%@EH@%%@NL@%
  15151. %@NL@%
  15152. %@CR:MCVI4001@%%@4@%At first glance, it may seem easier to create programs without import%@EH@%
  15153. libraries since import libraries add an extra step to the linking process.
  15154. However, it is easier to use import libraries for two reasons.%@NL@%
  15155. %@NL@%
  15156. %@CR:MCVI4002@%%@4@%First, the IMPLIB utility automates much of the program-creation process for%@EH@%
  15157. you. To run IMPLIB, you specify the .DEF file that you already created for
  15158. the dynamic-link library. Operation of IMPLIB is simple. If you do not use
  15159. an import library generated by IMPLIB, you must use an ASCII text editor to
  15160. create a second .DEF file where you explicitly give all needed import
  15161. definitions.%@NL@%
  15162. %@NL@%
  15163. %@CR:MCVI4003@%%@4@%Second, the first two steps in the linking process described above (creation%@EH@%
  15164. of the .DLL file and creation of the import library) may be carried out only
  15165. by the author of the dynamic-link library. The libraries may then be given
  15166. to an applications programmer, who focuses on linking the application (third
  15167. step). An applications programmer's task is simplified by linking with the
  15168. import library because then it is not necessary to edit the .DEF file. The
  15169. import library comes ready to link.%@NL@%
  15170. %@NL@%
  15171. %@CR:MCVI4004@%%@4@%A good example of a useful import library is the file DOSCALLS.LIB.%@EH@%
  15172. Generally, protected-mode applications need to call one of the dynamic-link
  15173. system libraries released with OS/2; the DOSCALLS.LIB file contains import
  15174. definitions for all calls to these system libraries. It is much easier to
  15175. link with DOSCALLS.LIB than to create a .DEF file for every OS/2 program you
  15176. link.%@NL@%
  15177. %@NL@%
  15178. %@NL@%
  15179. %@CR:MCVI5000@%%@2@%%@AB@%18.5  Advantages of Dynamic Linking%@AE@%%@EH@%%@NL@%
  15180. %@NL@%
  15181. %@CR:MCVI5001@%%@4@%Why use dynamic-link libraries at all? Dynamic-link libraries serve much the%@EH@%
  15182. same purpose that standard libraries do but they also give you the following
  15183. advantages:%@NL@%
  15184. %@NL@%
  15185. %@CR:MCVI5002@%  1. Link applications faster.%@NL@%
  15186. %@NL@%
  15187.      With dynamic linking, the executable code for a dynamic-link function%@NL@%
  15188.      is not copied into the application's .EXE file. Instead, only an import%@NL@%
  15189.      definition is copied.%@NL@%
  15190. %@NL@%
  15191.   2. Save significant disk space.%@NL@%
  15192. %@NL@%
  15193.      Suppose you create a library function called %@AS@%printit%@AE@%, and this function%@NL@%
  15194.      is called by many different programs. If %@AS@%printit%@AE@% is in a standard%@NL@%
  15195.      library, the function's executable code must be linked into each .EXE%@NL@%
  15196.      file that calls the function. In other words, the same code resides on%@NL@%
  15197.      your disk in many different files. But if %@AS@%printit%@AE@% is stored in a%@NL@%
  15198.      dynamic-link library, the executable code resides in just one file──the%@NL@%
  15199.      library itself.%@NL@%
  15200. %@NL@%
  15201.   3. Make libraries and applications more independent.%@NL@%
  15202. %@NL@%
  15203.      Dynamic-link libraries can be updated any number of times without%@NL@%
  15204.      relinking the applications that use them. If you are a user of%@NL@%
  15205.      third-party libraries, this is particularly convenient. You receive the%@NL@%
  15206.      updated .DLL file from the third-party developers, and you need only%@NL@%
  15207.      copy the new library onto your disk. At run time, your applications%@NL@%
  15208.      automatically call the updated library functions.%@NL@%
  15209. %@NL@%
  15210.   4. Utilize shared code and data segments.%@NL@%
  15211. %@NL@%
  15212.      Code and data segments loaded in from a dynamic-link library can be%@NL@%
  15213.      shared. Without dynamic linking, this sharing is not possible because%@NL@%
  15214.      each file has its own copy of all the code and data it uses. By sharing%@NL@%
  15215.      segments with dynamic linking, you can use memory more efficiently.%@NL@%
  15216. %@NL@%
  15217. %@NL@%
  15218. %@CR:MCVI6000@%%@2@%%@AB@%18.6  Creating Import Libraries with IMPLIB%@AE@%%@EH@%%@NL@%
  15219. %@NL@%
  15220. %@CR:MCVI6001@%%@4@%This section summarizes the use of the Microsoft Import Library Manager%@EH@%
  15221. (IMPLIB), and assumes you are familiar with the concepts of import
  15222. libraries, dynamic linking, and module-definition files discussed in Section
  15223. 18.2.%@BO:   bef80@%%@NL@%
  15224.  
  15225. %@NL@%
  15226. %@CR:MCVI6002@%%@4@%You can create an import library for use by other programmers in resolving%@EH@%
  15227. external references to your dynamic-link library. The IMPLIB command creates
  15228. an import library, which is a file with a .LIB extension that can be read by
  15229. the OS/2 linker. The .LIB file can be specified in the LINK command line
  15230. with other libraries. Import libraries are recommended for all dynamic-link
  15231. libraries. Without the use of import libraries, external references to
  15232. dynamic-link routines must be declared in an %@AB@%IMPORTS%@AE@% statement in the
  15233. module-definition file for the application being linked. IMPLIB is supported
  15234. only in protected mode.%@NL@%
  15235. %@NL@%
  15236. %@CR:MCVI6003@%%@4@%The IMPLIB command-line format is as follows:%@EH@%%@NL@%
  15237. %@NL@%
  15238.      IMPLIB %@AI@%implibname mod-def-file%@AE@% «%@AI@%mod-def-file%@AE@%...»%@NL@%
  15239. %@NL@%
  15240. %@CR:MCVI6004@%%@4@%The %@AI@%implibname%@AE@% is the name you wish the new import library to have.%@EH@%%@NL@%
  15241. %@NL@%
  15242. %@CR:MCVI6005@%%@4@%The %@AI@%mod-def-file%@AE@% is the name of a module-definition file for the%@EH@%
  15243. dynamic-link module. You may enter more than one.%@NL@%
  15244. %@NL@%
  15245. %@CR:MCVI6006@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  15246. %@NL@%
  15247. %@CR:MCVI6007@%%@4@%The following command creates the import library named MYLIB.LIB from the%@EH@%
  15248. module-definition file MYLIB.DEF:%@NL@%
  15249. %@NL@%
  15250.      IMPLIB mylib.lib mylib.def%@NL@%
  15251. %@NL@%
  15252. %@NL@%
  15253. %@CR:MCVJ0000@%%@1@%%@AB@%Chapter 19  Using Module-Definition Files%@AE@%%@EH@%%@NL@%
  15254. ───────────────────────────────────────────────────────────────────────────%@NL@%
  15255. %@NL@%
  15256. %@CR:MCVJ0001@%%@4@%A module-definition file describes the name, attributes, exports, imports,%@EH@%
  15257. and other characteristics of an application or library for OS/2 or Microsoft
  15258. Windows. This file is required for Windows applications and libraries and is
  15259. also required for dynamic-link libraries that run under OS/2.%@NL@%
  15260. %@NL@%
  15261. %@NL@%
  15262. %@CR:MCVJ1000@%%@2@%%@AB@%19.1  Module Statements%@AE@%%@EH@%%@NL@%
  15263. %@NL@%
  15264. %@CR:MCVJ1001@%%@4@%A module-definition file contains one or more "module statements." Each%@EH@%
  15265. module statement defines an attribute of the executable file, such as its
  15266. module name, the attributes of program segments, and the number and names of
  15267. exported and imported functions. The module statements and the attributes
  15268. they define are listed below.%@NL@%
  15269. %@CR:MCVJ1002@%%@NL@%
  15270. %@TH:   37   1573  2 27 49 @%
  15271. %@AB@%Module Statements          Attribute Defined%@AE@%
  15272.  
  15273. %@AB@%NAME%@AE@%                       Names application (no library created)
  15274.  
  15275. %@AB@%LIBRARY%@AE@%                    Names dynamic-link library (no application
  15276.                            created)
  15277.  
  15278. %@AB@%DESCRIPTION%@AE@%                Describes the module in one line
  15279.  
  15280. %@AB@%CODE%@AE@%                       Gives default attributes for code segments
  15281.  
  15282. %@AB@%DATA%@AE@%                       Gives default attributes for data segments
  15283.  
  15284. %@AB@%SEGMENTS%@AE@%                   Gives attributes for specific segments
  15285.  
  15286. %@AB@%STACKSIZE%@AE@%                  Specifies local-stack size in bytes
  15287.  
  15288. %@AB@%EXPORTS%@AE@%                    Defines exported functions
  15289.  
  15290. %@AB@%IMPORTS%@AE@%                    Defines imported functions
  15291.  
  15292. %@AB@%STUB%@AE@%                       Adds a DOS 3.x executable file to the beginning
  15293.                            of the module, usually to terminate the program
  15294.                            when run in real mode
  15295.  
  15296. %@AB@%HEAPSIZE%@AE@%                   Specifies local heap size in bytes
  15297.  
  15298. %@AB@%PROTMODE%@AE@%                   Specifies that the module runs only in DOS
  15299.                            protected mode
  15300.  
  15301. %@AB@%OLD%@AE@%                        Preserves import information from a previous
  15302.                            version of the library
  15303.  
  15304. %@AB@%REALMODE%@AE@%                   Relaxes some restrictions that the linker imposes
  15305.                            for protected-mode programs
  15306.  
  15307. %@AB@%EXETYPE%@AE@%                    Identifies operating system
  15308. %@TE:   37   1573  2 27 49 @%
  15309. %@NL@%
  15310. %@CR:MCVJ1003@%%@4@%The following rules govern the use of module statements in a%@EH@%
  15311. module-definition file:%@NL@%
  15312. %@NL@%
  15313. %@CR:MCVJ1004@%  ■  If you use either a %@AB@%NAME%@AE@% or a %@AB@%LIBRARY%@AE@% statement, it must precede all%@NL@%
  15314.      other statements in the module-definition file.%@NL@%
  15315. %@NL@%
  15316.   ■  You can include source-level comments in the module-definition file by%@NL@%
  15317.      beginning a line with a semicolon (%@AB@%;%@AE@%). The OS/2 utilities ignore each%@NL@%
  15318.      such comment line.%@NL@%
  15319. %@NL@%
  15320.   ■  All module-definition keywords (such as %@AB@%NAME%@AE@%, %@AB@%LIBRARY%@AE@%, and %@AB@%OLD%@AE@%) must be%@NL@%
  15321.      entered in uppercase letters.%@NL@%
  15322. %@NL@%
  15323. %@CR:MCVJ1005@%%@4@%The sample module-definition file below gives module definitions for a%@EH@%
  15324. dynamic-link library. This sample file includes one source-level comment and
  15325. five statements.%@NL@%
  15326. %@NL@%
  15327.      %@AI@%; Sample module-definition file%@AE@%%@NL@%
  15328. %@NL@%
  15329.      LIBRARY%@NL@%
  15330. %@NL@%
  15331.      DESCRIPTION 'Sample .DEF file for a dynamic-link library'%@NL@%
  15332. %@NL@%
  15333.      CODE       PRELOAD%@NL@%
  15334. %@NL@%
  15335.      STACKSIZE  1024%@NL@%
  15336. %@NL@%
  15337.      EXPORTS%@NL@%
  15338.          Init   @1%@NL@%
  15339.          Begin  @2%@NL@%
  15340.          Finish @3%@NL@%
  15341.          Load   @4%@NL@%
  15342.          Print  @5%@NL@%
  15343. %@NL@%
  15344. %@CR:MCVJ1006@%%@4@%The sections below explain the meaning of these statements, as well as%@EH@%
  15345. others, giving syntax and examples.%@NL@%
  15346. %@NL@%
  15347. %@NL@%
  15348. %@CR:MCVJ2000@%%@2@%%@AB@%19.2  The NAME Statement%@AE@%%@EH@%%@NL@%
  15349. %@NL@%
  15350. %@CR:MCVJ2001@%%@4@%The %@AB@%NAME%@AE@% statement identifies the executable file as an application and%@EH@%
  15351. optionally defines the name.%@NL@%
  15352. %@NL@%
  15353. %@CR:MCVJ2002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  15354. %@NL@%
  15355.      %@CR:MCVJ2003@%%@AB@%NAME%@AE@% «%@AI@%appname%@AE@%» «%@AI@%apptype%@AE@%»%@NL@%
  15356. %@NL@%
  15357. %@CR:MCVJ2004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  15358. %@NL@%
  15359. %@CR:MCVJ2005@%%@4@%If %@AI@%appname%@AE@% is given, it becomes the name of the application as it is known%@EH@%
  15360. by OS/2. This name can be any valid file name. If %@AI@%appname%@AE@% is not given, the
  15361. name of the module-definition file──with the extension removed──becomes the
  15362. name of the application.%@NL@%
  15363. %@NL@%
  15364. %@CR:MCVJ2006@%%@4@%The %@AI@%apptype%@AE@% field will be used by a future version of OS/2 and should be%@EH@%
  15365. declared for compatibility with this future version.%@NL@%
  15366. %@NL@%
  15367. %@CR:MCVJ2007@%%@4@%If %@AI@%apptype%@AE@% is given, it defines the type of application being linked. This%@EH@%
  15368. information is kept in the executable-file header. You do not need to use
  15369. this field unless you may be using your application in a Windows
  15370. environment. The %@AI@%apptype%@AE@% field may have one of the following values:%@NL@%
  15371. %@NL@%
  15372. %@CR:MCVJ2008@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15373. %@NL@%
  15374. %@AB@%WINDOWAPI%@AE@%                   Real-mode Presentation Manager application. The%@NL@%
  15375.                             application uses the API provided by the%@NL@%
  15376.                             Presentation Manager and must be executed in the%@NL@%
  15377.                             Presentation Manager environment.%@NL@%
  15378. %@NL@%
  15379. %@AB@%WINDOWCOMPAT%@AE@%                Presentation Manager-compatible application. The%@NL@%
  15380.                             application can run inside the Presentation%@NL@%
  15381.                             Manager, or it can run in a separate screen%@NL@%
  15382.                             group. An application can be of this type if it%@NL@%
  15383.                             uses the proper subset of OS/2 video, keyboard,%@NL@%
  15384.                             and mouse functions supported in the%@NL@%
  15385.                             Presentation Manager applications.%@NL@%
  15386. %@NL@%
  15387. %@AB@%NOTWINDOWCOMPAT%@AE@%             Application is not compatible with the%@NL@%
  15388.                             Presentation Manager and must operate in a%@NL@%
  15389.                             separate screen group from the Presentation%@NL@%
  15390.                             Manager.%@NL@%
  15391. %@NL@%
  15392. %@CR:MCVJ2009@%%@4@%If the %@AB@%NAME%@AE@% statement is included in the module-definition file, the %@AB@%LIBRARY%@AE@%%@EH@%
  15393. statement cannot appear. If neither a %@AB@%NAME%@AE@% statement nor a %@AB@%LIBRARY%@AE@% statement
  15394. appears in a module-definition file, the default is %@AB@%NAME%@AE@%──that is, the
  15395. linker acts as though a %@AB@%NAME%@AE@% statement were included, and thus creates an
  15396. application rather than a library.%@NL@%
  15397. %@NL@%
  15398. %@CR:MCVJ200A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  15399. %@NL@%
  15400. %@CR:MCVJ200B@%%@4@%The example below assigns the name %@AS@%calendar%@AE@% to the application being%@EH@%
  15401. defined:%@NL@%
  15402. %@NL@%
  15403.      NAME calendar WINDOWCOMPAT%@NL@%
  15404. %@NL@%
  15405. %@NL@%
  15406. %@CR:MCVJ3000@%%@2@%%@AB@%19.3  The LIBRARY Statement%@AE@%%@EH@%%@NL@%
  15407. %@NL@%
  15408. %@CR:MCVJ3001@%%@4@%The %@AB@%LIBRARY%@AE@% statement identifies the executable file as a dynamic-link%@EH@%
  15409. library and it can specify the name of the library or the type of
  15410. library-module initialization required.%@NL@%
  15411. %@NL@%
  15412. %@CR:MCVJ3002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  15413. %@NL@%
  15414.      %@CR:MCVJ3003@%%@AB@%LIBRARY%@AE@% «%@AI@%libraryname%@AE@%» «%@AI@%initialization%@AE@%»%@NL@%
  15415. %@NL@%
  15416. %@CR:MCVJ3004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  15417. %@NL@%
  15418. %@CR:MCVJ3005@%%@4@%If %@AI@%libraryname%@AE@% is given, it becomes the name of the library as it is known%@EH@%
  15419. by OS/2. This name can be any valid file name. If %@AI@%libraryname%@AE@% is not given,
  15420. the name of the module-definition file──with the extension removed──becomes
  15421. the name of the library.%@NL@%
  15422. %@NL@%
  15423. %@CR:MCVJ3006@%%@4@%The %@AI@%initialization%@AE@% field is optional and can have one of the two values%@EH@%
  15424. listed below. If neither is given, then the %@AI@%initialization%@AE@% default
  15425. is %@AB@%INITGLOBAL%@AE@%.%@NL@%
  15426. %@NL@%
  15427. %@CR:MCVJ3007@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15428. %@NL@%
  15429. %@AB@%INITGLOBAL%@AE@%                  The library-initialization routine is called%@NL@%
  15430.                             only when the library module is initially loaded%@NL@%
  15431.                             into memory%@NL@%
  15432. %@NL@%
  15433. %@AB@%INITINSTANCE%@AE@%                The library-initialization routine is called%@NL@%
  15434.                             each time a new process gains access to the%@NL@%
  15435.                             library%@NL@%
  15436. %@NL@%
  15437. %@CR:MCVJ3008@%%@4@%If the %@AB@%LIBRARY%@AE@% statement is included in a module-definition file, %@AB@%NAME%@AE@%%@EH@%
  15438. cannot appear. If no %@AB@%LIBRARY%@AE@% statement appears in a module-definition file,
  15439. the linker assumes that the module-definition file is defining an
  15440. application.%@NL@%
  15441. %@NL@%
  15442. %@CR:MCVJ3009@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  15443. %@NL@%
  15444. %@CR:MCVJ300A@%%@4@%The following example assigns the name %@AS@%calendar%@AE@% to the dynamic-link module%@EH@%
  15445. being defined, and specifies that library initialization is performed each
  15446. time a new process gains access to %@AS@%calendar%@AE@%:%@NL@%
  15447. %@NL@%
  15448.      LIBRARY calendar INITINSTANCE%@NL@%
  15449. %@NL@%
  15450. %@NL@%
  15451. %@CR:MCVJ4000@%%@2@%%@AB@%19.4  The DESCRIPTION Statement%@AE@%%@EH@%%@NL@%
  15452. %@NL@%
  15453. %@CR:MCVJ4001@%%@4@%The %@AB@%DESCRIPTION%@AE@% statement inserts the specified %@AI@%text%@AE@% into the application or%@EH@%
  15454. library. This statement is useful for embedding source-control or copyright
  15455. information into an application or library.%@NL@%
  15456. %@NL@%
  15457. %@CR:MCVJ4002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  15458. %@NL@%
  15459.     %@CR:MCVJ4003@%%@AB@%DESCRIPTION%@AE@% %@AB@%'%@AE@%%@AI@%text%@AE@%%@AB@%'%@AE@%%@NL@%
  15460. %@NL@%
  15461. %@CR:MCVJ4004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  15462. %@NL@%
  15463. %@CR:MCVJ4005@%%@4@%The %@AI@%text%@AE@% is a one-line string enclosed in single quotation marks. Use of the%@EH@%
  15464. %@AB@%DESCRIPTION%@AE@% statement is different from the inclusion of a comment because
  15465. comments──lines that begin with a semicolon (;)──are not placed in the
  15466. application or library.%@NL@%
  15467. %@NL@%
  15468. %@CR:MCVJ4006@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  15469. %@NL@%
  15470. %@CR:MCVJ4007@%%@4@%The following example inserts the text %@AS@%Template Program%@AE@% into the application%@EH@%
  15471. or library being defined:%@NL@%
  15472. %@NL@%
  15473.      DESCRIPTION 'Template Program'%@NL@%
  15474. %@NL@%
  15475. %@NL@%
  15476. %@CR:MCVJ5000@%%@2@%%@AB@%19.5  The CODE Statement%@AE@%%@EH@%%@NL@%
  15477. %@NL@%
  15478. %@CR:MCVJ5001@%%@4@%The %@AB@%CODE%@AE@% statement defines the default attributes for code segments within%@EH@%
  15479. the application or library.%@NL@%
  15480. %@NL@%
  15481. %@CR:MCVJ5002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  15482. %@NL@%
  15483.      %@CR:MCVJ5003@%%@AB@%CODE%@AE@% «%@AI@%attribute%@AE@%...»%@NL@%
  15484. %@NL@%
  15485. %@CR:MCVJ5004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  15486. %@NL@%
  15487. %@CR:MCVJ5005@%%@4@%Each %@AI@%attribute%@AE@% must correspond to one of the following attribute fields.%@EH@%
  15488. Each field can appear at most one time, and order is not significant. The
  15489. attribute fields are presented below, along with legal values. In each case,
  15490. the default value is listed last. The last three fields have no effect on
  15491. OS/2 code segments and are included for use with Microsoft Windows.%@NL@%
  15492. %@NL@%
  15493. %@CR:MCVJ5006@%%@AB@%Field                       Values%@AE@%%@NL@%
  15494. %@NL@%
  15495. %@AI@%load%@AE@%                        %@AB@%PRELOAD%@AE@%, %@AB@%LOADONCALL%@AE@%%@NL@%
  15496. %@NL@%
  15497. %@AI@%executeonly%@AE@%                 %@AB@%EXECUTEONLY%@AE@%, %@AB@%EXECUTEREAD%@AE@%%@NL@%
  15498. %@NL@%
  15499. %@AI@%iopl%@AE@%                        %@AB@%IOPL%@AE@%, %@AB@%NOIOPL%@AE@%%@NL@%
  15500. %@NL@%
  15501. %@AI@%conforming%@AE@%                  %@AB@%CONFORMING%@AE@%, %@AB@%NONCONFORMING%@AE@%%@NL@%
  15502. %@NL@%
  15503. %@AI@%shared%@AE@%                      %@AB@%SHARED%@AE@%, %@AB@%NONSHARED%@AE@%%@NL@%
  15504. %@NL@%
  15505. %@AI@%movable%@AE@%                     %@AB@%MOVABLE%@AE@%, %@AB@%FIXED%@AE@%%@NL@%
  15506. %@NL@%
  15507. %@AI@%discard%@AE@%                     %@AB@%NONDISCARDABLE%@AE@%, %@AB@%DISCARDABLE%@AE@%%@NL@%
  15508. %@NL@%
  15509. %@CR:MCVJ5007@%%@4@%The %@AI@%load%@AE@% field determines when a code segment is to be loaded. This field%@EH@%
  15510. contains one of the following keywords:%@NL@%
  15511. %@NL@%
  15512. %@CR:MCVJ5008@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15513. %@NL@%
  15514. %@AB@%PRELOAD%@AE@%                     The segment is loaded automatically at the%@NL@%
  15515.                             beginning of the program%@NL@%
  15516. %@NL@%
  15517. %@AB@%LOADONCALL%@AE@%                  The segment is not loaded until accessed (the%@NL@%
  15518.                             default)%@NL@%
  15519. %@NL@%
  15520. %@CR:MCVJ5009@%%@4@%The %@AI@%executeonly%@AE@% field determines whether a code segment can be read as well%@EH@%
  15521. as executed. This field contains one of the following keywords:%@NL@%
  15522. %@NL@%
  15523. %@CR:MCVJ500A@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15524. %@NL@%
  15525. %@AB@%EXECUTEONLY%@AE@%                 The segment can only be executed%@NL@%
  15526. %@NL@%
  15527. %@AB@%EXECUTEREAD%@AE@%                 The segment can be both executed and read (the%@NL@%
  15528.                             default)%@NL@%
  15529. %@NL@%
  15530. %@CR:MCVJ500B@%%@4@%The %@AI@%iopl%@AE@% field determines whether or not a segment has I/O privilege (that%@EH@%
  15531. is, whether it can access the hardware directly). This field contains one of
  15532. the following keywords:%@NL@%
  15533. %@NL@%
  15534. %@CR:MCVJ500C@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15535. %@NL@%
  15536. %@AB@%IOPL%@AE@%                        The code segment has I/O privilege%@NL@%
  15537. %@NL@%
  15538. %@AB@%NOIOPL%@AE@%                      The code segment does not have I/O privilege%@NL@%
  15539.                             (the default)%@NL@%
  15540. %@NL@%
  15541. %@CR:MCVJ500D@%%@4@%The %@AI@%conforming%@AE@% field specifies whether a code segment is a 286 "conforming"%@EH@%
  15542. segment. The concept of a conforming segment deals with privilege level (the
  15543. range of instructions that the process can execute) and is relevant only to
  15544. users writing device drivers and system-level code. A conforming segment can
  15545. be called from either Ring 2 or Ring 3, and the segment executes at the
  15546. caller's privilege level. This field contains one of the following keywords:%@NL@%
  15547. %@NL@%
  15548. %@CR:MCVJ500E@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15549. %@NL@%
  15550. %@AB@%CONFORMING%@AE@%                  The segment is conforming%@NL@%
  15551. %@NL@%
  15552. %@AB@%NONCONFORMING%@AE@%               The segment is nonconforming (the default)%@NL@%
  15553. %@NL@%
  15554. %@CR:MCVJ500F@%%@4@%The %@AI@%shared%@AE@% field determines whether all instances of the program can share a%@EH@%
  15555. given code segment. This field is ignored by OS/2, but is provided for use
  15556. with real-mode Windows. Under OS/2, all code segments are shared. The %@AI@%shared%@AE@%
  15557. field contains one of the following keywords: %@AB@%SHARED%@AE@% or %@AB@%NONSHARED%@AE@% (the
  15558. default for Windows).%@NL@%
  15559. %@NL@%
  15560. %@CR:MCVJ500G@%%@4@%The %@AI@%movable%@AE@% field determines whether a segment can be moved around in%@EH@%
  15561. memory. This field is ignored by OS/2, but is provided for use with
  15562. real-mode Windows. Under OS/2, all segments are movable. The %@AI@%movable%@AE@% field
  15563. contains one of the following keywords: %@AB@%MOVABLE%@AE@% or %@AB@%FIXED%@AE@% (the default for
  15564. Windows).%@NL@%
  15565. %@NL@%
  15566. %@CR:MCVJ500H@%%@4@%The %@AI@%discard%@AE@% field determines whether a segment can be swapped out to disk by%@EH@%
  15567. the operating system when not currently needed. This attribute is ignored by
  15568. OS/2, but is provided for use with real-mode Windows. Under OS/2 systems,
  15569. all segments can be swapped as needed. The %@AI@%shared%@AE@% attribute contains one of
  15570. the following keywords: %@AB@%DISCARDABLE%@AE@% or %@AB@%NONDISCARDABLE%@AE@% (the default for
  15571. Windows).%@NL@%
  15572. %@NL@%
  15573. %@CR:MCVJ500I@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  15574. %@NL@%
  15575. %@CR:MCVJ500J@%%@4@%The following example sets defaults for the module's code segments so they%@EH@%
  15576. are not loaded until accessed and have I/O hardware privilege:%@NL@%
  15577. %@NL@%
  15578.      CODE LOADONCALL IOPL%@NL@%
  15579. %@NL@%
  15580. %@NL@%
  15581. %@CR:MCVJ6000@%%@2@%%@AB@%19.6  The DATA Statement%@AE@%%@EH@%%@NL@%
  15582. %@NL@%
  15583. %@CR:MCVJ6001@%%@4@%The %@AB@%DATA%@AE@% statement defines the default attributes for the data segments%@EH@%
  15584. within the application or module.%@NL@%
  15585. %@NL@%
  15586. %@CR:MCVJ6002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  15587. %@NL@%
  15588.      %@CR:MCVJ6003@%%@AB@%DATA%@AE@% «%@AI@%attribute%@AE@%...»%@NL@%
  15589. %@NL@%
  15590. %@CR:MCVJ6004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  15591. %@NL@%
  15592. %@CR:MCVJ6005@%%@4@%Each %@AI@%attribute%@AE@% must correspond to one of the following attribute fields.%@EH@%
  15593. Each field can appear at most one time, and order is not significant. The
  15594. attribute fields are present below, along with legal values. In each case,
  15595. the default value is listed last. The last two fields have no effect on OS/2
  15596. data segments, but are included for use with Microsoft Windows.%@NL@%
  15597. %@NL@%
  15598. %@CR:MCVJ6006@%%@AB@%Field                       Values%@AE@%%@NL@%
  15599. %@NL@%
  15600. %@AI@%load%@AE@%                        %@AB@%PRELOAD%@AE@%, %@AB@%LOADONCALL%@AE@%%@NL@%
  15601. %@NL@%
  15602. %@AI@%readonly%@AE@%                    %@AB@%READONLY%@AE@%, %@AB@%READWRITE%@AE@%%@NL@%
  15603. %@NL@%
  15604. %@AI@%instance%@AE@%                    %@AB@%NONE%@AE@%, %@AB@%SINGLE%@AE@%, %@AB@%MULTIPLE%@AE@%%@NL@%
  15605. %@NL@%
  15606. %@AI@%iopl%@AE@%                        %@AB@%IOPL%@AE@%, %@AB@%NOIOPL%@AE@%%@NL@%
  15607. %@NL@%
  15608. %@AI@%shared%@AE@%                      %@AB@%SHARED%@AE@%, %@AB@%NONSHARED%@AE@%%@NL@%
  15609. %@NL@%
  15610. %@AI@%movable%@AE@%                     %@AB@%MOVABLE%@AE@%, %@AB@%FIXED%@AE@%%@NL@%
  15611. %@NL@%
  15612. %@AI@%discard%@AE@%                     %@AB@%NONDISCARDABLE%@AE@%, %@AB@%DISCARDABLE%@AE@%%@NL@%
  15613. %@NL@%
  15614. %@CR:MCVJ6007@%%@4@%The %@AI@%load%@AE@% field determines when a segment will be loaded. This field contains%@EH@%
  15615. one of the following keywords:%@NL@%
  15616. %@NL@%
  15617. %@CR:MCVJ6008@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15618. %@NL@%
  15619. %@AB@%PRELOAD%@AE@%                     The segment is loaded when the program begins%@NL@%
  15620.                             execution%@NL@%
  15621. %@NL@%
  15622. %@AB@%LOADONCALL%@AE@%                  The segment is not loaded until it is accessed%@NL@%
  15623.                             (the default)%@NL@%
  15624. %@NL@%
  15625. %@CR:MCVJ6009@%%@4@%The %@AI@%readonly%@AE@% field determines the access rights to a data segment. This%@EH@%
  15626. field contains one of the following keywords:%@NL@%
  15627. %@NL@%
  15628. %@CR:MCVJ600A@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15629. %@NL@%
  15630. %@AB@%READONLY%@AE@%                    The segment can only be read%@NL@%
  15631. %@NL@%
  15632. %@AB@%READWRITE%@AE@%                   The segment can be both read and written to (the%@NL@%
  15633.                             default)%@NL@%
  15634. %@NL@%
  15635. %@CR:MCVJ600B@%%@4@%The %@AI@%instance%@AE@% field affects the sharing attributes of the automatic data%@EH@%
  15636. segment, which is the physical segment represented by the group name DGROUP.
  15637. (This segment group makes up the physical segment which contains the local
  15638. stack and heap of the application.) The %@AI@%instance%@AE@% field contains one of the
  15639. following keywords:%@NL@%
  15640. %@NL@%
  15641. %@CR:MCVJ600C@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15642. %@NL@%
  15643. %@AB@%NONE%@AE@%                        No automatic data segment is created.%@NL@%
  15644. %@NL@%
  15645. %@AB@%SINGLE%@AE@%                      A single automatic data segment is shared by all%@NL@%
  15646.                             instances of the module. In this case, the%@NL@%
  15647.                             module is said to have "solo" data. This keyword%@NL@%
  15648.                             is the default for dynamic-link libraries.%@NL@%
  15649. %@NL@%
  15650. %@AB@%MULTIPLE%@AE@%                    The automatic data segment is copied for each%@NL@%
  15651.                             instance of the module. In this case, the module%@NL@%
  15652.                             is said to have "instance" data. This keyword is%@NL@%
  15653.                             the default for applications.%@NL@%
  15654. %@NL@%
  15655. %@CR:MCVJ600D@%%@4@%The %@AI@%iopl%@AE@% field determines whether or not data segments have I/O privilege%@EH@%
  15656. (that is, whether or not they can access the hardware directly). This field
  15657. contains one of the following keywords:%@NL@%
  15658. %@NL@%
  15659. %@CR:MCVJ600E@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15660. %@NL@%
  15661. %@AB@%IOPL%@AE@%                        The data segments have I/O privilege%@NL@%
  15662. %@NL@%
  15663. %@AB@%NOIOPL%@AE@%                      The data segments do not have I/O privilege (the%@NL@%
  15664.                             default)%@NL@%
  15665. %@NL@%
  15666. %@CR:MCVJ600F@%%@4@%The %@AI@%shared%@AE@% field determines whether all instances of the program can share a%@EH@%
  15667. %@AB@%READWRITE%@AE@% data segment. Under OS/2, this field is ignored by the linker if
  15668. the segment has the attribute %@AB@%READONLY%@AE@%, since %@AB@%READONLY%@AE@% data segments are
  15669. always shared. The %@AI@%shared%@AE@% field contains one of the following keywords:%@NL@%
  15670. %@NL@%
  15671. %@CR:MCVJ600G@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15672. %@NL@%
  15673. %@AB@%SHARED%@AE@%                      One copy of the data segment will be loaded and%@NL@%
  15674.                             shared among all processes accessing the module.%@NL@%
  15675.                             This keyword is the default for dynamic-link%@NL@%
  15676.                             libraries%@NL@%
  15677. %@NL@%
  15678. %@AB@%NONSHARED%@AE@%                   The segment cannot be shared and must be loaded%@NL@%
  15679.                             separately for each process. This keyword is the%@NL@%
  15680.                             default for applications%@NL@%
  15681. %@NL@%
  15682. %@CR:MCVJ600H@%%@4@%The %@AI@%movable%@AE@% field determines whether a segment can be moved around in%@EH@%
  15683. memory. This field is ignored by OS/2, but is provided for use with
  15684. real-mode Windows. Under OS/2, all segments are movable. The %@AI@%movable%@AE@% field
  15685. contains one of the following keywords: %@AB@%MOVABLE%@AE@% or %@AB@%FIXED%@AE@% (the default for
  15686. Windows).%@NL@%
  15687. %@NL@%
  15688. %@CR:MCVJ600I@%%@4@%The optional %@AI@%discard%@AE@% field determines whether a segment can be swapped out%@EH@%
  15689. to disk by the operating system when not currently needed. This attribute is
  15690. ignored by OS/2, but is provided for use with real-mode Windows. Under OS/2
  15691. systems, all segments can be swapped as needed. The %@AI@%discard%@AE@% attribute
  15692. contains one of the following keywords: %@AB@%DISCARDABLE%@AE@% or %@AB@%NONDISCARDABLE%@AE@% (the
  15693. default for Windows).%@NL@%
  15694. %@NL@%
  15695. %@CR:MCVJ600J@%%@4@%Note that the linker makes the automatic-data-segment attribute (specified%@EH@%
  15696. by an instance value of %@AB@%SINGLE%@AE@% or %@AB@%MULTIPLE%@AE@%) match the sharing attribute of
  15697. the automatic data segment (specified by a shared value of %@AB@%SHARED%@AE@% or
  15698. %@AB@%NONSHARED%@AE@%). Solo data (specified by %@AB@%SINGLE%@AE@%) force shared data segments by
  15699. default. Instance data (specified by %@AB@%MULTIPLE%@AE@%) force nonshared data by
  15700. default. Similarly, %@AB@%SHARED%@AE@% forces solo data, and %@AB@%NONSHARED%@AE@% forces instance
  15701. data.%@NL@%
  15702. %@NL@%
  15703. %@CR:MCVJ600K@%%@4@%If you give a contradictory %@AB@%DATA%@AE@% statement such as %@AS@%DATA SINGLE NONSHARED%@AE@%,%@EH@%
  15704. all segments in DGROUP are shared, and all other data segments are nonshared
  15705. by default. If a segment that is a member of DGROUP is defined with a
  15706. sharing attribute that conflicts with the automatic data type, a warning
  15707. about the bad segment is issued, and the segment's flags are converted to a
  15708. consistent sharing attribute. For example, the following%@NL@%
  15709. %@NL@%
  15710.      DATA SINGLE%@NL@%
  15711.      SEGMENTS%@NL@%
  15712.      _DATA CLASS 'DATA' NONSHARED%@NL@%
  15713. %@NL@%
  15714. %@CR:MCVJ600L@%is converted to%@NL@%
  15715. %@NL@%
  15716.      _DATA CLASS 'DATA' SHARED%@NL@%
  15717. %@NL@%
  15718. %@CR:MCVJ600M@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  15719. %@NL@%
  15720. %@CR:MCVJ600N@%%@4@%The example below defines the application's data segment so it is loaded%@EH@%
  15721. only when it is accessed and cannot be shared by more than one copy of the
  15722. program.%@NL@%
  15723. %@NL@%
  15724.      DATA LOADONCALL NONSHARED%@NL@%
  15725. %@NL@%
  15726. %@CR:MCVJ600O@%%@4@%By default, the data segment can be read and written, the automatic-data%@EH@%
  15727. segment is copied for each instance of the module, and the data segment has
  15728. no I/O privilege.%@NL@%
  15729. %@NL@%
  15730. %@NL@%
  15731. %@CR:MCVJ7000@%%@2@%%@AB@%19.7  The SEGMENTS Statement%@AE@%%@EH@%%@NL@%
  15732. %@NL@%
  15733. %@CR:MCVJ7001@%%@4@%The %@AB@%SEGMENTS%@AE@% statement defines the attributes of one or more segments in the%@EH@%
  15734. application or library on a segment-by-segment basis. The attributes
  15735. specified by this statement override defaults set in %@AB@%CODE%@AE@% and %@AB@%DATA%@AE@%
  15736. statements.%@NL@%
  15737. %@NL@%
  15738. %@CR:MCVJ7002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  15739. %@NL@%
  15740.      %@CR:MCVJ7003@%%@AB@%SEGMENTS%@AE@% %@AI@%segmentdefinitions%@AE@%%@NL@%
  15741. %@NL@%
  15742. %@CR:MCVJ7004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  15743. %@NL@%
  15744. %@CR:MCVJ7005@%%@4@%The %@AB@%SEGMENTS%@AE@% keyword marks the beginning of the segment definitions. This%@EH@%
  15745. keyword can be followed by one or more segment definitions, each on a
  15746. separate line (limited by the number set by the linker's /SEGMENTS option,
  15747. or 128 if the option is not used). The syntax for each segment definition is
  15748. as follows:%@NL@%
  15749. %@NL@%
  15750.      %@CR:MCVJ7006@%«%@AB@%'%@AE@%»%@AI@%segmentname%@AE@%«%@AB@%'%@AE@%»«%@AB@%CLASS%@AE@%%@AB@%'%@AE@%%@AI@%classname%@AE@%%@AB@%'%@AE@%» «%@AI@%attribute%@AE@%... »%@NL@%
  15751. %@NL@%
  15752. %@CR:MCVJ7007@%%@4@%Each segment definition begins with a %@AI@%segmentname%@AE@%, which can be placed in%@EH@%
  15753. optional single quotation marks (%@AB@%'%@AE@%). The quotation marks are required if
  15754. %@AI@%segmentname%@AE@% conflicts with a module-definition keyword, such as %@AB@%CODE%@AE@% or
  15755. %@AB@%DATA%@AE@%.%@NL@%
  15756. %@NL@%
  15757. %@CR:MCVJ7008@%%@4@%The %@AB@%CLASS%@AE@% keyword specifies the class of the segment. Single quotation marks%@EH@%
  15758. (%@AB@%'%@AE@%) are required around %@AI@%classname%@AE@%. If you do not use the %@AB@%CLASS%@AE@% argument, the
  15759. linker assumes that the class is %@AB@%CODE%@AE@%.%@NL@%
  15760. %@NL@%
  15761. %@CR:MCVJ7009@%%@4@%Each %@AI@%attribute%@AE@% must correspond to one of the following attribute fields.%@EH@%
  15762. Each field can appear at most one time, and order is not significant. The
  15763. attribute fields are presented below, along with legal values. In each case,
  15764. the default value is listed last.%@NL@%
  15765. %@NL@%
  15766. %@CR:MCVJ700A@%%@AB@%Field                       Values%@AE@%%@NL@%
  15767. %@NL@%
  15768. %@AI@%load%@AE@%                        %@AB@%PRELOAD%@AE@%, %@AB@%LOADONCALL%@AE@%%@NL@%
  15769. %@NL@%
  15770. %@AI@%readonly%@AE@%                    %@AB@%READONLY%@AE@%, %@AB@%READWRITE%@AE@%%@NL@%
  15771. %@NL@%
  15772. %@AI@%executeonly%@AE@%                 %@AB@%EXECUTEONLY%@AE@%, %@AB@%EXECUTEREAD%@AE@%%@NL@%
  15773. %@NL@%
  15774. %@AI@%iopl%@AE@%                        %@AB@%IOPL%@AE@%, %@AB@%NOIOPL%@AE@%%@NL@%
  15775. %@NL@%
  15776. %@AI@%conforming%@AE@%                  %@AB@%CONFORMING%@AE@%, %@AB@%NONCONFORMING%@AE@%%@NL@%
  15777. %@NL@%
  15778. %@AI@%shared%@AE@%                      %@AB@%SHARED%@AE@%, %@AB@%NONSHARED%@AE@%%@NL@%
  15779. %@NL@%
  15780. %@AI@%movable%@AE@%                     %@AB@%MOVABLE%@AE@%, %@AB@%FIXED%@AE@%%@NL@%
  15781. %@NL@%
  15782. %@AI@%discard%@AE@%                     %@AB@%NONDISCARDABLE%@AE@%, %@AB@%DISCARDABLE%@AE@%%@NL@%
  15783. %@NL@%
  15784. %@CR:MCVJ700B@%%@4@%The %@AI@%load%@AE@% field determines when a segment is to be loaded. This field%@EH@%
  15785. contains one of the following keywords:%@NL@%
  15786. %@NL@%
  15787. %@CR:MCVJ700C@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15788. %@NL@%
  15789. %@AB@%PRELOAD%@AE@%                     The segment is loaded automatically at the%@NL@%
  15790.                             beginning of the program%@NL@%
  15791. %@NL@%
  15792. %@AB@%LOADONCALL%@AE@%                  The segment is not loaded until accessed (the%@NL@%
  15793.                             default)%@NL@%
  15794. %@NL@%
  15795. %@CR:MCVJ700D@%%@4@%The %@AI@%readonly%@AE@% field determines the access rights to a data segment. This%@EH@%
  15796. field contains one of the following keywords:%@NL@%
  15797. %@NL@%
  15798. %@CR:MCVJ700E@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15799. %@NL@%
  15800. %@AB@%READONLY%@AE@%                    The segment can only be read%@NL@%
  15801. %@NL@%
  15802. %@AB@%READWRITE%@AE@%                   The segment can be both read and written to (the%@NL@%
  15803.                             default)%@NL@%
  15804. %@NL@%
  15805. %@CR:MCVJ700F@%%@4@%The %@AI@%executeonly%@AE@% field determines whether a code segment can be read as well%@EH@%
  15806. as executed. (The attribute has no effect on data segments.) This field
  15807. contains one of the following keywords:%@NL@%
  15808. %@NL@%
  15809. %@CR:MCVJ700G@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15810. %@NL@%
  15811. %@AB@%EXECUTEONLY%@AE@%                 The segment can only be executed%@NL@%
  15812. %@NL@%
  15813. %@AB@%EXECUTEREAD%@AE@%                 The segment can be both executed and read (the%@NL@%
  15814.                             default)%@NL@%
  15815. %@NL@%
  15816. %@CR:MCVJ700H@%%@4@%The %@AI@%iopl%@AE@% field determines whether or not a segment has I/O privilege (that%@EH@%
  15817. is, whether it can access the hardware directly). This field contains one of
  15818. the following keywords:%@NL@%
  15819. %@NL@%
  15820. %@CR:MCVJ700I@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15821. %@NL@%
  15822. %@AB@%IOPL%@AE@%                        The segments have I/O privilege%@NL@%
  15823. %@NL@%
  15824. %@AB@%NOIOPL%@AE@%                      The segments do not have I/O privilege (the%@NL@%
  15825.                             default)%@NL@%
  15826. %@NL@%
  15827. %@CR:MCVJ700J@%%@4@%The %@AI@%conforming%@AE@% field specifies whether a code segment is a 286 "conforming"%@EH@%
  15828. segment. The concept of a conforming segment deals with privilege level (the
  15829. range of instructions that the process can execute) and is relevant only to
  15830. users writing device drivers and system-level code. A conforming segment can
  15831. be called from either Ring 2 or Ring 3, and the segment executes at the
  15832. caller's privilege level. (The attribute has no effect on data segments.)
  15833. This field contains one of the following keywords:%@NL@%
  15834. %@NL@%
  15835. %@CR:MCVJ700K@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  15836. %@NL@%
  15837. %@AB@%CONFORMING%@AE@%                  The segment is conforming%@NL@%
  15838. %@NL@%
  15839. %@AB@%NONCONFORMING%@AE@%               The segment is nonconforming (the default)%@NL@%
  15840. %@NL@%
  15841. %@CR:MCVJ700L@%%@4@%The %@AI@%shared%@AE@% field determines whether all instances of the program can share a%@EH@%
  15842. %@AB@%READWRITE%@AE@% segment. For code segments and %@AB@%READONLY%@AE@% data segments, this field
  15843. is ignored by OS/2, but is provided for use with real-mode Windows. Under
  15844. OS/2, all code segments and all %@AB@%READONLY%@AE@% data segments are shared. The
  15845. %@AI@%shared%@AE@% field contains one of the following keywords: %@AB@%SHARED%@AE@% or %@AB@%NONSHARED%@AE@%
  15846. (the default).%@NL@%
  15847. %@NL@%
  15848. %@CR:MCVJ700M@%%@4@%The %@AI@%movable%@AE@% field determines whether a segment can be moved around in%@EH@%
  15849. memory. This field is ignored by OS/2, but is provided for use with
  15850. real-mode Windows. Under OS/2, all segments are movable. The %@AI@%movable%@AE@% field
  15851. contains one of the following keywords: %@AB@%MOVABLE%@AE@% or %@AB@%FIXED%@AE@% (the default for
  15852. Windows).%@NL@%
  15853. %@NL@%
  15854. %@CR:MCVJ700N@%%@4@%The optional %@AI@%discard%@AE@% field determines whether a segment can be swapped out%@EH@%
  15855. to disk by the operating system, when not currently needed. This attribute
  15856. is ignored by OS/2, but is provided for use with real-mode Windows. Under
  15857. OS/2 systems, all segments can be swapped as needed. The %@AI@%shared%@AE@% attribute
  15858. contains one of the following keywords: %@AB@%DISCARDABLE%@AE@% or %@AB@%NONDISCARDABLE%@AE@% (the
  15859. default for Windows).%@NL@%
  15860. %@NL@%
  15861. %@CR:MCVJ700O@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  15862. %@NL@%
  15863. %@CR:MCVJ700P@%%@4@%The following example specifies segments named %@AS@%cseg1%@AE@%, %@AS@%cseg2%@AE@%, and %@AS@%dseg%@AE@%. The%@EH@%
  15864. first segment is assigned class %@AS@%mycode%@AE@% and the second is assigned %@AB@%CODE%@AE@% by
  15865. default. Each segment is given different attributes.%@AS@%%@NL@%
  15866. %@NL@%
  15867.      SEGMENTS%@NL@%
  15868.          cseg1 CLASS 'mycode' IOPL%@NL@%
  15869.          cseg2 EXECUTEONLY PRELOAD CONFORMING%@NL@%
  15870.          dseg  CLASS 'data' LOADONCALL READONLY%@NL@%
  15871. %@NL@%
  15872. %@NL@%
  15873. %@CR:MCVJ8000@%%@2@%%@AB@%19.8  The STACKSIZE Statement%@AE@%%@EH@%%@NL@%
  15874. %@NL@%
  15875. %@CR:MCVJ8001@%%@4@%The %@AB@%STACKSIZE%@AE@% statement performs the same function as the /STACKSIZE linker%@EH@%
  15876. option. It overrides the size of any stack segment defined in an
  15877. application. (The %@AB@%STACKSIZE%@AE@% statement overrides the /STACKSIZE option).%@NL@%
  15878. %@NL@%
  15879. %@CR:MCVJ8002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  15880. %@NL@%
  15881.      %@CR:MCVJ8003@%%@AB@%STACKSIZE%@AE@% %@AI@%number%@AE@%%@NL@%
  15882. %@NL@%
  15883. %@CR:MCVJ8004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  15884. %@NL@%
  15885. %@CR:MCVJ8005@%%@4@%The %@AI@%number%@AE@% must be an integer; it is considered to be in decimal format by%@EH@%
  15886. default, but you can use C notation to specify hexadecimal or octal.%@NL@%
  15887. %@NL@%
  15888. %@CR:MCVJ8006@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  15889. %@NL@%
  15890. %@CR:MCVJ8007@%%@4@%The following example allocates 4,096 bytes of local-stack space:%@EH@%%@NL@%
  15891. %@NL@%
  15892.      STACKSIZE 4096%@NL@%
  15893. %@NL@%
  15894. %@NL@%
  15895. %@CR:MCVJ9000@%%@2@%%@AB@%19.9  The EXPORTS Statement%@AE@%%@EH@%%@NL@%
  15896. %@NL@%
  15897. %@CR:MCVJ9001@%%@4@%The %@AB@%EXPORTS%@AE@% statement defines the names and attributes of the functions%@EH@%
  15898. exported to other modules and of the functions that run with I/O privilege.
  15899. The term "export" refers to the process of making a function available to
  15900. other run-time modules. By default, functions are hidden from other modules
  15901. at run time.%@NL@%
  15902. %@NL@%
  15903. %@CR:MCVJ9002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  15904. %@NL@%
  15905.      %@CR:MCVJ9003@%%@AB@%EXPORTS%@AE@% %@AI@%exportdefinitions%@AE@%%@NL@%
  15906. %@NL@%
  15907. %@CR:MCVJ9004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  15908. %@NL@%
  15909. %@CR:MCVJ9005@%%@4@%The %@AB@%EXPORTS%@AE@% keyword marks the beginning of the export definitions. It may be%@EH@%
  15910. followed by up to 3,072 export definitions, each on a separate line. You
  15911. need to give an export definition for each dynamic-link routine you want to
  15912. make available to other modules. The syntax for an export definition is as
  15913. follows:%@NL@%
  15914. %@NL@%
  15915.      %@CR:MCVJ9006@%%@AI@%entryname%@AE@%«=%@AI@%internalname%@AE@%» «%@AB@%@%@AE@%%@AI@%ord%@AE@%«%@AB@%RESIDENTNAME%@AE@%»» «%@AI@%pwords%@AE@%» «%@AB@%NODATA%@AE@%»%@AB@%%@NL@%
  15916. %@NL@%
  15917. %@CR:MCVJ9007@%%@4@%The %@AI@%entryname%@AE@% specification defines the function name as it is known to%@EH@%
  15918. other modules. The optional %@AI@%internalname%@AE@% defines the actual name of the
  15919. export function as it appears within the module itself; by default, this
  15920. name is the same as %@AI@%entryname%@AE@%.%@NL@%
  15921. %@NL@%
  15922. %@CR:MCVJ9008@%%@4@%The optional %@AI@%ord%@AE@% field defines the function's ordinal position within the%@EH@%
  15923. module-definition table. If this field is used, the function's entry point
  15924. can be invoked by name or by ordinal. Use of ordinal positions is faster and
  15925. may save space.%@NL@%
  15926. %@NL@%
  15927. %@CR:MCVJ9009@%%@4@%The optional keyword %@AB@%RESIDENTNAME%@AE@% specifies that the function's name be kept%@EH@%
  15928. resident in memory at all times. This keyword is applicable only if the %@AI@%ord%@AE@%
  15929. option is used because if the %@AI@%ord%@AE@% option is not used, OS/2 automatically
  15930. keeps the names of all exported functions resident in memory anyway.%@NL@%
  15931. %@NL@%
  15932. %@CR:MCVJ900A@%%@4@%The %@AI@%pwords%@AE@% field specifies the total size of the function's parameters, as%@EH@%
  15933. meas-ured in words (the total number of bytes divided by two). This field is
  15934. required only if the function executes with I/O privilege. When a function
  15935. with I/O privilege is called, OS/2 consults the %@AI@%pwords%@AE@% field to determine
  15936. how many words to copy from the caller's stack to the I/O-privileged
  15937. function's stack.%@NL@%
  15938. %@NL@%
  15939. %@CR:MCVJ900B@%%@4@%The optional keyword %@AB@%NODATA%@AE@% is ignored by OS/2, but is provided for use by%@EH@%
  15940. real-mode Windows.%@NL@%
  15941. %@NL@%
  15942. %@CR:MCVJ900C@%%@4@%Normally, the %@AB@%EXPORTS%@AE@% statement is only meaningful for functions within%@EH@%
  15943. dynamic-link libraries and for functions that execute with I/O privilege.%@NL@%
  15944. %@NL@%
  15945. %@CR:MCVJ900D@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  15946. %@NL@%
  15947. %@CR:MCVJ900E@%%@4@%The following %@AB@%EXPORTS%@AE@% statement defines the three export functions %@EH@%
  15948. %@AS@%SampleRead%@AE@%, %@AS@%StringIn%@AE@%, and %@AS@%CharTest%@AE@%. The first two functions can be accessed
  15949. either by their exported names or by an ordinal number. Note that in the
  15950. module's own source code, these functions are defined as %@AS@%read2bin%@AE@% and %@AS@%str1%@AE@%,
  15951. respectively. The last function runs with I/O privilege and therefore is
  15952. given with the total size of the parameters: six words.%@NL@%
  15953. %@NL@%
  15954.      EXPORTS%@NL@%
  15955.             SampleRead = read2bin  @8%@NL@%
  15956.             StringIn = str1        @4  RESIDENTNAME%@NL@%
  15957.             CharTest   6%@NL@%
  15958. %@NL@%
  15959. %@NL@%
  15960. %@CR:MCVJA000@%%@2@%%@AB@%19.10  The IMPORTS Statement%@AE@%%@EH@%%@NL@%
  15961. %@NL@%
  15962. %@CR:MCVJA001@%%@4@%The %@AB@%IMPORTS%@AE@% statement defines the names of the functions that will be%@EH@%
  15963. imported for the application or library. The term "import" refers to the
  15964. process of declaring that a symbol is defined in another run-time module (a
  15965. dynamic-link library). Typically, LINK uses an import library (created by
  15966. the IMPLIB utility) to resolve external references to dynamic-link symbols.
  15967. However, the %@AB@%IMPORTS%@AE@% statement provides an alternative for resolving these
  15968. references within a module.%@NL@%
  15969. %@NL@%
  15970. %@CR:MCVJA002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  15971. %@NL@%
  15972.      %@CR:MCVJA003@%%@AB@%IMPORTS%@AE@% %@AI@%importdefinitions%@AE@%%@NL@%
  15973. %@NL@%
  15974. %@CR:MCVJA004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  15975. %@NL@%
  15976. %@CR:MCVJA005@%%@4@%The %@AB@%IMPORTS%@AE@% keyword marks the beginning of the import definitions. This%@EH@%
  15977. keyword is followed by one or more import definitions, each on a separate
  15978. line. The only limit on the number of import definitions is that the total
  15979. amount of space required for their names must be less than 64K. Each import
  15980. definition corresponds to a particular function. The syntax for an import
  15981. definition is as follows:%@AI@%%@NL@%
  15982. %@NL@%
  15983.      %@CR:MCVJA006@%«%@AI@%internalname%@AE@%%@AB@%=%@AE@%»%@AI@%modulename%@AE@%%@AB@%.%@AE@%%@AI@%entry%@AE@%%@NL@%
  15984. %@NL@%
  15985. %@CR:MCVJA007@%%@4@%The %@AI@%internalname%@AE@% specifies the name that the importing module actually uses%@EH@%
  15986. to call the function. Thus, %@AI@%internalname%@AE@% appears in the source code of the
  15987. importing module, though the function may have a different name in the
  15988. module where it is defined. By default, %@AI@%internalname%@AE@% is the same as the name
  15989. given in %@AI@%entry%@AE@%.%@NL@%
  15990. %@NL@%
  15991. %@CR:MCVJA008@%%@4@%The %@AI@%modulename%@AE@% is the name of the application or library that contains the%@EH@%
  15992. function.%@NL@%
  15993. %@NL@%
  15994. %@CR:MCVJA009@%%@4@%The %@AI@%entry%@AE@% field determines the function to be imported and can be a name or%@EH@%
  15995. an ordinal value. (Ordinal values are set in an %@AB@%EXPORTS%@AE@% statement.) If an
  15996. ordinal value is given, the %@AI@%internalname%@AE@% field is required.%@NL@%
  15997. %@NL@%
  15998. ───────────────────────────────────────────────────────────────────────────%@NL@%
  15999. %@AI@%NOTE%@AE@%%@NL@%
  16000.    A given function has a name for each of three different contexts. The%@NL@%
  16001.    function has a name used by the exporting module (where it is defined), a%@NL@%
  16002.    name used as an entry point between modules, and a name as it is used by%@NL@%
  16003.    the importing module (where it is called). If neither module uses the%@NL@%
  16004.    optional %@AI@%internalname%@AE@% field, the function has the same name in all three%@NL@%
  16005.    contexts. If either of the modules use the %@AI@%internalname%@AE@% field, the%@NL@%
  16006.    function may have more than one distinct name.%@NL@%
  16007. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16008. %@NL@%
  16009. %@CR:MCVJA00A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  16010. %@NL@%
  16011. %@CR:MCVJA00B@%%@4@%The following %@AB@%IMPORTS%@AE@% statement defines three functions to be imported:%@EH@%
  16012. %@AS@%SampleRead%@AE@%, %@AS@%SampleWrite%@AE@%, and a function that has been assigned an ordinal
  16013. value of 1. The functions are found in the modules %@AS@%Sample%@AE@%, %@AS@%SampleA%@AE@%, and
  16014. %@AS@%Read%@AE@%, respectively. The function from the %@AS@%Read%@AE@% module is referred to as
  16015. %@AS@%ReadChar%@AE@% in the importing module; the original name of the function, as it
  16016. is defined in the %@AS@%Read%@AE@% module, may or may not be known.%@NL@%
  16017. %@NL@%
  16018.      IMPORTS%@NL@%
  16019.          Sample.SampleRead%@NL@%
  16020.          SampleA.SampleWrite%@NL@%
  16021.          ReadChar = Read.1%@NL@%
  16022. %@NL@%
  16023. %@NL@%
  16024. %@CR:MCVJB000@%%@2@%%@AB@%19.11  The STUB Statement%@AE@%%@EH@%%@NL@%
  16025. %@NL@%
  16026. %@CR:MCVJB001@%%@4@%The %@AB@%STUB%@AE@% statement adds a DOS 3.x executable file to the beginning of the%@EH@%
  16027. application or library being created. The stub is invoked whenever the
  16028. module is executed under DOS 2.x or DOS 3.x. Typically, the stub displays a
  16029. message and terminates execution. (By default, the linker adds its own
  16030. standard stub for this purpose.)%@NL@%
  16031. %@NL@%
  16032. %@CR:MCVJB002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  16033. %@NL@%
  16034.      %@CR:MCVJB003@%%@AB@%STUB%@AE@% %@AB@%'%@AE@%%@AI@%filename%@AE@%%@AB@%'%@AE@%%@NL@%
  16035. %@NL@%
  16036. %@CR:MCVJB004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  16037. %@NL@%
  16038. %@CR:MCVJB005@%%@4@%The filename specifies the DOS executable file to be added. If the linker%@EH@%
  16039. does not find %@AI@%filename%@AE@% in the current directory, it searches in the list of
  16040. directories specified in the PATH environment variable.%@NL@%
  16041. %@NL@%
  16042. %@CR:MCVJB006@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  16043. %@NL@%
  16044. %@CR:MCVJB007@%%@4@%The following example appends the DOS executable file STOPIT.EXE to the%@EH@%
  16045. beginning of the module:%@NL@%
  16046. %@NL@%
  16047.      STUB 'STOPIT.EXE'%@NL@%
  16048. %@NL@%
  16049. %@CR:MCVJB008@%%@4@%The file STOPIT.EXE is executed when you attempt to run the module under%@EH@%
  16050. DOS.%@NL@%
  16051. %@NL@%
  16052. %@NL@%
  16053. %@CR:MCVJC000@%%@2@%%@AB@%19.12  The HEAPSIZE Statement%@AE@%%@EH@%%@NL@%
  16054. %@NL@%
  16055. %@CR:MCVJC001@%%@4@%The %@AB@%HEAPSIZE%@AE@% statement defines the size of the application's local heap in%@EH@%
  16056. bytes. This value affects the size of the automatic data segment.%@NL@%
  16057. %@NL@%
  16058. %@CR:MCVJC002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  16059. %@NL@%
  16060.      %@CR:MCVJC003@%%@AB@%HEAPSIZE%@AE@% %@AI@%bytes%@AE@% | %@AB@%MAXVAL%@AE@%%@NL@%
  16061. %@NL@%
  16062. %@CR:MCVJC004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  16063. %@NL@%
  16064. %@CR:MCVJC005@%%@4@%The %@AI@%bytes%@AE@% field is an integer number considered decimal by default. However,%@EH@%
  16065. hexadecimal and octal numbers can be entered by using C notation.%@NL@%
  16066. %@NL@%
  16067. %@CR:MCVJC006@%%@4@%%@AB@%MAXVAL%@AE@% is an optional keyword that may be substituted for %@AI@%bytes%@AE@% to set the%@EH@%
  16068. field parameter. %@AB@%MAXVAL%@AE@% sets the heap size to the value of DGROUP-64K.
  16069. DGROUP is the automatic or default data segment. The effect is that the
  16070. loader allocates exactly 64K for DGROUP. This may be useful in bound
  16071. applications in which you want to force a 64K requirement for DGROUP on the
  16072. program in DOS. The bound program fails to load if 64K minus the size of
  16073. DGROUP is less than zero.%@NL@%
  16074. %@NL@%
  16075. %@CR:MCVJC007@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  16076. %@NL@%
  16077.      HEAPSIZE 4000%@NL@%
  16078. %@NL@%
  16079.      HEAPSIZE MAXVAL%@NL@%
  16080. %@NL@%
  16081. %@NL@%
  16082. %@CR:MCVJD000@%%@2@%%@AB@%19.13  The PROTMODE Statement%@AE@%%@EH@%%@NL@%
  16083. %@NL@%
  16084. %@CR:MCVJD001@%%@4@%The %@AB@%PROTMODE%@AE@% statement specifies that the module runs only in protected mode%@EH@%
  16085. and not in Windows or dual mode. This statement is always optional, and
  16086. permits a protected-mode-only application to omit some information from the
  16087. executable-file header.%@NL@%
  16088. %@NL@%
  16089. %@CR:MCVJD002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  16090. %@NL@%
  16091. %@CR:MCVJD003@%%@4@%%@AB@%PROTMODE%@AE@%%@EH@%%@NL@%
  16092. %@NL@%
  16093. %@CR:MCVJD004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  16094. %@NL@%
  16095. %@CR:MCVJD005@%%@4@%If this statement is not included in the module-definition file, the linker%@EH@%
  16096. assumes the application can be run in either real or protected mode.%@NL@%
  16097. %@NL@%
  16098. %@NL@%
  16099. %@CR:MCVJE000@%%@2@%%@AB@%19.14  The OLD Statement%@AE@%%@EH@%%@NL@%
  16100. %@NL@%
  16101. %@CR:MCVJE001@%%@4@%The %@AB@%OLD%@AE@% statement directs the linker to search another dynamic-link module%@EH@%
  16102. for export ordinals. For more information on ordinals, see the sections
  16103. above on the %@AB@%EXPORTS%@AE@% and %@AB@%IMPORTS%@AE@% statements. Exported names in the current
  16104. module that match exported names in the %@AB@%OLD%@AE@% module are assigned ordinal
  16105. values from that module unless one of the following conditions is in effect:
  16106. the name in the %@AB@%OLD%@AE@% module has no ordinal value assigned, or an ordinal
  16107. value is explicitly assigned in the current module.%@NL@%
  16108. %@NL@%
  16109. %@CR:MCVJE002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  16110. %@NL@%
  16111.      %@CR:MCVJE003@%%@AB@%OLD%@AE@% %@AB@%'%@AE@%%@AI@%filename%@AE@%%@AB@%'%@AE@%%@NL@%
  16112. %@NL@%
  16113. %@CR:MCVJE004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  16114. %@NL@%
  16115. %@CR:MCVJE005@%%@4@%This statement is useful for preserving export ordinal values throughout%@EH@%
  16116. successive versions of a dynamic-link module. The %@AB@%OLD%@AE@% has no effect on
  16117. application modules.%@NL@%
  16118. %@NL@%
  16119. %@NL@%
  16120. %@CR:MCVJF000@%%@2@%%@AB@%19.15  The REALMODE Statement%@AE@%%@EH@%%@NL@%
  16121. %@NL@%
  16122. %@CR:MCVJF001@%%@4@%The %@AB@%REALMODE%@AE@% statement is analogous to the %@AB@%PROTMODE%@AE@% statement and is%@EH@%
  16123. provided for use with real-mode Windows applications.%@NL@%
  16124. %@NL@%
  16125. %@CR:MCVJF002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  16126. %@NL@%
  16127.      %@CR:MCVJF003@%%@AB@%REALMODE%@AE@%%@NL@%
  16128. %@NL@%
  16129. %@CR:MCVJF004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  16130. %@NL@%
  16131. %@CR:MCVJF005@%%@4@%%@AB@%REALMODE%@AE@% specifies that the application runs only in real mode. With this%@EH@%
  16132. statement, the linker relaxes some of the restrictions that it imposes on
  16133. programs running in protected mode.%@NL@%
  16134. %@NL@%
  16135. %@NL@%
  16136. %@CR:MCVJG000@%%@2@%%@AB@%19.16  The EXETYPE Statement%@AE@%%@EH@%%@NL@%
  16137. %@NL@%
  16138. %@CR:MCVJG001@%%@4@%The %@AB@%EXETYPE%@AE@% statement specifies in which operating system the application%@EH@%
  16139. (or dynamic-link library) is to run. This statement is optional and provides
  16140. an additional degree of protection against the program being run in an
  16141. incorrect operating system.%@NL@%
  16142. %@NL@%
  16143. %@CR:MCVJG002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  16144. %@NL@%
  16145.      %@CR:MCVJG003@%%@AB@%EXETYPE%@AE@% «%@AB@%OS2%@AE@% | %@AB@%WINDOWS%@AE@% | %@AB@%DOS4%@AE@%»%@NL@%
  16146. %@NL@%
  16147. %@CR:MCVJG004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  16148. %@NL@%
  16149. %@CR:MCVJG005@%%@4@%The %@AB@%EXETYPE%@AE@% keyword must be followed by a descriptor of the operating%@EH@%
  16150. system, either %@AB@%OS2%@AE@% (for OS/2 applications and dynamic-link libraries),
  16151. %@AB@%WINDOWS%@AE@%, or %@AB@%DOS4%@AE@%. If no %@AB@%EXETYPE%@AE@% statement is given, %@AB@%EXETYPE OS2%@AE@% is assumed
  16152. by an operating system that is loading the program.%@NL@%
  16153. %@NL@%
  16154. %@CR:MCVJG006@%%@4@%The effect of %@AB@%EXETYPE%@AE@% is to set bits in the header which identify%@EH@%
  16155. operating-system type. Operating-system loaders may check these bits.%@NL@%
  16156. %@NL@%
  16157. %@NL@%
  16158. %@CR:MCVK0000@%%@1@%%@AB@%Chapter 20  Creating Dual-Mode Programs with BIND%@AE@%%@EH@%%@NL@%
  16159. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16160. %@NL@%
  16161. %@CR:MCVK0001@%%@4@%The Microsoft Operating System/2 Bind (BIND) utility converts protected-mode%@EH@%
  16162. programs so they can run in both real mode and protected mode. Not every
  16163. protected-mode program can readily be converted. Programs you wish to
  16164. convert should make no system calls other than calls to the functions listed
  16165. in the Family API. (The Family API, see the %@AI@%Microsoft Operating System/2%@AE@%
  16166. %@AI@%Programmer's Reference%@AE@%, is a subset of the API functions.)%@NL@%
  16167. %@NL@%
  16168. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16169. %@AI@%NOTE%@AE@%%@NL@%
  16170.    The BIND utility will not work on BASIC programs.%@NL@%
  16171. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16172. %@NL@%
  16173. %@CR:MCVK0002@%%@4@%The BIND utility must "bind" dynamic-link functions──that is, the utility%@EH@%
  16174. brings an application program together with libraries and links everything
  16175. into a single stand-alone file that can run in real mode. The BIND utility
  16176. also alters the executable-file format of the program so it is recognized as
  16177. a standard executable file in both real mode and protected mode.%@NL@%
  16178. %@NL@%
  16179. %@CR:MCVK0003@%%@4@%If you are unable to create a bound version of your program, you can build a%@EH@%
  16180. dual-mode version, as explained at the end of the chapter.%@NL@%
  16181. %@NL@%
  16182. %@CR:MCVK0004@%%@4@%There are three components to the BIND utility:%@EH@%%@NL@%
  16183. %@NL@%
  16184. %@CR:MCVK0005@%  ■  BIND. This utility merges the executable file with the appropriate%@NL@%
  16185.      libraries as described above.%@NL@%
  16186. %@NL@%
  16187.   ■  Loader. This tool loads the OS/2 executable file when running DOS 2.x%@NL@%
  16188.      or 3.x and simulates the OS/2 startup conditions in a DOS environment.%@NL@%
  16189.      The loader consists of code that is stored in BIND.EXE and copied into%@NL@%
  16190.      files as needed.%@NL@%
  16191. %@NL@%
  16192.   ■  API.LIB. This library simulates the OS/2 API in a DOS environment.%@NL@%
  16193. %@NL@%
  16194. %@NL@%
  16195. %@CR:MCVK1000@%%@2@%%@AB@%20.1  Binding Library Routines%@AE@%%@EH@%%@NL@%
  16196. %@NL@%
  16197. %@CR:MCVK1001@%%@4@%The BIND utility replaces Family-API calls with simulator routines from the%@EH@%
  16198. standard (object-code) library API.LIB. However, your program may also make
  16199. dynamic-link calls to functions outside the API (that is, you can make
  16200. dynamic-link calls that are not system calls). This section explains how
  16201. BIND can accommodate these calls.%@NL@%
  16202. %@NL@%
  16203. %@CR:MCVK1002@%%@4@%If your program makes dynamic-link calls to functions outside the API, use%@EH@%
  16204. the %@AI@%linklibs%@AE@% field described in Section 20.3%@BO:   cddc2@%, "The BIND Command Line." BIND
  16205. searches each of the libraries and files specified in %@AI@%linklibs%@AE@% for object
  16206. code corresponding to the imported functions. In addition, if you are using
  16207. import definitions with either the ordinal or the internal-name option, you
  16208. need to specify import libraries so the functions you call can be identified
  16209. correctly. (For a discussion of various options within import definitions,
  16210. see Chapter 19%@BO:   c14f2@%, "Using Module-Definition Files.")%@NL@%
  16211. %@NL@%
  16212. %@NL@%
  16213. %@CR:MCVK2000@%%@2@%%@AB@%20.2  Binding Functions as Protected Mode Only%@AE@%%@EH@%%@NL@%
  16214. %@NL@%
  16215. %@CR:MCVK2001@%%@4@%If your program freely makes non-Family-API calls without regard to which%@EH@%
  16216. operating system is in use, the program cannot be converted for use in real
  16217. mode. However, you may choose to write a program so it first checks the
  16218. operating system and then restricts system calls (to the Family API) when
  16219. running in real mode. The BIND utility supports conversion of these
  16220. programs.%@NL@%
  16221. %@NL@%
  16222. %@CR:MCVK2002@%%@4@%By using the /n command-line option described below you can specify a list%@EH@%
  16223. of functions supported in protected mode only. If your program ever attempts
  16224. to call one of these functions when running in real mode, the BadDynLink
  16225. system function is called and aborts your program. The advantage of this
  16226. option is that it helps resolve external references, yet it remains the
  16227. responsibility of your program to check the operating-system version and
  16228. ensure that not one of these functions is ever called in real mode.%@NL@%
  16229. %@NL@%
  16230. %@CR:MCVK2003@%%@4@%If your program makes calls (either directly or indirectly) to%@EH@%
  16231. non-Family-API system calls, but you do not use the /n option, then BIND
  16232. fails to convert your program.%@NL@%
  16233. %@NL@%
  16234. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16235. %@AI@%NOTE%@AE@%%@NL@%
  16236.    %@AB@%BIND%@AE@% Version 1.0 does not work with files linked with the %@AB@%/EXEPACK%@AE@%%@NL@%
  16237.    option.%@NL@%
  16238. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16239. %@NL@%
  16240. %@NL@%
  16241. %@CR:MCVK3000@%%@2@%%@AB@%20.3  The BIND Command Line%@AE@%%@EH@%%@NL@%
  16242. %@NL@%
  16243. %@CR:MCVK3001@%%@4@%Invoke BIND with the following command line:%@EH@%%@NL@%
  16244. %@NL@%
  16245.      %@CR:MCVK3002@%BIND %@AI@%infile%@AE@% «%@AI@%implibs%@AE@%» «%@AI@%linklibs%@AE@%» «/o %@AI@%outfile%@AE@%» «/n @%@AI@%file%@AE@%» «/n %@AI@%names%@AE@%» «/m %@AI@%mapfile%@AE@%»%@NL@%
  16246. %@NL@%
  16247. %@CR:MCVK3003@%%@CR:MCVK3004@%%@4@%The %@AI@%infile%@AE@% field contains the name of the OS/2 application. The file name%@EH@%
  16248. may contain a complete path name. The file extension is optional; if you
  16249. provide no extension, .EXE is assumed.%@NL@%
  16250. %@NL@%
  16251. %@CR:MCVK3005@%%@4@%The %@AI@%implibs%@AE@% field contains the name of one or more import libraries. As%@EH@%
  16252. explained above, use this field if your program uses an import definition
  16253. with either the %@AI@%ordinal%@AE@% or %@AI@%internalname%@AE@% fields.%@NL@%
  16254. %@NL@%
  16255. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16256. %@AI@%NOTE%@AE@%%@NL@%
  16257.    If you want to specify a 64K default data segment when running in real%@NL@%
  16258.    mode, specify the file APILMR.OBJ, which guarantees a 64K stack. The%@NL@%
  16259.    reason this object file may be necessary is that a protected-mode%@NL@%
  16260.    application is not automatically given a 64K default data segment; a%@NL@%
  16261.    protected-mode application is only allocated the space it specifically%@NL@%
  16262.    requests. If you do not specify the file APILMR.OBJ, you may not have the%@NL@%
  16263.    local heap area needed when you run in real mode.%@NL@%
  16264. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16265. %@NL@%
  16266. %@CR:MCVK3006@%%@4@%The %@AI@%linklibs%@AE@% field contains the name of one or more standard libraries and%@EH@%
  16267. object files. Use this field to supply object code needed to resolve
  16268. dynamic-link calls. Include DOSCALLS.LIB in this field. You must give the
  16269. complete path name to DOSCALLS.LIB if it is not in the current directory. If
  16270. you specify a second library, API.LIB, you need to give the complete path
  16271. name for it also. If you do not specify API.LIB in this field, BIND
  16272. automatically searches for API.LIB by looking in directories listed in the
  16273. LIB environment variable. For example, the following command line
  16274. successfully uses BIND if API.LIB is located in a directory listed in the
  16275. LIB environment variable:%@NL@%
  16276. %@NL@%
  16277.      BIND FOO.EXE \LIB\DOSCALLS.LIB%@NL@%
  16278. %@NL@%
  16279. %@CR:MCVK3007@%%@4@%The /o option specifies the name for the bound application, %@AI@%outfile%@AE@%, and may%@EH@%
  16280. contain a full path name. The default value for this field is the name of
  16281. the file that was given as %@AI@%infile%@AE@%.%@NL@%
  16282. %@NL@%
  16283. %@CR:MCVK3008@%%@4@%The /n option provides a way of listing functions that are supported in%@EH@%
  16284. protected mode only. As explained above, if any of these functions are ever
  16285. called in real mode, the BadDynLink function is called to abort the program.
  16286. The /n option can be used either with a list of one or more %@AI@%names%@AE@% (separated
  16287. by spaces), or Module Statements Attribute Defined with a %@AI@%file%@AE@%
  16288. specification preceded by the %@AB@%@%@AE@% sign. The specified file should consist of a
  16289. list of functions, one per line.%@NL@%
  16290. %@NL@%
  16291. %@CR:MCVK3009@%%@4@%The /m option causes a link map to be generated for the DOS 3.x environment%@EH@%
  16292. of the .EXE file. The %@AI@%mapfile%@AE@% is the destination of the link map. If %@AI@%mapfile%@AE@%
  16293. is not specified with the /m option, the destination of the link map is
  16294. standard output.%@NL@%
  16295. %@NL@%
  16296. %@NL@%
  16297. %@CR:MCVK4000@%%@2@%%@AB@%20.4  BIND Operation%@AE@%%@EH@%%@NL@%
  16298. %@NL@%
  16299. %@CR:MCVK4001@%%@4@%BIND produces a single executable file that can run in either real mode or%@EH@%
  16300. protected mode. To complete this task, BIND executes three major steps:%@NL@%
  16301. %@NL@%
  16302. %@CR:MCVK4002@%  1. Reads in the dynamic-link entry points (for imported functions) from%@NL@%
  16303.      the OS/2 executable file and outputs to a temporary object file the%@NL@%
  16304.      EXTDEF object records for each imported item. Each EXTDEF record tells%@NL@%
  16305.      the linker of an external reference that needs to be resolved through%@NL@%
  16306.      ordinary linking.%@NL@%
  16307. %@NL@%
  16308.   2. Invokes LINK, giving the executable file, the temporary object file,%@NL@%
  16309.      the API.LIB file, and any other libraries specified on the BIND command%@NL@%
  16310.      line. By linking in the loader and the API-simulator routines, LINK%@NL@%
  16311.      produces an executable file that can run in real mode.%@NL@%
  16312. %@NL@%
  16313.   3. Merges the protected-mode and real-mode executable files to produce a%@NL@%
  16314.      single file that can run in either mode.%@NL@%
  16315. %@NL@%
  16316. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16317. %@AI@%NOTE%@AE@%%@NL@%
  16318.    A dual-mode executable file produced with BIND can be run in both DOS 2.x%@NL@%
  16319.    and 3.x environments. However, if you change the name of an executable%@NL@%
  16320.    file produced by BIND, then it will not run under DOS 2.x.%@NL@%
  16321. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16322. %@NL@%
  16323. %@NL@%
  16324. %@CR:MCVK5000@%%@2@%%@AB@%20.5  Executable-File Layout%@AE@%%@EH@%%@NL@%
  16325. %@NL@%
  16326. %@CR:MCVK5001@%%@4@%OS/2 executable files have two headers. The first header has a DOS 3.x%@EH@%
  16327. format. The second header has the OS/2 format. When the executable file is
  16328. run on an OS/2 system, it ignores the first header and uses the OS/2 format.
  16329. When run under DOS 3.x, the old header is used to load the file. Figure
  16330. 20.1%@FN@%
  16331. Figure 20.1 is found on page 345 of the printed version.%@EF@% shows the arrangement of the merged headers.%@NL@%
  16332. %@NL@%
  16333. %@NL@%
  16334. %@CR:MCVK6000@%%@2@%%@AB@%20.6  How to Build a Dual-Mode Application%@AE@%%@EH@%%@NL@%
  16335. %@NL@%
  16336. %@CR:MCVK6001@%%@4@%If you cannot create a bound application out of your program, you may want%@EH@%
  16337. to create a dual-mode executable (.EXE) file instead. A dual-mode .EXE file
  16338. is similar to a bound file; both types of files run in either real mode or
  16339. protected mode. However, the two types of files have a different internal
  16340. structure.%@NL@%
  16341. %@NL@%
  16342. %@CR:MCVK6002@%%@4@%A bound file has common executable code that actually runs in both modes.%@EH@%
  16343. System calls are specific to real mode or protected mode, but all system
  16344. calls are modified at load time.%@NL@%
  16345. %@NL@%
  16346. %@CR:MCVK6003@%%@4@%In contrast, a dual-mode file has two separate programs contained in one%@EH@%
  16347. file. One of these programs is real-mode-only and the other is
  16348. protected-mode-only. All the code in a dual-mode executable file runs in
  16349. either one mode or the other.%@NL@%
  16350. %@NL@%
  16351. %@CR:MCVK6004@%%@4@%To create a dual-mode application:%@EH@%%@NL@%
  16352. %@NL@%
  16353. %@CR:MCVK6005@%  1. Link a real-mode version of your program.%@NL@%
  16354. %@NL@%
  16355.   2. Create a module-definition file that contains the statement%@NL@%
  16356. %@NL@%
  16357.           %@AS@%STUB 'PROGR.EXE'%@AE@%%@NL@%
  16358. %@NL@%
  16359.      in which you substitute the name of your real-mode program for%@NL@%
  16360.      PROGR.EXE.%@NL@%
  16361. %@NL@%
  16362.   3. Link the protected-mode version of your program with this%@NL@%
  16363.      module-definition file. The protected-mode version and the real-mode%@NL@%
  16364.      version should have different names.%@NL@%
  16365. %@NL@%
  16366. %@NL@%
  16367. %@CR:MCVL0000@%%@1@%%@AB@%Chapter 21  Using EXEHDR%@AE@%%@EH@%%@NL@%
  16368. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16369. %@NL@%
  16370. %@CR:MCVL0001@%%@4@%The Microsoft Segmented-EXE Header Utility (EXEHDR) displays the contents of%@EH@%
  16371. an executable-file header. You can use EXEHDR with OS/2 or Windows, and you
  16372. can use it with an application or dynamic-link library. (With a Windows
  16373. file, some of the meanings of the executable-file-header fields change; see
  16374. your Windows documentation for more information.) The principal uses of
  16375. EXEHDR include the following:%@NL@%
  16376. %@NL@%
  16377. %@CR:MCVL0002@%  ■  Determining whether a file is an application or a dynamic-link library%@NL@%
  16378. %@NL@%
  16379.   ■  Viewing the attributes set by the module-definition file%@NL@%
  16380. %@NL@%
  16381.   ■  Viewing the number and size of code and data segments%@NL@%
  16382. %@NL@%
  16383. %@CR:MCVL0003@%%@4@%Except where noted otherwise, the special terms and keywords mentioned in%@EH@%
  16384. this section are explained in Chapter 19%@BO:   c14f2@%, "Using Module-Definition Files."%@NL@%
  16385. %@NL@%
  16386. %@NL@%
  16387. %@CR:MCVL1000@%%@2@%%@AB@%21.1  The EXEHDR Command Line%@AE@%%@EH@%%@NL@%
  16388. %@NL@%
  16389. %@CR:MCVL1001@%%@4@%To invoke the EXEHDR utility, use the syntax%@EH@%%@NL@%
  16390. %@NL@%
  16391.      %@CR:MCVL1002@%EXEHDR «/v» %@AI@%file%@AE@%%@NL@%
  16392. %@NL@%
  16393. %@CR:MCVL1003@%in which %@AI@%file%@AE@% is an application or dynamic-link library for either the OS/2
  16394. or Windows environment. The /v option specifies output in verbose mode.%@NL@%
  16395. %@NL@%
  16396. %@CR:MCVL1004@%%@4@%Section 21.2%@BO:   d003c@% presents sample output and explains the meaning of each field%@EH@%
  16397. of the output. Section 21.3%@BO:   d13d9@% describes additional output that EXEHDR
  16398. produces when it is run in verbose mode.%@NL@%
  16399. %@NL@%
  16400. %@NL@%
  16401. %@CR:MCVL2000@%%@2@%%@AB@%21.2  EXEHDR Output%@AE@%%@EH@%%@NL@%
  16402. %@NL@%
  16403. %@CR:MCVL2001@%%@4@%This section discusses the meaning of each field in the output below──output%@EH@%
  16404. produced when %@AS@%EXEHDR LINK.EXE%@AE@% is specified on the OS/2 command line. The
  16405. first six fields list the contents of the segmented-executable-file header.
  16406. The rest of the output lists each physical segment in the file. (The term
  16407. "physical segment" is defined in Chapter 14, "Incremental Linking with
  16408. ILINK.")%@NL@%
  16409. %@NL@%
  16410.      Module:                   LINK%@NL@%
  16411.      Description:              Microsoft Segmented-Executable Linker%@NL@%
  16412.      Data:                     NONSHARED%@NL@%
  16413.      Initial CS:IP:            seg   2 offset 3d9c%@NL@%
  16414.      Initial SS:SP:            seg   4 offset 8e40%@NL@%
  16415.      DGROUP:                   seg   4%@NL@%
  16416. %@NL@%
  16417.      no. type address  file  mem   flags%@NL@%
  16418.        1 CODE 00003400 0f208 0f208%@NL@%
  16419.        2 CODE 00012e00 05b04 05b04%@NL@%
  16420.        3 DATA 00018c00 01c1f 01c1f%@NL@%
  16421.        4 DATA 0001aa00 01b10 08e40%@NL@%
  16422. %@NL@%
  16423. %@CR:MCVL2002@%%@4@%The %@AS@%Module%@AE@% field is the name of the application as specified in the %@AB@%NAME%@AE@%%@EH@%
  16424. statement of the module-definition file. If no module definition was used to
  16425. create the executable file, this field displays the name assumed by default.
  16426. If a module definition was used to create the file, but the %@AB@%LIBRARY%@AE@%
  16427. statement appeared instead of the %@AB@%NAME%@AE@% statement (thus specifying a
  16428. dynamic-link library), the name of the library is given and EXEHDR uses the
  16429. word %@AS@%Library%@AE@% instead of %@AS@%Module.%@AE@%%@NL@%
  16430. %@NL@%
  16431. %@CR:MCVL2003@%%@4@%The %@AS@%Description%@AE@% field gives the contents, if any, of the %@AB@%DESCRIPTION%@AE@%%@EH@%
  16432. statement of the module-definition file used to create the file being
  16433. examined.%@NL@%
  16434. %@NL@%
  16435. %@CR:MCVL2004@%%@4@%The %@AS@%Data%@AE@% field indicates the type of the program's automatic data segment:%@EH@%
  16436. %@AB@%SHARED%@AE@%, %@AB@%NONSHARED%@AE@%, or %@AB@%NONE%@AE@%. This type can be specified in a
  16437. module-definition file, but by default is %@AB@%NONSHARED%@AE@% for applications and
  16438. %@AB@%SHARED%@AE@% for dynamic-link libraries. In this context, %@AB@%SHARED%@AE@% and %@AB@%NONSHARED%@AE@% are
  16439. equivalent to the %@AB@%SINGLE%@AE@% and %@AB@%MULTIPLE%@AE@% attributes listed in Section 19.6%@BO:   c53df@%.
  16440. (The "automatic data segment" is the physical segment corresponding to the
  16441. group named DGROUP.)%@NL@%
  16442. %@NL@%
  16443. %@CR:MCVL2005@%%@4@%The %@AS@%Initial CS:IP%@AE@% field is the program starting address (if an application%@EH@%
  16444. is being examined) or address of the initialization routine (if a
  16445. dynamic-link library is being examined).%@NL@%
  16446. %@NL@%
  16447. %@CR:MCVL2006@%%@4@%The %@AS@%Initial SS:SP%@AE@% field gives the value of the initial stack pointer.%@EH@%%@NL@%
  16448. %@NL@%
  16449. %@CR:MCVL2007@%%@4@%The %@AS@%DGROUP%@AE@% field is the segment number of the automatic data segment. This%@EH@%
  16450. segment corresponds to the group named DGROUP in the program's object
  16451. modules. Note that segment numbers start with the number 1.%@NL@%
  16452. %@NL@%
  16453. %@CR:MCVL2008@%%@4@%After the contents of the OS/2 executable header are displayed, the contents%@EH@%
  16454. of the segment table are listed. The following list describes the meaning of
  16455. each heading in the table. Note that all values are given in hexadecimal
  16456. radix except for the segment index number.%@NL@%
  16457. %@CR:MCVL2009@%%@NL@%
  16458. %@TH:   30   1578  2 20 56 @%
  16459. %@AB@%Heading             Meaning%@AE@%
  16460.  
  16461. %@AS@%no.%@AE@%                 Segment index number, starting with 1, in
  16462.                     decimal radix.
  16463.  
  16464. %@AS@%type%@AE@%                Identification of the segment as a code or data
  16465.                     segment. A code segment is any segment with
  16466.                     class name ending in %@AS@%'CODE'%@AE@%. All other segments
  16467.                     are data segments.%@AS@%
  16468.  
  16469. %@AS@%address%@AE@%             Location, within the file, of the contents of
  16470.                     the segment.
  16471.  
  16472. %@AS@%file%@AE@%                Size in bytes of the segment, as contained in
  16473.                     the file.
  16474.  
  16475. %@AS@%mem%@AE@%                 Size in bytes of the segment as it will be
  16476.                     stored in memory. If the value of this field is
  16477.                     greater than the value of the %@AS@%file%@AE@% field, OS/2
  16478.                     pads the additional space with zero values at
  16479.                     load time.
  16480.  
  16481. %@AS@%flags%@AE@%               Segment attributes, as defined in Chapter 19,
  16482.                     "Using Module-Definition Files." If the /v
  16483.                     option is not used, only nondefault attributes
  16484.                     are listed. Attributes are given in the form
  16485.                     specified in Chapter 19%@BO:   c14f2@%: %@AB@%READWRITE%@AE@%, %@AB@%PRELOAD%@AE@%,
  16486.                     and so forth. Attributes that are meaningful to
  16487.                     Windows but not to OS/2 are displayed as
  16488.                     lowercase and in parentheses, [e.g., %@AS@%(movable)%@AE@%]
  16489. %@TE:   30   1578  2 20 56 @%
  16490. %@NL@%
  16491. %@CR:MCVL3000@%%@2@%%@AB@%21.3  Output in Verbose Mode%@AE@%%@EH@%%@NL@%
  16492. %@NL@%
  16493. %@CR:MCVL3001@%%@4@%When you specify the /v mode, the EXEHDR utility gives all the information%@EH@%
  16494. discussed in Section 21.2%@BO:   d003c@%, as well as some additional information.
  16495. Specifically, when running in verbose mode, EXEHDR displays the following
  16496. information in this order:%@NL@%
  16497. %@NL@%
  16498. %@CR:MCVL3002@%  1. DOS 3.x header information. All OS/2 executable files have a DOS 3.x%@NL@%
  16499.      header, whether bound or not. If the program is not bound, the DOS 3.x%@NL@%
  16500.      portion typically consists of a stub that terminates the program. For a%@NL@%
  16501.      de-scription of DOS executable-file-header fields, see the %@AI@%Microsoft%@AE@%%@NL@%
  16502.      %@AI@%MS-DOS Programmer's Reference%@AE@%, or see Chapter 17%@BO:   ba564@% in this manual,%@NL@%
  16503.      "Using Other Utilities," for information on the Microsoft EXE File%@NL@%
  16504.      Header Utility (EXEMOD).%@NL@%
  16505. %@NL@%
  16506.   2. OS/2-specific header fields. This output includes the fields described%@NL@%
  16507.      in Section 21.2%@BO:   d003c@% except for the segment table. (The segment-table%@NL@%
  16508.      display for verbose mode is described below.)%@NL@%
  16509. %@NL@%
  16510.   3. File addresses and lengths of the various tables in the executable%@NL@%
  16511.      file, as in the following example:%@NL@%
  16512. %@NL@%
  16513.      Resource Table:            00003273 length 0000 (0)%@NL@%
  16514.      Resident Names Table:      00003273 length 0008 (8)%@NL@%
  16515.      Module Reference Table:    0000327b length 0006 (6)%@NL@%
  16516.      Imported Names Table:      00003281 length 0033 (51)%@NL@%
  16517.      Entry Table:               000032b4 length 0002 (2)%@NL@%
  16518.      Non-resident Names Table:  000032b6 length 0029 (41)%@NL@%
  16519.      Movable entry points:      0%@NL@%
  16520.      Segment sector size:       512%@NL@%
  16521. %@NL@%
  16522.      The first field in each row gives the name of the table, the second%@NL@%
  16523.      field gives the address of the table within the file, the third field%@NL@%
  16524.      gives the length of the table in hexadecimal radix, and the last field%@NL@%
  16525.      gives the length of the table in decimal radix. See the %@AI@%Microsoft%@AE@%%@NL@%
  16526.      %@AI@%Operating System/2 Programmer's Reference%@AE@% for an explanation of each%@NL@%
  16527.      table.%@AI@%%@NL@%
  16528. %@NL@%
  16529.   4. Segment table with complete attributes, not just the nondefault%@NL@%
  16530.      attributes. In addition to the attributes described in Section 21.2%@BO:   d003c@%,%@NL@%
  16531.      verbose mode also displays these two additional attributes:%@NL@%
  16532. %@NL@%
  16533.        ■  The %@AS@%relocs%@AE@% attribute is displayed for each segment that has%@NL@%
  16534.           address relocations. Relocations occur in each segment that%@NL@%
  16535.           references objects in other segments or makes dynamic-link%@NL@%
  16536.           references.%@NL@%
  16537. %@NL@%
  16538.        ■  The %@AS@%iterated%@AE@% attribute is displayed for each segment that has%@NL@%
  16539.           iterated data. Iterated data consist of a special code that packs%@NL@%
  16540.           repeated bytes; for example, OS/2 executables produced with the%@NL@%
  16541.           /EXEPACK option of LINK have iterated data.%@NL@%
  16542. %@NL@%
  16543.   5. Run-time relocations and fixups. See the object-module information in%@NL@%
  16544.      the %@AI@%Microsoft Operating System/2 Programmer's Reference%@AE@% for more%@NL@%
  16545.      information.%@NL@%
  16546. %@NL@%
  16547.   6. Finally, EXEHDR lists all exported entry points. Exports are discussed%@NL@%
  16548.      in Chapter 18%@BO:   be41d@%, "Linking for Windows and OS/2 Systems," and in Section%@NL@%
  16549.      19.9%@BO:   c9500@%, "The EXPORTS Statement."%@NL@%
  16550. %@NL@%
  16551. %@NL@%
  16552. %@CR:MCVa0000@%%@1@%%@AB@%Appendix A  Regular Expressions%@AE@%%@EH@%%@NL@%
  16553. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16554. %@NL@%
  16555. %@CR:MCVa0001@%%@4@%Regular expressions are used to specify text patterns in searches for%@EH@%
  16556. variable text strings. Special characters can be used within regular
  16557. expressions to specify groups of characters to be searched for.%@NL@%
  16558. %@NL@%
  16559. %@CR:MCVa0002@%%@4@%This appendix explains all of the special characters you can use to form%@EH@%
  16560. regular expressions, but you do not need to learn them all to use the
  16561. CodeView Search commands. The simplest form of regular expression is simply
  16562. a text string. For example, if you want to search for all instances of the
  16563. symbol %@AS@%COUNT%@AE@%, you can specify %@AS@%COUNT%@AE@% as the string to be found.%@NL@%
  16564. %@NL@%
  16565. %@CR:MCVa0003@%%@4@%If you want to search only for simple strings, you do not need to read this%@EH@%
  16566. entire appendix, but you should know how to search for strings containing
  16567. the special characters used in regular expressions. See Section A.2%@BO:   d2e49@% for
  16568. more information.%@NL@%
  16569. %@NL@%
  16570. %@NL@%
  16571. %@CR:MCVa1000@%%@2@%%@AB@%A.1  Special Characters in Regular Expressions%@AE@%%@EH@%%@NL@%
  16572. %@NL@%
  16573. %@CR:MCVa1001@%%@4@%The following characters have special meanings in regular expressions:%@EH@%%@NL@%
  16574. %@NL@%
  16575. %@CR:MCVa1002@%%@AB@%Character                   Purpose%@AE@%%@NL@%
  16576. %@NL@%
  16577. Asterisk (%@AB@%*%@AE@%)                Matches any number of repetitions of the%@NL@%
  16578.                             previous character.%@NL@%
  16579. %@NL@%
  16580. Backslash (%@AB@%\%@AE@%)               Removes the special characteristics of the%@NL@%
  16581.                             following characters: backslash (%@AB@%\%@AE@%), period (%@AB@%.%@AE@%),%@NL@%
  16582.                             caret (%@AB@%^%@AE@%), dollar sign (%@AB@%$%@AE@%), asterisk (%@AB@%*%@AE@%), and%@NL@%
  16583.                             left bracket (%@AB@%[%@AE@%).%@NL@%
  16584. %@NL@%
  16585. Brackets (%@AB@%[ ]%@AE@%)              Matches characters specified within the%@NL@%
  16586.                             brackets. The following special characters may%@NL@%
  16587.                             be used:%@NL@%
  16588. %@NL@%
  16589.                             %@AB@%Character       Purpose%@AE@%%@NL@%
  16590. %@NL@%
  16591.                             Caret (%@AB@%^%@AE@%)       Reverses the function of the%@NL@%
  16592.                                             brackets. That is, the caret%@NL@%
  16593.                                             matches any character except%@NL@%
  16594.                                             those specified within the%@NL@%
  16595.                                             brackets.%@NL@%
  16596. %@NL@%
  16597.                             Dash (%@AB@%-%@AE@%)        Matches characters in ASCII%@NL@%
  16598.                                             order between (inclusive of)%@NL@%
  16599.                                             the characters on either%@NL@%
  16600.                                             side of the dash.%@NL@%
  16601. %@NL@%
  16602.                             Caret (%@AB@%^%@AE@%)       Matches beginning of line.%@NL@%
  16603. %@NL@%
  16604.                             Dollar sign (%@AB@%$%@AE@%) Matches end of line.%@NL@%
  16605. %@NL@%
  16606.                             Period (%@AB@%.%@AE@%)      Matches any character.%@NL@%
  16607. %@NL@%
  16608. %@NL@%
  16609. %@CR:MCVa2000@%%@2@%%@AB@%A.2  Searching for Special Characters%@AE@%%@EH@%%@NL@%
  16610. %@NL@%
  16611. %@CR:MCVa2001@%%@4@%If you need to match one of the special characters used in regular%@EH@%
  16612. expressions, precede it with a backslash when you specify a search string.
  16613. The special charac-ters are the asterisk (%@AB@%*%@AE@%), backslash (%@AB@%\%@AE@%), left bracket
  16614. (%@AB@%[%@AE@%), caret (%@AB@%^%@AE@%), dollar sign (%@AB@%$%@AE@%), and period (%@AB@%.%@AE@%).%@NL@%
  16615. %@NL@%
  16616. %@CR:MCVa2002@%%@4@%For example, the regular expression %@AS@%I*J%@AE@% matches such combinations as %@AS@%J,%@AE@% %@AS@%IJ,%@AE@%%@EH@%
  16617. %@AS@%IIJ,%@AE@% and %@AS@%IIIJ%@AE@%. The regular expression %@AS@%I\*J%@AE@% matches only %@AS@%I*J%@AE@%. The backslash
  16618. is necessary because the asterisk (%@AB@%*%@AE@%) is a special character in regular
  16619. expressions.%@NL@%
  16620. %@NL@%
  16621. %@NL@%
  16622. %@CR:MCVa3000@%%@2@%%@AB@%A.3  Using the Period%@AE@%%@EH@%%@NL@%
  16623. %@NL@%
  16624. %@CR:MCVa3001@%%@4@%A period in a regular expression matches any single character. This%@EH@%
  16625. corresponds to the question mark (%@AB@%?%@AE@%) used in specifying DOS file names.%@NL@%
  16626. %@NL@%
  16627. %@CR:MCVa3002@%%@4@%For example, you could use the regular expression %@AS@%AMAX.%@AE@% to search for either%@EH@%
  16628. of the intrinsic functions%@AS@%AMAX0%@AE@% and %@AS@%AMAX1%@AE@%. You could use the expression %@AS@%X.Y%@AE@%
  16629. to search for strings such as %@AS@%X+Y%@AE@%, %@AS@%X-Y%@AE@%, or %@AS@%X*Y%@AE@%. If your programming style is
  16630. to put a space between variables and operators, you could use the regular
  16631. expression %@AS@%X.Y%@AE@% for the same purpose.%@NL@%
  16632. %@NL@%
  16633. %@CR:MCVa3003@%%@4@%Note that when you use the period as a wild card, you will find the strings%@EH@%
  16634. you are looking for, but you may also find other strings that you aren't
  16635. interested in. You can use brackets to be more exact about the strings you
  16636. want to find.%@NL@%
  16637. %@NL@%
  16638. %@NL@%
  16639. %@CR:MCVa4000@%%@2@%%@AB@%A.4  Using Brackets%@AE@%%@EH@%%@NL@%
  16640. %@NL@%
  16641. %@CR:MCVa4001@%%@4@%You can use brackets to specify a character or characters you want to match.%@EH@%
  16642. Any of the characters listed within the brackets is an acceptable match.
  16643. This method is more exact than using a period to match any character.%@NL@%
  16644. %@NL@%
  16645. %@CR:MCVa4002@%%@4@%For example, the regular expression %@AS@%x[-+/*]y%@AE@% matches %@AS@%x+y%@AE@%, %@AS@%x-y%@AE@%, %@AS@%x/y%@AE@%, or %@AS@%x*y%@AE@%,%@EH@%
  16646. but not %@AS@%x=y%@AE@% or %@AS@%xzy%@AE@%. The regular expression %@AS@%COUNT[12]%@AE@% matches %@AS@%COUNT1%@AE@% and
  16647. %@AS@%COUNT2%@AE@%, but not %@AS@%COUNT3%@AE@%.%@NL@%
  16648. %@NL@%
  16649. %@CR:MCVa4003@%%@4@%Most regular-expression special characters have no special meaning when used%@EH@%
  16650. within brackets. The only special characters within brackets are the caret
  16651. (%@AB@%^%@AE@%), dash (%@AB@%-%@AE@%), and right bracket (%@AB@%]%@AE@%). Even these characters only have
  16652. special meanings in certain contexts, as explained in Sections A.4.1%@BO:   d39c0@%-A.4.3.%@NL@%
  16653. %@NL@%
  16654. %@NL@%
  16655. %@CR:MCVa4100@%%@3@%%@AB@%A.4.1  Using the Dash within Brackets%@AE@%%@EH@%%@NL@%
  16656. %@NL@%
  16657. %@CR:MCVa4101@%%@4@%The dash (minus sign) can be used within brackets to specify a group of%@EH@%
  16658. sequential ASCII characters. For example, the regular expression %@AS@%[0-9]%@AE@%
  16659. matches any digit; it is equivalent to %@AS@%[0123456789]%@AE@%. Similarly, %@AS@%[a-z]%@AE@%
  16660. matches any lowercase letter, and %@AS@%[A-Z]%@AE@% matches any uppercase letter.%@NL@%
  16661. %@NL@%
  16662. %@CR:MCVa4102@%%@4@%You can combine ASCII ranges of characters with other listed characters. For%@EH@%
  16663. example, %@AS@%[A-Za-z ]%@AE@% matches any uppercase or lowercase letter or a space.%@NL@%
  16664. %@NL@%
  16665. %@CR:MCVa4103@%%@4@%The dash has this special meaning only if you use it to separate two ASCII%@EH@%
  16666. characters. It has no special meaning if used directly after the starting
  16667. bracket or directly before the ending bracket. This means you must be
  16668. careful where you place the dash (minus sign) within brackets.%@NL@%
  16669. %@NL@%
  16670. %@CR:MCVa4104@%%@4@%For example, you might use the regular expression %@AS@%[+-/*]%@AE@% to match the%@EH@%
  16671. characters %@AS@%+%@AE@%, %@AS@%-%@AE@%, %@AS@%/%@AE@%, and %@AS@%*%@AE@%. However, this does not give the intended result.
  16672. Instead it matches the characters between %@AS@%+%@AE@% and %@AS@%/%@AE@% and also the character %@AS@%*%@AE@%.
  16673. To specify the intended characters, put the dash first or last in the list:
  16674. %@AS@%[-+/*]%@AE@% or %@AS@%[+/*-]%@AE@%.%@NL@%
  16675. %@NL@%
  16676. %@NL@%
  16677. %@CR:MCVa4200@%%@3@%%@AB@%A.4.2  Using the Caret within Brackets%@AE@%%@EH@%%@NL@%
  16678. %@NL@%
  16679. %@CR:MCVa4201@%%@4@%If used as the first character within brackets, the caret (%@AB@%^%@AE@%) reverses the%@EH@%
  16680. meaning of the brackets. That is, any character except the ones in brackets
  16681. is matched. For example, the regular expression %@AS@%[^0-9]%@AE@% matches any character
  16682. that is not a digit. Specifying the characters to be excluded is often more
  16683. concise than specifying the characters you want to match.%@NL@%
  16684. %@NL@%
  16685. %@CR:MCVa4202@%%@4@%If the caret is not in the first position within the brackets, it is treated%@EH@%
  16686. as an ordinary character. For example, the expression %@AS@%[0-9^]%@AE@% matches any
  16687. digit or a caret.%@NL@%
  16688. %@NL@%
  16689. %@NL@%
  16690. %@CR:MCVa4300@%%@3@%%@AB@%A.4.3  Matching Brackets within Brackets%@AE@%%@EH@%%@NL@%
  16691. %@NL@%
  16692. %@CR:MCVa4301@%%@4@%Sometimes you may want to specify the bracket characters as characters to be%@EH@%
  16693. matched. This is no problem with the left bracket; it is treated as a normal
  16694. character. However, the right bracket is interpreted as the end of the
  16695. character list rather than as a character to be matched.%@NL@%
  16696. %@NL@%
  16697. %@CR:MCVa4302@%%@4@%If you want the right bracket to be matched, you must make it the first%@EH@%
  16698. character after the initial left bracket. For example, the regular
  16699. expression %@AS@%[]#![@%]%@AE@% matches either bracket character or any of the other
  16700. characters listed within the brackets. However, if you changed the order of
  16701. just one of the characters (to %@AS@%[#]![@%]%@AE@%), the meaning would be changed so
  16702. that you would be specifying two groups of characters in brackets: %@AS@%[#]%@AE@% and
  16703. %@AS@%[@%]%@AE@%.%@NL@%
  16704. %@NL@%
  16705. %@NL@%
  16706. %@CR:MCVa5000@%%@2@%%@AB@%A.5  Using the Asterisk%@AE@%%@EH@%%@NL@%
  16707. %@NL@%
  16708. %@CR:MCVa5001@%%@4@%The asterisk matches zero or more occurrences of the character preceding the%@EH@%
  16709. asterisk.%@NL@%
  16710. %@NL@%
  16711. %@CR:MCVa5002@%%@4@%For example, the regular expression %@AS@%IF * TEST%@AE@% matches any number of%@EH@%
  16712. repetitions of the space character that follow the word "%@AS@%if%@AE@%."%@NL@%
  16713. %@NL@%
  16714.      IF TEST%@NL@%
  16715.      IF        TEST%@NL@%
  16716.      IF TEST%@NL@%
  16717.      IFTEST%@NL@%
  16718. %@NL@%
  16719. %@CR:MCVa5003@%%@4@%Notice that the last example contains zero repetitions of the space%@EH@%
  16720. character.%@NL@%
  16721. %@NL@%
  16722. %@CR:MCVa5004@%%@4@%The asterisk is convenient if the text you are searching for might contain%@EH@%
  16723. some spaces, but you don't know the exact number. (Be careful in this
  16724. situation: you can't be sure if the text contains a series of spaces or a
  16725. tab.)%@NL@%
  16726. %@NL@%
  16727. %@CR:MCVa5005@%%@4@%You might also use the asterisk to search for a symbol when you aren't sure%@EH@%
  16728. of the spelling. For example, you could use %@AS@%first*ime%@AE@% if you aren't sure if
  16729. the identifier you are searching for is spelled %@AS@%firsttime%@AE@% or %@AS@%firstime%@AE@%.%@NL@%
  16730. %@NL@%
  16731. %@CR:MCVa5006@%%@4@%One particularly powerful use of the asterisk is to combine it with the%@EH@%
  16732. period (%@AB@%.%@AE@%*). This combination searches for any group of characters. It is
  16733. similar to the asterisk used in specifying DOS file names. For example, the
  16734. expression %@AS@%(.*)%@AE@% matches %@AS@%(test)%@AE@%, %@AS@%(response .EQ. 'Y')%@AE@%, %@AS@%(x=0;x .LE. 20;x=x+1)%@AE@%,
  16735. or any other string that starts with a left parenthesis and ends with a
  16736. right parenthesis.%@NL@%
  16737. %@NL@%
  16738. %@CR:MCVa5007@%%@4@%You can use brackets with the asterisk to search for a sequence of repeated%@EH@%
  16739. characters of a given type. For example, %@AS@%\[[0-9]*]%@AE@% matches number strings
  16740. within brackets (%@AS@%[1353]%@AE@% or %@AS@%[3]%@AE@%), but does not match character strings within
  16741. brackets (%@AS@%[count]%@AE@%). Empty brackets (%@AS@%[%@AE@%%@AS@%]%@AE@%) are also matched since the
  16742. characters in the brackets are repeated zero times.%@AS@%%@NL@%
  16743. %@NL@%
  16744. %@NL@%
  16745. %@CR:MCVa6000@%%@2@%%@AB@%A.6  Matching the Start or End of a Line%@AE@%%@EH@%%@NL@%
  16746. %@NL@%
  16747. %@CR:MCVa6001@%%@4@%In regular expressions, the caret (%@AB@%^%@AE@%) matches the start of a line, and the%@EH@%
  16748. dollar sign (%@AB@%$%@AE@%) matches the end of a line.%@NL@%
  16749. %@NL@%
  16750. %@CR:MCVa6002@%%@4@%For example, the regular expression %@AS@%^C%@AE@% matches any uppercase C that starts a%@EH@%
  16751. line. Similarly, %@AS@%)$%@AE@% matches a right parenthesis at the end of a line, but
  16752. not a right parenthesis within a line.%@NL@%
  16753. %@NL@%
  16754. %@CR:MCVa6003@%%@4@%You can combine both symbols to search for entire lines. For example, %@AS@%^{$%@AE@%%@EH@%
  16755. matches any line consisting of only a left curly brace in the left margin
  16756. and %@AS@%^$%@AE@% matches blank lines.%@NL@%
  16757. %@NL@%
  16758. %@NL@%
  16759.  
  16760. %@CR:MCVb0000@%%@1@%%@AB@%Appendix B  Using Exit Codes%@AE@%%@EH@%%@NL@%
  16761. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16762. %@NL@%
  16763. %@CR:MCVb0001@%%@4@%Most utilities return an exit code (sometimes called an "errorlevel" code)%@EH@%
  16764. used by DOS batch files or other programs. If the program finishes without
  16765. errors, it returns an exit code 0. The code varies if the program encounters
  16766. an error.%@NL@%
  16767. %@NL@%
  16768. %@NL@%
  16769. %@CR:MCVb1000@%%@2@%%@AB@%B.1  Exit Codes with NMAKE%@AE@%%@EH@%%@NL@%
  16770. %@NL@%
  16771. %@CR:MCVb1001@%%@4@%The NMAKE stops execution if a program executed by one of the commands in%@EH@%
  16772. the NMAKE description file encounters an error. (Invoke NMAKE with the /I
  16773. option to disable this behavior for the entire description file, or place a
  16774. minus sign (-) in front of a command to disable it only for that command.)
  16775. The exit code returned by the program is displayed as part of the error
  16776. message.%@NL@%
  16777. %@NL@%
  16778. %@CR:MCVb1002@%%@4@%Assume the NMAKE description file %@AS@%TEST%@AE@% contains the following lines:%@EH@%%@NL@%
  16779. %@NL@%
  16780.      TEST.OBJ :     TEST.FOR%@NL@%
  16781.            FL /c TEST.FOR%@NL@%
  16782. %@NL@%
  16783. %@CR:MCVb1003@%%@4@%If the source code in %@AS@%TEST.FOR%@AE@% contains a program error (but not if it%@EH@%
  16784. contains a warning error), you would see the following message the first
  16785. time you use NMAKE with the NMAKE description file %@AS@%TEST%@AE@%:%@NL@%
  16786. %@NL@%
  16787.      "nmake: CL /c TEST.FOR - error 2"%@NL@%
  16788. %@NL@%
  16789. %@CR:MCVb1004@%%@4@%This error message indicates that the command %@AS@%CL /c TEST.FOR%@AE@% in the NMAKE%@EH@%
  16790. description file returned exit code 2.%@NL@%
  16791. %@NL@%
  16792. %@CR:MCVb1005@%%@4@%You can also test exit codes in NMAKE description files with the %@AB@%!IF%@AE@%%@EH@%
  16793. directive.%@NL@%
  16794. %@NL@%
  16795. %@NL@%
  16796. %@CR:MCVb2000@%%@2@%%@AB@%B.2  Exit Codes with DOS Batch Files%@AE@%%@EH@%%@NL@%
  16797. %@NL@%
  16798. %@CR:MCVb2001@%%@4@%If you prefer to use DOS batch files instead of NMAKE description files, you%@EH@%
  16799. can test the code returned with the IF command. The following sample batch
  16800. file, called %@AS@%COMPILE.BAT%@AE@%, illustrates how to do this:%@NL@%
  16801. %@NL@%
  16802.      CL /c %1%@NL@%
  16803.      IF NOT ERRORLEVEL 1 LINK %1;%@NL@%
  16804.      IF NOT ERRORLEVEL 1 %1%@NL@%
  16805. %@NL@%
  16806. %@CR:MCVb2002@%%@4@%You can execute this sample batch file with the following command:%@EH@%%@NL@%
  16807. %@NL@%
  16808.      COMPILE TEST.C%@NL@%
  16809. %@NL@%
  16810. %@CR:MCVb2003@%%@4@%DOS then executes the first line of the batch file, substituting %@AS@%TEST.C%@AE@% for%@EH@%
  16811. the parameter %@AS@%%1%@AE@%, as in the command line below.%@NL@%
  16812. %@NL@%
  16813.      CL /c TEST.C%@NL@%
  16814. %@NL@%
  16815. %@CR:MCVb2004@%%@4@%It returns an exit code 0 if the compilation is successful or a higher code%@EH@%
  16816. if the compiler encounters an error. In the second line, DOS tests to see if
  16817. the code returned by the previous line is 1 or higher. If it is not (that
  16818. is, if the code is 0), DOS executes the following command:%@NL@%
  16819. %@NL@%
  16820.      LINK TEST;%@NL@%
  16821. %@NL@%
  16822. %@CR:MCVb2005@%%@4@%LINK also returns a code that is tested by the third line.%@EH@%%@NL@%
  16823. %@NL@%
  16824. %@NL@%
  16825. %@CR:MCVb3000@%%@2@%%@AB@%B.3  Exit Codes for Programs%@AE@%%@EH@%%@NL@%
  16826. %@NL@%
  16827. %@CR:MCVb3001@%%@4@%An exit code 0 always indicates execution of the program with no fatal%@EH@%
  16828. errors. Warning errors also return exit code 0. NMAKE can return several
  16829. codes indica-ting different kinds of errors; other programs return only one
  16830. code. The exit codes for each program are listed in Sections B.3.1%@BO:   d5edc@%-B.3.4.%@NL@%
  16831. %@NL@%
  16832. %@NL@%
  16833. %@CR:MCVb3100@%%@3@%%@AB@%B.3.1  LINK Exit Codes%@AE@%%@EH@%%@NL@%
  16834. %@NL@%
  16835. %@CR:MCVb3101@%%@NL@%%@AU@%Code                       Meaning%@AE@%%@NL@%
  16836. %@NL@%
  16837. 0                          No error.%@NL@%
  16838. %@NL@%
  16839. 2                          Program error. Commands or files given as input%@NL@%
  16840.                            to the linker produced the error.%@NL@%
  16841. %@NL@%
  16842. 4                          System error. The linker encountered one of the%@NL@%
  16843.                            following problems: 1) ran out of space on output%@NL@%
  16844.                            files; 2) was unable to reopen the temporary%@NL@%
  16845.                            file; 3) experienced an internal error; 4) was%@NL@%
  16846.                            interrupted by the user.%@NL@%
  16847. %@NL@%
  16848. %@NL@%
  16849. %@NL@%
  16850. %@CR:MCVb3200@%%@3@%%@AB@%B.3.2  LIB Exit Codes%@AE@%%@EH@%%@NL@%
  16851. %@NL@%
  16852. %@CR:MCVb3201@%%@AU@%Code                       Meaning%@AE@%%@NL@%
  16853. %@NL@%
  16854. 0                          No error.%@NL@%
  16855. %@NL@%
  16856. 2                          Program error. Commands or files given as input%@NL@%
  16857.                            to the utility produced the error.%@NL@%
  16858. %@NL@%
  16859. 4                          System error. The library manager encountered one%@NL@%
  16860.                            of the following problems: 1) ran out of memory;%@NL@%
  16861.                            2) experienced an internal error; 3) was%@NL@%
  16862.                            interrupted by the user.%@NL@%
  16863. %@NL@%
  16864. %@NL@%
  16865. %@CR:MCVb3300@%%@3@%%@AB@%B.3.3  NMAKE Exit Codes%@AE@%%@EH@%%@NL@%
  16866. %@NL@%
  16867. %@CR:MCVb3301@%%@AU@%Code                       Meaning%@AE@%%@NL@%
  16868. %@NL@%
  16869. 0                          No error%@NL@%
  16870. %@NL@%
  16871. 2                          Program error%@NL@%
  16872. %@NL@%
  16873. 4                          System error──out of memory%@NL@%
  16874. %@NL@%
  16875. %@NL@%
  16876. %@CR:MCVb3302@%%@4@%If a program called by a command in the NMAKE description file produces an%@EH@%
  16877. error, the exit code is displayed in the NMAKE error message.%@NL@%
  16878. %@NL@%
  16879. %@NL@%
  16880. %@CR:MCVb3400@%%@3@%%@AB@%B.3.4  EXEMOD and SETENV Exit Codes%@AE@%%@EH@%%@NL@%
  16881. %@NL@%
  16882. %@CR:MCVb3401@%%@AU@%Code                       Meaning%@AE@%%@NL@%
  16883. %@NL@%
  16884. 0                          No error.%@NL@%
  16885. %@NL@%
  16886. 2                          Program error. Commands or files given as input%@NL@%
  16887.                            to the utility produced the error.%@NL@%
  16888. %@NL@%
  16889. 4                          System error. The utility encountered one of the%@NL@%
  16890.                            following problems: 1) ran out of memory; 2)%@NL@%
  16891.                            experienced an internal error; 3) was interrupted%@NL@%
  16892.                            by the user.%@NL@%
  16893. %@NL@%
  16894. %@NL@%
  16895. %@CR:MCVb3500@%%@3@%%@AB@%B.3.5  CVPACK Exit Codes%@AE@%%@EH@%%@NL@%
  16896. %@NL@%
  16897. %@CR:MCVb3501@%%@AU@%Code                       Meaning%@AE@%%@NL@%
  16898. %@NL@%
  16899. 0                          No error.%@NL@%
  16900. %@NL@%
  16901. 1                          Program error.  Commands or files given as%@NL@%
  16902.                            input to the utility produced the error.%@NL@%
  16903. %@NL@%
  16904. %@CR:MCVc0000@%%@1@%%@AB@%Appendix C  Error Messages%@AE@%%@EH@%%@NL@%
  16905. ───────────────────────────────────────────────────────────────────────────%@NL@%
  16906. %@NL@%
  16907. %@NL@%
  16908. %@CR:MCVc1000@%%@2@%%@AB@%C.1  CodeView Error Messages%@AE@%%@EH@%%@NL@%
  16909. %@NL@%
  16910. %@CR:MCVc1001@%%@4@%The CodeView debugger displays an error message whenever it detects a%@EH@%
  16911. command it cannot execute. Most errors (start-up errors are the exception)
  16912. terminate the CodeView command under which the error occurred but do not
  16913. terminate the debugger. You may see any of the following messages.%@NL@%
  16914. %@NL@%
  16915. %@CR:MCVcE001@%%@4@%%@AB@%? cannot display%@AE@%%@EH@%%@NL@%
  16916. %@NL@%
  16917.           The Display Expression command (%@AB@%?%@AE@%) has been passed a valid symbol%@NL@%
  16918.           it cannot display. A variable with enumeration type cannot be%@NL@%
  16919.           displayed.%@NL@%
  16920. %@NL@%
  16921. %@CR:MCVcE002@%%@4@%%@AB@%Argument to IMAG/DIMAG must be simple type%@AE@%%@EH@%%@NL@%
  16922. %@NL@%
  16923.           You specified an argument to an %@AB@%IMAG%@AE@% or %@AB@%DIMAG%@AE@% function not%@NL@%
  16924.           permitted, such as an array with no subscripts.%@NL@%
  16925. %@NL@%
  16926. %@CR:MCVcE003@%%@4@%%@AB@%Array must have subscript%@AE@%%@EH@%%@NL@%
  16927. %@NL@%
  16928.           You specified an array without any subscripts in an expression,%@NL@%
  16929.           such as %@AS@%IARRAY+2%@AE@%. A correct example would be %@AS@%IARRAY[1]+2%@AE@%.%@NL@%
  16930. %@NL@%
  16931. %@CR:MCVcE004@%%@4@%%@AB@%Bad address%@AE@%%@EH@%%@NL@%
  16932. %@NL@%
  16933.           You specified an address in an invalid form.%@NL@%
  16934. %@NL@%
  16935.           For instance, you may have entered an address containing%@NL@%
  16936.           hexadecimal characters when the radix is decimal.%@NL@%
  16937. %@NL@%
  16938. %@CR:MCVcE005@%%@4@%%@AB@%Bad breakpoint command%@AE@%%@EH@%%@NL@%
  16939. %@NL@%
  16940.           You typed an invalid breakpoint number with the Breakpoint Clear,%@NL@%
  16941.           Breakpoint Disable, or Breakpoint Enable command.%@NL@%
  16942. %@NL@%
  16943.           The number must be in the range 0 to 19.%@NL@%
  16944. %@NL@%
  16945. %@CR:MCVcE006@%%@4@%%@AB@%Bad emulator info%@AE@%%@EH@%%@NL@%
  16946. %@NL@%
  16947.           The CodeView debugger cannot read data from the floating-point%@NL@%
  16948.           emulator.%@NL@%
  16949. %@NL@%
  16950. %@CR:MCVcE007@%%@4@%%@AB@%Bad flag%@AE@%%@EH@%%@NL@%
  16951. %@NL@%
  16952.           You specified an invalid flag mnemonic with the Register dialog%@NL@%
  16953.           command (%@AB@%R%@AE@%).%@NL@%
  16954. %@NL@%
  16955.           Use one of the mnemonics displayed when you enter the command %@AB@%RF%@AE@%.%@NL@%
  16956. %@NL@%
  16957. %@CR:MCVcE008@%%@4@%%@AB@%Bad format string%@AE@%%@EH@%%@NL@%
  16958. %@NL@%
  16959.           You used an invalid format specifier following an expression.%@NL@%
  16960. %@NL@%
  16961.           Expressions used with the Display Expression, Watch, Watchpoint,%@NL@%
  16962.           and Tracepoint commands can have CodeView format specifiers set%@NL@%
  16963.           off from the expression by a comma. The valid format specifiers%@NL@%
  16964.           are %@AB@%c%@AE@%, %@AB@%d%@AE@%, %@AB@%e%@AE@%, %@AB@%E%@AE@%, %@AB@%f%@AE@%, %@AB@%g%@AE@%, %@AB@%G%@AE@%, %@AB@%i%@AE@%, %@AB@%o%@AE@%, %@AB@%s%@AE@%, %@AB@%u%@AE@%, %@AB@%x%@AE@%, %@AB@%X%@AE@%. Some format specifiers%@NL@%
  16965.           can be preceded by the prefix %@AB@%h%@AE@% or %@AB@%l%@AE@%. See the Display Expression%@NL@%
  16966.           command for more information about format specifiers.%@NL@%
  16967. %@NL@%
  16968. %@CR:MCVcE009@%%@4@%%@AB@%Bad integer or real constant%@AE@%%@EH@%%@NL@%
  16969. %@NL@%
  16970.           You specified an illegal numeric constant in an expression.%@NL@%
  16971. %@NL@%
  16972. %@CR:MCVcE010@%%@4@%%@AB@%Bad intrinsic function%@AE@%%@EH@%%@NL@%
  16973. %@NL@%
  16974.           You specified an illegal intrinsic function name in an expression.%@NL@%
  16975. %@NL@%
  16976. %@CR:MCVcE011@%%@4@%%@AB@%Bad radix (use 8, 10, or 16)%@AE@%%@EH@%%@NL@%
  16977. %@NL@%
  16978.           With the %@AB@%N%@AE@% command, you can use only octal, decimal, and%@NL@%
  16979.           hexadecimal radixes.%@NL@%
  16980. %@NL@%
  16981. %@CR:MCVcE012@%%@4@%%@AB@%Bad register%@AE@%%@EH@%%@NL@%
  16982. %@NL@%
  16983.           You typed the Register command (%@AB@%R%@AE@%) with an invalid register name.%@NL@%
  16984. %@NL@%
  16985.           Use %@AB@%AX%@AE@%, %@AB@%BX%@AE@%, %@AB@%CX%@AE@%, %@AB@%DX%@AE@%, %@AB@%SP%@AE@%, %@AB@%BP%@AE@%, %@AB@%SI%@AE@%, %@AB@%DI%@AE@%, %@AB@%DS%@AE@%, %@AB@%ES%@AE@%, %@AB@%SS%@AE@%, %@AB@%CS%@AE@%, %@AB@%IP%@AE@%, or %@AB@%F%@AE@%.%@NL@%
  16986. %@NL@%
  16987. %@CR:MCVcE013@%%@4@%%@AB@%Bad subscript%@AE@%%@EH@%%@NL@%
  16988. %@NL@%
  16989.           You entered an illegal subscript expression for an array, such as%@NL@%
  16990.           %@AS@%IARRAY(3.3)%@AE@% or %@AS@%IARRAY((3,3))%@AE@%. The correct expression for this%@NL@%
  16991.           example (in BASIC or FORTRAN) is %@AS@%IARRAY(3,3)%@AE@%.%@NL@%
  16992. %@NL@%
  16993. %@CR:MCVcE014@%%@4@%%@AB@%Bad type case%@AE@%%@EH@%%@NL@%
  16994. %@NL@%
  16995.           The types of the operands in an expression are incompatible.%@NL@%
  16996. %@NL@%
  16997. %@CR:MCVcE015@%%@4@%%@AB@%Bad type (use one of 'ABDILSTUW')%@AE@%%@EH@%%@NL@%
  16998. %@NL@%
  16999.           The valid dump types are ASCII (%@AB@%A%@AE@%), Byte (%@AB@%B%@AE@%), Double Word (%@AB@%D%@AE@%),%@NL@%
  17000.           Integer (%@AB@%I%@AE@%), Long Real (%@AB@%L%@AE@%), Short Real (%@AB@%S%@AE@%), 10-Byte Real (%@AB@%T%@AE@%),%@NL@%
  17001.           Unsigned (%@AB@%U%@AE@%), and Word (%@AB@%W%@AE@%).%@NL@%
  17002. %@NL@%
  17003. %@CR:MCVcE016@%%@4@%%@AB@%Badly formed type%@AE@%%@EH@%%@NL@%
  17004. %@NL@%
  17005.           The type information in the symbol table of the file you are%@NL@%
  17006.           debugging is incorrect.%@NL@%
  17007. %@NL@%
  17008.           If the message occurs, please note the circumstances of the error%@NL@%
  17009.           and inform Microsoft Corporation by following the directions in%@NL@%
  17010.           the Microsoft Product Assistance Request form at the back of one%@NL@%
  17011.           of your manuals.%@NL@%
  17012. %@NL@%
  17013. %@CR:MCVcE017@%%@4@%%@AB@%Breakpoint # or '*' expected%@AE@%%@EH@%%@NL@%
  17014. %@NL@%
  17015.           You entered the Breakpoint Clear (%@AB@%BC%@AE@%), Breakpoint Disable (%@AB@%BD%@AE@%), or%@NL@%
  17016.           Breakpoint Enable (%@AB@%BE%@AE@%) command with no argument.%@NL@%
  17017. %@NL@%
  17018.           These commands require that you specify the number of the%@NL@%
  17019.           breakpoint to be acted on, or that you specify the asterisk (%@AB@%*%@AE@%)%@NL@%
  17020.           indicating that all breakpoints are to be acted on.%@NL@%
  17021. %@NL@%
  17022. %@CR:MCVcE018@%%@4@%%@AB@%Cannot use struct or union as scalar%@AE@%%@EH@%%@NL@%
  17023. %@NL@%
  17024.           A struct or union variable cannot be used as a scalar value in a C%@NL@%
  17025.           expression.%@NL@%
  17026. %@NL@%
  17027.           Such variables must be followed by a file separator or preceded by%@NL@%
  17028.           the address of operator.%@NL@%
  17029. %@NL@%
  17030. %@CR:MCVcE019@%%@4@%%@AB@%Cannot cast complex constant component into REAL%@AE@%%@EH@%%@NL@%
  17031. %@NL@%
  17032.           Both the real and imaginary components of a %@AB@%COMPLEX%@AE@% constant must%@NL@%
  17033.           be compatible with the type %@AB@%REAL%@AE@%.%@NL@%
  17034. %@NL@%
  17035. %@CR:MCVcE020@%%@4@%%@AB@%Cannot cast IMAG/DIMAG argument to COMPLEX%@AE@%%@EH@%%@NL@%
  17036. %@NL@%
  17037.           Arguments to %@AB@%IMAG%@AE@% and %@AB@%DIMAG%@AE@% must be simple numeric types.%@NL@%
  17038. %@NL@%
  17039. %@CR:MCVcE021@%%@4@%%@AB@%Cannot find%@AE@% %@AI@%filename%@AE@%%@EH@%%@NL@%
  17040. %@NL@%
  17041.           The CodeView debugger could not find the executable file you%@NL@%
  17042.           specified when you started.%@NL@%
  17043. %@NL@%
  17044.           You may have misspelled the file name, or the file is in a%@NL@%
  17045.           different directory.%@NL@%
  17046. %@NL@%
  17047. %@CR:MCVcE022@%%@4@%%@AB@%Character constant too long%@AE@%%@EH@%%@NL@%
  17048. %@NL@%
  17049.           You specified a character constant too long for the FORTRAN%@NL@%
  17050.           expression evaluator (the limit is 126 bytes).%@NL@%
  17051. %@NL@%
  17052. %@CR:MCVcE023@%%@4@%%@AB@%Character too big for current radix%@AE@%%@EH@%%@NL@%
  17053. %@NL@%
  17054.           In a constant, you specified a radix that is larger than the%@NL@%
  17055.           current CodeView radix.%@NL@%
  17056. %@NL@%
  17057.           Use the %@AB@%N%@AE@% command to change the radix.%@NL@%
  17058. %@NL@%
  17059. %@CR:MCVcE024@%%@4@%%@AB@%Constant too big%@AE@%%@EH@%%@NL@%
  17060. %@NL@%
  17061.           The CodeView debugger cannot accept an unsigned constant number%@NL@%
  17062.           larger than 4,294,967,295 (16#FFFFFFFF).%@NL@%
  17063. %@NL@%
  17064. %@CR:MCVcE025@%%@4@%%@AB@%CPU not an 80386%@AE@%%@EH@%%@NL@%
  17065. %@NL@%
  17066.           The 386 option cannot be selected if you are using a machine%@NL@%
  17067.           without an 80386 processor.%@NL@%
  17068. %@NL@%
  17069. %@CR:MCVcE026@%%@4@%%@AB@%Divide by zero%@AE@%%@EH@%%@NL@%
  17070. %@NL@%
  17071.           An expression in an argument of a dialog command attempts to%@NL@%
  17072.           divide by zero.%@NL@%
  17073. %@NL@%
  17074. %@CR:MCVcE027@%%@4@%%@AB@%EMM error%@AE@%%@EH@%%@NL@%
  17075. %@NL@%
  17076.           The debugger is failing to use EMM correctly. Please contact%@NL@%
  17077.           Microsoft Corporation by following the directions in the Microsoft%@NL@%
  17078.           Product Assistance Request form at the back of one of your%@NL@%
  17079.           manuals.%@NL@%
  17080. %@NL@%
  17081. %@CR:MCVcE028@%%@4@%%@AB@%EMM hardware error%@AE@%%@EH@%%@NL@%
  17082. %@NL@%
  17083.           The Expanded Memory routines report a hardware error. Your%@NL@%
  17084.           expanded memory board may need replacement.%@NL@%
  17085. %@NL@%
  17086. %@CR:MCVcE029@%%@4@%%@AB@%EMM memory not found%@AE@%%@EH@%%@NL@%
  17087. %@NL@%
  17088.           You tried to use the %@AB@%/E%@AE@% option without having installed expanded%@NL@%
  17089.           memory. You must make this installation with software that%@NL@%
  17090.           accesses the memory according to the Lotus/Intel/Microsoft EMS%@NL@%
  17091.           specification.%@NL@%
  17092. %@NL@%
  17093. %@CR:MCVcE030@%%@4@%%@AB@%EMM software error%@AE@%%@EH@%%@NL@%
  17094. %@NL@%
  17095.           The Expanded Memory routines report a software error. Reinstall%@NL@%
  17096.           EMM software.%@NL@%
  17097. %@NL@%
  17098. %@CR:MCVcE031@%%@4@%%@AB@%Expression not a memory address%@AE@%%@EH@%%@NL@%
  17099. %@NL@%
  17100.           A Tracepoint command was given without a symbol that evaluates to%@NL@%
  17101.           a single memory address.%@NL@%
  17102. %@NL@%
  17103.           For example, the commands %@AS@%TP?1%@AE@% and %@AS@%TP?a+b%@AE@% each produce this error%@NL@%
  17104.           message. The proper way to put a tracepoint on the word at address%@NL@%
  17105.           1 is with the command %@AS@%TPW 1%@AE@%.%@NL@%
  17106. %@NL@%
  17107. %@CR:MCVcE032@%%@4@%%@AB@%Expression too complex%@AE@%%@EH@%%@NL@%
  17108. %@NL@%
  17109.           An expression given as a dialog-command argument is too complex.%@NL@%
  17110. %@NL@%
  17111.           Try simplifying the expression.%@NL@%
  17112. %@NL@%
  17113. %@CR:MCVcE033@%%@4@%%@AB@%Extra input ignored%@AE@%%@EH@%%@NL@%
  17114. %@NL@%
  17115.           You specified too many arguments to a command.%@NL@%
  17116. %@NL@%
  17117.           The CodeView debugger evaluates the valid arguments and ignores%@NL@%
  17118.           the rest. Often in this situation the debugger does not evaluate%@NL@%
  17119.           the arguments in the way you intended.%@NL@%
  17120. %@NL@%
  17121. %@CR:MCVcE034@%%@4@%%@AB@%Flip/Swap option off - application output lost%@AE@%%@EH@%%@NL@%
  17122. %@NL@%
  17123.           The program you are debugging is writing to the screen, but the%@NL@%
  17124.           output cannot be displayed because you have turned off the%@NL@%
  17125.           flip/swap option.%@NL@%
  17126. %@NL@%
  17127. %@CR:MCVcE035@%%@4@%%@AB@%Floating point error%@AE@%%@EH@%%@NL@%
  17128. %@NL@%
  17129.           This message should not occur, but if it does, please note the%@NL@%
  17130.           circumstances of the error and inform Microsoft Corporation by%@NL@%
  17131.           following the directions in the Microsoft Product Assistance%@NL@%
  17132.           Request form at the back of one of your manuals.%@NL@%
  17133. %@NL@%
  17134. %@CR:MCVcE036@%%@4@%%@AB@%Floating point not loaded%@AE@%%@EH@%%@NL@%
  17135. %@NL@%
  17136.           This message occurs when the current thread has not initialized%@NL@%
  17137.           its own emulator. Each thread has its own floating-point emulator.%@NL@%
  17138. %@NL@%
  17139. %@CR:MCVcE037@%%@4@%%@AB@%Function call before 'main'%@AE@%%@EH@%%@NL@%
  17140. %@NL@%
  17141.           This message occurs when you attempt to evaluate a program-defined%@NL@%
  17142.           function before you have entered the main function.%@NL@%
  17143. %@NL@%
  17144.           Execute at least to the beginning of the main function before%@NL@%
  17145.           attempting to evaluate program-defined functions.%@NL@%
  17146. %@NL@%
  17147. %@CR:MCVcE038@%%@4@%%@AB@%Illegal instruction%@AE@%%@EH@%%@NL@%
  17148. %@NL@%
  17149.           This message usually indicates that a divide-by-zero machine%@NL@%
  17150.           instruction was attempted.%@NL@%
  17151. %@NL@%
  17152. %@CR:MCVcE039@%%@4@%%@AB@%Index out of bound%@AE@%%@EH@%%@NL@%
  17153. %@NL@%
  17154.           You specified a subscript value outside the bounds declared for%@NL@%
  17155.           the array.%@NL@%
  17156. %@NL@%
  17157. %@CR:MCVcE040@%%@4@%%@AB@%Insufficient EMM memory%@AE@%%@EH@%%@NL@%
  17158. %@NL@%
  17159.           Not enough expanded memory is available to hold the program's%@NL@%
  17160.           symbol table.%@NL@%
  17161. %@NL@%
  17162. %@CR:MCVcE041@%%@4@%%@AB@%Internal debugger error%@AE@%%@EH@%%@NL@%
  17163. %@NL@%
  17164.           If this message occurs, please note the circumstances of the error%@NL@%
  17165.           and notify Microsoft Corporation by following the directions in%@NL@%
  17166.           the Microsoft Product Assistance Request form at the back of one%@NL@%
  17167.           of your manuals.%@NL@%
  17168. %@NL@%
  17169. %@CR:MCVcE042@%%@4@%%@AB@%Invalid argument%@AE@%%@EH@%%@NL@%
  17170. %@NL@%
  17171.           One of the arguments you specified is not a valid CodeView%@NL@%
  17172.           expression.%@NL@%
  17173. %@NL@%
  17174. %@CR:MCVcE043@%%@4@%%@AB@%Invalid executable file format - please relink%@AE@%%@EH@%%@NL@%
  17175. %@NL@%
  17176.           The executable file was not linked with the version of the linker%@NL@%
  17177.           released with this version of the CodeView debugger. Relink with%@NL@%
  17178.           the more current version of the linker.%@NL@%
  17179. %@NL@%
  17180. %@CR:MCVcE044@%%@4@%%@AB@%Invalid option%@AE@%%@EH@%%@NL@%
  17181. %@NL@%
  17182.           The option specified cannot be used with the CodeView Option%@NL@%
  17183.           command.%@NL@%
  17184. %@NL@%
  17185. %@CR:MCVcE045@%%@4@%%@AB@%Missing '"'%@AE@%%@EH@%%@NL@%
  17186. %@NL@%
  17187.           You specified a string as an argument to a dialog command, but you%@NL@%
  17188.           did not supply a closing double quotation mark.%@NL@%
  17189. %@NL@%
  17190. %@CR:MCVcE046@%%@4@%%@AB@%Missing '('%@AE@%%@EH@%%@NL@%
  17191. %@NL@%
  17192.           An argument to a dialog command was specified as an expression%@NL@%
  17193.           containing a right parenthesis, but no left parenthesis.%@NL@%
  17194. %@NL@%
  17195. %@CR:MCVcE047@%%@4@%%@AB@%Missing ')'%@AE@%%@EH@%%@NL@%
  17196. %@NL@%
  17197.           An argument to a dialog command was specified as an expression%@NL@%
  17198.           containing a left parenthesis, but no right parenthesis.%@NL@%
  17199. %@NL@%
  17200. %@CR:MCVcE048@%%@4@%%@AB@%Missing ']'%@AE@%%@EH@%%@NL@%
  17201. %@NL@%
  17202.           An argument to a dialog command was specified as an expression%@NL@%
  17203.           containing a left bracket, but no right bracket.%@NL@%
  17204. %@NL@%
  17205.           This error message can also occur if a regular expression is%@NL@%
  17206.           specified with a right bracket but no left bracket.%@NL@%
  17207. %@NL@%
  17208. %@CR:MCVcE049@%%@4@%%@AB@%Missing '(' in complex constant%@AE@%%@EH@%%@NL@%
  17209. %@NL@%
  17210.           The debugger is expecting an opening parenthesis of a complex%@NL@%
  17211.           constant in an expression, but it is missing.%@NL@%
  17212. %@NL@%
  17213. %@CR:MCVcE050@%%@4@%%@AB@%Missing ')' in complex constant%@AE@%%@EH@%%@NL@%
  17214. %@NL@%
  17215.           The debugger expects a closing parenthesis of a complex constant%@NL@%
  17216.           in an expression.%@NL@%
  17217. %@NL@%
  17218. %@CR:MCVcE051@%%@4@%%@AB@%Missing ')' in substring%@AE@%%@EH@%%@NL@%
  17219. %@NL@%
  17220.           The debugger expects a closing parenthesis of a substring%@NL@%
  17221.           expression.%@NL@%
  17222. %@NL@%
  17223. %@CR:MCVcE052@%%@4@%%@AB@%Missing '(' to intrinsic%@AE@%%@EH@%%@NL@%
  17224. %@NL@%
  17225.           The debugger expects an opening parenthesis for an intrinsic%@NL@%
  17226.           function.%@NL@%
  17227. %@NL@%
  17228. %@CR:MCVcE053@%%@4@%%@AB@%Missing ')' to intrinsic%@AE@%%@EH@%%@NL@%
  17229. %@NL@%
  17230.           The debugger expects a closing parenthesis for an intrinsic%@NL@%
  17231.           function.%@NL@%
  17232. %@NL@%
  17233. %@CR:MCVcE054@%%@4@%%@AB@%No closing single quote%@AE@%%@EH@%%@NL@%
  17234. %@NL@%
  17235.           You specified a character in an expression used as a%@NL@%
  17236.           dialog-command argument, but the closing single quotation mark is%@NL@%
  17237.           missing.%@NL@%
  17238. %@NL@%
  17239. %@CR:MCVcE055@%%@4@%%@AB@%No code at this line number%@AE@%%@EH@%%@NL@%
  17240. %@NL@%
  17241.           You tried to set a breakpoint on a source line that does not%@NL@%
  17242.           correspond to machine code. (In other words, the source line does%@NL@%
  17243.           not contain an executable statement.)%@NL@%
  17244. %@NL@%
  17245.           For instance, the line may be a data declaration or a comment.%@NL@%
  17246. %@NL@%
  17247. %@CR:MCVcE056@%%@4@%%@AB@%No free EMM memory handles%@AE@%%@EH@%%@NL@%
  17248. %@NL@%
  17249.           The debugger cannot find an available handle. EMM software%@NL@%
  17250.           allocates a fixed number of memory handles (usually 256) to be%@NL@%
  17251.           used for specific tasks.%@NL@%
  17252. %@NL@%
  17253. %@CR:MCVcE057@%%@4@%%@AB@%No match of regular expression%@AE@%%@EH@%%@NL@%
  17254. %@NL@%
  17255.           No match was found for the regular expression you specified with%@NL@%
  17256.           the Search command or with the Find selection from the Search%@NL@%
  17257.           menu.%@NL@%
  17258. %@NL@%
  17259. %@CR:MCVcE058@%%@4@%%@AB@%No previous regular expression%@AE@%%@EH@%%@NL@%
  17260. %@NL@%
  17261.           You selected Previous from the Search menu, but there was no%@NL@%
  17262.           previous match for the last regular expression specified.%@NL@%
  17263. %@NL@%
  17264. %@CR:MCVcE059@%%@4@%%@AB@%No source lines at this address%@AE@%%@EH@%%@NL@%
  17265. %@NL@%
  17266.           The address you specified as an argument for the View command (%@AB@%V%@AE@%)%@NL@%
  17267.           does not have any source lines.%@NL@%
  17268. %@NL@%
  17269.           For instance, it could be an address in a library routine or an%@NL@%
  17270.           assembly-language module.%@NL@%
  17271. %@NL@%
  17272. %@CR:MCVcE060@%%@4@%%@AB@%No such file/directory%@AE@%%@EH@%%@NL@%
  17273. %@NL@%
  17274.           A file specified in a command argument or in response to a prompt%@NL@%
  17275.           does not exist.%@NL@%
  17276. %@NL@%
  17277.           For instance, the message appears when you select Load from the%@NL@%
  17278.           File menu and then enter the name of a nonexistent file.%@NL@%
  17279. %@NL@%
  17280. %@CR:MCVcE061@%%@4@%%@AB@%No symbolic information = CV options not used or wrong LINK version%@AE@%%@EH@%%@NL@%
  17281. %@NL@%
  17282.           The program file you specified is not in the CodeView format.%@NL@%
  17283. %@NL@%
  17284.           You cannot debug in source mode unless you recreate the file in%@NL@%
  17285.           CodeView format. However, you can debug in assembly mode.%@NL@%
  17286. %@NL@%
  17287. %@CR:MCVcE062@%%@4@%%@AB@%Not a text file%@AE@%%@EH@%%@NL@%
  17288. %@NL@%
  17289.           You attempted to load a file by using the Load selection from the%@NL@%
  17290.           File menu or using the View command, but the file is not a text%@NL@%
  17291.           file.%@NL@%
  17292. %@NL@%
  17293.           The CodeView debugger determines if a file is a text file by%@NL@%
  17294.           checking the first 128 bytes for characters that are not in the%@NL@%
  17295.           ASCII ranges 9 to 13 and 20 to 126.%@NL@%
  17296. %@NL@%
  17297. %@CR:MCVcE063@%%@4@%%@AB@%Not an executable file%@AE@%%@EH@%%@NL@%
  17298. %@NL@%
  17299.           The file you specified to be debugged when you started the%@NL@%
  17300.           CodeView debugger is not an executable file having the extension%@NL@%
  17301.           %@AB@%.EXE%@AE@% or %@AB@%.COM%@AE@%.%@NL@%
  17302. %@NL@%
  17303. %@CR:MCVcE064@%%@4@%%@AB@%Not enough space%@AE@%%@EH@%%@NL@%
  17304. %@NL@%
  17305.           You typed the Shell Escape command (%@AB@%!%@AE@%) or selected Shell from the%@NL@%
  17306.           File menu, but there is not enough free memory to execute%@NL@%
  17307.           %@AB@%COMMAND.COM%@AE@%.%@NL@%
  17308. %@NL@%
  17309.           Since memory is released by code in the FORTRAN start-up routines,%@NL@%
  17310.           this error always occurs if you try to use the Shell Escape%@NL@%
  17311.           command before you have executed any code. Use any of the%@NL@%
  17312.           code-execution commands (Trace, Program Step, or Go) to execute%@NL@%
  17313.           the FORTRAN start-up code, then try the Shell Escape command%@NL@%
  17314.           again. The message also occurs with assembly-language programs%@NL@%
  17315.           that do not specifically release memory.%@NL@%
  17316. %@NL@%
  17317. %@CR:MCVcE065@%%@4@%%@AB@%Object too big%@AE@%%@EH@%%@NL@%
  17318. %@NL@%
  17319.           You entered a Tracepoint command with a data object (such as an%@NL@%
  17320.           array) larger than 128 bytes.%@NL@%
  17321. %@NL@%
  17322. %@CR:MCVcE066@%%@4@%%@AB@%Operand types incorrect for this operation%@AE@%%@EH@%%@NL@%
  17323. %@NL@%
  17324.           An operand in a FORTRAN expression had a type incompatible with%@NL@%
  17325.           the operation applied to it.%@NL@%
  17326. %@NL@%
  17327.           For example, if %@AS@%P%@AE@% is declared as %@AS@%CHARACTER P(10)%@AE@%, the %@AS@%? P+5%@AE@% would%@NL@%
  17328.           produce this error, since a character array cannot be an operand%@NL@%
  17329.           of an arithmetic operator.%@NL@%
  17330. %@NL@%
  17331. %@CR:MCVcE067@%%@4@%%@AB@%Operator must have a struct\union type%@AE@%%@EH@%%@NL@%
  17332. %@NL@%
  17333.           You have used one of the C member-selection operators (-, >, or .)%@NL@%
  17334.           in an expression that does not reference an element of a structure%@NL@%
  17335.           or union.%@NL@%
  17336. %@NL@%
  17337. %@CR:MCVcE068@%%@4@%%@AB@%Operator needs lvalue%@AE@%%@EH@%%@NL@%
  17338. %@NL@%
  17339.           You specified an expression that does not evaluate to a memory%@NL@%
  17340.           location in an operation that requires one. (An lvalue is an%@NL@%
  17341.           expression that refers to a memory location.)%@NL@%
  17342. %@NL@%
  17343.           For example, %@AS@%buffer(count)%@AE@% is correct because it represents a%@NL@%
  17344.           symbol in memory. However, %@AS@%I .EQV. 10%@AE@% is invalid because it%@NL@%
  17345.           evaluates to TRUE or FALSE instead of to a single memory location.%@NL@%
  17346. %@NL@%
  17347. %@CR:MCVcE069@%%@4@%%@AB@%Overlay not resident%@AE@%%@EH@%%@NL@%
  17348. %@NL@%
  17349.           You tried to unassemble machine code from a function that is%@NL@%
  17350.           currently not in memory.%@NL@%
  17351. %@NL@%
  17352. %@CR:MCVcE070@%%@4@%%@AB@%Program terminated normally (%@AE@%%@AI@%number%@AE@%%@AB@%)%@AE@%%@EH@%%@NL@%
  17353. %@NL@%
  17354.           You executed your program to the end. The number displayed in%@NL@%
  17355.           parentheses is the exit code returned to DOS by your program.%@NL@%
  17356. %@NL@%
  17357.           You must use the Restart command (or the Start menu selection) to%@NL@%
  17358.           start the program before executing more code.%@NL@%
  17359. %@NL@%
  17360. %@CR:MCVcE071@%%@4@%%@AB@%Radix must be between 2 and 36 inclusive%@AE@%%@EH@%%@NL@%
  17361. %@NL@%
  17362.           You specified a radix outside the allowable range.%@NL@%
  17363. %@NL@%
  17364.  
  17365. %@CR:MCVcE072@%%@4@%%@AB@%Register variable out of scope%@AE@%%@EH@%%@NL@%
  17366. %@NL@%
  17367.           You tried to specify a register variable by using the period (%@AB@%.%@AE@%)%@NL@%
  17368.           operator and a routine name.%@NL@%
  17369. %@NL@%
  17370.           For example, if you are in a third-level routine, you can display%@NL@%
  17371.           the value of a local variable called %@AS@%local%@AE@% in a second-level%@NL@%
  17372.           routine called %@AS@%parent%@AE@% with the following command:%@NL@%
  17373. %@NL@%
  17374.                ? parent.local%@NL@%
  17375. %@NL@%
  17376.           However, this command will not work if %@AS@%local%@AE@% is declared as a%@NL@%
  17377.           register variable.%@NL@%
  17378. %@NL@%
  17379. %@CR:MCVcE073@%%@4@%%@AB@%Regular expression too complex%@AE@%%@EH@%%@NL@%
  17380. %@NL@%
  17381.           The regular expression specified is too complex for the CodeView%@NL@%
  17382.           debugger to evaluate.%@NL@%
  17383. %@NL@%
  17384. %@CR:MCVcE074@%%@4@%%@AB@%Regular expression too long%@AE@%%@EH@%%@NL@%
  17385. %@NL@%
  17386.           The regular expression specified is too long for the CodeView%@NL@%
  17387.           debugger to evaluate.%@NL@%
  17388. %@NL@%
  17389. %@CR:MCVcE075@%%@4@%%@AB@%Restart program to debug%@AE@%%@EH@%%@NL@%
  17390. %@NL@%
  17391.           You have executed to the end of the program you are debugging.%@NL@%
  17392. %@NL@%
  17393. %@CR:MCVcE076@%%@4@%%@AB@%Simple variable cannot have argument%@AE@%%@EH@%%@NL@%
  17394. %@NL@%
  17395.           In an expression, you specified an argument to a simple variable.%@NL@%
  17396. %@NL@%
  17397.           For example, given the declaration %@AS@%INTEGER NUM%@AE@%, the expression%@NL@%
  17398.           %@AS@%NUM(I)%@AE@% is not allowed.%@NL@%
  17399. %@NL@%
  17400. %@CR:MCVcE077@%%@4@%%@AB@%Substring range out of bound%@AE@%%@EH@%%@NL@%
  17401. %@NL@%
  17402.           A character expression exceeds the length specified in the%@NL@%
  17403.           %@AB@%CHARACTER%@AE@% statement.%@NL@%
  17404. %@NL@%
  17405. %@CR:MCVcE078@%%@4@%%@AB@%Syntax error%@AE@%%@EH@%%@NL@%
  17406. %@NL@%
  17407.           You specified an invalid command line for a dialog command.%@NL@%
  17408. %@NL@%
  17409.           Check for an invalid command letter. This message also appears if%@NL@%
  17410.           you enter an invalid assembly-language instruction using the%@NL@%
  17411.           Assembly command. The error is preceded by a caret that points to%@NL@%
  17412.           the first character the CodeView debugger could not interpret.%@NL@%
  17413. %@NL@%
  17414. %@CR:MCVcE079@%%@4@%%@AB@%Too few array bounds given%@AE@%%@EH@%%@NL@%
  17415. %@NL@%
  17416.           The bounds that you specified in an array subscript do not match%@NL@%
  17417.           the array declaration.%@NL@%
  17418. %@NL@%
  17419.           For example, given the array declaration %@AS@%INTEGER IARRAY(3,4)%@AE@%, the%@NL@%
  17420.           expression %@AS@%IARRAY(I)%@AE@% would produce this error message.%@NL@%
  17421. %@NL@%
  17422. %@CR:MCVcE080@%%@4@%%@AB@%Too many array bounds given%@AE@%%@EH@%%@NL@%
  17423. %@NL@%
  17424.           The bounds that you specified in an array subscript do not match%@NL@%
  17425.           the array declaration.%@NL@%
  17426. %@NL@%
  17427.           For example, given the array declaration %@AS@%INTEGER IARRAY(3,4)%@AE@%, the%@NL@%
  17428.           expression %@AS@%IARRAY(I,3,J)%@AE@% would produce this error message.%@NL@%
  17429. %@NL@%
  17430. %@CR:MCVcE081@%%@4@%%@AB@%Too many breakpoints%@AE@%%@EH@%%@NL@%
  17431. %@NL@%
  17432.           You tried to specify a 21st breakpoint; the CodeView debugger%@NL@%
  17433.           permits only 20.%@NL@%
  17434. %@NL@%
  17435. %@CR:MCVcE082@%%@4@%%@AB@%Too many open files%@AE@%%@EH@%%@NL@%
  17436. %@NL@%
  17437.           You do not have enough file handles for the CodeView debugger to%@NL@%
  17438.           operate correctly.%@NL@%
  17439. %@NL@%
  17440.           You must specify more files in your %@AB@%CONFIG.SYS%@AE@% file. See the DOS%@NL@%
  17441.           user's guide for information on using the %@AB@%CONFIG.SYS%@AE@% file.%@NL@%
  17442. %@NL@%
  17443. %@CR:MCVcE083@%%@4@%%@AB@%Type clash in function argument%@AE@%%@EH@%%@NL@%
  17444. %@NL@%
  17445.           The type of an actual parameter does not match the corresponding%@NL@%
  17446.           formal parameter.%@NL@%
  17447. %@NL@%
  17448.           This message also appears when a subroutine that uses alternate%@NL@%
  17449.           returns is called and the values of the return labels in the%@NL@%
  17450.           actual parameter list are not 0.%@NL@%
  17451. %@NL@%
  17452. %@CR:MCVcE084@%%@4@%%@AB@%Type conversion too complex%@AE@%%@EH@%%@NL@%
  17453. %@NL@%
  17454.           You tried to type cast an element of an expression in a type other%@NL@%
  17455.           than the simple types or with more than one level of indirection.%@NL@%
  17456. %@NL@%
  17457.           An example of a complex type would be type casting to a struct or%@NL@%
  17458.           union type. An example of two levels of indirection is %@AS@%char **%@AE@%.%@NL@%
  17459. %@NL@%
  17460. %@CR:MCVcE085@%%@4@%%@AB@%Unable to open file%@AE@%%@EH@%%@NL@%
  17461. %@NL@%
  17462.           A file you specified in a command argument or in response to a%@NL@%
  17463.           prompt cannot be opened.%@NL@%
  17464. %@NL@%
  17465.           For instance, this message appears when you select Load from the%@NL@%
  17466.           File menu, and then enter the name of a file that is corrupted or%@NL@%
  17467.           has its file attributes set so that it cannot be opened.%@NL@%
  17468. %@NL@%
  17469. %@CR:MCVcE086@%%@4@%%@AB@%Unknown symbol%@AE@%%@EH@%%@NL@%
  17470. %@NL@%
  17471.           You specified an identifier not in the CodeView debugger's symbol%@NL@%
  17472.           table.%@NL@%
  17473. %@NL@%
  17474.           Check for a misspelling. This message may also occur if you try to%@NL@%
  17475.           use a local variable in an argument when you are not in the%@NL@%
  17476.           routine where the variable is defined. The message also occurs%@NL@%
  17477.           when a subroutine that uses alternate returns is called and the%@NL@%
  17478.           values of the return labels in the actual parameter list are
  17479.           not 0.%@NL@%
  17480. %@NL@%
  17481. %@CR:MCVcE087@%%@4@%%@AB@%Unrecognized option%@AE@% %@AI@%option%@AE@%%@EH@%%@NL@%
  17482. %@AB@%Valid options: /B /C<%@AE@%%@AI@%command%@AE@%%@AB@%> /D /F /I /M /S /T /W /43 /2%@AE@%%@NL@%
  17483. %@NL@%
  17484.           You entered an invalid option when starting the CodeView debugger.%@NL@%
  17485. %@NL@%
  17486.           Try retyping the command line.%@NL@%
  17487. %@NL@%
  17488. %@CR:MCVcE088@%%@4@%%@AB@%Usage cv [%@AE@%%@AI@%options%@AE@%%@AB@%] file [%@AE@%%@AI@%arguments%@AE@%%@AB@%]%@AE@%%@EH@%%@NL@%
  17489. %@NL@%
  17490.           You failed to specify an executable file when you started%@NL@%
  17491.           CodeView.%@NL@%
  17492. %@NL@%
  17493.           Try again with the syntax shown in the message.%@NL@%
  17494. %@NL@%
  17495. %@CR:MCVcE089@%%@4@%%@AB@%Video mode changed without the /S option%@AE@%%@EH@%%@NL@%
  17496. %@NL@%
  17497.           The program changed video modes (either to or from graphics modes)%@NL@%
  17498.           when screen swapping was not specified.%@NL@%
  17499. %@NL@%
  17500.           You must use the %@AB@%/S%@AE@% option to specify screen swapping when%@NL@%
  17501.           debugging graphics programs. You can continue debugging when you%@NL@%
  17502.           get this message, but the output screen of the debugged program%@NL@%
  17503.           may be damaged.%@NL@%
  17504. %@NL@%
  17505. %@CR:MCVcE090@%%@4@%%@AB@%Warning: packed file%@AE@%%@EH@%%@NL@%
  17506. %@NL@%
  17507.           You started the CodeView debugger with a packed file as the%@NL@%
  17508.           executable file.%@NL@%
  17509. %@NL@%
  17510.           You can attempt to debug the program in assembly mode, but the%@NL@%
  17511.           packing routines at the start of the program may make this%@NL@%
  17512.           difficult. You cannot debug in source mode because all symbolic%@NL@%
  17513.           information is stripped from a file when it is packed with the%@NL@%
  17514.           %@AB@%/EXEPACK%@AE@% linker option.%@NL@%
  17515. %@NL@%
  17516. %@CR:MCVcE091@%%@4@%%@AB@%Wrong number of function arguments%@AE@%%@EH@%%@NL@%
  17517. %@NL@%
  17518.           You specified an incorrect number of arguments when you tried to%@NL@%
  17519.           evaluate a function in a CodeView expression.%@NL@%
  17520. %@NL@%
  17521. %@NL@%
  17522. %@CR:MCVc2000@%%@2@%%@AB@%C.2  LINK Error Messages%@AE@%%@EH@%%@NL@%
  17523. %@NL@%
  17524. %@CR:MCVc2001@%%@4@%This section lists and describes error messages generated by the Microsoft%@EH@%
  17525. Segmented-Executable Linker, %@AB@%LINK%@AE@%.%@NL@%
  17526. %@NL@%
  17527. %@CR:MCVc2002@%%@4@%%@AB@%Fatal errors%@AE@% cause the linker to stop execution. Fatal error messages have%@EH@%
  17528. the following format:%@NL@%
  17529. %@NL@%
  17530.      %@AI@%location%@AE@%%@AS@%:  error L1%@AE@%%@AI@%xxx%@AE@%%@AS@%:%@AE@%%@AI@% messagetext%@AE@%%@NL@%
  17531. %@NL@%
  17532. %@CR:MCVc2003@%%@4@%%@AB@%Nonfatal errors%@AE@% indicate problems in the executable file. LINK produces the%@EH@%
  17533. executable file. Nonfatal error messages have the following format:%@NL@%
  17534. %@NL@%
  17535.      %@AI@%location%@AE@% %@AS@%:  error L2%@AE@%%@AI@%xxx%@AE@%%@AS@%:%@AE@%%@AI@%messagetext%@AE@%%@NL@%
  17536. %@NL@%
  17537. %@CR:MCVc2004@%%@4@%%@AB@%Warnings%@AE@% indicate possible problems in the executable file. LINK produces%@EH@%
  17538. the executable file. Warnings have the following format:%@NL@%
  17539. %@NL@%
  17540.      %@AI@%location%@AE@%%@AS@% :  warning L4%@AE@%%@AI@%xxx%@AE@%%@AS@%:%@AE@%%@AI@%messagetext%@AE@%%@NL@%
  17541. %@NL@%
  17542. %@CR:MCVc2005@%%@4@%In all three kinds of messages, location is the input file associated with%@EH@%
  17543. the error, or %@AS@%LINK%@AE@% if there is no input file. If the input file is an %@AB@%.OBJ%@AE@%
  17544. or %@AB@%.LIB%@AE@% file and has a module name, the module name is enclosed in
  17545. parentheses, as shown below.%@NL@%
  17546. %@NL@%
  17547.      SLIBC.LIB(_file)%@NL@%
  17548.      MAIN.OBJ(main.c)%@NL@%
  17549.      TEXT.OBJ%@NL@%
  17550. %@NL@%
  17551. %@CR:MCVc2006@%%@4@%The following error messages may appear when you link object files with the%@EH@%
  17552. Microsoft Segmented-Executable Linker, %@AB@%LINK%@AE@%.%@NL@%
  17553. %@NL@%
  17554. %@NL@%
  17555. %@CR:MCVc2100@%%@3@%%@AB@%C.3.1  LINK Fatal Error Messages%@AE@%%@EH@%%@NL@%
  17556. %@NL@%
  17557. %@CR:MCVcE092@%%@4@%%@AB@%L1001%@AE@%     %@AI@%option%@AE@%%@AB@% : option name ambiguous%@AE@%%@EH@%%@NL@%
  17558. %@NL@%
  17559.           A unique option name did not appear after the option indicator%@NL@%
  17560.           (%@AB@%/%@AE@%). For example, the command%@NL@%
  17561. %@NL@%
  17562.           LINK /N main;%@NL@%
  17563. %@NL@%
  17564.           generates this error, since %@AB@%LINK%@AE@% cannot tell which of the options%@NL@%
  17565.           beginning with the letter "N" was intended.%@NL@%
  17566. %@NL@%
  17567. %@CR:MCVcE093@%%@4@%%@AB@%L1002%@AE@%     %@AI@%option%@AE@%%@AB@% : unrecognized option name%@AE@%%@EH@%%@NL@%
  17568. %@NL@%
  17569.           An unrecognized character followed the option indicator (%@AB@%/%@AE@%), as%@NL@%
  17570.           shown below.%@NL@%
  17571. %@NL@%
  17572.           LINK /ABCDEF main;%@NL@%
  17573. %@NL@%
  17574. %@CR:MCVcE094@%%@4@%%@AB@%L1003     /QUICKLIB, /EXEPACK incompatible%@AE@%%@EH@%%@NL@%
  17575. %@NL@%
  17576.           You cannot link with both the %@AB@%/QU%@AE@% option and the %@AB@%/E%@AE@% option.%@NL@%
  17577. %@NL@%
  17578. %@CR:MCVcE095@%%@4@%%@AB@%L1004%@AE@%     %@AI@%option%@AE@%%@AB@% : invalid numeric value%@AE@%%@EH@%%@NL@%
  17579. %@NL@%
  17580.           An incorrect value appeared for one of the linker options. For%@NL@%
  17581.           example, a character string was given for an option that requires%@NL@%
  17582.           a numeric value.%@NL@%
  17583. %@NL@%
  17584. %@CR:MCVcE096@%%@4@%%@AB@%L1005     /PACKCODE : packing limit exceeds 65536 bytes%@AE@%%@EH@%%@NL@%
  17585. %@NL@%
  17586.           The value supplied with the %@AB@%/PACKCODE%@AE@% option exceeds the limit of%@NL@%
  17587.           65,536 bytes.%@NL@%
  17588. %@NL@%
  17589. %@CR:MCVcE097@%%@4@%%@AB@%%@AB@%L1006%@AE@%     %@AI@%option-text%@AE@%%@AB@% : stack size exceeds 65535 bytes%@AE@%%@EH@%%@NL@%
  17590. %@NL@%
  17591.           The value given as a parameter to the %@AB@%/STACKSIZE%@AE@% option exceeds%@NL@%
  17592.           the maximum allowed.%@NL@%
  17593. %@NL@%
  17594. %@CR:MCVcE098@%%@4@%%@AB@%L1007%@AE@%     %@AI@%option%@AE@%%@AB@% : interrupt number exceeds 255%@AE@%%@EH@%%@NL@%
  17595. %@NL@%
  17596.           A number greater than 255 was given as the /OVERLAYINTERRUPT%@NL@%
  17597.           option value.%@NL@%
  17598. %@NL@%
  17599. %@CR:MCVcE099@%%@4@%%@AB@%L1008%@AE@%     %@AI@%option%@AE@%%@AB@% : segment limit set too high%@AE@%%@EH@%%@NL@%
  17600. %@NL@%
  17601.           The %@AB@%/SEGMENTS%@AE@% option specified a limit on the number of segments%@NL@%
  17602.           allowed greater than 3,072.%@NL@%
  17603. %@NL@%
  17604. %@CR:MCVcE100@%%@4@%%@AB@%L1009%@AE@%     %@AI@%number%@AE@%%@AB@% : CPARMAXALLOC : illegal value%@AE@%%@EH@%%@NL@%
  17605. %@NL@%
  17606.           The number specified in the %@AB@%/CPARMAXALLOC%@AE@% option was not in the%@NL@%
  17607.           range 1- 65,535.%@NL@%
  17608. %@NL@%
  17609. %@CR:MCVcE101@%%@4@%%@AB@%L1020     no object modules specified%@AE@%%@EH@%%@NL@%
  17610. %@NL@%
  17611.           No object-file names were specified to the linker.%@NL@%
  17612. %@NL@%
  17613. %@CR:MCVcE102@%%@4@%%@AB@%L1021     cannot nest response files%@AE@%%@EH@%%@NL@%
  17614. %@NL@%
  17615.           A response file occurred within a response file.%@NL@%
  17616. %@NL@%
  17617. %@CR:MCVcE103@%%@4@%%@AB@%L1022     response line too long%@AE@%%@EH@%%@NL@%
  17618. %@NL@%
  17619.           A line in a response file was longer than 127 characters.%@NL@%
  17620. %@NL@%
  17621. %@CR:MCVcE104@%%@4@%%@AB@%L1023     terminated by user%@AE@%%@EH@%%@NL@%
  17622. %@NL@%
  17623.           You entered CTRL+C.%@NL@%
  17624. %@NL@%
  17625. %@CR:MCVcE105@%%@4@%%@AB@%L1024     nested right parentheses%@AE@%%@EH@%%@NL@%
  17626. %@NL@%
  17627.           The contents of an overlay were typed incorrectly on the command%@NL@%
  17628.           line.%@NL@%
  17629. %@NL@%
  17630. %@CR:MCVcE106@%%@4@%%@AB@%L1025     nested left parentheses%@AE@%%@EH@%%@NL@%
  17631. %@NL@%
  17632.           The contents of an overlay were typed incorrectly on the command%@NL@%
  17633.           line.%@NL@%
  17634. %@NL@%
  17635. %@CR:MCVcE107@%%@4@%%@AB@%L1026     unmatched right parenthesis%@AE@%%@EH@%%@NL@%
  17636. %@NL@%
  17637.           A right parenthesis was missing from the contents specification of%@NL@%
  17638.           an overlay on the command line.%@NL@%
  17639. %@NL@%
  17640. %@CR:MCVcE108@%%@4@%%@AB@%L1027     unmatched left parenthesis%@AE@%%@EH@%%@NL@%
  17641. %@NL@%
  17642.           A left parenthesis was missing from the contents specification of%@NL@%
  17643.           an overlay on the command line.%@NL@%
  17644. %@NL@%
  17645. %@CR:MCVcE109@%%@4@%%@AB@%L1030     missing internal name%@AE@%%@EH@%%@NL@%
  17646. %@NL@%
  17647.           An %@AB@%IMPORT%@AE@% statement specified an ordinal in the module-definition%@NL@%
  17648.           file without including the internal name of the routine. The name%@NL@%
  17649.           must be given if the import is by ordinal.%@NL@%
  17650. %@NL@%
  17651. %@CR:MCVcE110@%%@4@%%@AB@%L1031     module description redefined%@AE@%%@EH@%%@NL@%
  17652. %@NL@%
  17653.           A %@AB@%DESCRIPTION%@AE@% statement in the module-definition file was%@NL@%
  17654.           specified more than once, a procedure that is not allowed.%@NL@%
  17655. %@NL@%
  17656. %@CR:MCVcE111@%%@4@%%@AB@%L1032     module name redefined%@AE@%%@EH@%%@NL@%
  17657. %@NL@%
  17658.           The module name was specified more than once (via a %@AB@%NAME%@AE@% or%@NL@%
  17659.           %@AB@%LIBRARY%@AE@% statement), a procedure that is not allowed.%@NL@%
  17660. %@NL@%
  17661. %@CR:MCVcE112@%%@4@%%@AB@%L1040     too many exported entries%@AE@%%@EH@%%@NL@%
  17662. %@NL@%
  17663.           The module-definition file exceeded the limit of 3,072 exported%@NL@%
  17664.           names.%@NL@%
  17665. %@NL@%
  17666. %@CR:MCVcE113@%%@4@%%@AB@%L1041     resident-name table overflow%@AE@%%@EH@%%@NL@%
  17667. %@NL@%
  17668.           The size of the resident-name table exceeds 65,534 bytes. (An%@NL@%
  17669.           entry in the resident-name table is made for each exported routine%@NL@%
  17670.           designated %@AB@%RESIDENTNAME%@AE@%, and consists of the name plus three bytes%@NL@%
  17671.           of information. The first entry is the module name.)%@NL@%
  17672. %@NL@%
  17673.           Reduce the number of exported routines or change some to%@NL@%
  17674.           nonresident status.%@NL@%
  17675. %@NL@%
  17676. %@CR:MCVcE114@%%@4@%%@AB@%L1042     nonresident-name table overflow%@AE@%%@EH@%%@NL@%
  17677. %@NL@%
  17678.           The size of the nonresident-name table exceeds 65,534 bytes. (An%@NL@%
  17679.           entry in the nonresident-name table is made for each exported%@NL@%
  17680.           routine not designated %@AB@%RESIDENT-NAME%@AE@%, and consists of the name%@NL@%
  17681.           plus three bytes of information. The first entry is the%@NL@%
  17682.           %@AB@%DESCRIPTION%@AE@% statement.)%@NL@%
  17683. %@NL@%
  17684.           Reduce the number of exported routines or change some to resident%@NL@%
  17685.           status.%@NL@%
  17686. %@NL@%
  17687. %@CR:MCVcE115@%%@4@%%@AB@%L1043     relocation table overflow%@AE@%%@EH@%%@NL@%
  17688. %@NL@%
  17689.           More than 32,768 long calls, long jumps, or other long pointers%@NL@%
  17690.           appeared in the program.%@NL@%
  17691. %@NL@%
  17692.           Try replacing long references with short references where%@NL@%
  17693.           possible, and recreate the object module.%@NL@%
  17694. %@NL@%
  17695. %@CR:MCVcE116@%%@4@%%@AB@%L1044     imported-name table overflow%@AE@%%@EH@%%@NL@%
  17696. %@NL@%
  17697.           The size of the imported-names table exceeds 65,534 bytes. (An%@NL@%
  17698.           entry in the imported-names table is made for each new name given%@NL@%
  17699.           in the %@AB@%IMPORTS%@AE@% section──including the module names──and consists%@NL@%
  17700.           of the name plus one byte.)%@NL@%
  17701. %@NL@%
  17702.           Reduce the number of imports.%@NL@%
  17703. %@NL@%
  17704. %@CR:MCVcE117@%%@4@%%@AB@%L1045     too many TYPDEF records%@AE@%%@EH@%%@NL@%
  17705. %@NL@%
  17706.           An object module contained more than 255 %@AB@%TYPDEF%@AE@% records. These%@NL@%
  17707.           records describe communal variables. This error can appear only%@NL@%
  17708.           with programs produced by the Microsoft FORTRAN Compiler or other%@NL@%
  17709.           compilers that support communal variables. (%@AB@%TYPDEF%@AE@% is a DOS term.%@NL@%
  17710.           It is explained in the %@AI@%Microsoft MS-DOS Programmer's Reference%@AE@% and%@NL@%
  17711.           in other reference books on DOS.)%@NL@%
  17712. %@NL@%
  17713. %@CR:MCVcE118@%%@4@%%@AB@%L1046     too many external symbols in one module%@AE@%%@EH@%%@NL@%
  17714. %@NL@%
  17715.           An object module specified more than the limit of 1,023 external%@NL@%
  17716.           symbols.%@NL@%
  17717. %@NL@%
  17718.           Break the module into smaller parts.%@NL@%
  17719. %@NL@%
  17720. %@CR:MCVcE119@%%@4@%%@AB@%L1047     too many group, segment, and class names in one module%@AE@%%@EH@%%@NL@%
  17721. %@NL@%
  17722.           The program contained too many group, segment, and class names.%@NL@%
  17723. %@NL@%
  17724.           Reduce the number of groups, segments, or classes, and recreate%@NL@%
  17725.           the object file.%@NL@%
  17726. %@NL@%
  17727. %@CR:MCVcE120@%%@4@%%@AB@%L1048     too many segments in one module%@AE@%%@EH@%%@NL@%
  17728. %@NL@%
  17729.           An object module had more than 255 segments.%@NL@%
  17730. %@NL@%
  17731.           Split the module or combine segments.%@NL@%
  17732. %@NL@%
  17733. %@CR:MCVcE121@%%@4@%%@AB@%L1049     too many segments%@AE@%%@EH@%%@NL@%
  17734. %@NL@%
  17735.           The program had more than the maximum number of segments. (The%@NL@%
  17736.           %@AB@%/SEGMENTS%@AE@% option specifies the maximum legal number; the default%@NL@%
  17737.           is 128.)%@NL@%
  17738. %@NL@%
  17739.           Relink by using the %@AB@%/SEGMENTS%@AE@% option with an appropriate number of%@NL@%
  17740.           segments.%@NL@%
  17741. %@NL@%
  17742. %@CR:MCVcE122@%%@4@%%@AB@%L1050     too many groups in one module%@AE@%%@EH@%%@NL@%
  17743. %@NL@%
  17744.           %@AB@%LINK%@AE@% encountered more than 21 group definitions (%@AB@%GRPDEF%@AE@%) in a%@NL@%
  17745.           single module.%@NL@%
  17746. %@NL@%
  17747.           Reduce the number of group definitions or split the module. (Group%@NL@%
  17748.           definitions are explained in the %@AI@%Microsoft MS-DOS Programmer's%@AE@%%@NL@%
  17749.           %@AI@%Reference%@AE@% and in other reference books on DOS.)%@NL@%
  17750. %@NL@%
  17751. %@CR:MCVcE123@%%@4@%%@AB@%L1051     too many groups%@AE@%%@EH@%%@NL@%
  17752. %@NL@%
  17753.           The program defined more than 20 groups, not counting %@AB@%DGROUP%@AE@%.%@NL@%
  17754. %@NL@%
  17755.           Reduce the number of groups.%@NL@%
  17756. %@NL@%
  17757. %@CR:MCVcE124@%%@4@%%@AB@%L1052     too many libraries%@AE@%%@EH@%%@NL@%
  17758. %@NL@%
  17759.           An attempt was made to link with more than 32 libraries.%@NL@%
  17760. %@NL@%
  17761.           Combine libraries, or use modules that require fewer libraries.%@NL@%
  17762. %@NL@%
  17763. %@CR:MCVcE125@%%@4@%%@AB@%L1053     out of memory for symbol table%@AE@%%@EH@%%@NL@%
  17764. %@NL@%
  17765.           The program had more symbolic information (such as public,%@NL@%
  17766.           external, segment, group, class, and file names) than could fit in%@NL@%
  17767.           available memory.%@NL@%
  17768. %@NL@%
  17769.           Try freeing memory by linking from the DOS command level instead%@NL@%
  17770.           of from a %@AB@%MAKE%@AE@% file or an editor. Otherwise, combine modules or%@NL@%
  17771.           segments and try to eliminate as many public symbols as possible.%@NL@%
  17772. %@NL@%
  17773. %@CR:MCVcE126@%%@4@%%@AB@%L1054     requested segment limit too high%@AE@%%@EH@%%@NL@%
  17774. %@NL@%
  17775.           The linker did not have enough memory to allocate tables%@NL@%
  17776.           describing the num-ber of segments requested. (The default is 128%@NL@%
  17777.           or the value specified with the %@AB@%/SEGMENTS%@AE@% option.)%@NL@%
  17778. %@NL@%
  17779.           Try linking again by using the %@AB@%/SEGMENTS%@AE@% option to select a%@NL@%
  17780.           smaller number of segments (for example, use 64 if the default was%@NL@%
  17781.           used previously), or free some memory by eliminating resident%@NL@%
  17782.           programs or shells.%@NL@%
  17783. %@NL@%
  17784. %@CR:MCVcE127@%%@4@%%@AB@%L1056     too many overlays%@AE@%%@EH@%%@NL@%
  17785. %@NL@%
  17786.           The program defined more than 63 overlays.%@NL@%
  17787. %@NL@%
  17788. %@CR:MCVcE128@%%@4@%%@AB@%L1057     data record too large%@AE@%%@EH@%%@NL@%
  17789. %@NL@%
  17790.           A %@AB@%LEDATA%@AE@% record (in an object module) contained more than 1,024%@NL@%
  17791.           bytes of data. This is a translator error. (%@AB@%LEDATA%@AE@% is a DOS term%@NL@%
  17792.           that is explained in the %@AI@%Microsoft MS-DOS Programmer's Reference%@AE@%%@NL@%
  17793.           and in other DOS reference books.)%@NL@%
  17794. %@NL@%
  17795.           Note which translator (compiler or assembler) produced the%@NL@%
  17796.           incorrect object module and the circumstances. Please report this%@NL@%
  17797.           error to Microsoft Corporation by following the directions in the%@NL@%
  17798.           Microsoft Product Assistance Request form at the back of one of%@NL@%
  17799.           your manuals.%@NL@%
  17800. %@NL@%
  17801. %@CR:MCVcE129@%%@4@%%@AB@%L1061     out of memory for/INCREMENTAL%@AE@%%@EH@%%@NL@%
  17802. %@NL@%
  17803.           The linker ran out of memory when trying to process the additional%@NL@%
  17804.           information required for %@AB@%ILINK%@AE@% support.%@NL@%
  17805. %@NL@%
  17806.           Disable incremental linking.%@NL@%
  17807. %@NL@%
  17808. %@CR:MCVcE130@%%@4@%%@AB@%L1062     too many symbols for/INCREMENTAL%@AE@%%@EH@%%@NL@%
  17809. %@NL@%
  17810.           The program had more symbols than can be stored in the %@AB@%.SYM%@AE@% file.%@NL@%
  17811. %@NL@%
  17812.           Reduce the number of symbols or disable incremental linking.%@NL@%
  17813. %@NL@%
  17814. %@CR:MCVcE131@%%@4@%%@AB@%L1063     out of memory for CodeView information%@AE@%%@EH@%%@NL@%
  17815. %@NL@%
  17816.           The linker was given too many object files with debug information,%@NL@%
  17817.           and the linker ran out of space to store it.%@NL@%
  17818. %@NL@%
  17819.           Reduce the number of object files that have debug information.%@NL@%
  17820. %@NL@%
  17821. %@CR:MCVcE132@%%@4@%%@AB@%L1064     out of memory%@AE@%%@EH@%%@NL@%
  17822. %@NL@%
  17823.           The linker was not able to allocate enough memory from the%@NL@%
  17824.           operating system to link the program. On OS/2, try increasing the%@NL@%
  17825.           swap space. Otherwise, reduce the size of the program in terms of%@NL@%
  17826.           code, data, and symbols. On OS/2, consider splitting the program%@NL@%
  17827.           into dynlink libraries.%@NL@%
  17828. %@NL@%
  17829. %@CR:MCVcE133@%%@4@%%@AB@%L1070%@AE@%     %@AI@%name%@AE@%%@AB@% : segment size exceeds 64K%@AE@%%@EH@%%@NL@%
  17830. %@NL@%
  17831.           A single segment contained more than 64K of code or data.%@NL@%
  17832. %@NL@%
  17833.           Try compiling and linking using the large model.%@NL@%
  17834. %@NL@%
  17835. %@CR:MCVcE134@%%@4@%%@AB@%L1071     segment _TEXT larger than 65520 bytes%@AE@%%@EH@%%@NL@%
  17836. %@NL@%
  17837.           This error is likely to occur only in small-model C programs, but%@NL@%
  17838.           it can occur when any program with a segment named %@AB@%_TEXT%@AE@% is linked%@NL@%
  17839.           using the %@AB@%/DOSSEG%@AE@% option of the %@AB@%LINK%@AE@% command. Small-model C%@NL@%
  17840.           programs must reserve code addresses 0 and 1; this range is%@NL@%
  17841.           increased to 16 for alignment purposes.%@NL@%
  17842. %@NL@%
  17843.           Try compiling and linking using the large model.%@NL@%
  17844. %@NL@%
  17845. %@CR:MCVcE135@%%@4@%%@AB@%L1072     common area longer than 65536 bytes%@AE@%%@EH@%%@NL@%
  17846. %@NL@%
  17847.           The program had more than 64K of communal variables. This error%@NL@%
  17848.           cannot appear with object files generated by the Microsoft Macro%@NL@%
  17849.           Assembler, %@AB@%MASM%@AE@%. It occurs only with programs produced by the%@NL@%
  17850.           Microsoft FORTRAN Compiler or other compilers that support%@NL@%
  17851.           communal variables.%@NL@%
  17852. %@NL@%
  17853. %@CR:MCVcE136@%%@4@%%@AB@%L1073     file segment limit exceeded%@AE@%%@EH@%%@NL@%
  17854. %@NL@%
  17855.           The number of physical or file segments exceeds the limit of 254%@NL@%
  17856.           imposed by OS/2 protected mode and by Windows for each application%@NL@%
  17857.           or dynamic-link library. (A file segment is created for each group%@NL@%
  17858.           definition, nonpacked logical segment, and set of packed%@NL@%
  17859.           segments.)%@NL@%
  17860. %@NL@%
  17861.           Reduce the number of segments or put more information into each%@NL@%
  17862.           segment. Make sure that the %@AB@%/PACKCODE%@AE@% and/or the %@AB@%/PACKDATA%@AE@% options%@NL@%
  17863.           are on.%@NL@%
  17864. %@NL@%
  17865. %@CR:MCVcE137@%%@4@%%@AB@%L1074%@AE@%     %@AI@%name%@AE@%%@AB@% : group larger than 64K bytes%@AE@%%@EH@%%@NL@%
  17866. %@NL@%
  17867.           The given group exceeds the limit of 65,536 bytes.%@NL@%
  17868. %@NL@%
  17869.           Reduce the size of the group, or remove any unneeded segments from%@NL@%
  17870.           the group (refer to the map file for a listing of segments).%@NL@%
  17871. %@NL@%
  17872. %@CR:MCVcE138@%%@4@%%@AB@%L1075     entry table larger than 65535 bytes%@AE@%%@EH@%%@NL@%
  17873. %@NL@%
  17874.           The entry table exceeds the limit of 65,535 bytes. (There is an%@NL@%
  17875.           entry in this table for each exported routine for each address%@NL@%
  17876.           that is the target of a far relocation, and for one of the%@NL@%
  17877.           following conditions when true: the target segment is%@NL@%
  17878.           designated %@AB@%IOPL%@AE@%; or %@AB@%PROTMODE%@AE@% is not enabled and the target segment%@NL@%
  17879.           is designated %@AB@%MOVABLE%@AE@%.)%@NL@%
  17880. %@NL@%
  17881.           Declare %@AB@%PROTMODE%@AE@% if applicable, or reduce the number of exported%@NL@%
  17882.           routines, or make some segments %@AB@%FIXED%@AE@% or %@AB@%NOIOPL%@AE@% if possible.%@NL@%
  17883. %@NL@%
  17884. %@CR:MCVcE139@%%@4@%%@AB@%L1078     file segment alignment too small%@AE@%%@EH@%%@NL@%
  17885. %@NL@%
  17886.           The segment-alignment size given with the %@AB@%/ALIGN:%@AE@%%@AI@%number%@AE@% option was%@NL@%
  17887.           too small. Try increasing %@AI@%number%@AE@%.%@NL@%
  17888. %@NL@%
  17889. %@CR:MCVcE140@%%@4@%%@AB@%L1080     cannot open list file%@AE@%%@EH@%%@NL@%
  17890. %@NL@%
  17891.           The disk or the root directory was full.%@NL@%
  17892. %@NL@%
  17893.           Delete or move files to make space.%@NL@%
  17894. %@NL@%
  17895. %@CR:MCVcE141@%%@4@%%@AB@%L1081     out of space for run file%@AE@%%@EH@%%@NL@%
  17896. %@NL@%
  17897.           The disk on which the %@AB@%.EXE%@AE@% file was being written was full.%@NL@%
  17898. %@NL@%
  17899.           Free more space on the disk and restart the linker.%@NL@%
  17900. %@NL@%
  17901. %@CR:MCVcE142@%%@4@%%@AB@%L1082%@AE@%     %@AI@%name%@AE@%%@AB@% : stub file not found%@AE@%%@EH@%%@NL@%
  17902. %@NL@%
  17903.           The linker could not open the file given in the %@AB@%STUB%@AE@% statement in%@NL@%
  17904.           the module-definition file.%@NL@%
  17905. %@NL@%
  17906. %@CR:MCVcE143@%%@4@%%@AB@%L1083     cannot open run file%@AE@%%@EH@%%@NL@%
  17907. %@NL@%
  17908.           The disk or the root directory was full.%@NL@%
  17909. %@NL@%
  17910.           Delete or move files to make space.%@NL@%
  17911. %@NL@%
  17912. %@CR:MCVcE144@%%@4@%%@AB@%L1084     cannot create temporary file%@AE@%%@EH@%%@NL@%
  17913. %@NL@%
  17914.           The disk or root directory was full.%@NL@%
  17915. %@NL@%
  17916.           Free more space in the directory and restart the linker.%@NL@%
  17917. %@NL@%
  17918. %@CR:MCVcE145@%%@4@%%@AB@%L1085     cannot open temporary file%@AE@%%@EH@%%@NL@%
  17919. %@NL@%
  17920.           The disk or the root directory was full.%@NL@%
  17921. %@NL@%
  17922.           Delete or move files to make space.%@NL@%
  17923. %@NL@%
  17924. %@CR:MCVcE146@%%@4@%%@AB@%L1086     scratch file missing%@AE@%%@EH@%%@NL@%
  17925. %@NL@%
  17926.           An internal error has occurred.%@NL@%
  17927. %@NL@%
  17928.           Note the circumstances of the problem and contact Microsoft%@NL@%
  17929.           Corporation by following the directions in the Microsoft Product%@NL@%
  17930.           Assistance Request form at the back of one of your manuals.%@NL@%
  17931. %@NL@%
  17932. %@CR:MCVcE147@%%@4@%%@AB@%L1087     unexpected end-of-file on scratch file%@AE@%%@EH@%%@NL@%
  17933. %@NL@%
  17934.           The disk with the temporary linker-output file was removed.%@NL@%
  17935. %@NL@%
  17936. %@CR:MCVcE148@%%@4@%%@AB@%L1088     out of space for list file%@AE@%%@EH@%%@NL@%
  17937. %@NL@%
  17938.           The disk (where the listing file was being written) is full.%@NL@%
  17939. %@NL@%
  17940.           Free more space on the disk and restart the linker.%@NL@%
  17941. %@NL@%
  17942. %@CR:MCVcE149@%%@4@%%@AB@%L1089%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot open response file%@AE@%%@EH@%%@NL@%
  17943. %@NL@%
  17944.           %@AB@%LINK%@AE@% could not find the specified response file.%@NL@%
  17945. %@NL@%
  17946.           This usually indicates a typing error.%@NL@%
  17947. %@NL@%
  17948. %@CR:MCVcE150@%%@4@%%@AB@%L1090     cannot reopen list file%@AE@%%@EH@%%@NL@%
  17949. %@NL@%
  17950.           The original disk was not replaced at the prompt.%@NL@%
  17951. %@NL@%
  17952.           Restart the linker.%@NL@%
  17953. %@NL@%
  17954. %@CR:MCVcE151@%%@4@%%@AB@%L1091     unexpected end-of-file on library%@AE@%%@EH@%%@NL@%
  17955. %@NL@%
  17956.           The disk containing the library was probably removed.%@NL@%
  17957. %@NL@%
  17958.           Replace the disk containing the library and run the linker again.%@NL@%
  17959. %@NL@%
  17960. %@CR:MCVcE152@%%@4@%%@AB@%L1092     cannot open module-definitions file%@AE@%%@EH@%%@NL@%
  17961. %@NL@%
  17962.           The linker could not open the module-definition file specified on%@NL@%
  17963.           the command line or in the response file.%@NL@%
  17964. %@NL@%
  17965. %@CR:MCVcE153@%%@4@%%@AB@%L1093%@AE@%     %@AI@%filename%@AE@%%@AB@% : object not found%@AE@%%@EH@%%@NL@%
  17966. %@NL@%
  17967.           One of the object files specified in the linker input was not%@NL@%
  17968.           found.%@NL@%
  17969. %@NL@%
  17970.           Restart the linker and specify the object file.%@NL@%
  17971. %@NL@%
  17972. %@CR:MCVcE154@%%@4@%%@AB@%L1094%@AE@%     %@AI@%file%@AE@%%@AB@% : cannot open file for writing%@AE@%%@EH@%%@NL@%
  17973. %@NL@%
  17974.           The linker was unable to open the file with write permission.%@NL@%
  17975. %@NL@%
  17976.           Check file permissions.%@NL@%
  17977. %@NL@%
  17978. %@CR:MCVcE155@%%@4@%%@AB@%L1095%@AE@%     %@AI@%file%@AE@%%@AB@% : out of space on file%@AE@%%@EH@%%@NL@%
  17979. %@NL@%
  17980.           The linker ran out of disk space for the specified output file.%@NL@%
  17981. %@NL@%
  17982.           Delete or move files to make space.%@NL@%
  17983. %@NL@%
  17984. %@CR:MCVcE156@%%@4@%%@AB@%L1100     stub.EXE file invalid%@AE@%%@EH@%%@NL@%
  17985. %@NL@%
  17986.           The file specified in the %@AB@%STUB%@AE@% statement is not a valid real-mode%@NL@%
  17987.           executable file.%@NL@%
  17988. %@NL@%
  17989. %@CR:MCVcE157@%%@4@%%@AB@%L1101     invalid object module%@AE@%%@EH@%%@NL@%
  17990. %@NL@%
  17991.           One of the object modules was invalid.%@NL@%
  17992. %@NL@%
  17993.           If the error persists after recompiling, please contact Microsoft%@NL@%
  17994.           Corporation by following the directions in the Microsoft Product%@NL@%
  17995.           Assistance Request form at the back of one of your manuals.%@NL@%
  17996. %@NL@%
  17997. %@CR:MCVcE158@%%@4@%%@AB@%L1102     unexpected end-of-file%@AE@%%@EH@%%@NL@%
  17998. %@NL@%
  17999.           An invalid format for a library was encountered.%@NL@%
  18000. %@NL@%
  18001. %@CR:MCVcE159@%%@4@%%@AB@%L1103     attempt to access data outside segment bounds%@AE@%%@EH@%%@NL@%
  18002. %@NL@%
  18003.           A data record in an object module specified data extending beyond%@NL@%
  18004.           the end of a segment. This is a translator error.%@NL@%
  18005. %@NL@%
  18006.           Note which translator (compiler or assembler) produced the%@NL@%
  18007.           incorrect object module and the circumstances in which it was%@NL@%
  18008.           produced. Please report this error to Microsoft Corporation by%@NL@%
  18009.           following the directions in the Microsoft Product Assistance%@NL@%
  18010.           Request form at the back of one of your manuals.%@NL@%
  18011. %@NL@%
  18012. %@CR:MCVcE160@%%@4@%%@AB@%L1104%@AE@%     %@AI@%filename%@AE@%%@AB@% : not valid library%@AE@%%@EH@%%@NL@%
  18013. %@NL@%
  18014.           The specified file was not a valid library file. This error causes%@NL@%
  18015.           %@AB@%LINK%@AE@% to abort.%@NL@%
  18016. %@NL@%
  18017. %@CR:MCVcE161@%%@4@%%@AB@%L1105     invalid object due to aborted incremental compile%@AE@%%@EH@%%@NL@%
  18018. %@NL@%
  18019.           Delete the object file, recompile the program, and relink.%@NL@%
  18020. %@NL@%
  18021. %@CR:MCVcE162@%%@4@%%@AB@%L1113     unresolved COMDEF; internal error%@AE@%%@EH@%%@NL@%
  18022. %@NL@%
  18023.           Note the circumstances of the error and contact Microsoft%@NL@%
  18024.           Corporation by following the directions in the Microsoft Product%@NL@%
  18025.           Assistance Request form at the back of one of your manuals.%@NL@%
  18026. %@NL@%
  18027. %@CR:MCVcE163@%%@4@%%@AB@%L1114     file not suitable for /EXEPACK; relink without%@AE@%%@EH@%%@NL@%
  18028. %@NL@%
  18029.           For the linked program, the size of the packed load image plus%@NL@%
  18030.           packing overhead was larger than that of the unpacked load image.%@NL@%
  18031. %@NL@%
  18032.           Relink without the %@AB@%/EXEPACK%@AE@% option.%@NL@%
  18033. %@NL@%
  18034. %@CR:MCVcE164@%%@4@%%@AB@%L1115%@AE@%     %@AI@%option%@AE@%%@AB@%: option incompatible with overlays%@AE@%%@EH@%%@NL@%
  18035. %@NL@%
  18036.           The given option is not compatible with overlays. Remove the%@NL@%
  18037.           option or else do not use overlaid modules.%@NL@%
  18038. %@NL@%
  18039. %@CR:MCVcE165@%%@4@%%@AB@%L1123%@AE@%     %@AI@%name%@AE@%%@AB@% : segment defined for both 16- and 32-bit.%@AE@%%@EH@%%@NL@%
  18040. %@NL@%
  18041.           Define the segment as either 16-bit or 32-bit.%@NL@%
  18042. %@NL@%
  18043. %@CR:MCVcE166@%%@4@%%@AB@%L1126     conflicting iopl-parameter-words value%@AE@%%@EH@%%@NL@%
  18044. %@NL@%
  18045.           An exported name was specified in the module-definition file with%@NL@%
  18046.           an %@AB@%IOPL%@AE@%-parameter-words value, and the same name was specified as%@NL@%
  18047.           an export by the Microsoft C export pragma with a different%@NL@%
  18048.           parameter-words value.%@NL@%
  18049. %@NL@%
  18050. %@CR:MCVcE167@%%@4@%%@AB@%L1127     far segment references not allowed with /BINARY%@AE@%%@EH@%%@NL@%
  18051. %@NL@%
  18052.           You used the %@AB@%/BINARY%@AE@% option (causing the linker to produce a .COM%@NL@%
  18053.           file) with modules that have a far segment reference. Far segment%@NL@%
  18054.           references are not compatible with the %@AB@%.COM%@AE@% file format.%@NL@%
  18055.           High-level-language modules cause this error message (unless the%@NL@%
  18056.           language supports tiny memory model). Assembly code that%@NL@%
  18057.           references a segment address also produces this error message. For%@NL@%
  18058.           example:%@NL@%
  18059. %@NL@%
  18060.           mov     ax, seg mydata%@NL@%
  18061. %@NL@%
  18062. %@NL@%
  18063. %@CR:MCVc2200@%%@3@%%@AB@%C.2.2  LINK Nonfatal Error Messages%@AE@%%@EH@%%@NL@%
  18064. %@NL@%
  18065. %@CR:MCVcE168@%%@4@%%@AB@%L2000     imported starting address%@AE@%%@EH@%%@NL@%
  18066. %@NL@%
  18067.           The program starting address as specified in the %@AB@%END%@AE@% statement in%@NL@%
  18068.           a %@AB@%MASM%@AE@% file is an imported routine. This is not supported by OS/2%@NL@%
  18069.           or Windows.%@NL@%
  18070. %@NL@%
  18071. %@CR:MCVcE169@%%@4@%%@AB@%L2001     fixup(s) without data%@AE@%%@EH@%%@NL@%
  18072. %@NL@%
  18073.           A %@AB@%FIXUPP%@AE@% record occurred without a data record immediately%@NL@%
  18074.           preceding it. This is probably a compiler error. (See the%@NL@%
  18075.           %@AI@%Microsoft MS-DOS %@AE@%%@AI@%Programmer's Reference%@AE@% for more information on%@NL@%
  18076.           %@AB@%FIXUPP%@AE@%.)%@NL@%
  18077. %@NL@%
  18078.           If the error persists after recompiling, please contact Microsoft%@NL@%
  18079.           Corporation by following the directions in the Microsoft Product%@NL@%
  18080.           Assistance Request form at the back of one or your manuals.%@NL@%
  18081. %@NL@%
  18082. %@CR:MCVcE170@%%@4@%%@AB@%L2002     fixup overflow at %@AI@%number%@AE@%%@AB@% in segment%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  18083. %@NL@%
  18084.           This error message will be followed by one of the following:%@NL@%
  18085. %@NL@%
  18086.           %@CR:MCVc2201@%1. "Target external '%@AI@%name%@AE@%.'"%@NL@%
  18087. %@NL@%
  18088.           2. frm seg %@AI@%name1%@AE@%, tgt seg %@AI@%name2%@AE@%, tgt offset %@AI@%number%@AE@%.%@NL@%
  18089. %@NL@%
  18090. %@CR:MCVc2202@%%@4@%A fixup overflow is essentially an attempted reference to code or data that%@EH@%
  18091. is impossible because the source location, i.e., where the reference is made
  18092. "from," and the target address, i.e., where the reference is made "to," are
  18093. too far apart. A close look at the source location is often all you need to
  18094. correct the problem.%@NL@%
  18095. %@NL@%
  18096. %@CR:MCVc2203@%%@4@%Revise the source file and recreate the object file. (For information about%@EH@%
  18097. frame and target segments, see the %@AI@%Microsoft MS-DOS Programmer's Reference%@AE@%.)%@NL@%
  18098. %@NL@%
  18099. %@CR:MCVcE171@%%@4@%%@AB@%L2003     intersegment self-relative fixup at%@AE@% %@AI@%number%@AE@%%@AB@% in segment name%@AE@%%@EH@%%@NL@%
  18100. %@NL@%
  18101.           The program issued a near call or jump to a label in a different%@NL@%
  18102.           segment. This error most often occurs when you specifically%@NL@%
  18103.           declare an external procedure to be near and it should be declared%@NL@%
  18104.           as far.%@NL@%
  18105. %@NL@%
  18106. %@CR:MCVcE172@%%@4@%%@AB@%L2004     LOBYTE-type fixup overflow%@AE@%%@EH@%%@NL@%
  18107. %@NL@%
  18108.           A %@AB@%LOBYTE%@AE@% fixup generated an address overflow. (See the %@AI@%Microsoft%@AE@%%@NL@%
  18109.           %@AI@%MS-DOS Programmer's Reference%@AE@% for more information.)%@NL@%
  18110. %@NL@%
  18111. %@CR:MCVcE173@%%@4@%%@AB@%L2005     fixup type unsupported%@AE@%%@EH@%%@NL@%
  18112. %@NL@%
  18113.           A fixup type occurred that is not supported by the Microsoft%@NL@%
  18114.           linker. This is probably a compiler error.%@NL@%
  18115. %@NL@%
  18116.           Note the circumstances of the failure and contact Microsoft%@NL@%
  18117.           Corporation by following the directions in the Microsoft Product%@NL@%
  18118.           Assistance Request form at the back of one of your manuals.%@NL@%
  18119. %@NL@%
  18120. %@CR:MCVcE174@%%@4@%%@AB@%L2010     too many fixups in LIDATA record%@AE@%%@EH@%%@NL@%
  18121. %@NL@%
  18122.           The number of far relocations (pointer- or base-type) in a LIDATA%@NL@%
  18123.           record ex- ceeds the limit imposed by the linker. This is%@NL@%
  18124.           typically produced by the %@AB@%DUP%@AE@% statement in an %@AB@%.ASM%@AE@% file. The limit%@NL@%
  18125.           is dynamic: a 1,024-byte buffer is shared by relocations and the%@NL@%
  18126.           contents of the %@AB@%LIDATA%@AE@% record; there are eight bytes per%@NL@%
  18127.           relocation.%@NL@%
  18128. %@NL@%
  18129.           Reduce the number of far relocations in the %@AB@%DUP%@AE@% statement.%@NL@%
  18130. %@NL@%
  18131. %@CR:MCVcE175@%%@4@%%@AB@%L2011%@AE@%     %@AI@%name%@AE@%%@AB@% : NEAR/HUGE conflict%@AE@%%@EH@%%@NL@%
  18132. %@NL@%
  18133.           Conflicting %@AB@%NEAR%@AE@% and %@AB@%HUGE%@AE@% attributes were given for a communal%@NL@%
  18134.           variable. This error can occur only with programs produced by the%@NL@%
  18135.           Microsoft FORTRAN Compiler or other compilers that support%@NL@%
  18136.           communal variables.%@NL@%
  18137. %@NL@%
  18138. %@CR:MCVcE176@%%@4@%%@AB@%L2012%@AE@%     %@AI@%name%@AE@%%@AB@% : array-element size mismatch%@AE@%%@EH@%%@NL@%
  18139. %@NL@%
  18140.           A far communal array was declared with two or more different%@NL@%
  18141.           array-element sizes (for instance, an array was declared once as%@NL@%
  18142.           an array of characters and once as an array of real numbers). This%@NL@%
  18143.           error cannot occur with object files produced by the Microsoft%@NL@%
  18144.           Macro Assembler. It occurs only with the Microsoft FORTRAN%@NL@%
  18145.           Compiler and any other compiler that supports far communal arrays.%@NL@%
  18146. %@NL@%
  18147. %@CR:MCVcE177@%%@4@%%@AB@%L2013     LIDATA record too large%@AE@%%@EH@%%@NL@%
  18148. %@NL@%
  18149.           A %@AB@%LIDATA%@AE@% record contained more than 512 bytes. This is probably a%@NL@%
  18150.           compiler error.%@NL@%
  18151. %@NL@%
  18152.           Note the circumstances of the failure and contact Microsoft%@NL@%
  18153.           Corporation by following the directions in the Microsoft Product%@NL@%
  18154.           Assistance Request form at the back of one of your manuals.%@NL@%
  18155. %@NL@%
  18156. %@CR:MCVcE178@%%@4@%%@AB@%L2022%@AE@%     %@AI@%name%@AE@%%@AB@% (alias%@AE@% %@AI@%internalname%@AE@%%@AB@%) : export undefined%@AE@%%@EH@%%@NL@%
  18157. %@NL@%
  18158.           The internal name of the given exported routine is undefined.%@NL@%
  18159. %@NL@%
  18160.           Number LINK Error Message%@NL@%
  18161. %@NL@%
  18162. %@CR:MCVcE179@%%@4@%%@AB@%L2023%@AE@%     %@AI@%name%@AE@%%@AB@% (alias%@AE@% %@AI@%internalname%@AE@%%@AB@%) : export imported%@AE@%%@EH@%%@NL@%
  18163. %@NL@%
  18164.           The internal name of the given exported routine conflicts with the%@NL@%
  18165.           internal name of a previously imported routine.  The set of%@NL@%
  18166.           imported and exported names cannot overlap.%@NL@%
  18167. %@NL@%
  18168. %@CR:MCVcE180@%%@4@%%@AB@%L2024%@AE@%     %@AI@%name%@AE@%%@AB@% : special symbol already defined%@AE@%%@EH@%%@NL@%
  18169. %@NL@%
  18170.           Your program defined a symbol name already used by the linker for%@NL@%
  18171.           one of its own low-level symbols. (For example, the linker%@NL@%
  18172.           generates special symbols used in overlay support and other%@NL@%
  18173.           operations.)%@NL@%
  18174. %@NL@%
  18175.           Choose another name for the symbol in order to avoid conflict.%@NL@%
  18176. %@NL@%
  18177. %@CR:MCVcE181@%%@4@%%@AB@%L2025%@AE@%     %@AI@%name%@AE@%%@AB@% : symbol defined more than once.%@AE@%%@EH@%%@NL@%
  18178. %@NL@%
  18179.           The same symbol has been found in two different object files.%@NL@%
  18180. %@NL@%
  18181. %@CR:MCVcE182@%%@4@%%@AB@%L2026     entry ordinal%@AE@% %@AI@%number%@AE@%%@AB@%, name%@AE@% %@AI@%name%@AE@%%@AB@% : multiple definitions for the%@AE@%%@EH@%%@NL@%
  18182.           %@AB@%same ordinal%@AE@%%@NL@%
  18183. %@NL@%
  18184.           The given exported name with the given ordinal number conflicted%@NL@%
  18185.           with a different exported name previously assigned to the same%@NL@%
  18186.           ordinal. Only one name can be associated with a particular%@NL@%
  18187.           ordinal.%@NL@%
  18188. %@NL@%
  18189. %@CR:MCVcE183@%%@4@%%@AB@%L2027%@AE@%     %@AI@%name%@AE@%%@AB@% : ordinal too large for export%@AE@%%@EH@%%@NL@%
  18190. %@NL@%
  18191.           The given exported name was assigned an ordinal that exceeded the%@NL@%
  18192.           limit of 3,072.%@NL@%
  18193. %@NL@%
  18194. %@CR:MCVcE184@%%@4@%%@AB@%L2028     automatic data segment plus heap exceed 64K%@AE@%%@EH@%%@NL@%
  18195. %@NL@%
  18196.           The total size of data declared in %@AB@%DGROUP%@AE@%, plus the value given in%@NL@%
  18197.           %@AB@%HEAPSIZE%@AE@% in the module-definition file, plus the stack size given%@NL@%
  18198.           by the %@AB@%/STACKSIZE%@AE@% option or %@AB@%STACKSIZE%@AE@% module-definition file%@NL@%
  18199.           statement, exceeds 64K.  Reduce near-data allocation, %@AB@%HEAPSIZE%@AE@%, or%@NL@%
  18200.           stack.%@NL@%
  18201. %@NL@%
  18202. %@CR:MCVcE185@%%@4@%%@AB@%L2029%@AE@%     %@AI@%name%@AE@%%@AB@% : unresolved external%@AE@%%@EH@%%@NL@%
  18203. %@NL@%
  18204.           The name that comes before %@AS@%in file(s)%@AE@% is the unresolved external%@NL@%
  18205.           symbol. On the next line is a list of object modules that have%@NL@%
  18206.           made references to this symbol. This message and the list are also%@NL@%
  18207.           written to the map file, if one exists.%@NL@%
  18208. %@NL@%
  18209. %@CR:MCVcE186@%%@4@%%@AB@%L2030     starting address not code (use class 'CODE')%@AE@%%@EH@%%@NL@%
  18210. %@NL@%
  18211.           The program starting address, as specified in the %@AB@%END%@AE@% statement of%@NL@%
  18212.           an %@AB@%.ASM%@AE@% file, should be in a code segment. (Code segments are%@NL@%
  18213.           recognized if their class name ends in %@AS@%'CODE'%@AE@%.) This is an error%@NL@%
  18214.           in OS/2 protected mode.%@NL@%
  18215. %@NL@%
  18216.           The error message may be disabled by including the %@AB@%REALMODE%@AE@%%@NL@%
  18217.           statement in the module-definition file.%@NL@%
  18218. %@NL@%
  18219. %@CR:MCVcE187@%%@4@%%@AB@%L2041     stack plus data exceed 64K%@AE@%%@EH@%%@NL@%
  18220. %@NL@%
  18221.           If the total of near data and requested stack size exceeds 64K,%@NL@%
  18222.           the program will not run correctly. The linker checks for this%@NL@%
  18223.           condition only when %@AB@%/DOSSEG%@AE@% is enabled, which is the case in the%@NL@%
  18224.           library startup module.%@NL@%
  18225. %@NL@%
  18226.           Reduce the stack size.%@NL@%
  18227. %@NL@%
  18228. %@CR:MCVcE188@%%@4@%%@AB@%L2043     Quick Library support module missing%@AE@%%@EH@%%@NL@%
  18229. %@NL@%
  18230.           You did not link with the required %@AB@%QUICKLIB.OBJ%@AE@% module when%@NL@%
  18231.           creating a Quick library.%@NL@%
  18232. %@NL@%
  18233. %@CR:MCVcE189@%%@4@%%@AB@%L2044%@AE@%     %@AI@%name%@AE@%%@AB@% : symbol multiply defined, use/NOE%@AE@%%@EH@%%@NL@%
  18234. %@NL@%
  18235.           The linker found what it interprets as a public-symbol%@NL@%
  18236.           redefinition, probably because you have redefined a symbol defined%@NL@%
  18237.           in a library. Relink with the %@AB@%/NOEXTDICTIONARY%@AE@% (%@AB@%NOE%@AE@%) option. If%@NL@%
  18238.           error L2025 results for the same symbol, then you have a genuine%@NL@%
  18239.           symbol-redefinition error.%@NL@%
  18240. %@NL@%
  18241. %@CR:MCVcE190@%%@4@%%@AB@%L2045%@AE@%     %@AI@%segmentname%@AE@%%@AB@% : segment with > 1 class name not allowed with/INC%@AE@%%@EH@%%@NL@%
  18242. %@NL@%
  18243.           Your program defined a segment more than once, giving the segment%@NL@%
  18244.           different class names. Different class names for the same segment%@NL@%
  18245.           are not allowed when you link with the %@AB@%/INCREMENTAL%@AE@% option.%@NL@%
  18246.           Normally, this error should never appear unless you are%@NL@%
  18247.           programming with %@AB@%MASM%@AE@%. For example, if you give the two MASM%@NL@%
  18248.           statements%@NL@%
  18249. %@NL@%
  18250.           %@AS@%_BSS segment%@AE@%%@NL@%
  18251.           %@AS@%'BSS'_BSS segment 'DATA'%@AE@%%@NL@%
  18252. %@NL@%
  18253.           then the statements have the effect of defining two distinct%@NL@%
  18254.           segments with the same name but different classes. This situation%@NL@%
  18255.           is incompatible with the %@AB@%/INCREMENTAL%@AE@% option.%@NL@%
  18256. %@NL@%
  18257. %@CR:MCVcE191@%%@4@%%@AB@%L2047     IOPL attribute conflict - segment:%@AE@% %@AI@%segname%@AE@%%@AB@% in group:%@AE@% %@AI@%grpname%@AE@%%@EH@%%@NL@%
  18258. %@NL@%
  18259.           The segment %@AI@%segname%@AE@% is the a member of the group %@AI@%grpname%@AE@%, but has%@NL@%
  18260.           a different %@AB@%IOPL%@AE@% attribute from other segments in the group.%@NL@%
  18261. %@NL@%
  18262. %@NL@%
  18263. %@CR:MCVc2300@%%@3@%%@AB@%C.2.3  LINK Warning Messages%@AE@%%@EH@%%@NL@%
  18264. %@NL@%
  18265. %@CR:MCVcE192@%%@4@%%@AB@%L4000     seg disp. included near offset in segment%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  18266. %@NL@%
  18267.           This is the warning generated by the %@AB@%/WARNFIXUP%@AE@% option. See%@NL@%
  18268.           Section 13.3.31%@BO:   99af7@%, "Issuing Fixup Warnings," for more information%@NL@%
  18269.           on that option.%@NL@%
  18270. %@NL@%
  18271. %@CR:MCVcE193@%%@4@%%@AB@%L4001     frame-relative fixup, frame ignored near%@AE@% %@AI@%offset%@AE@%%@AB@% in segment%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  18272. %@NL@%
  18273.           A reference is made relative to a segment that is different from%@NL@%
  18274.           the target segment of the reference. For example, if %@AS@%_foo%@AE@% is%@NL@%
  18275.           defined in segment %@AS@%_TEXT%@AE@%, the instruction %@AS@%call DGROUP:_foo%@AE@%%@NL@%
  18276.           produces this warning. The frame %@AB@%DGROUP%@AE@% is ignored, so the linker%@NL@%
  18277.           treats the call as if it were %@AS@%call _TEXT:_foo%@AE@%.%@NL@%
  18278. %@NL@%
  18279. %@CR:MCVcE194@%%@4@%%@AB@%L4002     frame-relative absolute fixup near%@AE@% %@AI@%offset%@AE@%%@AB@% in segment%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  18280. %@NL@%
  18281.           A reference is made similar to the type described in L4001, but%@NL@%
  18282.           both segments are absolute (defined with %@AB@%AT%@AE@%). The linker treats%@NL@%
  18283.           the executable file as if the file were to run in real mode only.%@NL@%
  18284. %@NL@%
  18285. %@CR:MCVcE195@%%@4@%%@AB@%L4003     intersegment self-relative fixup at%@AE@% %@AI@%offset%@AE@%%@AB@% in segment%@AE@% %@AI@%name%@AE@%%@AB@% pos:%@AE@%%@EH@%%@NL@%
  18286.           %@AI@%offset%@AE@% %@AB@%target external%@AE@% '%@AI@%name%@AE@%'%@NL@%
  18287. %@NL@%
  18288.           The linker found an intersegment self-relative fixup. This error%@NL@%
  18289.           may be caused by compiling a small-model program with the %@AB@%/NT%@AE@%%@NL@%
  18290.           option.%@NL@%
  18291. %@NL@%
  18292. %@CR:MCVcE196@%%@4@%%@AB@%L4010     invalid alignment specification%@AE@%%@EH@%%@NL@%
  18293. %@NL@%
  18294.           The number specified in the %@AB@%/ALIGNMENT%@AE@% option must be a power of 2%@NL@%
  18295.           in the range 2-32,768, inclusive.%@NL@%
  18296. %@NL@%
  18297. %@CR:MCVcE197@%%@4@%%@AB@%L4011     PACKCODE value exceeding 65500 unreliable%@AE@%%@EH@%%@NL@%
  18298. %@NL@%
  18299.           The packing limit specified with the %@AB@%/PACKCODE%@AE@% option was between%@NL@%
  18300.           65,500 and 65,536. Code segments with a size in this range are%@NL@%
  18301.           unreliable on some steppings of the 80286 processor.%@NL@%
  18302. %@NL@%
  18303. %@CR:MCVcE198@%%@4@%%@AB@%L4012     load-high disables EXEPACK%@AE@%%@EH@%%@NL@%
  18304. %@NL@%
  18305.           The %@AB@%/HIGH%@AE@% and %@AB@%/EXEPACK%@AE@% options cannot be used at the same time.%@NL@%
  18306. %@NL@%
  18307. %@CR:MCVcE199@%%@4@%%@AB@%L4013     invalid option for new-format executable file ignored%@AE@%%@EH@%%@NL@%
  18308. %@NL@%
  18309.           The use of overlays with the options %@AB@%/CPARMAXALLOC%@AE@%, %@AB@%/DSALLOCATE%@AE@%,%@NL@%
  18310.           and %@AB@%/NOGROUPASSOCIATION%@AE@% is not allowed with either OS/2%@NL@%
  18311.           protected-mode or Windows executable files.%@NL@%
  18312. %@NL@%
  18313. %@CR:MCVcE200@%%@4@%%@AB@%L4014%@AE@%     %@AI@%option%@AE@%%@AB@% : invalid option for old-format executable file ignored%@AE@%%@EH@%%@NL@%
  18314. %@NL@%
  18315.           The %@AB@%/ALIGNMENT%@AE@% option is invalid for real-mode executables.%@NL@%
  18316. %@NL@%
  18317. %@CR:MCVcE201@%%@4@%%@AB@%L4015     /CODEVIEW disables /DSALLOCATE%@AE@%%@EH@%%@NL@%
  18318. %@NL@%
  18319.           The %@AB@%/CODEVIEW%@AE@% and %@AB@%/DSALLOCATE%@AE@% options cannot be used at the same%@NL@%
  18320.           time.%@NL@%
  18321. %@NL@%
  18322. %@CR:MCVcE202@%%@4@%%@AB@%L4016     /CODEVIEW disables/EXEPACK%@AE@%%@EH@%%@NL@%
  18323. %@NL@%
  18324.           The %@AB@%/CODEVIEW%@AE@% and %@AB@%/EXEPACK%@AE@% options cannot be used at the same%@NL@%
  18325.           time.%@NL@%
  18326. %@NL@%
  18327. %@CR:MCVcE203@%%@4@%%@AB@%L4020%@AE@%     %@AI@%name%@AE@%%@AB@% : code-segment size exceeds 65500%@AE@%%@EH@%%@NL@%
  18328. %@NL@%
  18329.           Code segments of 65,501-65,536 bytes in length may be unreliable%@NL@%
  18330.           on the Intel 80286 processor.%@NL@%
  18331. %@NL@%
  18332. %@CR:MCVcE204@%%@4@%%@AB@%L4021     no stack segment%@AE@%%@EH@%%@NL@%
  18333. %@NL@%
  18334.           The program did not contain a stack segment defined with %@AB@%STACK%@AE@%%@NL@%
  18335.           combine type. This message should not appear for modules compiled%@NL@%
  18336.           with the Microsoft FORTRAN Compiler, but it could appear for an%@NL@%
  18337.           assembly-language module.%@NL@%
  18338. %@NL@%
  18339.           Normally, every program should have a stack segment with the%@NL@%
  18340.           combine type specified as %@AB@%STACK%@AE@%. You may ignore this message if%@NL@%
  18341.           you have a specific reason for not defining a stack or for%@NL@%
  18342.           defining one without the %@AB@%STACK%@AE@% combine type. Linking with versions%@NL@%
  18343.           of %@AB@%LINK%@AE@% earlier than Version 2.40 might cause this message since%@NL@%
  18344.           these linkers search libraries only once.%@NL@%
  18345. %@NL@%
  18346. %@CR:MCVcE205@%%@4@%%@AB@%L4022%@AE@%     %@AI@%group1%@AE@%%@AB@%,%@AE@% %@AI@%group2%@AE@%%@AB@% : groups overlap%@AE@%%@EH@%%@NL@%
  18347. %@NL@%
  18348.           The named groups overlap. Since a group is assigned to a physical%@NL@%
  18349.           segment, groups cannot overlap with either OS/2 protected-mode or%@NL@%
  18350.           Windows executable files.%@NL@%
  18351. %@NL@%
  18352.           Reorganize segments and group definitions so the groups do not%@NL@%
  18353.           overlap. Refer to the map file.%@NL@%
  18354. %@NL@%
  18355. %@CR:MCVcE206@%%@4@%%@AB@%L4023%@AE@%     %@AI@%name%@AE@%%@AB@% (%@AE@%%@AI@%internal name%@AE@%%@AB@%) : export internal name conflict%@AE@%%@EH@%%@NL@%
  18356. %@NL@%
  18357.           The internal name of the given exported routine conflicted with%@NL@%
  18358.           the internal name of a previous import definition or export%@NL@%
  18359.           definition.%@NL@%
  18360. %@NL@%
  18361. %@CR:MCVcE207@%%@4@%%@AB@%L4024%@AE@%     %@AI@%name%@AE@%%@AB@% : multiple definitions for export name%@AE@%%@EH@%%@NL@%
  18362. %@NL@%
  18363.           The given name was exported more than once, an action that is not%@NL@%
  18364.           allowed.%@NL@%
  18365. %@NL@%
  18366. %@CR:MCVcE208@%%@4@%%@AB@%L4025%@AE@%     %@AI@%name%@AE@%%@AB@% : import internal name conflict%@AE@%%@EH@%%@NL@%
  18367. %@NL@%
  18368.           The internal name of the given imported routine (import is either%@NL@%
  18369.           a name or a number) conflicted with the internal name of a%@NL@%
  18370.           previous export or import.%@NL@%
  18371. %@NL@%
  18372. %@CR:MCVcE209@%%@4@%%@AB@%L4026%@AE@%     %@AI@%dynlib.import (name)%@AE@%%@AB@% : self-imported%@AE@%%@EH@%%@NL@%
  18373. %@NL@%
  18374.           The given imported routine was imported from the module being%@NL@%
  18375.           linked. This is not supported on some systems.%@NL@%
  18376. %@NL@%
  18377. %@CR:MCVcE210@%%@4@%%@AB@%L4027%@AE@%     %@AI@%name%@AE@%%@AB@% : multiple definitions for import internal-name%@AE@%%@EH@%%@NL@%
  18378. %@NL@%
  18379.           The given internal name was imported more than once. Previous%@NL@%
  18380.           import definitions are ignored.%@NL@%
  18381. %@NL@%
  18382. %@CR:MCVcE211@%%@4@%%@AB@%L4028%@AE@%     %@AI@%name%@AE@%%@AB@% : segment already defined%@AE@%%@EH@%%@NL@%
  18383. %@NL@%
  18384.           The given segment was defined more than once in the %@AB@%SEGMENTS%@AE@%%@NL@%
  18385.           statement of the module-definition file.%@NL@%
  18386. %@NL@%
  18387. %@CR:MCVcE212@%%@4@%%@AB@%L4029%@AE@%     %@AI@%name%@AE@%%@AB@% : DGROUP segment converted to type data%@AE@%%@EH@%%@NL@%
  18388. %@NL@%
  18389.           The given logical segment in the group %@AB@%DGROUP%@AE@% was defined as a%@NL@%
  18390.           code segment. (%@AB@%DGROUP%@AE@% cannot contain code segments because the%@NL@%
  18391.           linker always considers %@AB@%DGROUP%@AE@% to be a data segment. The name%@NL@%
  18392.           %@AB@%DGROUP%@AE@% is predefined as the automatic data segment.) The linker%@NL@%
  18393.           converts the named segment to type "data."%@NL@%
  18394. %@NL@%
  18395. %@CR:MCVcE213@%%@4@%%@AB@%L4030%@AE@%     %@AI@%name%@AE@%%@AB@% : segment attributes changed to conform with automatic data%@AE@%%@EH@%%@NL@%
  18396.           segment%@NL@%
  18397. %@NL@%
  18398.           The given logical segment in the group %@AB@%DGROUP%@AE@% was given sharing%@NL@%
  18399.           attributes (%@AB@%SHARED/NONSHARED%@AE@%) that differed from the automatic%@NL@%
  18400.           data attributes as declared by the %@AB@%DATA%@AE@% %@AI@%instance%@AE@% specification%@NL@%
  18401.           (%@AB@%SINGLE/MULTIPLE%@AE@%). The attributes are converted to conform to%@NL@%
  18402.           those of %@AB@%DGROUP%@AE@%. Refer to Error L4029 for more information on%@NL@%
  18403.           %@AB@%DGROUP%@AE@%.%@NL@%
  18404. %@NL@%
  18405. %@CR:MCVcE214@%%@4@%%@AB@%L4031%@AE@%     %@AI@%name%@AE@%%@AB@% : segment declared in more than one group%@AE@%%@EH@%%@NL@%
  18406. %@NL@%
  18407.           A segment was declared to be a member of two different groups.%@NL@%
  18408. %@NL@%
  18409.           Correct the source file and recreate the object files.%@NL@%
  18410. %@NL@%
  18411. %@CR:MCVcE215@%%@4@%%@AB@%L4032%@AE@%     %@AI@%name%@AE@%%@AB@% : code-group size exceeds 65500 bytes%@AE@%%@EH@%%@NL@%
  18412. %@NL@%
  18413.           The given code group has a size between 65,500 and 65,536 bytes, a%@NL@%
  18414.           size that is unreliable on some steppings of the 80286 processor.%@NL@%
  18415. %@NL@%
  18416. %@CR:MCVcE216@%%@4@%%@AB@%L4034     more than 239 overlay segments; extra put in root%@AE@%%@EH@%%@NL@%
  18417. %@NL@%
  18418.           Your program designated more than the limit of 239 segments to go%@NL@%
  18419.           in overlays. Starting with the 234th segment, they are assigned to%@NL@%
  18420.           the root (that is, the permanently resident portion of the%@NL@%
  18421.           program).%@NL@%
  18422. %@NL@%
  18423. %@CR:MCVcE217@%%@4@%%@AB@%L4036     no automatic data segment%@AE@%%@EH@%%@NL@%
  18424. %@NL@%
  18425.           The application did not define a group named %@AB@%DGROUP%@AE@%. %@AB@%DGROUP%@AE@% has%@NL@%
  18426.           special meaning to the linker, which uses it to identify the%@NL@%
  18427.           automatic or default data segment used by the operating system.%@NL@%
  18428.           Most OS/2 protected-mode and Windows applications require %@AB@%DGROUP%@AE@%.%@NL@%
  18429.           This warning will not be issued if %@AB@%DATA%@AE@% %@AB@%NONE%@AE@% is declared or if the%@NL@%
  18430.           executable file is a dynamic-link library.%@NL@%
  18431. %@NL@%
  18432. %@CR:MCVcE218@%%@4@%%@AB@%L4038     program has no starting address%@AE@%%@EH@%%@NL@%
  18433. %@NL@%
  18434.           Your OS/2 or Windows application had no starting address, which%@NL@%
  18435.           usually will cause the program to fail. Higher-level languages%@NL@%
  18436.           automatically specify a starting address. If you are writing an%@NL@%
  18437.           assembly-language program, specify a starting address with the %@AB@%END%@AE@%%@NL@%
  18438.           statement.%@NL@%
  18439. %@NL@%
  18440.           Real-mode programs and dynamic-link libraries should never receive%@NL@%
  18441.           this message, regardless whether or not they have starting%@NL@%
  18442.           addresses.%@NL@%
  18443. %@NL@%
  18444. %@CR:MCVcE219@%%@4@%%@AB@%L4042     cannot open old version%@AE@%%@EH@%%@NL@%
  18445. %@NL@%
  18446.           The file specified in the %@AB@%OLD%@AE@% statement in the module-definition%@NL@%
  18447.           file could not be opened.%@NL@%
  18448. %@NL@%
  18449. %@CR:MCVcE220@%%@4@%%@AB@%L4043     old version not segmented-executable format%@AE@%%@EH@%%@NL@%
  18450. %@NL@%
  18451.           The file specified in the %@AB@%OLD%@AE@% statement in the module-definition%@NL@%
  18452.           file was not a valid OS/2 protected-mode or Windows executable%@NL@%
  18453.           file.%@NL@%
  18454. %@NL@%
  18455. %@CR:MCVcE221@%%@4@%%@AB@%L4045     name of output file is%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  18456. %@NL@%
  18457.           The prompt for the run-file field gave an inaccurate default%@NL@%
  18458.           because %@AB@%/QUICKLIB%@AE@% option was not used early enough. The output%@NL@%
  18459.           will be a Quick library with the name given in the error message.%@NL@%
  18460. %@NL@%
  18461. %@CR:MCVcE222@%%@4@%%@AB@%L4046     module name different from output file name%@AE@%%@EH@%%@NL@%
  18462. %@NL@%
  18463.           The name of the executable file as specified in the %@AB@%NAME%@AE@% or%@NL@%
  18464.           %@AB@%LIBRARY%@AE@% statement is different from the output file name. This may%@NL@%
  18465.           cause problems; consult the documentation for your operating%@NL@%
  18466.           system.%@NL@%
  18467. %@NL@%
  18468. %@CR:MCVcE223@%%@4@%%@AB@%L4050     too many public symbols for sorting%@AE@%%@EH@%%@NL@%
  18469. %@NL@%
  18470.           The linker uses the stack and all available memory in the near%@NL@%
  18471.           heap to sort public symbols for the %@AB@%/MAP%@AE@% option. If the number of%@NL@%
  18472.           public symbols exceeds the space available for them, this warning%@NL@%
  18473.           is issued and the symbols are not sorted in the map file but%@NL@%
  18474.           listed in an arbitrary order.%@NL@%
  18475. %@NL@%
  18476.           Reduce the number of symbols.%@NL@%
  18477. %@NL@%
  18478. %@CR:MCVcE224@%%@4@%%@AB@%L4051%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot find library%@AE@%%@EH@%%@NL@%
  18479. %@NL@%
  18480.           The linker could not find the specified file.%@NL@%
  18481. %@NL@%
  18482.           Enter a new file name, a new path specification, or both.%@NL@%
  18483. %@NL@%
  18484. %@CR:MCVcE225@%%@4@%%@AB@%L4053     VM.TMP : illegal file name; ignored%@AE@%%@EH@%%@NL@%
  18485. %@NL@%
  18486.           %@AB@%VM.TMP%@AE@% appeared as an object-file name.%@NL@%
  18487. %@NL@%
  18488.           Rename the file and rerun the linker.%@NL@%
  18489. %@NL@%
  18490. %@CR:MCVcE226@%%@4@%%@AB@%L4054%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot find file%@AE@%%@EH@%%@NL@%
  18491. %@NL@%
  18492.           The linker could not find the specified file.%@NL@%
  18493. %@NL@%
  18494.           Enter a new file name, a new path specification, or both.%@NL@%
  18495. %@NL@%
  18496. %@CR:MCVcE227@%%@4@%%@AB@%L4067     ignoring start address not equal to 0x100 for /TINY%@AE@%%@EH@%%@NL@%
  18497. %@NL@%
  18498.           The code specified a starting address other than the assumed%@NL@%
  18499.           address of 100 hex for a %@AB@%.COM%@AE@% file created with the %@AB@%/TINY%@AE@% option.%@NL@%
  18500.           The linker is proceeding to start the %@AB@%.COM%@AE@% file at 100 hex,%@NL@%
  18501.           regardless of the specified address.%@NL@%
  18502. %@NL@%
  18503.           Present only in the DOS-only 3.xx linkers and the executable 5.xx%@NL@%
  18504.           linkers.%@NL@%
  18505. %@NL@%
  18506. %@NL@%
  18507. %@CR:MCVc3000@%%@2@%%@AB@%C.3  ILINK Error Messages%@AE@%%@EH@%%@NL@%
  18508. %@NL@%
  18509. %@CR:MCVc3001@%%@4@%This section lists and describes error messages generated by the Microsoft%@EH@%
  18510. Incremental Linker, %@AB@%ILINK%@AE@%.%@NL@%
  18511. %@NL@%
  18512. %@CR:MCVc3002@%%@4@%%@AB@%Fatal errors%@AE@% cause the linker to end the linking session. Fatal error%@EH@%
  18513. messages have the following format:%@NL@%
  18514. %@NL@%
  18515. %@CR:MCVc3003@%%@AI@%location%@AE@% : %@AS@%error L1%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  18516. %@NL@%
  18517. %@CR:MCVc3004@%%@4@%%@AB@%Incremental violations%@AE@% cause %@AB@%ILINK%@AE@% to end the linking session and carry out%@EH@%
  18518. the command specified by the /e option.  Incremental violations messages
  18519. have the following format:%@NL@%
  18520. %@NL@%
  18521. %@CR:MCVc3005@%%@AI@%location%@AE@% : %@AS@%error L2%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  18522. %@NL@%
  18523. %@CR:MCVc3006@%%@4@%%@AB@%Warnings%@AE@% give notice of certain conditions without ending the operation of%@EH@%
  18524. ILINK. Warnings have the following format:%@NL@%
  18525. %@NL@%
  18526. %@CR:MCVc3007@%%@AI@%location%@AE@% : %@AS@%warning L4%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  18527. %@NL@%
  18528. %@CR:MCVc3008@%%@4@%In all three kinds of messages, location is the input file associated with%@EH@%
  18529. the error. If the input file is an %@AB@%.OBJ%@AE@% or %@AB@%.LIB%@AE@% file and has a module name,
  18530. the module name is enclosed in parentheses, as shown in the following
  18531. examples:%@NL@%
  18532. %@NL@%
  18533.      SLIBC.LIB (_file)%@NL@%
  18534.      MAIN.OBJ (main.c)%@NL@%
  18535.      TEXT.OBJ%@NL@%
  18536. %@NL@%
  18537. %@CR:MCVc3009@%%@4@%The following error messages may appear when you link object files with the%@EH@%
  18538. Microsoft Incremental Linker, %@AB@%ILINK%@AE@%.%@NL@%
  18539. %@NL@%
  18540. %@NL@%
  18541. %@CR:MCVc3100@%%@3@%%@AB@%C.3.1  ILINK Fatal Errors%@AE@%%@EH@%%@NL@%
  18542. %@NL@%
  18543. %@CR:MCVcE228@%%@4@%%@AB@%L1105     invalid object due to aborted incremental compile%@AE@%%@EH@%%@NL@%
  18544. %@NL@%
  18545.           Delete the object file, recompile the program, and relink.%@NL@%
  18546. %@NL@%
  18547. %@CR:MCVcE229@%%@4@%%@AB@%L1200     .SYM seek error%@AE@%%@EH@%%@NL@%
  18548. %@NL@%
  18549.           The %@AB@%.SYM%@AE@% file could not be properly read. Try redoing a full link%@NL@%
  18550.           with the %@AB@%/INCREMENTAL%@AE@% option.%@NL@%
  18551. %@NL@%
  18552. %@CR:MCVcE230@%%@4@%%@AB@%L1201     .SYM read error%@AE@%%@EH@%%@NL@%
  18553. %@NL@%
  18554.           The %@AB@%.SYM%@AE@% file could not be properly read. Try redoing a full link%@NL@%
  18555.           with the %@AB@%/INCREMENTAL%@AE@% option.%@NL@%
  18556. %@NL@%
  18557. %@CR:MCVcE231@%%@4@%%@AB@%L1202     .SYM write error%@AE@%%@EH@%%@NL@%
  18558. %@NL@%
  18559.           The disk is full or the %@AB@%.SYM%@AE@% file already exists and has the%@NL@%
  18560.           %@AB@%READONLY%@AE@% attribute.%@NL@%
  18561. %@NL@%
  18562. %@CR:MCVcE232@%%@4@%%@AB@%L1203     map for segment%@AE@% %@AI@%name%@AE@%%@AB@% exceeds 64K%@AE@%%@EH@%%@NL@%
  18563. %@NL@%
  18564.           The symbolic information associated with the given segment exceeds%@NL@%
  18565.           64K bytes, an amount more than %@AB@%ILINK%@AE@% can handle.%@NL@%
  18566. %@NL@%
  18567. %@CR:MCVcE233@%%@4@%%@AB@%L1204     .ILK write error%@AE@%%@EH@%%@NL@%
  18568. %@NL@%
  18569.           The disk is full or the %@AB@%.SYM%@AE@% file already exists and has the%@NL@%
  18570.           %@AB@%READONLY%@AE@% attribute.%@NL@%
  18571. %@NL@%
  18572. %@CR:MCVcE234@%%@4@%%@AB@%L1205     fixup overflow at%@AE@% %@AI@%address%@AE@%%@AB@% in segment%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  18573. %@NL@%
  18574.           A %@AB@%FIXUPP%@AE@% object record with the given location referred to a%@NL@%
  18575.           target too far away to be correctly processed. This messages%@NL@%
  18576.           indicates an error in translation by the compiler or assembler.%@NL@%
  18577. %@NL@%
  18578. %@CR:MCVcE235@%%@4@%%@AB@%L1206     .ILK seek error%@AE@%%@EH@%%@NL@%
  18579. %@NL@%
  18580.           The %@AB@%.ILK%@AE@% file is corrupted. Do a full link. If the error%@NL@%
  18581.           persists, note the circumstance of the error and notify Microsoft%@NL@%
  18582.           Corporation by following the directions in the Microsoft Product%@NL@%
  18583.           Assistance Request form at the back of one of your manuals.%@NL@%
  18584. %@NL@%
  18585. %@CR:MCVcE236@%%@4@%%@AB@%L1207     .ILK file too large%@AE@%%@EH@%%@NL@%
  18586. %@NL@%
  18587.           The %@AB@%.ILK%@AE@% file is too large for %@AB@%ILINK%@AE@% to process. Do a full link.%@NL@%
  18588. %@NL@%
  18589. %@CR:MCVcE237@%%@4@%%@AB@%L1208     invalid .SYM file%@AE@%%@EH@%%@NL@%
  18590. %@NL@%
  18591.           The %@AB@%.SYM%@AE@% file is invalid; delete the file and do a full link. If%@NL@%
  18592.           the problem persists, contact Microsoft Product Support.%@NL@%
  18593. %@NL@%
  18594. %@CR:MCVcE238@%%@4@%%@AB@%L1209     .OBJ close error%@AE@%%@EH@%%@NL@%
  18595. %@NL@%
  18596.           The operating system returned an error when %@AB@%ILINK%@AE@% attempted to%@NL@%
  18597.           close one of the %@AB@%.OBJ%@AE@% files.%@NL@%
  18598. %@NL@%
  18599. %@CR:MCVcE239@%%@4@%%@AB@%L1210     .OBJ read error%@AE@%%@EH@%%@NL@%
  18600. %@NL@%
  18601.           The %@AB@%.OBJ%@AE@% file has an unreadable structure. Try rebuilding the .OBJ%@NL@%
  18602.           file and doing a full link. This message indicates an error in%@NL@%
  18603.           translation by the compiler or assembler.%@NL@%
  18604. %@NL@%
  18605. %@CR:MCVcE240@%%@4@%%@AB@%L1211     too many LNAMES%@AE@%%@EH@%%@NL@%
  18606. %@NL@%
  18607.           An object module has more than 255 %@AB@%LNAME%@AE@% records.%@NL@%
  18608. %@NL@%
  18609. %@CR:MCVcE241@%%@4@%%@AB@%L1212     too many SEGDEFs%@AE@%%@EH@%%@NL@%
  18610. %@NL@%
  18611.           The given object module has more than 100 %@AB@%SEGDEF%@AE@% records. A SEGDEF%@NL@%
  18612.           record defines logical segments.%@NL@%
  18613. %@NL@%
  18614. %@CR:MCVcE242@%%@4@%%@AB@%L1213     too many GRPDEFs%@AE@%%@EH@%%@NL@%
  18615. %@NL@%
  18616.           The given object module has more than 10 %@AB@%GRPDEF%@AE@% records. A GRPDEF%@NL@%
  18617.           record defines physical segments.%@NL@%
  18618. %@NL@%
  18619. %@CR:MCVcE243@%%@4@%%@AB@%L1214     too many COMDEFs%@AE@%%@EH@%%@NL@%
  18620. %@NL@%
  18621.           The total number of %@AB@%COMDEF%@AE@% and %@AB@%EXTDEF%@AE@% records exceeded the limit.%@NL@%
  18622.           The limit on the total of %@AB@%COMDEF%@AE@% records (communal data variables)%@NL@%
  18623.           and %@AB@%EXTDEF%@AE@% records (external references) is 1,023. Use fewer%@NL@%
  18624.           communal or external variables in your program.%@NL@%
  18625. %@NL@%
  18626. %@CR:MCVcE244@%%@4@%%@AB@%L1215     too many EXTDEFs%@AE@%%@EH@%%@NL@%
  18627. %@NL@%
  18628.           The total number of %@AB@%COMDEF%@AE@% and %@AB@%EXTDEF%@AE@% records exceeded the limit.%@NL@%
  18629.           The limit on the total of %@AB@%COMDEF%@AE@% records (communal data variables)%@NL@%
  18630.           and %@AB@%EXTDEF%@AE@% records (external references) is 1,023. Use fewer%@NL@%
  18631.           communal or external variables in your program.%@NL@%
  18632. %@NL@%
  18633. %@CR:MCVcE245@%%@4@%%@AB@%L1216     symbol%@AE@% %@AI@%name%@AE@%%@AB@% multiply defined%@AE@%%@EH@%%@NL@%
  18634. %@NL@%
  18635.           The given symbol is defined more than once.%@NL@%
  18636. %@NL@%
  18637. %@CR:MCVcE246@%%@4@%%@AB@%L1217     internal error #3%@AE@%%@EH@%%@NL@%
  18638. %@NL@%
  18639.           Note the circumstance of the error and notify Microsoft%@NL@%
  18640.           Corporation by following the directions in the Microsoft Product%@NL@%
  18641.           Assistance Request form at the back of one of your manuals.%@NL@%
  18642. %@NL@%
  18643. %@CR:MCVcE247@%%@4@%%@AB@%L1218     .EXE file too big, change alignment%@AE@%%@EH@%%@NL@%
  18644. %@NL@%
  18645.           The segment-sector alignment value in the %@AB@%.EXE%@AE@% file is too small%@NL@%
  18646.           to express the size of one of the segments.  Do a full link and%@NL@%
  18647.           increase the alignment value with the %@AB@%/ALIGNMENT%@AE@% option to %@AB@%LINK%@AE@%.%@NL@%
  18648. %@NL@%
  18649. %@CR:MCVcE248@%%@4@%%@AB@%L1219     too many library files%@AE@%%@EH@%%@NL@%
  18650. %@NL@%
  18651.           The number of libraries exceeded %@AB@%ILINK%@AE@%'s limit of 32 libraries%@NL@%
  18652.           (%@AB@%.LIB%@AE@% files). Reduce the number of libraries.%@NL@%
  18653. %@NL@%
  18654. %@CR:MCVcE249@%%@4@%%@AB@%L1220     seek error on library%@AE@%%@EH@%%@NL@%
  18655. %@NL@%
  18656.           A library (%@AB@%.LIB%@AE@% file) is corrupted. Do a full link and check your%@NL@%
  18657.           %@AB@%.LIB%@AE@% files.%@NL@%
  18658. %@NL@%
  18659. %@CR:MCVcE250@%%@4@%%@AB@%L1221     library close error%@AE@%%@EH@%%@NL@%
  18660. %@NL@%
  18661.           The operating system returned an error when %@AB@%ILINK%@AE@% attempted to%@NL@%
  18662.           close one of the libraries (%@AB@%.LIB%@AE@% files). Do a full link. If the%@NL@%
  18663.           error persists, note the circumstances of the error and notify%@NL@%
  18664.           Microsoft Corporation by following the directions in the Microsoft%@NL@%
  18665.           Product Assistance Request form at the back of one of your%@NL@%
  18666.           manuals.%@NL@%
  18667. %@NL@%
  18668. %@CR:MCVcE251@%%@4@%%@AB@%L1222     error closing .EXE file%@AE@%%@EH@%%@NL@%
  18669. %@NL@%
  18670.           The operating system returned an error when %@AB@%ILINK%@AE@% attempted to%@NL@%
  18671.           close the executable file. Do a full link. If the error persists,%@NL@%
  18672.           contact Microsoft Product Support.%@NL@%
  18673. %@NL@%
  18674. %@CR:MCVcE252@%%@4@%%@AB@%L1223     could not update time on%@AE@% %@AI@%file%@AE@%%@EH@%%@NL@%
  18675. %@NL@%
  18676.           The operating system returned an error when %@AB@%ILINK%@AE@% attempted to%@NL@%
  18677.           update the time on the given file. Possibly the file had the%@NL@%
  18678.           %@AB@%READONLY%@AE@% attribute set.%@NL@%
  18679. %@NL@%
  18680. %@CR:MCVcE253@%%@4@%%@AB@%L1224     invalid flag%@AE@% %@AI@%character%@AE@%%@EH@%%@NL@%
  18681. %@NL@%
  18682.           You used incorrect syntax on the %@AB@%ILINK%@AE@% command line.%@NL@%
  18683. %@NL@%
  18684. %@CR:MCVcE254@%%@4@%%@AB@%L1225     only one -e command allowed%@AE@%%@EH@%%@NL@%
  18685. %@NL@%
  18686.           You used incorrect syntax on the %@AB@%ILINK%@AE@% command line.%@NL@%
  18687. %@NL@%
  18688. %@CR:MCVcE255@%%@4@%%@AB@%L1226     terminated by user%@AE@%%@EH@%%@NL@%
  18689. %@NL@%
  18690.           You pressed CTRL+C or CTRL+BREAK, an action that interrupts and%@NL@%
  18691.           terminates %@AB@%ILINK%@AE@%.%@NL@%
  18692. %@NL@%
  18693. %@CR:MCVcE256@%%@4@%%@AB@%L1227     file%@AE@% %@AI@%name%@AE@%%@AB@% write protected%@AE@%%@EH@%%@NL@%
  18694. %@NL@%
  18695.           The %@AB@%.EXE%@AE@%, %@AB@%.ILK%@AE@%, or %@AB@%.SYM%@AE@% file that %@AB@%ILINK%@AE@% attempted to update has%@NL@%
  18696.           the %@AB@%READONLY%@AE@% attribute.%@NL@%
  18697. %@NL@%
  18698. %@CR:MCVcE257@%%@4@%%@AB@%L1228     file%@AE@% %@AI@%name%@AE@%%@AB@% missing%@AE@%%@EH@%%@NL@%
  18699. %@NL@%
  18700.           %@AB@%ILINK%@AE@% could not find one of the %@AB@%.OBJ%@AE@% files specified on the%@NL@%
  18701.           command line.%@NL@%
  18702. %@NL@%
  18703. %@CR:MCVcE258@%%@4@%%@AB@%L1229     invalid.OBJ format%@AE@%%@EH@%%@NL@%
  18704. %@NL@%
  18705.           There may be one of several problems: error in compiler%@NL@%
  18706.           translation, corrupted object file, invalid object file (possibly%@NL@%
  18707.           text file), or object file could not be read or found.%@NL@%
  18708. %@NL@%
  18709. %@CR:MCVcE259@%%@4@%%@AB@%L1230     invalid%@AE@% %@AI@%file%@AE@%%@AB@% record: position =%@AE@% %@AI@%address%@AE@%%@EH@%%@NL@%
  18710. %@NL@%
  18711.           The given %@AB@%.OBJ%@AE@% file has an invalid format or one unrecognized by%@NL@%
  18712.           %@AB@%ILINK%@AE@%. This message may indicate an error in translation by the%@NL@%
  18713.           compiler or assembler.%@NL@%
  18714. %@NL@%
  18715. %@CR:MCVcE260@%%@4@%%@AB@%L1231     file%@AE@% %@AI@%name%@AE@%%@AB@% was not full linked%@AE@%%@EH@%%@NL@%
  18716. %@NL@%
  18717.           You specified an %@AB@%.OBJ%@AE@% file in the %@AB@%ILINK%@AE@% command line that was not%@NL@%
  18718.           in the list of files in the most recent full link.%@NL@%
  18719. %@NL@%
  18720. %@CR:MCVcE261@%%@4@%%@AB@%L1232     cannot run%@AE@% %@AI@%program%@AE@%%@EH@%%@NL@%
  18721. %@NL@%
  18722.           %@AB@%ILINK%@AE@% is unable to execute a program specified for execution with%@NL@%
  18723.           the %@AB@%\e%@AE@% command-line option. Make sure the program is in the search%@NL@%
  18724.           path and is an %@AB@%.EXE%@AE@% or %@AB@%.COM%@AE@% file.%@NL@%
  18725. %@NL@%
  18726. %@CR:MCVcE262@%%@4@%%@AB@%L1233%@AE@%     %@AI@%program%@AE@%%@AB@% returned%@AE@% %@AI@%return-code%@AE@%%@EH@%%@NL@%
  18727. %@NL@%
  18728.           The given program was specified with the %@AB@%\e%@AE@% option. When ILINK%@NL@%
  18729.           executed this program, it terminated with the given nonzero return%@NL@%
  18730.           code. %@AB@%ILINK%@AE@% cannot continue to the next commands, if any.%@NL@%
  18731. %@NL@%
  18732. %@CR:MCVcE263@%%@4@%%@AB@%L1234     error creating%@AE@% %@AI@%file%@AE@%%@EH@%%@NL@%
  18733. %@NL@%
  18734.           %@AB@%ILINK%@AE@% was unable to create the batch file for executing the %@AB@%\e%@AE@%%@NL@%
  18735.           commands. Make sure the directory given in %@AB@%TMP%@AE@% or %@AB@%TEMP%@AE@%, or the%@NL@%
  18736.           current directory, exists and can be written to.%@NL@%
  18737. %@NL@%
  18738. %@CR:MCVcE264@%%@4@%%@AB@%L1235     error writing to%@AE@% %@AI@%file%@AE@%%@EH@%%@NL@%
  18739. %@NL@%
  18740.           %@AB@%ILINK%@AE@% experienced an error while writing the batch file for%@NL@%
  18741.           executing the %@AB@%\e%@AE@% commands.  Make sure the drive for %@AB@%TMP%@AE@% or %@AB@%TEMP%@AE@% or%@NL@%
  18742.           the current drive has enough free space.%@NL@%
  18743. %@NL@%
  18744. %@CR:MCVcE265@%%@4@%%@AB@%L1240     far references in STRUC fields not supported%@AE@%%@EH@%%@NL@%
  18745. %@NL@%
  18746.           %@AB@%ILINK%@AE@% currently does not support %@AB@%STRUC%@AE@% definitions like this:%@NL@%
  18747. %@NL@%
  18748.               extrn   func:FAR%@NL@%
  18749.               rek     STRUC%@NL@%
  18750.               far_adr DD     func    ; %@AI@%Initialized far address%@AE@%%@NL@%
  18751.                                      ; %@AI@%within a STRUC%@AE@%%@NL@%
  18752.               rek     ENDS%@NL@%
  18753. %@NL@%
  18754.           To use %@AB@%ILINK%@AE@%, change your code to get rid of the far address%@NL@%
  18755.           within the %@AB@%STRUC%@AE@%.%@NL@%
  18756. %@NL@%
  18757. %@CR:MCVcE266@%%@4@%%@AB@%L1241     too many defined segments%@AE@%%@EH@%%@NL@%
  18758. %@NL@%
  18759.           %@AB@%ILINK%@AE@% has a limit of 255 physical segments (that is, segments%@NL@%
  18760.           defined in the object module as opposed to groups or logical%@NL@%
  18761.           segments). To use %@AB@%ILINK%@AE@%, reduce the number of segments.%@NL@%
  18762. %@NL@%
  18763. %@CR:MCVcE267@%%@4@%%@AB@%L1242     too many modules%@AE@%%@EH@%%@NL@%
  18764. %@NL@%
  18765.           The program exceeds %@AB@%ILINK%@AE@%'s limit of 1,204 modules. Reduce the%@NL@%
  18766.           number of modules.%@NL@%
  18767. %@NL@%
  18768. %@CR:MCVcE268@%%@4@%%@AB@%L1243     cannot link 64K-length segments%@AE@%%@EH@%%@NL@%
  18769. %@NL@%
  18770.           The program has a segment larger than 65,535 bytes.%@NL@%
  18771. %@NL@%
  18772. %@CR:MCVcE269@%%@4@%%@AB@%L1244     cannot link iterated segments%@AE@%%@EH@%%@NL@%
  18773. %@NL@%
  18774.           %@AB@%ILINK%@AE@% cannot handle programs linked with the %@AB@%/EXEPACK%@AE@% linker%@NL@%
  18775.           option.%@NL@%
  18776. %@NL@%
  18777. %@NL@%
  18778. %@CR:MCVc3200@%%@3@%%@AB@%C.3.2  Incremental Violations%@AE@%%@EH@%%@NL@%
  18779. %@NL@%
  18780. %@CR:MCVcE270@%%@4@%%@AB@%L1250%@AE@%     %@AI@%number%@AE@%%@AB@% undefined symbols%@AE@%%@EH@%%@NL@%
  18781. %@NL@%
  18782.           A number of symbols were referred to in fixups but never publicly%@NL@%
  18783.           defined in the program. The given number indicates how many of%@NL@%
  18784.           these undefined symbols were found.%@NL@%
  18785. %@NL@%
  18786. %@CR:MCVcE271@%%@4@%%@AB@%L1251     invalid module reference%@AE@% %@AI@%library%@AE@%%@EH@%%@NL@%
  18787. %@NL@%
  18788.           The program makes a dynamic-link reference to a dynamic-link%@NL@%
  18789.           library that is not recognized or declared by the %@AB@%.EXE%@AE@% file.%@NL@%
  18790. %@NL@%
  18791. %@CR:MCVcE272@%%@4@%%@AB@%L1252     file%@AE@% %@AI@%name%@AE@%%@AB@% does not exist%@AE@%%@EH@%%@NL@%
  18792. %@NL@%
  18793.           %@AB@%ILINK%@AE@% could not find the given file required for %@AB@%ILINK%@AE@% operation.%@NL@%
  18794. %@NL@%
  18795. %@CR:MCVcE273@%%@4@%%@AB@%L1253     symbol%@AE@% %@AI@%name%@AE@%%@AB@% deleted%@AE@%%@EH@%%@NL@%
  18796. %@NL@%
  18797.           A symbol was deleted from an incrementally linked module.%@NL@%
  18798. %@NL@%
  18799. %@CR:MCVcE274@%%@4@%%@AB@%L1254     new segment definition%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  18800. %@NL@%
  18801.           A segment was added to the program.%@NL@%
  18802. %@NL@%
  18803. %@CR:MCVcE275@%%@4@%%@AB@%L1255     changed segment definition%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  18804. %@NL@%
  18805.           The segment contribution changed for the given module; it%@NL@%
  18806.           contributed to a segment it did not previously contribute to, or a%@NL@%
  18807.           segment contribution was removed.%@NL@%
  18808. %@NL@%
  18809. %@CR:MCVcE276@%%@4@%%@AB@%L1256     segment%@AE@% %@AI@%name%@AE@%%@AB@% grew too big%@AE@%%@EH@%%@NL@%
  18810. %@NL@%
  18811.           The given segment grew beyond the padding for the given module.%@NL@%
  18812. %@NL@%
  18813. %@CR:MCVcE277@%%@4@%%@AB@%L1257     new group definition%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  18814. %@NL@%
  18815.           A new group was defined via the %@AB@%GROUP%@AE@% directive in assembly%@NL@%
  18816.           language or via the %@AB@%\ND%@AE@% C compiler option.%@NL@%
  18817. %@NL@%
  18818. %@CR:MCVcE278@%%@4@%%@AB@%L1258     group%@AE@% %@AI@%name%@AE@%%@AB@% changed to include%@AE@% %@AI@%segment%@AE@%%@EH@%%@NL@%
  18819. %@NL@%
  18820.           The list of segments included in the given group changed.%@NL@%
  18821. %@NL@%
  18822. %@CR:MCVcE279@%%@4@%%@AB@%L1259     symbol%@AE@% %@AI@%name%@AE@%%@AB@% changed%@AE@%%@EH@%%@NL@%
  18823. %@NL@%
  18824.           The given data symbol moved (is now at a new address).%@NL@%
  18825. %@NL@%
  18826. %@CR:MCVcE280@%%@4@%%@AB@%L1260     cannot add new communal data symbol%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  18827. %@NL@%
  18828.           A new communal data symbol was added as an uninitialized variable%@NL@%
  18829.           in C or with the %@AB@%COMM%@AE@% feature in %@AB@%MASM%@AE@%.%@NL@%
  18830. %@NL@%
  18831. %@CR:MCVcE281@%%@4@%%@AB@%L1261     communal variable%@AE@% %@AI@%name%@AE@%%@AB@% grew too big%@AE@%%@EH@%%@NL@%
  18832. %@NL@%
  18833.           The given communal variable changed size too much.%@NL@%
  18834. %@NL@%
  18835. %@CR:MCVcE282@%%@4@%%@AB@%L1262     invalid symbol type for%@AE@% %@AI@%symbol%@AE@%%@EH@%%@NL@%
  18836. %@NL@%
  18837.           A symbol which was previously a code symbol became a data symbol%@NL@%
  18838.           or vice versa.%@NL@%
  18839. %@NL@%
  18840. %@CR:MCVcE283@%%@4@%%@AB@%L1263     new Codeview symbolic info%@AE@%%@EH@%%@NL@%
  18841. %@NL@%
  18842.           A module previously compiled without %@AB@%\Zi%@AE@% was compiled with %@AB@%\Zi%@AE@%.%@NL@%
  18843. %@NL@%
  18844. %@CR:MCVcE284@%%@4@%%@AB@%L1264     new line-number info%@AE@%%@EH@%%@NL@%
  18845. %@NL@%
  18846.           A module previously compiled without %@AB@%\Zi%@AE@% or %@AB@%\Zd%@AE@% was compiled with%@NL@%
  18847.           %@AB@%\Zi%@AE@% or %@AB@%\Zd%@AE@%.%@NL@%
  18848. %@NL@%
  18849. %@CR:MCVcE285@%%@4@%%@AB@%L1265     new public CodeView info%@AE@%%@EH@%%@NL@%
  18850. %@NL@%
  18851.           New information on public symbol addresses was added.%@NL@%
  18852. %@NL@%
  18853. %@CR:MCVcE286@%%@4@%%@AB@%L1266     invalid .EXE file%@AE@%%@EH@%%@NL@%
  18854. %@NL@%
  18855.           The %@AB@%.EXE%@AE@% file is invalid. Make sure you are using an up-to-date%@NL@%
  18856.           linker. If the error persists, note the circumstances of the error%@NL@%
  18857.           and notify Microsoft Corporation by following the directions in%@NL@%
  18858.           the Microsoft Product Assistance Request form at the back of one%@NL@%
  18859.           of your manuals.%@NL@%
  18860. %@NL@%
  18861. %@CR:MCVcE287@%%@4@%%@AB@%L1267     invalid .ILK file%@AE@%%@EH@%%@NL@%
  18862. %@NL@%
  18863.           The %@AB@%.ILK%@AE@% file is invalid. Make sure you are using an up-to-date%@NL@%
  18864.           linker. If the error persists, notify Microsoft Corporation by%@NL@%
  18865.           following the directions in the Microsoft Product Assistance%@NL@%
  18866.           Request form at the back of one of your manuals.%@NL@%
  18867. %@NL@%
  18868. %@CR:MCVcE288@%%@4@%%@AB@%L1268     .SYM/.ILK mismatch%@AE@%%@EH@%%@NL@%
  18869. %@NL@%
  18870.           The %@AB@%.SYM%@AE@% and %@AB@%.ILK%@AE@% files are out of sync.  Make sure you are using%@NL@%
  18871.           an up-to-date linker. If the error persists, note the%@NL@%
  18872.           circumstances of the error and notify Microsoft Corporation by%@NL@%
  18873.           following the directions in the Microsoft Product Assistance%@NL@%
  18874.           Request form at the back of one of your manuals.%@NL@%
  18875. %@NL@%
  18876. %@CR:MCVcE289@%%@4@%%@AB@%L1269     library%@AE@% %@AI@%name%@AE@%%@AB@% has changed%@AE@%%@EH@%%@NL@%
  18877. %@NL@%
  18878.           The given library has changed.%@NL@%
  18879. %@NL@%
  18880. %@CR:MCVcE290@%%@4@%%@AB@%L1270     entry table expansion not implemented%@AE@%%@EH@%%@NL@%
  18881. %@NL@%
  18882.           The program call tree changed in such a way that %@AB@%ILINK%@AE@% could not%@NL@%
  18883.           process it correctly. This problem is caused by new calls to a%@NL@%
  18884.           routine from another routine that did not call it before. Do a%@NL@%
  18885.           full link.%@NL@%
  18886. %@NL@%
  18887. %@CR:MCVcE291@%%@4@%%@AB@%L1271     segment%@AE@% %@AI@%index%@AE@%%@AB@% with relocs exceeds 64K; cannot move%@AE@%%@EH@%%@NL@%
  18888. %@NL@%
  18889.           The given segment, referred to by its index within the program's%@NL@%
  18890.           segment table, is too big along with its runtime relocations for%@NL@%
  18891.           %@AB@%ILINK%@AE@% to process the segment correctly.%@NL@%
  18892. %@NL@%
  18893. %@CR:MCVcE292@%%@4@%%@AB@%L1272     .ILK read error%@AE@%%@EH@%%@NL@%
  18894. %@NL@%
  18895.           The %@AB@%.ILK%@AE@% file does not exist or was not in the expected format.%@NL@%
  18896. %@NL@%
  18897. %@CR:MCVcE293@%%@4@%%@AB@%L1273     out of memory%@AE@%%@EH@%%@NL@%
  18898. %@NL@%
  18899.           %@AB@%ILINK%@AE@% ran out of memory for processing the input. If you are%@NL@%
  18900.           running %@AB@%ILINK%@AE@% while using the %@AB@%NMAKE%@AE@% utility, try running ILINK%@NL@%
  18901.           from the shell (that is, directly from the operating-system%@NL@%
  18902.           prompt). Otherwise, do a full link.%@NL@%
  18903. %@NL@%
  18904. %@NL@%
  18905. %@CR:MCVc3300@%%@3@%%@AB@%C.3.3  ILINK Warning Messages%@AE@%%@EH@%%@NL@%
  18906. %@NL@%
  18907. %@CR:MCVcE294@%%@4@%%@AB@%L4201     fixup frame relative to an (as yet) undefined symbol - assuming%@AE@%%@EH@%%@NL@%
  18908.           %@AB@%ok%@AE@%%@NL@%
  18909. %@NL@%
  18910.           See documentation for %@AB@%LINK%@AE@% error messages L4001 and L4002.%@NL@%
  18911. %@NL@%
  18912. %@CR:MCVcE295@%%@4@%%@AB@%L4202     module contains TYPEDEFs - ignored%@AE@%%@EH@%%@NL@%
  18913. %@NL@%
  18914.           The %@AB@%.OBJ%@AE@% file contains type definitions. %@AB@%ILINK%@AE@% ignores these%@NL@%
  18915.           records.%@NL@%
  18916. %@NL@%
  18917. %@CR:MCVcE296@%%@4@%%@AB@%L4203     module contains BLKDEFs - ignored%@AE@%%@EH@%%@NL@%
  18918. %@NL@%
  18919.           The %@AB@%.OBJ%@AE@% file contains records no longer supported by Microsoft%@NL@%
  18920.           language compilers.%@NL@%
  18921. %@NL@%
  18922. %@CR:MCVcE297@%%@4@%%@AB@%L4204     old .EXE free information lost%@AE@%%@EH@%%@NL@%
  18923. %@NL@%
  18924.           The free list in the %@AB@%.EXE%@AE@% file has been corrupted. The free list%@NL@%
  18925.           represents "holes" in the %@AB@%EXE%@AE@% file made available when segments%@NL@%
  18926.           moved to new locations.%@NL@%
  18927. %@NL@%
  18928. %@CR:MCVcE298@%%@4@%%@AB@%L4205     file%@AE@% %@AI@%name%@AE@%%@AB@% has no useful contribution%@AE@%%@EH@%%@NL@%
  18929. %@NL@%
  18930.           The given module makes no contribution to any segment.%@NL@%
  18931. %@NL@%
  18932. %@CR:MCVcE299@%%@4@%%@AB@%L4206     main entry point moved%@AE@%%@EH@%%@NL@%
  18933. %@NL@%
  18934.           The program starting address changed. You may want to consider%@NL@%
  18935.           doing a full link.%@NL@%
  18936. %@NL@%
  18937. %@NL@%
  18938. %@CR:MCVc4000@%%@2@%%@AB@%C.4  LIB Error Messages%@AE@%%@EH@%%@NL@%
  18939. %@NL@%
  18940. %@CR:MCVc4001@%%@4@%Error messages generated by the Microsoft Library Manager, LIB, have one of%@EH@%
  18941. the following formats:%@NL@%
  18942. %@NL@%
  18943.      {%@AI@%filename%@AE@%| %@AS@%LIB%@AE@%} : %@AS@%fatal error U1%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  18944.      {%@AI@%filename%@AE@%| %@AS@%LIB%@AE@%} : %@AS@%nonfatal error U2%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  18945.      {%@AI@%filename%@AE@%| %@AS@%LIB%@AE@%} : %@AS@%warning U4%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  18946. %@NL@%
  18947. %@CR:MCVc4002@%%@4@%The message begins with the input-file name (%@AI@%filename%@AE@%), if one exists, or%@EH@%
  18948. with the name of the utility. If possible, %@AB@%LIB%@AE@% prints a warning and
  18949. continues operation. In some cases errors are fatal, and %@AB@%LIB%@AE@% terminates
  18950. processing. %@AB@%LIB%@AE@% may display the following error messages.%@NL@%
  18951. %@NL@%
  18952. %@NL@%
  18953. %@CR:MCVc4100@%%@3@%%@AB@%C.4.1  Fatal LIB Error Messages%@AE@%%@EH@%%@NL@%
  18954. %@NL@%
  18955. %@CR:MCVcE300@%%@4@%%@AB@%U1150     page size too small%@AE@%%@EH@%%@NL@%
  18956. %@NL@%
  18957.           The page size of an input library was too small, indicating an%@NL@%
  18958.           invalid input %@AB@%.LIB%@AE@% file.%@NL@%
  18959. %@NL@%
  18960. %@CR:MCVcE301@%%@4@%%@AB@%U1151     syntax error : illegal file specification%@AE@%%@EH@%%@NL@%
  18961. %@NL@%
  18962.           A command operator such as a minus sign (%@AB@%-%@AE@%) was given without a%@NL@%
  18963.           following module name.%@NL@%
  18964. %@NL@%
  18965. %@CR:MCVcE302@%%@4@%%@AB@%U1152     syntax error : option name missing%@AE@%%@EH@%%@NL@%
  18966. %@NL@%
  18967.           A forward slash (%@AB@%/%@AE@%) was given without an option after it.%@NL@%
  18968. %@NL@%
  18969. %@CR:MCVcE303@%%@4@%%@AB@%U1153     syntax error : option value missing%@AE@%%@EH@%%@NL@%
  18970. %@NL@%
  18971.           The %@AB@%/PAGESIZE%@AE@% option was given without a value following it.%@NL@%
  18972. %@NL@%
  18973. %@CR:MCVcE304@%%@4@%%@AB@%U1154     option unknown%@AE@%%@EH@%%@NL@%
  18974. %@NL@%
  18975.           An unknown option was given. Currently, %@AB@%LIB%@AE@% recognizes the%@NL@%
  18976.           %@AB@%/PAGESIZE%@AE@%, %@AB@%/NOIGNORECASE%@AE@%, and %@AB@%/IGNORECASE%@AE@% options.%@NL@%
  18977. %@NL@%
  18978. %@CR:MCVcE305@%%@4@%%@AB@%U1155     syntax error : illegal input%@AE@%%@EH@%%@NL@%
  18979. %@NL@%
  18980.           The given command did not follow correct %@AB@%LIB%@AE@% syntax as specified%@NL@%
  18981.           in Chapter 15%@BO:   a2cc3@%, "Managing Libraries with LIB."%@NL@%
  18982. %@NL@%
  18983. %@CR:MCVcE306@%%@4@%%@AB@%U1156     syntax error%@AE@%%@EH@%%@NL@%
  18984. %@NL@%
  18985.           The given command did not follow the correct %@AB@%LIB%@AE@% syntax as%@NL@%
  18986.           specified in Chapter 15%@BO:   a2cc3@%, "Managing Libraries with LIB."%@NL@%
  18987. %@NL@%
  18988. %@CR:MCVcE307@%%@4@%%@AB@%U1157     comma or new line missing%@AE@%%@EH@%%@NL@%
  18989. %@NL@%
  18990.           A comma or carriage return was expected in the command line but%@NL@%
  18991.           did not appear. This may indicate an incorrectly placed comma, as%@NL@%
  18992.           in the following line:%@NL@%
  18993. %@NL@%
  18994.              LIB math.lib,-mod1+mod2;%@NL@%
  18995. %@NL@%
  18996.           The line should have been entered as follows:%@NL@%
  18997. %@NL@%
  18998.              LIB math.lib -mod1+mod2;%@NL@%
  18999. %@NL@%
  19000. %@CR:MCVcE308@%%@4@%%@AB@%U1158     terminator missing%@AE@%%@EH@%%@NL@%
  19001. %@NL@%
  19002.           Either the response to the %@AS@%Output library%@AE@% prompt or the last line%@NL@%
  19003.           of the response file used to start %@AB@%LIB%@AE@% did not end with a carriage%@NL@%
  19004.           return.%@NL@%
  19005. %@NL@%
  19006. %@CR:MCVcE309@%%@4@%%@AB@%U1161     cannot rename old library%@AE@%%@EH@%%@NL@%
  19007. %@NL@%
  19008.           %@AB@%LIB%@AE@% could not rename the old library to have a %@AB@%.BAK%@AE@% extension%@NL@%
  19009.           because the %@AB@%.BAK%@AE@% version already existed with read only%@NL@%
  19010.           protection.%@NL@%
  19011. %@NL@%
  19012.           Change the protection on the old %@AB@%.BAK%@AE@% version.%@NL@%
  19013. %@NL@%
  19014. %@CR:MCVcE310@%%@4@%%@AB@%U1162     cannot reopen library%@AE@%%@EH@%%@NL@%
  19015. %@NL@%
  19016.           The old library could not be reopened after it was renamed to have%@NL@%
  19017.           a %@AB@%.BAK%@AE@% extension.%@NL@%
  19018. %@NL@%
  19019. %@CR:MCVcE311@%%@4@%%@AB@%U1163     error writing to cross-reference file%@AE@%%@EH@%%@NL@%
  19020. %@NL@%
  19021.           The disk or root directory was full.%@NL@%
  19022. %@NL@%
  19023.           Delete or move files to make space.%@NL@%
  19024. %@NL@%
  19025. %@CR:MCVcE312@%%@4@%%@AB@%U1170     too many symbols%@AE@%%@EH@%%@NL@%
  19026. %@NL@%
  19027.           More than 4,609 symbols appeared in the library file.%@NL@%
  19028. %@NL@%
  19029. %@CR:MCVcE313@%%@4@%%@AB@%U1171     insufficient memory%@AE@%%@EH@%%@NL@%
  19030. %@NL@%
  19031.           %@AB@%LIB%@AE@% did not have enough memory to run.%@NL@%
  19032. %@NL@%
  19033.           Remove any shells or resident programs and try again, or add more%@NL@%
  19034.           memory.%@NL@%
  19035. %@NL@%
  19036. %@CR:MCVcE314@%%@4@%%@AB@%U1172     no more virtual memory%@AE@%%@EH@%%@NL@%
  19037. %@NL@%
  19038.           Try using the %@AB@%/NOEXTDICTIONARY%@AE@%. The current library exceeds the%@NL@%
  19039.           512K byte limit imposed by %@AB@%LIB%@AE@% option. Try using the%@NL@%
  19040.           %@AB@%/NOEXITDICTIONARY%@AE@% or reduce the number of object modules.%@NL@%
  19041. %@NL@%
  19042. %@CR:MCVcE315@%%@4@%%@AB@%U1173     internal failure%@AE@%%@EH@%%@NL@%
  19043. %@NL@%
  19044.           Note the circumstances of the failure and notify Microsoft%@NL@%
  19045.           Corporation by following the directions in the Microsoft Product%@NL@%
  19046.           Assistance Request form at the back of one of your manuals.%@NL@%
  19047. %@NL@%
  19048. %@CR:MCVcE316@%%@4@%%@AB@%U1174     mark: not allocated%@AE@%%@EH@%%@NL@%
  19049. %@NL@%
  19050.           Note the circumstances of the failure and notify Microsoft%@NL@%
  19051.           Corporation by following the directions in the Microsoft Product%@NL@%
  19052.           Assistance Request form at the back of one of your manuals.%@NL@%
  19053. %@NL@%
  19054. %@CR:MCVcE317@%%@4@%%@AB@%U1175     free: not allocated%@AE@%%@EH@%%@NL@%
  19055. %@NL@%
  19056.           Note the circumstances of the error and notify Microsoft%@NL@%
  19057.           Corporation by following the directions in the Microsoft Product%@NL@%
  19058.           Assistance Request form at the back of one of your manuals.%@NL@%
  19059. %@NL@%
  19060. %@CR:MCVcE318@%%@4@%%@AB@%U1180     write to extract file failed%@AE@%%@EH@%%@NL@%
  19061. %@NL@%
  19062.           The disk or root directory was full.%@NL@%
  19063. %@NL@%
  19064.           Delete or move files to make space.%@NL@%
  19065. %@NL@%
  19066. %@CR:MCVcE319@%%@4@%%@AB@%U1181     write to library file failed%@AE@%%@EH@%%@NL@%
  19067. %@NL@%
  19068.           The disk or root directory was full.%@NL@%
  19069. %@NL@%
  19070.           Delete or move files to make space.%@NL@%
  19071. %@NL@%
  19072. %@CR:MCVcE320@%%@4@%%@AB@%U1182%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot create extract file%@AE@%%@EH@%%@NL@%
  19073. %@NL@%
  19074.           The disk or root directory was full, or the specified extract file%@NL@%
  19075.           already existed with read-only protection.%@NL@%
  19076. %@NL@%
  19077.           Make space on the disk or change the protection of the extract%@NL@%
  19078.           file.%@NL@%
  19079. %@NL@%
  19080. %@CR:MCVcE321@%%@4@%%@AB@%U1183     cannot open response file%@AE@%%@EH@%%@NL@%
  19081. %@NL@%
  19082.           The response file was not found.%@NL@%
  19083. %@NL@%
  19084. %@CR:MCVcE322@%%@4@%%@AB@%U1184     unexpected end-of-file on command input%@AE@%%@EH@%%@NL@%
  19085. %@NL@%
  19086.           An end-of-file character was received prematurely in response to a%@NL@%
  19087.           prompt.%@NL@%
  19088. %@NL@%
  19089. %@CR:MCVcE323@%%@4@%%@AB@%U1185     cannot create new library%@AE@%%@EH@%%@NL@%
  19090. %@NL@%
  19091.           The disk or root directory was full, or the library file already%@NL@%
  19092.           existed with read-only protection.%@NL@%
  19093. %@NL@%
  19094.           Make space on the disk or change the protection of the library%@NL@%
  19095.           file.%@NL@%
  19096. %@NL@%
  19097. %@CR:MCVcE324@%%@4@%%@AB@%U1186     error writing to new library%@AE@%%@EH@%%@NL@%
  19098. %@NL@%
  19099.           The disk or root directory was full.%@NL@%
  19100. %@NL@%
  19101.           Delete or move files to make space.%@NL@%
  19102. %@NL@%
  19103. %@CR:MCVcE325@%%@4@%%@AB@%U1187     cannot open VM.TMP%@AE@%%@EH@%%@NL@%
  19104. %@NL@%
  19105.           The disk or root directory was full.%@NL@%
  19106. %@NL@%
  19107.           Delete or move files to make space.%@NL@%
  19108. %@NL@%
  19109. %@CR:MCVcE326@%%@4@%%@AB@%U1188     cannot write to VM%@AE@%%@EH@%%@NL@%
  19110. %@NL@%
  19111.           The library manager cannot write to the virtual memory. Note the%@NL@%
  19112.           circumstances of the failure and notify Microsoft Corporation by%@NL@%
  19113.           following the directions in the Microsoft Product Assistance%@NL@%
  19114.           Request form at  the back of one of your manuals.%@NL@%
  19115. %@NL@%
  19116. %@CR:MCVcE327@%%@4@%%@AB@%U1189     cannot read from VM%@AE@%%@EH@%%@NL@%
  19117. %@NL@%
  19118.           The library manager cannot read the virtual memory. Note the%@NL@%
  19119.           circumstances of the error and notify Microsoft Corporation by%@NL@%
  19120.           following the directions in the Microsoft Product Assistance%@NL@%
  19121.           Request form at the back of one of your manuals.%@NL@%
  19122. %@NL@%
  19123. %@CR:MCVcE328@%%@4@%%@AB@%U1190     interrupted by user%@AE@%%@EH@%%@NL@%
  19124. %@NL@%
  19125.           You interrupted %@AB@%LIB%@AE@% during its operation, with CTRL+C or%@NL@%
  19126.           CTRL+BREAK.%@NL@%
  19127. %@NL@%
  19128. %@CR:MCVcE329@%%@4@%%@AB@%U1200%@AE@%     %@AI@%name%@AE@%%@AB@% : invalid library header%@AE@%%@EH@%%@NL@%
  19129. %@NL@%
  19130.           The input library file had an invalid format. It was either not a%@NL@%
  19131.           library file or it had been corrupted.%@NL@%
  19132. %@NL@%
  19133. %@CR:MCVcE330@%%@4@%%@AB@%U1203%@AE@%     %@AI@%name%@AE@%%@AB@% : invalid object module near%@AE@% %@AI@%location%@AE@%%@EH@%%@NL@%
  19134. %@NL@%
  19135.           The module specified by %@AI@%name%@AE@% was not a valid object module.%@NL@%
  19136. %@NL@%
  19137. %@NL@%
  19138. %@CR:MCVc4200@%%@3@%%@AB@%C.4.2  Nonfatal LIB Error Messages%@AE@%%@EH@%%@NL@%
  19139. %@NL@%
  19140. %@CR:MCVcE331@%%@4@%%@AB@%U2152%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot create listing%@AE@%%@EH@%%@NL@%
  19141. %@NL@%
  19142.           The directory or disk was full, or the cross-reference-listing%@NL@%
  19143.           file already existed with read-only protection.%@NL@%
  19144. %@NL@%
  19145.           Make space on the disk or change the protection of the%@NL@%
  19146.           cross-reference-listing file.%@NL@%
  19147. %@NL@%
  19148. %@CR:MCVcE332@%%@4@%%@AB@%U2155%@AE@%     %@AI@%modulename%@AE@%%@AB@% : module not in library; ignored%@AE@%%@EH@%%@NL@%
  19149. %@NL@%
  19150.           The specified module was not found in the input library.%@NL@%
  19151. %@NL@%
  19152. %@CR:MCVcE333@%%@4@%%@AB@%U2157%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot access file%@AE@%%@EH@%%@NL@%
  19153. %@NL@%
  19154.           %@AB@%LIB%@AE@% was unable to open the specified file.%@NL@%
  19155. %@NL@%
  19156. %@CR:MCVcE334@%%@4@%%@AB@%U2158%@AE@%     %@AI@%libraryname%@AE@%%@AB@% : invalid library header; file ignored%@AE@%%@EH@%%@NL@%
  19157. %@NL@%
  19158.           The input library had an incorrect format.%@NL@%
  19159. %@NL@%
  19160. %@CR:MCVcE335@%%@4@%%@AB@%U2159%@AE@%     %@AI@%filename%@AE@%%@AB@% : invalid format%@AE@% %@AI@%hexnumber%@AE@%%@AB@%; file ignored%@AE@%%@EH@%%@NL@%
  19161. %@NL@%
  19162.           The signature byte or word hexnumber of the given file was not one%@NL@%
  19163.           of the following recognized types: Microsoft library, Intel%@NL@%
  19164.           library, Microsoft object, or Xenix archive.%@NL@%
  19165. %@NL@%
  19166. %@NL@%
  19167. %@CR:MCVc4300@%%@3@%%@AB@%C.5.3  Warning LIB Error Messages%@AE@%%@EH@%%@NL@%
  19168. %@NL@%
  19169. %@CR:MCVcE336@%%@4@%%@AB@%U4150%@AE@%     %@AI@%modulename%@AE@%%@AB@% : module redefinition ignored%@AE@%%@EH@%%@NL@%
  19170. %@NL@%
  19171.           A module was specified to be added to a library but a module with%@NL@%
  19172.           the same name was already in the library, or a module with the%@NL@%
  19173.           same name was found more than once in the library.%@NL@%
  19174. %@NL@%
  19175. %@CR:MCVcE337@%%@4@%%@AB@%U4151%@AE@%     %@AI@%name%@AE@%%@AB@% : symbol defined in%@AE@% %@AI@%modulename%@AE@%%@AB@%, redefinition ignored%@AE@%%@EH@%%@NL@%
  19176. %@NL@%
  19177.           The specified symbol was defined in more than one module.%@NL@%
  19178. %@NL@%
  19179. %@CR:MCVcE338@%%@4@%%@AB@%U4153%@AE@%     %@AI@%number%@AE@%%@AB@% : page size too small; ignored%@AE@%%@EH@%%@NL@%
  19180. %@NL@%
  19181.           The value specified in the %@AB@%/PAGESIZE%@AE@% option was less than 16.%@NL@%
  19182. %@NL@%
  19183. %@CR:MCVcE339@%%@4@%%@AB@%U4155%@AE@%     %@AI@%modulename%@AE@%%@AB@% : module not in library%@AE@%%@EH@%%@NL@%
  19184. %@NL@%
  19185.           A module specified to be replaced does not already exist in the%@NL@%
  19186.           library. %@AB@%LIB%@AE@% adds the module anyway.%@NL@%
  19187. %@NL@%
  19188. %@CR:MCVcE340@%%@4@%%@AB@%U4156%@AE@%     %@AI@%libraryname%@AE@%%@AB@% : output-library specification ignored%@AE@%%@EH@%%@NL@%
  19189. %@NL@%
  19190.           An output library was specified in addition to a new library name.%@NL@%
  19191.           For example, specifying%@NL@%
  19192. %@NL@%
  19193.           LIB new.lib+one.obj,new.lst,new.lib%@NL@%
  19194. %@NL@%
  19195.           where %@AS@%new.lib%@AE@% does not already exist, causes this error.%@NL@%
  19196. %@NL@%
  19197. %@CR:MCVcE341@%%@4@%%@AB@%U4157     insufficient memory, extended dictionary not created%@AE@%%@EH@%%@NL@%
  19198. %@NL@%
  19199.           Insufficient memory prevented %@AB@%LIB%@AE@% from creating an extended%@NL@%
  19200.           dictionary. The library is still valid, but the linker will not be%@NL@%
  19201.           able to take advantage of the extended dictionary to speed%@NL@%
  19202.           linking.%@NL@%
  19203. %@NL@%
  19204. %@CR:MCVcE342@%%@4@%%@AB@%U4158     internal error, extended dictionary not created%@AE@%%@EH@%%@NL@%
  19205. %@NL@%
  19206.           An internal error prevented %@AB@%LIB%@AE@% from creating an extended%@NL@%
  19207.           dictionary. The library is still valid, but the linker will not be%@NL@%
  19208.           able to take advantage of the extended dictionary to speed%@NL@%
  19209.           linking.%@NL@%
  19210. %@NL@%
  19211. %@NL@%
  19212. %@CR:MCVc5000@%%@2@%%@AB@%C.5  NMAKE Error Messages%@AE@%%@EH@%%@NL@%
  19213. %@NL@%
  19214. %@CR:MCVc5001@%%@4@%Error messages from the NMAKE utility have one of the following formats:%@EH@%%@NL@%
  19215. %@NL@%
  19216.      {%@AI@%filename%@AE@% | %@AS@%NMAKE%@AE@%} : %@AS@%fatal error U1%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  19217.      {%@AI@%filename%@AE@% | %@AS@%NMAKE%@AE@%} : %@AS@%warning U4%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  19218. %@NL@%
  19219. %@CR:MCVc5002@%%@4@%The message begins with the input-file name (%@AI@%filename%@AE@%) and line number, if%@EH@%
  19220. one exists, or with the name of the utility.%@NL@%
  19221. %@NL@%
  19222. %@CR:MCVc5003@%%@4@%NMAKE generates the following error messages.%@EH@%%@NL@%
  19223. %@NL@%
  19224. %@NL@%
  19225. %@CR:MCVc5100@%%@3@%%@AB@%C.5.1  Fatal NMAKE Error Messages%@AE@%%@EH@%%@NL@%
  19226. %@NL@%
  19227. %@CR:MCVcE343@%%@4@%%@AB@%U1000     syntax error: ')' missing in macro invocation%@AE@%%@EH@%%@NL@%
  19228. %@NL@%
  19229.           A left parenthesis (%@AS@%(%@AE@%) appeared without a matching right%@NL@%
  19230.           parenthesis (%@AS@%)%@AE@%) in a macro invocation. The correct form is%@NL@%
  19231.           $(%@AI@%name%@AE@%), or $%@AI@%n%@AE@% for one-character names.%@NL@%
  19232. %@NL@%
  19233. %@CR:MCVcE344@%%@4@%%@AB@%U1001     syntax error : illegal character '%@AE@%%@AI@%character%@AE@%%@AB@%' in macro%@AE@%%@EH@%%@NL@%
  19234. %@NL@%
  19235.           A nonalphanumeric character other than an underscore (%@AB@%_%@AE@%) appeared%@NL@%
  19236.           in a macro.%@NL@%
  19237. %@NL@%
  19238. %@CR:MCVcE345@%%@4@%%@AB@%U1002     syntax error : bad macro invocation '$'%@AE@%%@EH@%%@NL@%
  19239. %@NL@%
  19240.           A single dollar sign (%@AB@%$%@AE@%) appeared without a macro name associated%@NL@%
  19241.           with it. The correct form is $(%@AI@%name%@AE@%). To use a dollar sign in the%@NL@%
  19242.           file, type it twice or precede it with a caret (%@AB@%^%@AE@%).%@NL@%
  19243. %@NL@%
  19244. %@CR:MCVcE346@%%@4@%%@AB@%U1003     syntax error : '=' missing in macro%@AE@%%@EH@%%@NL@%
  19245. %@NL@%
  19246.           The equal sign (%@AB@%=%@AE@%) was missing in a macro definition. The correct%@NL@%
  19247.           form is '%@AI@%name%@AE@% = %@AI@%value%@AE@%'.%@NL@%
  19248. %@NL@%
  19249. %@CR:MCVcE347@%%@4@%%@AB@%U1004     syntax error : macro name missing%@AE@%%@EH@%%@NL@%
  19250. %@NL@%
  19251.           A macro invocation appeared without a name. The correct form is%@NL@%
  19252.           $(%@AI@%name%@AE@%).%@NL@%
  19253. %@NL@%
  19254. %@CR:MCVcE348@%%@4@%%@AB@%U1005     syntax error : text must follow ':' in macro%@AE@%%@EH@%%@NL@%
  19255. %@NL@%
  19256.           A string substitution was specified for a macro, but the string to%@NL@%
  19257.           be changed in the macro was not specified.%@NL@%
  19258. %@NL@%
  19259. %@CR:MCVcE349@%%@4@%%@AB@%U1016     syntax error : closing '"' missing%@AE@%%@EH@%%@NL@%
  19260. %@NL@%
  19261.           An opening double quotation mark (%@AB@%"%@AE@%) appeared without a closing%@NL@%
  19262.           double quotation mark.%@NL@%
  19263. %@NL@%
  19264. %@CR:MCVcE350@%%@4@%%@AB@%U1017     unknown directive '%@AE@%%@AI@%directive%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19265. %@NL@%
  19266.           The directive specified is not one of the recognized directives.%@NL@%
  19267. %@NL@%
  19268. %@CR:MCVcE351@%%@4@%%@AB@%U1018     directive and/or expression part missing%@AE@%%@EH@%%@NL@%
  19269. %@NL@%
  19270.           The directive is incompletely specified. The expression part is%@NL@%
  19271.           required.%@NL@%
  19272. %@NL@%
  19273. %@CR:MCVcE352@%%@4@%%@AB@%U1019     too many nested if blocks%@AE@%%@EH@%%@NL@%
  19274. %@NL@%
  19275.           Note the circumstances of the failure and notify Microsoft%@NL@%
  19276.           Corporation by following the directions in the Microsoft Product%@NL@%
  19277.           Assistance Request form at the back of one of your manuals.%@NL@%
  19278. %@NL@%
  19279. %@CR:MCVcE353@%%@4@%%@AB@%U1020     EOF found before next directive%@AE@%%@EH@%%@NL@%
  19280. %@NL@%
  19281.           A directive, such as %@AB@%!ENDIF%@AE@%, was missing.%@NL@%
  19282. %@NL@%
  19283. %@CR:MCVcE354@%%@4@%%@AB@%U1021     syntax error : else unexpected%@AE@%%@EH@%%@NL@%
  19284. %@NL@%
  19285.           An %@AB@%!ELSE%@AE@% directive was found that was not preceded by %@AB@%!IF%@AE@%, %@AB@%!IFDEF%@AE@%,%@NL@%
  19286.           or %@AB@%!IFNDEF%@AE@%, or was placed in a syntactically incorrect place.%@NL@%
  19287. %@NL@%
  19288. %@CR:MCVcE355@%%@4@%%@AB@%U1022     Missing terminating char for string/program invocation :%@AE@%%@EH@%%@NL@%
  19289.           '%@AI@%character%@AE@%'%@NL@%
  19290. %@NL@%
  19291.           The closing double quotation mark (%@AB@%"%@AE@%) in a string comparison in a%@NL@%
  19292.           directive was missing, or the closing bracket (%@AB@%]%@AE@%) in a program%@NL@%
  19293.           invocation in a directive was missing.%@NL@%
  19294. %@NL@%
  19295. %@CR:MCVcE356@%%@4@%%@AB@%U1023     syntax error present in expression%@AE@%%@EH@%%@NL@%
  19296. %@NL@%
  19297.           An expression is invalid. Check the allowed operators and operator%@NL@%
  19298.           precedence.%@NL@%
  19299. %@NL@%
  19300. %@CR:MCVcE357@%%@4@%%@AB@%U1024     illegal argument to !CMDSWITCHES%@AE@%%@EH@%%@NL@%
  19301. %@NL@%
  19302.           An unrecognized command switch was specified.%@NL@%
  19303. %@NL@%
  19304. %@CR:MCVcE358@%%@4@%%@AB@%U1031     file name missing%@AE@%%@EH@%%@NL@%
  19305. %@NL@%
  19306.           An include directive was found, but the name of the file to%@NL@%
  19307.           include was missing.%@NL@%
  19308. %@NL@%
  19309. %@CR:MCVcE359@%%@4@%%@AB@%U1033     syntax error : '%@AE@%%@AI@%string%@AE@%%@AB@%' unexpected%@AE@%%@EH@%%@NL@%
  19310. %@NL@%
  19311.           The specified string is not part of the valid syntax for a%@NL@%
  19312.           makefile.%@NL@%
  19313. %@NL@%
  19314. %@CR:MCVcE360@%%@4@%%@AB@%U1034     syntax error : separator missing%@AE@%%@EH@%%@NL@%
  19315. %@NL@%
  19316.           The colon (%@AB@%:%@AE@%) that separates target(s) and dependent(s) is%@NL@%
  19317.           missing.%@NL@%
  19318. %@NL@%
  19319. %@CR:MCVcE361@%%@4@%%@AB@%U1035     syntax error : expected separator or '='%@AE@%%@EH@%%@NL@%
  19320. %@NL@%
  19321.           Either a colon (%@AB@%:%@AE@%), implying a dependency line, or an equal sign%@NL@%
  19322.           (%@AB@%=%@AE@%), implying a macro definition, was expected.%@NL@%
  19323. %@NL@%
  19324. %@CR:MCVcE362@%%@4@%%@AB@%U1036     syntax error : too many names to left of '='%@AE@%%@EH@%%@NL@%
  19325. %@NL@%
  19326.           Only one string is allowed to the left of a macro definition.%@NL@%
  19327. %@NL@%
  19328. %@CR:MCVcE363@%%@4@%%@AB@%U1037     syntax error : target name missing%@AE@%%@EH@%%@NL@%
  19329. %@NL@%
  19330.           A colon (%@AB@%:%@AE@%) was found before a target name was found. At least one%@NL@%
  19331.           target is required.%@NL@%
  19332. %@NL@%
  19333. %@CR:MCVcE364@%%@4@%%@AB@%U1038     internal error : lexer%@AE@%%@EH@%%@NL@%
  19334. %@NL@%
  19335.           Note the circumstances of the failure and notify Microsoft%@NL@%
  19336.           Corporation by following the directions in the Microsoft Product%@NL@%
  19337.           Assistance Request form at the back of one of your manuals.%@NL@%
  19338. %@NL@%
  19339. %@CR:MCVcE365@%%@4@%%@AB@%U1039     internal error : parser%@AE@%%@EH@%%@NL@%
  19340. %@NL@%
  19341.           Note the circumstances of the failure and notify Microsoft%@NL@%
  19342.           Corporation by following the directions in the Microsoft Product%@NL@%
  19343.           Assistance Request form at the back of one of your manuals.%@NL@%
  19344. %@NL@%
  19345. %@CR:MCVcE366@%%@4@%%@AB@%U1040     internal error : macro-expansion%@AE@%%@EH@%%@NL@%
  19346. %@NL@%
  19347.           Note the circumstances of the failure and notify Microsoft%@NL@%
  19348.           Corporation by following the directions in the Microsoft Product%@NL@%
  19349.           Assistance Request form at the back of one of your manuals.%@NL@%
  19350. %@NL@%
  19351. %@CR:MCVcE367@%%@4@%%@AB@%U1041     internal error : target building%@AE@%%@EH@%%@NL@%
  19352. %@NL@%
  19353.           Note the circumstances of the failure and notify Microsoft%@NL@%
  19354.           Corporation by following the directions in the Microsoft Product%@NL@%
  19355.           Assistance Request form at the back of one of your manuals.%@NL@%
  19356. %@NL@%
  19357. %@CR:MCVcE368@%%@4@%%@AB@%U1042     internal error : expression stack overflow%@AE@%%@EH@%%@NL@%
  19358. %@NL@%
  19359.           Note the circumstances of the failure and notify Microsoft%@NL@%
  19360.           Corporation by following the directions in the Microsoft Product%@NL@%
  19361.           Assistance Request form at the back of one of your manuals.%@NL@%
  19362. %@NL@%
  19363. %@CR:MCVcE369@%%@4@%%@AB@%U1043     internal error : temp file limit exceeded%@AE@%%@EH@%%@NL@%
  19364. %@NL@%
  19365.           Note the circumstances of the failure and notify Microsoft%@NL@%
  19366.           Corporation by following  the directions in the Microsoft Product%@NL@%
  19367.           Assistance Request form at the back of one of your manuals.%@NL@%
  19368. %@NL@%
  19369. %@CR:MCVcE370@%%@4@%%@AB@%U1044     internal error : too many levels of recursion building a target%@AE@%%@EH@%%@NL@%
  19370. %@NL@%
  19371.           Note the circumstances of the failure and notify Microsoft%@NL@%
  19372.           Corporation by following the directions in the Microsoft Product%@NL@%
  19373.           Assistance Request form at the back of one of your manuals.%@NL@%
  19374. %@NL@%
  19375. %@CR:MCVcE371@%%@4@%%@AB@%U1050%@AE@%     %@AI@%user-specified text%@AE@%%@EH@%%@NL@%
  19376. %@NL@%
  19377.           The message specified with the %@AB@%!ERROR%@AE@% directive is displayed.%@NL@%
  19378. %@NL@%
  19379. %@CR:MCVcE372@%%@4@%%@AB@%U1051     '%@AE@%%@AI@%progname%@AE@%%@AB@%' usage : [-acdeinpqrst -f makefile -x stderrfile]%@AE@%%@EH@%%@NL@%
  19380.           %@AB@%[macrodefs] [targets]%@AE@%%@NL@%
  19381. %@NL@%
  19382.           An error was made trying to invoke %@AB@%NMAKE%@AE@%.%@NL@%
  19383. %@NL@%
  19384.           Use the specified form.%@NL@%
  19385. %@NL@%
  19386. %@CR:MCVcE373@%%@4@%%@AB@%U1052     out of memory%@AE@%%@EH@%%@NL@%
  19387. %@NL@%
  19388.           The program ran out of space in the far heap. Split the%@NL@%
  19389.           description into smaller and simpler pieces.%@NL@%
  19390. %@NL@%
  19391. %@CR:MCVcE374@%%@4@%%@AB@%U1053     file '%@AE@%%@AI@%filename%@AE@%%@AB@%' not found%@AE@%%@EH@%%@NL@%
  19392. %@NL@%
  19393.           The file was not found. The file name might not be properly%@NL@%
  19394.           specified in the makefile.%@NL@%
  19395. %@NL@%
  19396. %@CR:MCVcE375@%%@4@%%@AB@%U1054     file '%@AE@%%@AI@%filename%@AE@%%@AB@%' unreadable%@AE@%%@EH@%%@NL@%
  19397. %@NL@%
  19398.           The file cannot be read. The file might not have the appropriate%@NL@%
  19399.           attributes for reading.%@NL@%
  19400. %@NL@%
  19401. %@CR:MCVcE376@%%@4@%%@AB@%U1055     can't create response file '%@AE@%%@AI@%filename%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19402. %@NL@%
  19403.           The response file cannot be created.%@NL@%
  19404. %@NL@%
  19405. %@CR:MCVcE377@%%@4@%%@AB@%U1056     out of environment space%@AE@%%@EH@%%@NL@%
  19406. %@NL@%
  19407.           The environment space limit was reached.%@NL@%
  19408. %@NL@%
  19409.           Restart the program with a larger environment space.%@NL@%
  19410. %@NL@%
  19411. %@CR:MCVcE378@%%@4@%%@AB@%U1057     can't find command.com%@AE@%%@EH@%%@NL@%
  19412. %@NL@%
  19413.           The %@AB@%COMMAND.COM%@AE@% file could not be found.%@NL@%
  19414. %@NL@%
  19415. %@CR:MCVcE379@%%@4@%%@AB@%U1058     unlink of file '%@AE@%%@AI@%filename%@AE@%%@AB@%' failed%@AE@%%@EH@%%@NL@%
  19416. %@NL@%
  19417.           Unlink of the temporary response file failed.%@NL@%
  19418. %@NL@%
  19419. %@CR:MCVcE380@%%@4@%%@AB@%U1059     terminated by user%@AE@%%@EH@%%@NL@%
  19420. %@NL@%
  19421.           Execution of %@AB@%NMAKE%@AE@% aborted because you typed CTRL+C or CTRL+BREAK.%@NL@%
  19422. %@NL@%
  19423. %@CR:MCVcE381@%%@4@%%@AB@%U1070     cycle in macro definition '%@AE@%%@AI@%macroname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19424. %@NL@%
  19425.           A circular definition was detected in the macro definition%@NL@%
  19426.           specified. This is an invalid definition.%@NL@%
  19427. %@NL@%
  19428. %@CR:MCVcE382@%%@4@%%@AB@%U1071     cycle in dependency tree for target '%@AE@%%@AI@%targetname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19429. %@NL@%
  19430.           A circular dependency was detected in the dependency tree for the%@NL@%
  19431.           specified target. This is invalid.%@NL@%
  19432. %@NL@%
  19433. %@CR:MCVcE383@%%@4@%%@AB@%U1072     cycle in include files%@AE@% %@AI@%filenames%@AE@%%@EH@%%@NL@%
  19434. %@NL@%
  19435.           A circular inclusion was detected in the include files specified.%@NL@%
  19436.           That is, each file includes the other.%@NL@%
  19437. %@NL@%
  19438. %@CR:MCVcE384@%%@4@%%@AB@%U1073     don't know how to make '%@AE@%%@AI@%targetname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19439. %@NL@%
  19440.           The specified target does not exist and there are no commands to%@NL@%
  19441.           execute or inference rules given for it. Hence it cannot be built.%@NL@%
  19442. %@NL@%
  19443. %@CR:MCVcE385@%%@4@%%@AB@%U1074     macro definition too long%@AE@%%@EH@%%@NL@%
  19444. %@NL@%
  19445.           The macro definition is too long.%@NL@%
  19446. %@NL@%
  19447. %@CR:MCVcE386@%%@4@%%@AB@%U1075     string too long%@AE@%%@EH@%%@NL@%
  19448. %@NL@%
  19449.           The text string would overflow an internal buffer.%@NL@%
  19450. %@NL@%
  19451. %@CR:MCVcE387@%%@4@%%@AB@%U1076     name too long%@AE@%%@EH@%%@NL@%
  19452. %@NL@%
  19453.           The macro name, target name, or build-command name would overflow%@NL@%
  19454.           an internal buffer. Macro names may be at most 128 characters.%@NL@%
  19455. %@NL@%
  19456. %@CR:MCVcE388@%%@4@%%@AB@%U1077     '%@AE@%%@AI@%program%@AE@%%@AB@%' : return code%@AE@% %@AI@%value%@AE@%%@EH@%%@NL@%
  19457. %@NL@%
  19458.           The given program invoked from %@AB@%NMAKE%@AE@% failed, returning the error%@NL@%
  19459.           code %@AI@%value%@AE@%.%@NL@%
  19460. %@NL@%
  19461. %@CR:MCVcE389@%%@4@%%@AB@%U1078     constant overflow at '%@AE@%%@AI@%directive%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19462. %@NL@%
  19463.           A constant in %@AI@%directive%@AE@%'s expression was too big.%@NL@%
  19464. %@NL@%
  19465. %@CR:MCVcE390@%%@4@%%@AB@%U1079     illegal expression: divide by zero present%@AE@%%@EH@%%@NL@%
  19466. %@NL@%
  19467.           An expression tries to divide by zero.%@NL@%
  19468. %@NL@%
  19469. %@CR:MCVcE391@%%@4@%%@AB@%U1080     operator and/or operand out of place: usage illegal%@AE@%%@EH@%%@NL@%
  19470. %@NL@%
  19471.           The expression incorrectly uses an operator or operand.%@NL@%
  19472. %@NL@%
  19473.           Check the allowed set of operators and their precedence.%@NL@%
  19474. %@NL@%
  19475. %@CR:MCVcE392@%%@4@%%@AB@%U1081     '%@AE@%%@AI@%program%@AE@%%@AB@%' : program not found%@AE@%%@EH@%%@NL@%
  19476. %@NL@%
  19477.           %@AB@%NMAKE%@AE@% could not find the given program in order to run it.%@NL@%
  19478. %@NL@%
  19479.           Make sure that the program is in the current path and has the%@NL@%
  19480.           correct extension.%@NL@%
  19481. %@NL@%
  19482. %@CR:MCVcE393@%%@4@%%@AB@%U1082%@AE@%     %@AI@%command%@AE@%%@AB@% cannot execute command: out of memory%@AE@%%@EH@%%@NL@%
  19483.  
  19484. %@NL@%
  19485.           %@AB@%NMAKE%@AE@% cannot execute the given command because there is not enough%@NL@%
  19486.           memory. Free memory and run %@AB@%NMAKE%@AE@% again.%@NL@%
  19487. %@NL@%
  19488. %@CR:MCVcE394@%%@4@%%@AB@%U1085     can't mix implicit and explicit rules%@AE@%%@EH@%%@NL@%
  19489. %@NL@%
  19490.           A regular target was specified along with the target for a rule%@NL@%
  19491.           (which has the form .%@AI@%fromext%@AE@%.%@AI@%toext%@AE@%). This is invalid.%@NL@%
  19492. %@NL@%
  19493. %@CR:MCVcE395@%%@4@%%@AB@%U1086     inference rule can't have dependents%@AE@%%@EH@%%@NL@%
  19494. %@NL@%
  19495.           Dependents are not allowed when an inference rule is being%@NL@%
  19496.           defined.%@NL@%
  19497. %@NL@%
  19498. %@CR:MCVcE396@%%@4@%%@AB@%U1087     can't have : and :: dependents for same target%@AE@%%@EH@%%@NL@%
  19499. %@NL@%
  19500.           A target cannot have both a single-colon (%@AB@%:%@AE@%) and a double-colon%@NL@%
  19501.           (%@AB@%::%@AE@%) dependency.%@NL@%
  19502. %@NL@%
  19503. %@CR:MCVcE397@%%@4@%%@AB@%U1088     invalid separator on inference rules: '::'%@AE@%%@EH@%%@NL@%
  19504. %@NL@%
  19505.           Inference rules can use only a single-colon (%@AB@%:%@AE@%) separator.%@NL@%
  19506. %@NL@%
  19507. %@CR:MCVcE398@%%@4@%%@AB@%U1089     can't have build commands for pseudotarget '%@AE@%%@AI@%targetname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19508. %@NL@%
  19509.           Pseudotargets (for example, %@AB@%.PRECIOUS%@AE@%, .SUFFIXES) cannot have%@NL@%
  19510.           build commands specified.%@NL@%
  19511. %@NL@%
  19512. %@CR:MCVcE399@%%@4@%%@AB@%U1090     can't have dependents for pseudotarget '%@AE@%%@AI@%targetname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19513. %@NL@%
  19514.           The specified pseudotarget (for example, %@AB@%.SILENT%@AE@%, %@AB@%.IGNORE%@AE@%) cannot%@NL@%
  19515.           have a dependent.%@NL@%
  19516. %@NL@%
  19517. %@CR:MCVcE400@%%@4@%%@AB@%U1091     invalid suffixes in inference rule%@AE@%%@EH@%%@NL@%
  19518. %@NL@%
  19519.           The suffixes being used in the inference rule are invalid.%@NL@%
  19520. %@NL@%
  19521. %@CR:MCVcE401@%%@4@%%@AB@%U1092     too many names in rule%@AE@%%@EH@%%@NL@%
  19522. %@NL@%
  19523.           An inference rule cannot have more than one pair of extensions%@NL@%
  19524.           (.%@AI@%fromext%@AE@%.%@AI@%toext%@AE@%) as a target.%@NL@%
  19525. %@NL@%
  19526. %@CR:MCVcE402@%%@4@%%@AB@%U1093     can't mix special pseudotargets%@AE@%%@EH@%%@NL@%
  19527. %@NL@%
  19528.           It is illegal to list two or more pseudotargets together.%@NL@%
  19529. %@NL@%
  19530. %@NL@%
  19531. %@CR:MCVc5200@%%@3@%%@AB@%C.5.2  Warning NMAKE Error Messages%@AE@%%@EH@%%@NL@%
  19532. %@NL@%
  19533. %@CR:MCVcE403@%%@4@%%@AB@%U4011     command file can only be invoked from command line%@AE@%%@EH@%%@NL@%
  19534. %@NL@%
  19535.           A command file cannot be invoked from within another command file.%@NL@%
  19536.           Such an invocation is ignored.%@NL@%
  19537. %@NL@%
  19538. %@CR:MCVcE404@%%@4@%%@AB@%U4012     resetting value of special macro '%@AE@%%@AI@%macroname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19539. %@NL@%
  19540.           The value of a macro such as $(%@AB@%MAKE%@AE@%) was changed within a%@NL@%
  19541.           description file.%@NL@%
  19542. %@NL@%
  19543.           The name by which this program was invoked is not a tagged section%@NL@%
  19544.           in the %@AB@%TOOLS.INI%@AE@% file.%@NL@%
  19545. %@NL@%
  19546. %@CR:MCVcE405@%%@4@%%@AB@%U4015     no match found for wildcard '%@AE@%%@AI@%filename%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19547. %@NL@%
  19548.           There are no file names that match the specified target or%@NL@%
  19549.           dependent file with the wild-card characters asterisk (%@AB@%*%@AE@%) and%@NL@%
  19550.           question mark (%@AB@%?%@AE@%).%@NL@%
  19551. %@NL@%
  19552. %@CR:MCVcE406@%%@4@%%@AB@%U4016     too many rules for target '%@AE@%%@AI@%targetname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19553. %@NL@%
  19554.           Multiple blocks of build commands are specified for a target using%@NL@%
  19555.           single colons (%@AB@%:%@AE@%) as separators.%@NL@%
  19556. %@NL@%
  19557. %@CR:MCVcE407@%%@4@%%@AB@%U4017     ignoring rule%@AE@% %@AI@%rule%@AE@%%@AB@% (extension not in .SUFFIXES)%@AE@%%@EH@%%@NL@%
  19558. %@NL@%
  19559.           The rule was ignored because the suffix(es) in the rule are not%@NL@%
  19560.           listed in the %@AB@%.SUFFIXES%@AE@% list.%@NL@%
  19561. %@NL@%
  19562. %@CR:MCVcE408@%%@4@%%@AB@%U4018     special macro undefined '%@AE@%%@AI@%macroname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19563. %@NL@%
  19564.           The special macro %@AI@%macroname%@AE@% is undefined.%@NL@%
  19565. %@NL@%
  19566. %@CR:MCVcE409@%%@4@%%@AB@%U4019     Filename '%@AE@%%@AI@%filename%@AE@%%@AB@%' too long; truncating to 8.3%@AE@%%@EH@%%@NL@%
  19567. %@NL@%
  19568.           The base name of the file has more than eight characters or the%@NL@%
  19569.           extension has more than three characters. %@AB@%NMAKE%@AE@% truncates the name%@NL@%
  19570.           to an eight-character base and a three-character extension.%@NL@%
  19571. %@NL@%
  19572. %@CR:MCVcE410@%%@4@%%@AB@%U4020     removed target '%@AE@%%@AI@%target%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  19573. %@NL@%
  19574.           Execution of %@AB@%NMAKE%@AE@% was interrupted while it was trying to build%@NL@%
  19575.           the given target, and therefore the target was incomplete. Because%@NL@%
  19576.           the target was not specified in the %@AB@%.PRECIOUS%@AE@% list, %@AB@%NMAKE%@AE@% has%@NL@%
  19577.           deleted it.%@NL@%
  19578. %@NL@%
  19579. %@NL@%
  19580. %@CR:MCVc6000@%%@2@%%@AB@%C.6  EXEMOD Error Messages%@AE@%%@EH@%%@NL@%
  19581. %@NL@%
  19582. %@CR:MCVc6001@%%@4@%Error messages from the Microsoft EXE File Header Utility, EXEMOD, have one%@EH@%
  19583. of the following formats:%@NL@%
  19584. %@NL@%
  19585.      {%@AI@%filename%@AE@%| %@AS@%EXEMOD%@AE@%} : %@AS@%fatal error U1%@AE@%%@AI@%xxx%@AE@%:%@AI@%messagetext%@AE@%%@NL@%
  19586.      {%@AI@%filename%@AE@%| %@AS@%EXEMOD%@AE@%} : %@AS@%warning U4%@AE@%%@AI@%xxx%@AE@%:%@AI@% messagetext%@AE@%%@NL@%
  19587. %@NL@%
  19588. %@CR:MCVc6002@%%@4@%The message begins with the input-file name (%@AI@%filename%@AE@%), if one exists, or%@EH@%
  19589. with the name of the utility. If possible, %@AB@%EXEMOD%@AE@% prints a warning and
  19590. continues operation. In some cases errors are fatal and %@AB@%EXEMOD%@AE@% terminates
  19591. processing.%@NL@%
  19592. %@NL@%
  19593. %@CR:MCVc6003@%%@4@%EXEMOD generates the following error messages:%@EH@%%@NL@%
  19594. %@NL@%
  19595. %@NL@%
  19596. %@CR:MCVc6100@%%@3@%%@AB@%C.6.1  Fatal EXEMOD Error Messages%@AE@%%@EH@%%@NL@%
  19597. %@NL@%
  19598. %@CR:MCVcE411@%%@4@%%@AB@%U1050     usage : exemod file [-/h] [-/stack n] [-/max n] [-/min n]%@AE@%%@EH@%%@NL@%
  19599. %@NL@%
  19600.           The %@AB@%EXEMOD%@AE@% command line was not specified properly.%@NL@%
  19601. %@NL@%
  19602.           Try again using the syntax shown. Note that the option indicator%@NL@%
  19603.           can be either a slash (%@AB@%/%@AE@%) or a hyphen (%@AB@%-%@AE@%). The single brackets%@NL@%
  19604.           (%@AB@%[ ]%@AE@%) in the error message indicate that your choice of the item%@NL@%
  19605.           within them is optional.%@NL@%
  19606. %@NL@%
  19607. %@CR:MCVcE412@%%@4@%%@AB@%U1051     invalid .EXE file : bad header%@AE@%%@EH@%%@NL@%
  19608. %@NL@%
  19609.           The specified input file is not an executable file or it has an%@NL@%
  19610.           invalid file header.%@NL@%
  19611. %@NL@%
  19612. %@CR:MCVcE413@%%@4@%%@AB@%U1052     invalid .EXE file : actual length less than reported%@AE@%%@EH@%%@NL@%
  19613. %@NL@%
  19614.           The second and third fields in the input-file header indicate a%@NL@%
  19615.           file size greater than the actual size.%@NL@%
  19616. %@NL@%
  19617. %@CR:MCVcE414@%%@4@%%@AB@%U1053     cannot change load-high program%@AE@%%@EH@%%@NL@%
  19618. %@NL@%
  19619.           When the minimum allocation value and the maximum allocation value%@NL@%
  19620.           are both 0, the file cannot be modified.%@NL@%
  19621. %@NL@%
  19622. %@CR:MCVcE415@%%@4@%%@AB@%U1054     file not .EXE%@AE@%%@EH@%%@NL@%
  19623. %@NL@%
  19624.           %@AB@%EXEMOD%@AE@% automatically appends the %@AB@%.EXE%@AE@% extension to any file name%@NL@%
  19625.           without an extension; in this case, no file with the given name%@NL@%
  19626.           and an %@AB@%.EXE%@AE@% extension could be found.%@NL@%
  19627. %@NL@%
  19628. %@CR:MCVcE416@%%@4@%%@AB@%U1055%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot find file%@AE@%%@EH@%%@NL@%
  19629. %@NL@%
  19630.           The file specified by %@AI@%filename%@AE@% could not be found.%@NL@%
  19631. %@NL@%
  19632. %@CR:MCVcE417@%%@4@%%@AB@%U1056%@AE@%     %@AI@%filename%@AE@%%@AB@% : permission denied%@AE@%%@EH@%%@NL@%
  19633. %@NL@%
  19634.           The file specified by %@AI@%filename%@AE@% was a read only file.%@NL@%
  19635. %@NL@%
  19636. %@NL@%
  19637. %@CR:MCVc6200@%%@3@%%@AB@%C.6.2  Warning EXEMOD Error Messages%@AE@%%@EH@%%@NL@%
  19638. %@NL@%
  19639. %@CR:MCVcE418@%%@4@%%@AB@%U4050     packed file%@AE@%%@EH@%%@NL@%
  19640. %@NL@%
  19641.           The given file was a packed file. This is a warning only.%@NL@%
  19642. %@NL@%
  19643. %@CR:MCVcE419@%%@4@%%@AB@%U4051     minimum allocation less than stack; correcting minimum%@AE@%%@EH@%%@NL@%
  19644. %@NL@%
  19645.           If the minimum allocation value is not enough to accommodate the%@NL@%
  19646.           stack (either the original stack request or the modified request),%@NL@%
  19647.           the minimum allocation value is adjusted. This is a warning%@NL@%
  19648.           message only; the modification is still performed.%@NL@%
  19649. %@NL@%
  19650. %@CR:MCVcE420@%%@4@%%@AB@%U4052     minimum allocation greater than maximum; correcting maximum%@AE@%%@EH@%%@NL@%
  19651. %@NL@%
  19652.           If the minimum allocation value is greater than the maximum%@NL@%
  19653.           allocation value, the maximum allocation value is adjusted. This%@NL@%
  19654.           is a warning message only; %@AB@%EXEMOD%@AE@% will still modify the file. The%@NL@%
  19655.           values shown if you ask for a display of DOS header values will be%@NL@%
  19656.           the values after the packed file is expanded.%@NL@%
  19657. %@NL@%
  19658. %@NL@%
  19659. %@CR:MCVc7000@%%@2@%%@AB@%C.7  SETENV Error Messages%@AE@%%@EH@%%@NL@%
  19660. %@NL@%
  19661. %@CR:MCVc7001@%%@4@%Messages generated by the Microsoft Environment Expansion Utility, SETENV,%@EH@%
  19662. have the following format:%@NL@%
  19663. %@NL@%
  19664.      {%@AI@%filename%@AE@% | %@AS@%SETENV%@AE@%} :%@AS@%fatal error U1%@AE@%%@AI@%xxx%@AE@%%@AS@%:%@AE@%%@AI@%messagetext%@AE@%%@NL@%
  19665. %@NL@%
  19666. %@CR:MCVc7002@%%@4@%The message begins with the input-file name (%@AI@%filename%@AE@%), if one exists, or%@EH@%
  19667. with the name of the utility.%@NL@%
  19668. %@NL@%
  19669. %@CR:MCVc7003@%%@4@%SETENV generates the following fatal error messages:%@EH@%%@NL@%
  19670. %@NL@%
  19671. %@CR:MCVcE421@%%@4@%%@AB@%U1080     usage : setenv <command.com> [envsize]%@AE@%%@EH@%%@NL@%
  19672. %@NL@%
  19673.           The command line was not specified properly. This usually%@NL@%
  19674.           indicates that the wrong number of arguments was given.%@NL@%
  19675. %@NL@%
  19676.           Try again with the syntax shown in the message.%@NL@%
  19677. %@NL@%
  19678. %@CR:MCVcE422@%%@4@%%@AB@%U1081     unrecognizable COMMAND.COM%@AE@%%@EH@%%@NL@%
  19679. %@NL@%
  19680.           The %@AB@%COMMAND.COM%@AE@% file was not one of the accepted versions (DOS%@NL@%
  19681.           Versions 2.0, 2.1, 2.11, 3.0, and 3.1).%@NL@%
  19682. %@NL@%
  19683. %@CR:MCVcE423@%%@4@%%@AB@%U1082     maximum for Version 3.1 : 992%@AE@%%@EH@%%@NL@%
  19684. %@NL@%
  19685.           You specified a file recognized as %@AB@%COMMAND.COM%@AE@% for IBM PC-DOS,%@NL@%
  19686.           Version 3.1, and gave an environment size greater than 992 bytes,%@NL@%
  19687.           the maximum allowed for that version.%@NL@%
  19688. %@NL@%
  19689. %@CR:MCVcE424@%%@4@%%@AB@%U1083     maximum environment size : 65520%@AE@%%@EH@%%@NL@%
  19690. %@NL@%
  19691.           The environment size specified was greater than 65,520 bytes, the%@NL@%
  19692.           maximum size allowed.%@NL@%
  19693. %@NL@%
  19694. %@CR:MCVcE425@%%@4@%%@AB@%U1084     minimum environment size : 160%@AE@%%@EH@%%@NL@%
  19695. %@NL@%
  19696.           The environment size specified was less than 160 bytes, the%@NL@%
  19697.           minimum size allowed.%@NL@%
  19698. %@NL@%
  19699. %@CR:MCVcE426@%%@4@%%@AB@%U1085%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot find file%@AE@%%@EH@%%@NL@%
  19700. %@NL@%
  19701.           The specified file was not found, perhaps because it was a%@NL@%
  19702.           directory or some other special file.%@NL@%
  19703. %@NL@%
  19704. %@CR:MCVcE427@%%@4@%%@AB@%U1086%@AE@%     %@AI@%filename%@AE@%%@AB@% : permission denied%@AE@%%@EH@%%@NL@%
  19705. %@NL@%
  19706.           The specified file was a read only file.%@NL@%
  19707. %@NL@%
  19708. %@CR:MCVcE428@%%@4@%%@AB@%U1087%@AE@%     %@AI@%filename%@AE@%%@AB@% : unknown error%@AE@%%@EH@%%@NL@%
  19709. %@NL@%
  19710.           An unknown system error occurred while the specified file was%@NL@%
  19711.           being read or written.%@NL@%
  19712. %@NL@%
  19713. %@NL@%
  19714. %@CR:MCVg0000@%%@1@%%@AB@%Glossary%@AE@%%@EH@%%@NL@%
  19715. ───────────────────────────────────────────────────────────────────────────%@NL@%
  19716. %@NL@%
  19717. %@CR:MCVgD001@%%@4@%%@AB@%8087 or 80287 coprocessor%@AE@%%@EH@%%@NL@%
  19718.   Intel hardware products that perform much faster math calculations than
  19719.   the main processor.%@NL@%
  19720. %@NL@%
  19721. %@CR:MCVgD002@%%@4@%%@AB@%adapter%@AE@%%@EH@%%@NL@%
  19722.   A term sometimes used to refer to printed-circuit cards that plug into a
  19723.   computer and control a device, such as a video display or a printer.%@NL@%
  19724. %@NL@%
  19725. %@CR:MCVgD003@%%@4@%%@AB@%address%@AE@%%@EH@%%@NL@%
  19726.   An expression that evaluates to a location in memory. Addresses can be
  19727.   given in the segment offset format. If the segment is not given, the
  19728.   default segment is assumed. The default segment is CS for commands related
  19729.   to code and DS for commands related to data.%@NL@%
  19730. %@NL@%
  19731. %@CR:MCVgD004@%%@4@%%@AB@%address range%@AE@%%@EH@%%@NL@%
  19732.   A range of memory bounded by two addresses. The range can be specified in
  19733.   the normal format by giving the starting and ending addresses (inclusive),
  19734.   or it can be specified in the object-range format by specifying the
  19735.   starting address followed first by the letter (uppercase or lowercase) and
  19736.   then by the number of objects in the range (0x100 L 10, for example,
  19737.   specifies the range from 0x100 to 0x109, inclusive).%@NL@%
  19738. %@NL@%
  19739. %@CR:MCVgD005@%%@4@%%@AB@%Applications Program Interface (API)%@AE@%%@EH@%%@NL@%
  19740.   The set of calls a program uses to obtain services from the operating
  19741.   system. The term API denotes a service interface, whatever its form.
  19742.   Generally used to refer to OS/2 system calls.%@NL@%
  19743. %@NL@%
  19744. %@CR:MCVgD006@%%@4@%%@AB@%argc%@AE@%%@EH@%%@NL@%
  19745.   The conventional name for the first argument to the main function in a C
  19746.   source program (an integer specifying how many arguments are passed to the
  19747.   program from the command line).%@NL@%
  19748. %@NL@%
  19749. %@CR:MCVgD007@%%@4@%%@AB@%argument%@AE@%%@EH@%%@NL@%
  19750.   A value passed to a function.%@NL@%
  19751. %@NL@%
  19752. %@CR:MCVgD008@%%@4@%%@AB@%argv%@AE@%%@EH@%%@NL@%
  19753.   The conventional name for the second argument to the main function in a C
  19754.   source program (a pointer to an array of strings). The first string is the
  19755.   program name and each following string is an argument passed to the
  19756.   program from the command line.%@NL@%
  19757. %@NL@%
  19758. %@CR:MCVgD009@%%@4@%%@AB@%array%@AE@%%@EH@%%@NL@%
  19759.   A set of elements with the same type.%@NL@%
  19760. %@NL@%
  19761. %@CR:MCVgD010@%%@4@%%@AB@%ASCII (American Standard Code for Information Interchange)%@AE@%%@EH@%%@NL@%
  19762.   A set of 256 codes that many computers use to represent letters, digits,
  19763.   special characters, and other symbols.  Only the first 128 of these codes
  19764.   are standardized; the remaining 128 are special characters defined by the
  19765.   computer manufacturer.%@NL@%
  19766. %@NL@%
  19767. %@CR:MCVgD011@%%@4@%%@AB@%assembly mode%@AE@%%@EH@%%@NL@%
  19768.   The mode in which the CodeView debugger displays assembly-language-
  19769.   instruction mnemonics to represent the code being executed.%@NL@%
  19770. %@NL@%
  19771. %@CR:MCVgD012@%%@4@%%@AB@%base name%@AE@%%@EH@%%@NL@%
  19772.   The part of a file name before the extension. For example, SAMPLE is the
  19773.   base name of the file SAMPLE.BAS.%@NL@%
  19774. %@NL@%
  19775. %@CR:MCVgD013@%%@4@%%@AB@%BASIC%@AE@%%@EH@%%@NL@%
  19776.   A programming language included with versions of DOS. BASIC is an acronym
  19777.   for Beginner's All-purpose Symbolic Instruction Code.%@NL@%
  19778. %@NL@%
  19779. %@CR:MCVgD014@%%@4@%%@AB@%Basic Input/Output System (BIOS)%@AE@%%@EH@%%@NL@%
  19780.   The code built into system memory that provides hardware interface
  19781.   routines for programs. You can trace into the BIOS with the CodeView
  19782.   debugger, using assembly mode.%@NL@%
  19783. %@NL@%
  19784. %@CR:MCVgD015@%%@4@%%@AB@%batch file%@AE@%%@EH@%%@NL@%
  19785.   A text file containing MS-DOS commands that can be invoked from the MS-DOS
  19786.   command line.%@NL@%
  19787. %@NL@%
  19788. %@CR:MCVgD016@%%@4@%%@AB@%breakpoint%@AE@%%@EH@%%@NL@%
  19789.   A specified address where program execution will be halted. The CodeView
  19790.   debugger interrupts execution whenever the program reaches an address
  19791.   where a breakpoint has been set. See also "watchpoint" and "tracepoint"
  19792.   for a description of conditional breakpoints.%@NL@%
  19793. %@NL@%
  19794. %@CR:MCVgD017@%%@4@%%@AB@%buffer%@AE@%%@EH@%%@NL@%
  19795.   An area in memory in which a copy of the file is kept and changed as you
  19796.   edit. This buffer is copied to disk when you do a save operation.%@NL@%
  19797. %@NL@%
  19798. %@CR:MCVgD018@%%@4@%%@AB@%call gate%@AE@%%@EH@%%@NL@%
  19799.   A special LDT or GDT entry that describes a subroutine entry point rather
  19800.   than a memory segment. A far call to a call gate selector will cause a
  19801.   transfer to the entry point specified in the call gate. This is a feature
  19802.   of the 80286/80386 hardware and is normally used to provide a transition
  19803.   from a lower privilege state to a higher one.%@NL@%
  19804. %@NL@%
  19805. %@CR:MCVgD019@%%@4@%%@AB@%CGA%@AE@%%@EH@%%@NL@%
  19806.   IBM's Color Graphics Adapter.%@NL@%
  19807. %@NL@%
  19808. %@CR:MCVgD020@%%@4@%%@AB@%character string%@AE@%%@EH@%%@NL@%
  19809.   A sequence of bytes treated as a set of ASCII letters or numbers.%@NL@%
  19810. %@NL@%
  19811. %@CR:MCVgD021@%%@4@%%@AB@%Child process%@AE@%%@EH@%%@NL@%
  19812.   A process created by another process (its parent process).%@NL@%
  19813. %@NL@%
  19814. %@CR:MCVgD022@%%@4@%%@AB@%click%@AE@%%@EH@%%@NL@%
  19815.   To press and release one of the mouse buttons while pointing the mouse at
  19816.   an object on the screen.%@NL@%
  19817. %@NL@%
  19818. %@CR:MCVgD023@%%@4@%%@AB@%Color Graphics Adapter (CGA)%@AE@%%@EH@%%@NL@%
  19819.   A video adapter capable of displaying text characters or graphics pixels.
  19820.   Color can also be displayed with the appropriate display monitor.%@NL@%
  19821. %@NL@%
  19822. %@CR:MCVgD024@%%@4@%%@AB@%command%@AE@%%@EH@%%@NL@%
  19823.   An instruction you use to control a computer program, such as DOS or an
  19824.   application program.%@NL@%
  19825. %@NL@%
  19826. %@CR:MCVgD025@%%@4@%%@AB@%command file%@AE@%%@EH@%%@NL@%
  19827.   A file that contains the program or instructions required to carry out a
  19828.   command. If the file's extension is COM or EXE, the command file contains
  19829.   machine instructions; if its extension is BAT, the command file is a batch
  19830.   file and contains DOS commands; if its extension is CMD, the command file
  19831.   contains OS/2 commands.%@NL@%
  19832. %@NL@%
  19833. %@CR:MCVgD026@%%@4@%%@AB@%compile%@AE@%%@EH@%%@NL@%
  19834.   The action performed to translate programming language statements to a
  19835.   form that can be executed by the computer.%@NL@%
  19836. %@NL@%
  19837. %@CR:MCVgD027@%%@4@%%@AB@%constant%@AE@%%@EH@%%@NL@%
  19838.   A value that does not change during program execution. A variable, on the
  19839.   other hand, is a value that can──and usually does──change during program
  19840.   execution.%@NL@%
  19841. %@NL@%
  19842. %@CR:MCVgD028@%%@4@%%@AB@%constant expression%@AE@%%@EH@%%@NL@%
  19843.   Any expression that evaluates to a constant and may involve integer
  19844.   constants, character constants, floating-point constants, enumeration
  19845.   constants, type casts to integral and floating-point types, and other
  19846.   constant expressions.%@NL@%
  19847. %@NL@%
  19848. %@CR:MCVgD029@%%@4@%%@AB@%CPU%@AE@%%@EH@%%@NL@%
  19849.   Central Processing Unit, or the main processor in a computer. For example,
  19850.   the CPU is an Intel 8088 in PCs and an 80286 in PC/ATs.%@NL@%
  19851. %@NL@%
  19852. %@CR:MCVgD030@%%@4@%%@AB@%Ctrl-C%@AE@%%@EH@%%@NL@%
  19853.   Same as CTRL-BREAK.%@NL@%
  19854. %@NL@%
  19855. %@CR:MCVgD031@%%@4@%%@AB@%Ctrl-S%@AE@%%@EH@%%@NL@%
  19856.   Same as CTRL-NUM LOCK.%@NL@%
  19857. %@NL@%
  19858. %@CR:MCVgD032@%%@4@%%@AB@%cursor%@AE@%%@EH@%%@NL@%
  19859.   The thin blinking line that represents the current location where the next
  19860.   character you type appears. The cursor automatically moves to the dialog
  19861.   window when you start entering a command.%@NL@%
  19862. %@NL@%
  19863. %@CR:MCVgD033@%%@4@%%@AB@%debugger%@AE@%%@EH@%%@NL@%
  19864.   A program that helps the programmer locate the source of problems found
  19865.   during runtime testing of a program.%@NL@%
  19866. %@NL@%
  19867. %@CR:MCVgD034@%%@4@%%@AB@%dialog box%@AE@%%@EH@%%@NL@%
  19868.   A box that appears when you choose a menu command that requires additional
  19869.   information.%@NL@%
  19870. %@NL@%
  19871. %@CR:MCVgD035@%%@4@%%@AB@%dialog commands%@AE@%%@EH@%%@NL@%
  19872.   Commands entered in the dialog window in window mode, or any command in
  19873.   sequential mode. Dialog commands consist of one- or two-character commands
  19874.   that can usually be followed by arguments.%@NL@%
  19875. %@NL@%
  19876. %@CR:MCVgD036@%%@4@%%@AB@%dialog window%@AE@%%@EH@%%@NL@%
  19877.   The window at the bottom of the CodeView screen where dialog commands can
  19878.   be entered and previously entered dialog commands can be reviewed.%@NL@%
  19879. %@NL@%
  19880. %@CR:MCVgD037@%%@4@%%@AB@%double precision%@AE@%%@EH@%%@NL@%
  19881.   A real (floating-point) value that occupies eight bytes of memory.
  19882.   Double-precision values are accurate to 15 or 16 digits.%@NL@%
  19883. %@NL@%
  19884. %@CR:MCVgD038@%%@4@%%@AB@%drag%@AE@%%@EH@%%@NL@%
  19885.   To point the mouse at an object on the screen, press a mouse button, and
  19886.   then move the mouse while holding the button down.%@NL@%
  19887. %@NL@%
  19888. %@CR:MCVgD039@%%@4@%%@AB@%dump%@AE@%%@EH@%%@NL@%
  19889.   Contents of memory displayed at a specified memory location. In the
  19890.   CodeView debugger, the size of the object to be displayed is specified
  19891.   with a type character from the following list: %@AB@%A%@AE@% (ASCII), %@AB@%B%@AE@% (Byte), %@AB@%I%@AE@%
  19892.   (Integer), %@AB@%U%@AE@% (Unsigned Integer), %@AB@%W%@AE@% (Word), %@AB@%D%@AE@% (Double Word), %@AB@%SP%@AE@% (Short
  19893.   Real), %@AB@%L%@AE@% (Long Real), or %@AB@%T%@AE@% (10-Byte Real).%@NL@%
  19894. %@NL@%
  19895. %@CR:MCVgD040@%%@4@%%@AB@%dynamic link%@AE@%%@EH@%%@NL@%
  19896.   A method of postponing the resolution of external references until
  19897.   loadtime or runtime. A dynamic link allows the called subroutines to be
  19898.   packaged, distributed, and maintained independently of their callers. OS/2
  19899.   extends the dynamic link mechanism to serve as the primary method by which
  19900.   all system and nonsystem services are obtained.%@NL@%
  19901. %@NL@%
  19902. %@CR:MCVgD041@%%@4@%%@AB@%dynamic-link library%@AE@%%@EH@%%@NL@%
  19903.   A file, in a special format, that contains the binary code for a group of
  19904.   dynamically linked subroutines.%@NL@%
  19905. %@NL@%
  19906. %@CR:MCVgD042@%%@4@%%@AB@%dynamic-link routine%@AE@%%@EH@%%@NL@%
  19907.   See "dynamic link."%@NL@%
  19908. %@NL@%
  19909. %@CR:MCVgD043@%%@4@%%@AB@%Enhanced graphics adapter (EGA)%@AE@%%@EH@%%@NL@%
  19910.   A video adapter capable of displaying in all the modes of the color
  19911.   graphics adapter (CGA) plus additional modes. The CodeView 43 option
  19912.   displays in the EGA's 43-line text mode.%@NL@%
  19913. %@NL@%
  19914. %@CR:MCVgD044@%%@4@%%@AB@%environment strings%@AE@%%@EH@%%@NL@%
  19915.   A series of user-definable and program-definable strings associated with
  19916.   each process. The initial values of environment strings are established by
  19917.   a process's parent.%@NL@%
  19918. %@NL@%
  19919. %@CR:MCVgD045@%%@4@%%@AB@%environment table%@AE@%%@EH@%%@NL@%
  19920.   The part of MS-DOS that stores environment variables and their values.%@NL@%
  19921. %@NL@%
  19922. %@CR:MCVgD046@%%@4@%%@AB@%environment variable%@AE@%%@EH@%%@NL@%
  19923.   A variable stored in the environment table that provides MS-DOS with
  19924.   information (where to find executable files and library files, where to
  19925.   create  temporary files, etc.).%@NL@%
  19926. %@NL@%
  19927. %@CR:MCVgD047@%%@4@%%@AB@%Esc%@AE@%%@EH@%%@NL@%
  19928.   Escape key.%@NL@%
  19929. %@NL@%
  19930. %@CR:MCVgD048@%%@4@%%@AB@%escape sequence%@AE@%%@EH@%%@NL@%
  19931.   A specific combination of a backslash (\) followed by a letter or
  19932.   combination of digits. The combination represents white-space and
  19933.   nongraphic characters within strings and character constants.%@NL@%
  19934. %@NL@%
  19935. %@CR:MCVgD049@%%@4@%%@AB@%executable file%@AE@%%@EH@%%@NL@%
  19936.   A file with an extension of .EXE, .COM, .BAT, or .CMD. Executable files
  19937.   can be run by typing the file name at the system prompt.%@NL@%
  19938. %@NL@%
  19939. %@CR:MCVgD050@%%@4@%%@AB@%executable program%@AE@%%@EH@%%@NL@%
  19940.   A file that contains executable program code. When the name of the file is
  19941.   typed at the system prompt, the statements in the file are executed.%@NL@%
  19942. %@NL@%
  19943. %@CR:MCVgD051@%%@4@%%@AB@%exit code%@AE@%%@EH@%%@NL@%
  19944.   A code returned by a program to MS-DOS indicating whether the program ran
  19945.   successfully.%@NL@%
  19946. %@NL@%
  19947. %@CR:MCVgD052@%%@4@%%@AB@%expression%@AE@%%@EH@%%@NL@%
  19948.   A combination of operands and operators that yields a single value.%@NL@%
  19949. %@NL@%
  19950. %@CR:MCVgD053@%%@4@%%@AB@%Family Applications Program Interface (Family API)%@AE@%%@EH@%%@NL@%
  19951.   A standard execution environment under MS-DOS versions 2.x and 3.x and
  19952.   OS/2. The programmer can use the Family API to create an application that
  19953.   uses a subset of OS/2 functions (but a superset of MS-DOS 3.x functions)
  19954.   and that runs in a binary-compatible fashion under MS-DOS versions 2.x and
  19955.   3.x and OS/2.%@NL@%
  19956. %@NL@%
  19957. %@CR:MCVgD054@%%@4@%%@AB@%far address%@AE@%%@EH@%%@NL@%
  19958.   A memory location specified by using a segment (location of a 64K block)
  19959.   and an offset from the beginning of the segment. Far addresses require
  19960.   four bytes──two for the segment and two for the offset. A far address is
  19961.   also known as a segmented address. See  "near address."%@NL@%
  19962. %@NL@%
  19963. %@CR:MCVgD055@%%@4@%%@AB@%file%@AE@%%@EH@%%@NL@%
  19964.   A named collection of information stored on a disk. The file usually
  19965.   contains either data or a program.%@NL@%
  19966. %@NL@%
  19967. %@CR:MCVgD056@%%@4@%%@AB@%flags%@AE@%%@EH@%%@NL@%
  19968.   A register that contains individual bits, each of which signals a
  19969.   condition that can be tested by a machine-level instruction. In other
  19970.   registers, the contents of the register are considered as a whole, while
  19971.   in the flags register only the individual bits have meaning. In the
  19972.   CodeView debugger, the current values of the most commonly used bits of
  19973.   the flags register are shown at the bottom of the register window. See
  19974.   "registers."%@NL@%
  19975. %@NL@%
  19976. %@CR:MCVgD057@%%@4@%%@AB@%flipping%@AE@%%@EH@%%@NL@%
  19977.   A screen-exchange method that uses the video pages of the CGA or EGA to
  19978.   store both the debugging and output screens. Video pages are areas of
  19979.   memory reserved for screen storage. When you request the other screen, the
  19980.   two video pages are exchanged. This method is faster than swapping──the
  19981.   other screen-exchange method──but it does not work with the MA or with
  19982.   programs that do graphics or use the video pages. See also "screen
  19983.   exchange" and "swapping."%@NL@%
  19984. %@NL@%
  19985. %@CR:MCVgD058@%%@4@%%@AB@%function%@AE@%%@EH@%%@NL@%
  19986.   A subroutine or procedure that returns a value.%@NL@%
  19987. %@NL@%
  19988. %@CR:MCVgD059@%%@4@%%@AB@%function call%@AE@%%@EH@%%@NL@%
  19989.   A call to a a subroutine that performs a specific action. In C (source
  19990.   mode), subroutines are called functions. In assembly language (assembly
  19991.   mode), subroutines are called procedures.%@NL@%
  19992. %@NL@%
  19993. %@CR:MCVgD060@%%@4@%%@AB@%global symbol%@AE@%%@EH@%%@NL@%
  19994.   A symbol that is available throughout the entire program. In the CodeView
  19995.   debugger, function names are always global symbols. See also "local
  19996.   symbol."%@NL@%
  19997. %@NL@%
  19998. %@CR:MCVgD061@%%@4@%%@AB@%global variable%@AE@%%@EH@%%@NL@%
  19999.   A variable that is available throughout a module.%@NL@%
  20000. %@NL@%
  20001. %@CR:MCVgD062@%%@4@%%@AB@%grandparent process%@AE@%%@EH@%%@NL@%
  20002.   The parent process of a process that created a process.%@NL@%
  20003. %@NL@%
  20004. %@CR:MCVgD063@%%@4@%%@AB@%hexadecimal%@AE@%%@EH@%%@NL@%
  20005.   The base-16 numbering system whose digits are 0 through F (the letters A
  20006.   through F represent the decimal numbers 10 through 15). Hexadecimal is
  20007.   often used in computer programming because it is easily converted to and
  20008.   from binary, the base-2 numbering system the computer itself uses.%@NL@%
  20009. %@NL@%
  20010. %@CR:MCVgD064@%%@4@%%@AB@%highlight%@AE@%%@EH@%%@NL@%
  20011.   A reverse-video area in a text box, window, or menu marking the current
  20012.   command chosen or text that has been selected for copying or deleting.%@NL@%
  20013. %@NL@%
  20014. %@CR:MCVgD065@%%@4@%%@AB@%I/O privilege mechanism%@AE@%%@EH@%%@NL@%
  20015.   A facility that allows a process to ask a device driver for direct access
  20016.   to the device's I/O ports and any dedicated or mapped memory locations it
  20017.   has. The I/O privilege mechanism can be used directly by an application or
  20018.   indirectly by a dynamic-link package.%@NL@%
  20019. %@NL@%
  20020. %@CR:MCVgD066@%%@4@%%@AB@%identifier%@AE@%%@EH@%%@NL@%
  20021.   A name that identifies a register or a location in memory. The terms
  20022.   identifier and symbol are used synonymously in CodeView documentation.%@NL@%
  20023. %@NL@%
  20024. %@CR:MCVgD067@%%@4@%%@AB@%IEEE format (Institute for Electrical and Electronic Engineers, Inc.)%@AE@%%@EH@%%@NL@%
  20025.   A method of representing floating-point numbers internally.%@NL@%
  20026. %@NL@%
  20027. %@CR:MCVgD068@%%@4@%%@AB@%include file%@AE@%%@EH@%%@NL@%
  20028.   A source file that is merged into a program with the %@AB@%$INCLUDE%@AE@% metacommand
  20029.   or the C %@AB@%#include%@AE@% directive.%@NL@%
  20030. %@NL@%
  20031. %@CR:MCVgD069@%%@4@%%@AB@%integer%@AE@%%@EH@%%@NL@%
  20032.   A whole number represented inside the machine as a 16-bit two's complement
  20033.   binary number. An integer has a range of -32,768 to +32,767. See "long
  20034.   integer."%@NL@%
  20035. %@NL@%
  20036. %@CR:MCVgD070@%%@4@%%@AB@%interrupt call%@AE@%%@EH@%%@NL@%
  20037.   A machine-level procedure that can be called to execute a BIOS, MS-DOS, or
  20038.   other function. You can trace into BIOS interrupts with the CodeView
  20039.   debugger, but not into the MS-DOS interrupt (0x21).%@NL@%
  20040. %@NL@%
  20041. %@CR:MCVgD071@%%@4@%%@AB@%label%@AE@%%@EH@%%@NL@%
  20042.   A symbol (identifier) representing an address in the code segment (CS)
  20043.   register. Labels in C programs can be either function names or labels for
  20044.   goto statements.%@NL@%
  20045. %@NL@%
  20046. %@CR:MCVgD072@%%@4@%%@AB@%link%@AE@%%@EH@%%@NL@%
  20047.   The step that the linker performs to produce an executable file. The link
  20048.   step resolves references to procedures or variables in other modules and
  20049.   creates a complete program ready for execution.%@NL@%
  20050. %@NL@%
  20051. %@CR:MCVgD073@%%@4@%%@AB@%linking%@AE@%%@EH@%%@NL@%
  20052.   The process in which the linker loads modules into memory, computes
  20053.   absolute offset addresses for routines  and variables in relocatable
  20054.   modules, and resolves all external references by searching the run-time
  20055.   library. After loading and linking, the linker saves the modules it has
  20056.   loaded into memory as a single executable file.%@NL@%
  20057. %@NL@%
  20058. %@CR:MCVgD074@%%@4@%%@AB@%local symbol%@AE@%%@EH@%%@NL@%
  20059.   A symbol that only has value within a particular function. A function
  20060.   argument or a variable declared as auto or static within a function can be
  20061.   a local symbol. See "global symbol."%@NL@%
  20062. %@NL@%
  20063. %@CR:MCVgD075@%%@4@%%@AB@%local variable%@AE@%%@EH@%%@NL@%
  20064.   A variable whose scope is confined to a particular unit of code, such as
  20065.   the module-level code, or a procedure within a module.%@NL@%
  20066. %@NL@%
  20067. %@CR:MCVgD076@%%@4@%%@AB@%long integer%@AE@%%@EH@%%@NL@%
  20068.   A whole number represented inside the machine by a 32-bit two's complement
  20069.   value. Long integers have a range of -2,147,483,648 to +2,147,483,647. See
  20070.   "integer."%@NL@%
  20071. %@NL@%
  20072. %@CR:MCVgD077@%%@4@%%@AB@%lvalue%@AE@%%@EH@%%@NL@%
  20073.   An expression (such as a variable name) that refers to a single memory
  20074.   location and is required as the left-hand operand of an assignment
  20075.   operation or the single operand of a unary operator. For example, %@AS@%X1%@AE@% is an
  20076.   lvalue, but %@AS@%X1+X2%@AE@% is not.%@NL@%
  20077. %@NL@%
  20078. %@CR:MCVgD078@%%@4@%%@AB@%machine code%@AE@%%@EH@%%@NL@%
  20079.   A series of binary numbers that a microprocessor executes as program
  20080.   instructions.%@NL@%
  20081. %@NL@%
  20082. %@CR:MCVgD079@%%@4@%%@AB@%macro%@AE@%%@EH@%%@NL@%
  20083.   A method for representing a long series of characters or statements with a
  20084.   symbol.  The macro is expanded by the C or MASM preprocessor.  C and MASM
  20085.   each have their own conventions for defining macros.%@NL@%
  20086. %@NL@%
  20087. %@CR:MCVgD080@%%@4@%%@AB@%math coprocessor%@AE@%%@EH@%%@NL@%
  20088.   An optional hardware component, such as an 8087 or  80287 chip, that
  20089.   improves the speed of arithmetic involving floating-point numbers.%@NL@%
  20090. %@NL@%
  20091. %@CR:MCVgD081@%%@4@%%@AB@%menu bar%@AE@%%@EH@%%@NL@%
  20092.   The bar at the top of the CodeView display containing menu titles and the
  20093.   titles Trace and Go.%@NL@%
  20094. %@NL@%
  20095. %@CR:MCVgD082@%%@4@%%@AB@%Microsoft binary format%@AE@%%@EH@%%@NL@%
  20096.   A method of representing floating-point numbers internally.%@NL@%
  20097. %@NL@%
  20098. %@CR:MCVgD083@%%@4@%%@AB@%module%@AE@%%@EH@%%@NL@%
  20099.   A discrete group of statements. Every program has at least one module (the
  20100.   main module). In most cases, each module corresponds to one source file.
  20101.   When you save a program containing multiple modules, each module is saved
  20102.   in a separate disk file.%@NL@%
  20103. %@NL@%
  20104. %@CR:MCVgD084@%%@4@%%@AB@%Monochrome Adapter (MA)%@AE@%%@EH@%%@NL@%
  20105.   A video adapter capable of displaying only in black and white. Most
  20106.   monochrome adapters display text only; individual graphics pixels cannot
  20107.   be displayed. The CodeView debugger recognizes monochrome adapters and
  20108.   automatically selects swapping as the screen-exchange mode.%@NL@%
  20109. %@NL@%
  20110. %@CR:MCVgD085@%%@4@%%@AB@%mouse%@AE@%%@EH@%%@NL@%
  20111.   A pointing device that fits under your hand and rolls in any direction on
  20112.   a flat surface. By moving the mouse, you can move the mouse pointer in a
  20113.   corresponding direction on the screen. See "pointer."%@NL@%
  20114. %@NL@%
  20115. %@CR:MCVgD086@%%@4@%%@AB@%mouse pointer%@AE@%%@EH@%%@NL@%
  20116.   The reverse-video square that moves to indicate the current position of
  20117.   the mouse. The mouse pointer only appears if a mouse is installed. To
  20118.   select an item with the mouse, move the mouse until the pointer rests on
  20119.   the item.%@NL@%
  20120. %@NL@%
  20121. %@CR:MCVgD087@%%@4@%%@AB@%multitasking operating system%@AE@%%@EH@%%@NL@%
  20122.   An operating system in which two or more programs/threads can execute
  20123.   simultaneously.%@NL@%
  20124. %@NL@%
  20125. %@CR:MCVgD088@%%@4@%%@AB@%NAN%@AE@%%@EH@%%@NL@%
  20126.   An acronym that stands for "not a number." The 8087 or 80287 coprocessor
  20127.   generates NANs when the result of an operation cannot be represented in
  20128.   the IEEE format. For example, if you try to add two positive numbers whose
  20129.   sum is larger than the maximum value supported by the data type, the
  20130.   coprocessor returns a NAN instead of the sum.%@NL@%
  20131. %@NL@%
  20132. %@CR:MCVgD089@%%@4@%%@AB@%near address%@AE@%%@EH@%%@NL@%
  20133.   A memory location specified by using only the offset from the start of the
  20134.   segment. A near address requires only two bytes. See "far address."%@NL@%
  20135. %@NL@%
  20136. %@CR:MCVgD090@%%@4@%%@AB@%null pointer%@AE@%%@EH@%%@NL@%
  20137.   A pointer to nothing, expressed as the integer value 0.%@NL@%
  20138. %@NL@%
  20139. %@CR:MCVgD091@%%@4@%%@AB@%object file%@AE@%%@EH@%%@NL@%
  20140.   A file (with the extension .OBJ) containing relocatable machine code
  20141.   produced by compiling a program and used by the linker to form an
  20142.   executable file.%@NL@%
  20143. %@NL@%
  20144. %@CR:MCVgD092@%%@4@%%@AB@%object module%@AE@%%@EH@%%@NL@%
  20145.   The contents of an object file after the file has been made part of a
  20146.   stand-alone library.%@NL@%
  20147. %@NL@%
  20148. %@CR:MCVgD093@%%@4@%%@AB@%object range%@AE@%%@EH@%%@NL@%
  20149.   See "address range."%@NL@%
  20150. %@NL@%
  20151. %@CR:MCVgD094@%%@4@%%@AB@%offset%@AE@%%@EH@%%@NL@%
  20152.   The number of bytes from the beginning of a segment in memory to a
  20153.   particular byte in that segment.%@NL@%
  20154. %@NL@%
  20155. %@CR:MCVgD095@%%@4@%%@AB@%output screen%@AE@%%@EH@%%@NL@%
  20156.   The screen where program output is shown. The Screen Exchange command (\),
  20157.   Output from the View menu, and the F4 key can be used to switch to this
  20158.   screen. The output screen is the same as it would be if you ran the
  20159.   debugged program outside of the CodeView debugger.%@NL@%
  20160. %@NL@%
  20161. %@CR:MCVgD096@%%@4@%%@AB@%parent process%@AE@%%@EH@%%@NL@%
  20162.   A process that creates another process, called the child process.%@NL@%
  20163. %@NL@%
  20164. %@CR:MCVgD097@%%@4@%%@AB@%PID (Process Identification Number)%@AE@%%@EH@%%@NL@%
  20165.   A unique code that OS/2 assigns to a process when the process is created.
  20166.   The PID may be any value except 0.%@NL@%
  20167. %@NL@%
  20168. %@CR:MCVgD098@%%@4@%%@AB@%pointer%@AE@%%@EH@%%@NL@%
  20169.   A variable containing the address of another variable. See "mouse
  20170.   pointer."%@NL@%
  20171. %@NL@%
  20172. %@CR:MCVgD099@%%@4@%%@AB@%popup menu%@AE@%%@EH@%%@NL@%
  20173.   A menu that pops up when you point the mouse cursor to the menu title and
  20174.   press a mouse button. In the CodeView debugger, popup menus also pop up
  20175.   when you press the ALT key and the first letter of the menu title at the
  20176.   same time. You can make a selection from the menu by dragging the
  20177.   highlight up or down with the mouse, by pressing the UP or DOWN direction
  20178.   key to move the highlight, or by pressing the ALT key and the first letter
  20179.   of the selection title at the same time.%@NL@%
  20180. %@NL@%
  20181. %@CR:MCVgD100@%%@4@%%@AB@%port%@AE@%%@EH@%%@NL@%
  20182.   The electrical connection through which the computer sends and receives
  20183.   data to and from devices or other computers.%@NL@%
  20184. %@NL@%
  20185. %@CR:MCVgD101@%%@4@%%@AB@%precedence%@AE@%%@EH@%%@NL@%
  20186.   The relative position of an operator in the hierarchy that determines the
  20187.   order in which expressions are evaluated.%@NL@%
  20188. %@NL@%
  20189. %@CR:MCVgD102@%%@4@%%@AB@%printf%@AE@%%@EH@%%@NL@%
  20190.   A function in the C standard library that prints formatted output
  20191.   according to instructions supplied with a type-specifier argument. The
  20192.   CodeView debugger uses a subset of the %@AB@%printf%@AE@% type specifiers to format
  20193.   expression values.%@NL@%
  20194. %@NL@%
  20195. %@CR:MCVgD103@%%@4@%%@AB@%privilege mode%@AE@%%@EH@%%@NL@%
  20196.   A special execution mode (also known as ring 0) supported by the
  20197.   80286/80386 hardware. Code executing in this mode can execute restricted
  20198.   instructions that are used to manipulate key system structures and tables.
  20199.   Only the OS/2 kernel and device drivers run in this mode.%@NL@%
  20200. %@NL@%
  20201. %@CR:MCVgD104@%%@4@%%@AB@%procedure%@AE@%%@EH@%%@NL@%
  20202.   A general term for a SUB or FUNCTION.%@NL@%
  20203. %@NL@%
  20204. %@CR:MCVgD105@%%@4@%%@AB@%procedure call%@AE@%%@EH@%%@NL@%
  20205.   A call to a subroutine that performs a specific action. In assembly
  20206.   language (assembly mode), subroutines are called procedures. In C (source
  20207.   mode), subroutines are called functions.%@NL@%
  20208. %@NL@%
  20209. %@CR:MCVgD106@%%@4@%%@AB@%process%@AE@%%@EH@%%@NL@%
  20210.   The executing instance of a binary file. In OS/2, the terms task and
  20211.   process are used interchangeably. A process is the unit of ownership, and
  20212.   processes own resources such as memory, open files, dynlink libraries, and
  20213.   semaphores.%@NL@%
  20214. %@NL@%
  20215. %@CR:MCVgD107@%%@4@%%@AB@%processor%@AE@%%@EH@%%@NL@%
  20216.   See "CPU."%@NL@%
  20217. %@NL@%
  20218. %@CR:MCVgD108@%%@4@%%@AB@%program step%@AE@%%@EH@%%@NL@%
  20219.   To trace the next source line in source mode or the next instruction in
  20220.   assembly mode. If the source line or instruction contains a function,
  20221.   procedure, or interrupt call, the call is executed to the end and the
  20222.   CodeView debugger is ready to execute the instruction after the call. See
  20223.   "trace."%@NL@%
  20224. %@NL@%
  20225. %@CR:MCVgD109@%%@4@%%@AB@%protected mode%@AE@%%@EH@%%@NL@%
  20226.   The operating mode of the 80286 or 80386 microprocessor that allows the
  20227.   operating system to use features that protect one application from another
  20228.   (also called protect mode). Protected mode in OS/2 supports multitasking
  20229.   and a whole range of special services not supported in DOS.%@NL@%
  20230. %@NL@%
  20231. %@CR:MCVgD110@%%@4@%%@AB@%radix%@AE@%%@EH@%%@NL@%
  20232.   The number system in which numbers are specified. In the CodeView
  20233.   debugger, numbers can be entered in three radixes: 8 (octal), 10
  20234.   (decimal), or 16 (hexadecimal). The default radix is 10.%@NL@%
  20235. %@NL@%
  20236. %@CR:MCVgD111@%%@4@%%@AB@%real mode%@AE@%%@EH@%%@NL@%
  20237.   The operating mode of the 80286 or 80386 microprocessor that runs programs
  20238.   designed for the 8086/8088 microprocessor. All programs for the DOS
  20239.   environment run in real mode.%@NL@%
  20240. %@NL@%
  20241. %@CR:MCVgD112@%%@4@%%@AB@%redirection%@AE@%%@EH@%%@NL@%
  20242.   To specify the device from which a program will receive input or to which
  20243.   it will send output. Normally program input comes from the keyboard, and
  20244.   program output goes to the screen. Redirection involves specifying a
  20245.   device (or file) other than the default device. In the MS-DOS operating
  20246.   system, input is redirected with the less-than symbol (<) and output is
  20247.   redirected with the greater-than symbol (>). The same symbols are used in
  20248.   the CodeView debugger to redirect input or output of the debugging
  20249.   session. In addition, the equal sign (=) can be used to redirect both
  20250.   input and output.%@NL@%
  20251. %@NL@%
  20252. %@CR:MCVgD113@%%@4@%%@AB@%register window%@AE@%%@EH@%%@NL@%
  20253.   The optional window in which the central processing unit (CPU) registers
  20254.   and the bits of the flag register are displayed.%@NL@%
  20255. %@NL@%
  20256. %@CR:MCVgD114@%%@4@%%@AB@%registers%@AE@%%@EH@%%@NL@%
  20257.   Special memory within the processor, where byte- or word-sized data can be
  20258.   stored during m