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 @%%@AB@%Information                 Location%@AE@%%@EH@%Examining and locating      Part 1%@BO:    92c3@% (chapters 1-12), "The CodeView Debugger,"program errors              describes methods to help you track down errors                            in a program and analyze it while it runs. Exit                            codes and error messages are discussed in the                            appendixes at the back of this manual.Starting a debugging        Chapter 1%@BO:    9668@%, "Getting Started," tells you howsession                     to compile and link programs so that you can run                            them with the debugger. It also explains each                            CodeView command-line option.Using the CodeView          Chapter 2%@BO:   1b3d8@%, "The CodeView Display," describesinterface                   how to use the CodeView windows, pop-up menus,                            and the mouse.Specifying the CodeView     Chapter 3%@BO:   2d605@%, "Using Dialog Commands," presents thecommands                    general form of commands, while Chapter 4%@BO:   2faf9@%,                            "CodeView Expressions," describes how to build                            complex expressions for use in commands.Controlling execution       Chapter 5%@BO:   3d63b@%, "Executing Code," explains the basicsof your program             of controlling program execution with the                            CodeView debugger; Chapter 7%@BO:   579f3@%, "Managing                            Breakpoints," explains how to use breakpoints to                            suspend execution.Watching the value of       Chapter 6%@BO:   43f5c@%, "Examining Data and Expressions,"variables or                shows how to display values; Chapter 8%@BO:   5c045@%,expressions                 "Managing Watch Statements," shows how to place                            variables in a window where you can watch their                            values change as the program runs.Using the utilities         Part 2%@BO:   87cd5@% (chapters 13-21), "Utilities," describes                            the various utilities for producing and                            maintaining executable files, and for other                            tasks. Exit codes and error messages for the                            utilities are discussed in the appendixes at the                            back of this manual.Creating executable         Chapter 13%@BO:   8801e@%, "Linking Object Files with LINK."filesUsing the incremental       Chapter 14%@BO:   9eada@%, "Incremental Linking with ILINK."linker for fasterlinkingManaging software           Chapter 15%@BO:   a2cc3@%, "Managing Libraries with LIB."librariesAutomating projects         Chapter 16%@BO:   ac80b@%, "NMAKE."that have severalmodulesUsing EXEMOD, SETENV,       Chapter 17%@BO:   ba564@%, "Using Other Utilities."and CVPACKDynamic linking under       Chapter 18%@BO:   be41d@%, "Linking for Windows and OS/2OS/2                        Systems."Module-definition           Chapter 19%@BO:   c14f2@%, "Using Module-Definition Files."statementsBinding programs to run     Chapter 20%@BO:   ccaeb@%, "Creating Dual-Mode Programs withunder both protected        BIND."mode and real modeViewing the contents of     Chapter 21%@BO:   cf974@%, "Using EXEHDR."a segmented .EXE fileheaderSpecifying expressions      Appendix A%@BO:   d21a7@%, "Regular Expressions."for the CodeView SearchcommandCodes returned to DOS       Appendix B%@BO:   d5161@%, "Exit Codes."by each utilityA list of error             Appendix C%@BO:   d6a72@%, "Error Messages."messages%@TE:   81   3727  2 28 49 @%
  564. %@NL@%
  565. ───────────────────────────────────────────────────────────────────────────%@NL@%
  566. %@AI@%Important%@AE@%%@NL@%
  567.    There may be additional information about the CodeView debugger in the%@NL@%
  568.    %@AB@%README.DOC file.%@AE@% This file will describe changes made to the program%@NL@%
  569.    after the manual was printed.%@NL@%
  570. ───────────────────────────────────────────────────────────────────────────%@NL@%
  571. %@NL@%
  572. %@NL@%
  573. %@CR:MCV03000@%%@2@%%@AB@%Document Conventions%@AE@%%@EH@%%@NL@%
  574. %@NL@%
  575. %@CR:MCV03001@%%@4@%The following document conventions are used throughout this manual and apply%@EH@%
  576. in particular to syntax displays.%@NL@%
  577. %@NL@%
  578. %@CR:MCV03002@%%@NL@%
  579. %@TH:   69   4014  2 28 49 @%%@AB@%Example                     Description%@AE@%%@AB@%BP%@AE@%                          %@AB@%Boldface type%@AE@% always marks standard features of                            either programming languages (keywords,                            operators, and functions) or CodeView                            sequential-mode commands.                            These terms and punctuation marks must be typed                            exactly as shown in order to have effect.                            However, the use of uppercase or lowercase                            letters is not always significant.                            Case-sensitive terms are noted in text.%@AI@%number%@AE@%                      %@AI@%Placeholders%@AE@% are words in italics that indicate                            a general kind of information; you are expected                            to provide the actual value. For example,                            consider the syntax display for the CodeView                            Radix command:                            %@AB@%N%@AE@%%@AI@%number%@AE@%                            This syntax display asks that you enter the                            Radix command by typing %@AS@%N%@AE@%, immediately followed                            by some value for %@AI@%number%@AE@%. You could, for                            example, type in the entry %@AS@%N8%@AE@%; but you could not                            legally type in the word "number" itself.%@AS@%Word Ptr%@AE@%                    %@AS@%This font%@AE@% is used to indicate all example                            programs, user input, and screen output.Program . . . Fragment      A column of three dots tells you part of a                            program has been intentionally omitted.%@AS@%«%@AI@%optional items%@AE@%»            Double brackets enclose optional fields in                            command-line and option syntax. Consider the                            following command-line syntax:                            %@AB@%R%@AE@% «%@AI@%register%@AE@%» ««=»%@AI@%value%@AE@%»                            The double brackets around the placeholders                            indicate that you may enter a %@AI@%register%@AE@% and you                            may enter a %@AI@%value%@AE@%. The equal sign (=) indicates                            that you may place an equal sign before the                            %@AI@%value%@AE@%, but only if you specify a %@AI@%value%@AE@%.«%@AI@%choice1%@AE@% | %@AI@%choice2%@AE@%»         The vertical bar indicates that you may enter                            one of the entries shown on either side of the                            bar. The following command-line syntax                            illustrates the use of a vertical bar:                            %@AB@%DB%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»                            The bar indicates that following the Dump Bytes                            command (%@AB@%DB%@AE@%), you can specify either an %@AI@%address%@AE@%                            or %@AI@%range%@AE@%. Since both are in double brackets, you                            can also give the command with no argument."Watch point"               The first time a new term is defined, it is                            enclosed in quotation marks.ALT                         Small capital letters are used for the names of                            keys and key sequences, such as ENTER, CTRL+C,                            and ALT+F.Sample screens              Sample screens are shown in black and white.                            Your screens will look like this if you have a                            monochrome monitor, or if you use the /B option                            in the CodeView command line (see Section 1.5.4%@BO:   1590c@%,                            "Starting with a Black-and-White Display").%@TE:   69   4014  2 28 49 @%
  580. %@NL@%
  581. %@NL@%
  582. ───────────────────────────────────────────────────────────────────────────%@NL@%
  583. %@CR:MCVP1000@%%@1@%%@AB@%Part 1  The CodeView Debugger%@AE@%%@EH@%%@NL@%
  584. %@NL@%
  585. %@CR:MCVP1003@%%@4@%Part 1 explains the use of the CodeView debugger. Commands, display, and%@EH@%
  586. interface of the debugger are presented here, while other material relevant
  587. to the debugger such as error messages and exit codes is presented in the
  588. Appendixes.%@NL@%
  589. %@NL@%
  590. %@CR:MCVP1004@%%@4@%Chapter 1%@BO:    9668@% explains how to create a C, Fortran, BASIC, Pascal or assembly%@EH@%
  591. program that can be run with CodeView; it also explains how to start the
  592. debugger and select various command-line options.%@NL@%
  593. %@NL@%
  594. %@CR:MCVP1005@%%@4@%Chapter 2%@BO:   1b3d8@% discusses the CodeView display screen and interface, including%@EH@%
  595. function keys, keyboard commands, and the mouse.%@NL@%
  596. %@NL@%
  597. %@CR:MCVP1006@%%@4@%Chapters 3%@BO:   2d605@%-12 of Part 1 describe how to use each of the CodeView commands%@EH@%
  598. and expressions.%@NL@%
  599. %@NL@%
  600. %@NL@%
  601. %@CR:MCV10000@%%@1@%%@AB@%Chapter 1  Getting Started%@AE@%%@EH@%%@NL@%
  602. ───────────────────────────────────────────────────────────────────────────%@NL@%
  603. %@NL@%
  604. %@CR:MCV10001@%%@4@%Getting started with the CodeView debugger requires several simple steps.%@EH@%
  605. First you must prepare a special-format executable file for the program you
  606. wish to debug; then you can invoke the debugger. You may also wish to
  607. specify options that will affect the debugger's operation.%@NL@%
  608. %@NL@%
  609. %@CR:MCV10002@%%@4@%This chapter describes how to produce executable files in the CodeView%@EH@%
  610. format using C, FORTRAN, BASIC, Pascal, or assembly language and describes
  611. how to load a program into the CodeView debugger. The chapter lists
  612. restrictions and programming considerations with regard to the debugger,
  613. which you may want to consult before compiling or assembling. Finally, the
  614. chapter describes how to use the debugger with Microsoft or IBM Macro
  615. Assembler, Versions 1.0 through 4.0.%@NL@%
  616. %@NL@%
  617. %@NL@%
  618. %@CR:MCV11000@%%@2@%%@AB@%1.1  Restrictions%@AE@%%@EH@%%@NL@%
  619. %@NL@%
  620. %@CR:MCV11001@%%@4@%This list describes files that are not directly supported by the debugger.%@EH@%
  621. The following restrictions apply generally to the use of the CodeView
  622. debugger, regardless of the language being used.%@NL@%
  623. %@NL@%
  624. %@AB@%Restriction                 Explanation%@AE@%%@NL@%
  625. %@NL@%
  626. Include files               You will not be able to use the CodeView%@NL@%
  627.                             debugger to debug source code in include files.%@NL@%
  628. %@NL@%
  629. Packed files                CodeView symbolic information cannot be put into%@NL@%
  630.                             a packed file.%@NL@%
  631. %@NL@%
  632. .COM files                  Files with the extension .COM can be debugged in%@NL@%
  633.                             assembly mode only; they can never contain%@NL@%
  634.                             symbolic information.%@NL@%
  635. %@NL@%
  636. Memory-resident             The CodeView debugger can only work with%@NL@%
  637. programs                    disk-resident .EXE and .COM files. Debugging of%@NL@%
  638.                             memory-resident files is not supported.%@NL@%
  639. %@NL@%
  640. Programs that alter the     Programs that run under the CodeView debugger%@NL@%
  641. environment                 can read the DOS environment, but they cannot%@NL@%
  642.                             permanently change it. Upon exit from CodeView,%@NL@%
  643.                             all changes to the environment are lost.%@NL@%
  644. %@NL@%
  645. Program Segment Prefix      The CodeView debugger automatically preprocesses%@NL@%
  646. (PSP)                       a program's PSP the same way a C program does;%@NL@%
  647.                             quote marks are removed, and exactly one space%@NL@%
  648.                             is left between command-line arguments. This%@NL@%
  649.                             preprocessing only creates a problem if you are%@NL@%
  650.                             debugging a program not written in C──one that%@NL@%
  651.                             tries to access command-line arguments.%@NL@%
  652. %@NL@%
  653. %@CR:MCV11003@%%@4@%Some of the features now allowed by CodeView include debugging of library%@EH@%
  654. modules and debugging of overlaid code.%@NL@%
  655. %@NL@%
  656. %@NL@%
  657. %@CR:MCV12000@%%@2@%%@AB@%1.2  The CodeView Environment%@AE@%%@EH@%%@NL@%
  658. %@NL@%
  659. %@CR:MCV12001@%%@4@%Work with CodeView can be optimized in several ways.%@EH@%%@NL@%
  660. %@NL@%
  661. %@CR:MCV12002@%%@4@%The CVPACK utility compresses CodeView information in an executable file.%@EH@%
  662. See Section 17.4%@BO:   bdfa9@% for directions on how to use CVPACK.%@NL@%
  663. %@NL@%
  664. %@CR:MCV12003@%%@4@%In addition, the /E option enables CodeView to take advantage of expanded%@EH@%
  665. memory. Command-line options are described in Section 1.5%@BO:   136bc@%.%@NL@%
  666. %@NL@%
  667. %@NL@%
  668. %@CR:MCV13000@%%@2@%%@AB@%1.3  Preparing Programs for the CodeView Debugger%@AE@%%@EH@%%@NL@%
  669. %@NL@%
  670. %@CR:MCV13001@%%@4@%You must compile and link with the correct options in order to use a program%@EH@%
  671. with the CodeView debugger. These options direct the compiler and the linker
  672. to produce an executable file, which contains line-number information and a
  673. symbol table, in addition to the executable code.%@NL@%
  674. %@NL@%
  675. ───────────────────────────────────────────────────────────────────────────%@NL@%
  676. %@AI@%NOTE%@AE@%%@NL@%
  677.    For the sake of brevity, Sections 1.3.1%@BO:    ab8b@%-1.3.3 use the term "compiling"%@NL@%
  678.    to refer to the process of producing object modules. However, almost%@NL@%
  679.    everything said about compiling in this section applies equally well to%@NL@%
  680.    assembling. Exceptions are noted in Section 1.3.8%@BO:    fbcc@%, "Preparing Assembly%@NL@%
  681.    Programs."%@NL@%
  682. ───────────────────────────────────────────────────────────────────────────%@NL@%
  683. %@NL@%
  684. %@CR:MCV13002@%%@4@%Not all compiler and linker versions support CodeView options. (See the%@EH@%
  685. section on the appropriate language below for information about compiler
  686. versions.) Also, you will need to use the Microsoft Overlay Linker (Version
  687. 3.6 or later) or the Microsoft Segmented-Executable Linker. If you try to
  688. debug an executable file that was not compiled and linked with CodeView
  689. options, or if you use a compiler that does not support these options, then
  690. you will only be able to use the debugger in assembly mode. This means the
  691. CodeView debugger will not be able to display source code or understand
  692. source-level symbols, such as symbols for functions and variables.%@NL@%
  693. %@NL@%
  694. %@NL@%
  695. %@CR:MCV13100@%%@3@%%@AB@%1.3.1  Programming Considerations%@AE@%%@EH@%%@NL@%
  696. %@NL@%
  697. %@CR:MCV13101@%%@4@%Any source code that is legal in C, FORTRAN, BASIC, Pascal, or Microsoft%@EH@%
  698. Macro Assembler can be compiled or assembled to create an executable file
  699. and then debugged with the CodeView debugger. However, some programming
  700. practices make debugging more difficult.%@NL@%
  701. %@NL@%
  702. %@CR:MCV13102@%%@4@%Each of the Microsoft languages listed above permits you to put code in%@EH@%
  703. separate include files and read the files into your source file by using an
  704. include directive. However, you will not be able to use the CodeView
  705. debugger to debug source code in include files. The preferred method of
  706. developing programs is to create separate object modules and then link the
  707. object modules with your program. The CodeView debugger supports the
  708. debugging of separate object modules in the same session.%@NL@%
  709. %@NL@%
  710. %@CR:MCV13103@%%@4@%Also, the CodeView debugger is more effective and easier to use if you put%@EH@%
  711. each source statement on a separate line. A number of languages (C and BASIC
  712. in particular) permit you to place more than one statement on a single line
  713. of the source file. This practice does not prevent the CodeView debugger
  714. from functioning. However, the debugger must treat the line as a single
  715. unit; it cannot break the line down into separate statements. Therefore, if
  716. you have three statements on the same line, you will not be able to put a
  717. breakpoint or freeze execution on the individual statements. The best you
  718. will be able to do is to freeze execution at the beginning of the three
  719. statements or at the beginning of the next line.%@NL@%
  720. %@NL@%
  721. %@CR:MCV13104@%%@4@%Some languages (C and assembly in particular) support a type of macro%@EH@%
  722. expansion. However, the CodeView debugger will not help you debug macros in
  723. source mode. You will need to expand the macros yourself before debugging
  724. them; otherwise, the debugger will treat them as simple statements or
  725. instructions.%@NL@%
  726. %@NL@%
  727. %@CR:MCV13105@%%@4@%Finally, your segments should be declared according to the standard%@EH@%
  728. Microsoft format (as described in the %@AI@%Microsoft Mixed-Language%@AE@% %@AI@%Programming%@AE@%
  729. %@AI@%Guide%@AE@%). This is taken care of for you automatically with each of the
  730. Microsoft high-level languages.%@NL@%
  731. %@NL@%
  732. %@NL@%
  733. %@CR:MCV13200@%%@3@%%@AB@%1.3.2  CodeView Compile Options%@AE@%%@EH@%%@NL@%
  734. %@NL@%
  735. %@CR:MCV13201@%%@4@%Microsoft compilers accept command-line options preceded by either a forward%@EH@%
  736. slash (/) or a dash (-). For brevity, this manual lists only the forward
  737. slash when describing options, but you may use either symbol.%@NL@%
  738. %@NL@%
  739. %@CR:MCV13202@%%@4@%The use of uppercase or lowercase letters is significant for options used%@EH@%
  740. with the C, FORTRAN, BASIC, and Pascal compilers; you must type the letters
  741. exactly as given.%@NL@%
  742. %@NL@%
  743. %@CR:MCV13203@%%@4@%When you compile a source file for a program you want to debug, you must%@EH@%
  744. specify the /Zi option on the command line. The /Zi option instructs the
  745. compiler to include line-number and symbolic information in the object file.%@NL@%
  746. %@NL@%
  747. %@CR:MCV13204@%%@4@%If you do not need complete symbolic information in some modules, you can%@EH@%
  748. compile those modules with the /Zd option instead of /Zi. The /Zd option
  749. writes less symbolic information to the object file, so using this option
  750. will save disk space and memory. For example, if you are working on a
  751. program made up of five modules, but only need to debug one module, you can
  752. compile that module with the /Zi option and the other modules with the /Zd
  753. option. You will be able to examine global variables and see source lines in
  754. modules compiled with the /Zd option, but local variables will be
  755. unavailable.%@NL@%
  756. %@NL@%
  757. %@CR:MCV13205@%%@4@%In addition, if you are working with a high-level language, you will%@EH@%
  758. probably want to use the /Od option, which turns off optimization. Optimized
  759. code may be rearranged for greater efficiency and, as a result, the
  760. instructions in your program may not correspond closely to the source lines.
  761. After debugging, you can compile a final version of the program with the
  762. optimization level you prefer.%@NL@%
  763. %@NL@%
  764. ───────────────────────────────────────────────────────────────────────────%@NL@%
  765. %@AI@%NOTE%@AE@%%@NL@%
  766.    The %@AB@%/Zd%@AE@% option is not available with QuickBASIC. The %@AB@%/Od%@AE@% option is not%@NL@%
  767.    available with QuickBASIC or the Macro Assembler.%@NL@%
  768. ───────────────────────────────────────────────────────────────────────────%@NL@%
  769. %@NL@%
  770. %@CR:MCV13206@%%@4@%You cannot debug a program until you compile it successfully. The CodeView%@EH@%
  771. debugger will not help you correct syntax or compiler errors. Once you
  772. successfully compile your program, you can use the debugger to locate
  773. logical errors in the program.%@NL@%
  774. %@NL@%
  775. %@CR:MCV13207@%%@4@%Compiling examples are given in the sections below on compiling and linking%@EH@%
  776. with specific languages.%@NL@%
  777. %@NL@%
  778. %@NL@%
  779. %@CR:MCV13300@%%@3@%%@AB@%1.3.3  CodeView Link Options%@AE@%%@EH@%%@NL@%
  780. %@NL@%
  781. %@CR:MCV13301@%%@4@%If you use LINK separately to link an object file or files for debugging,%@EH@%
  782. you should specify the /CODEVIEW option (it can be abbreviated as /CO). This
  783. instructs the linker to incorporate addresses for symbols and source lines
  784. into the executable file.%@NL@%
  785. %@NL@%
  786. %@CR:MCV13302@%%@4@%If you use a Microsoft driver program that automatically invokes the linker%@EH@%
  787. (such as CL with C, or FL with FORTRAN), the linker is automatically invoked
  788. with the /CO option whenever you specify /Zi on the command line. You do not
  789. use /CO unless you are invoking the linker directly, by typing LINK.%@NL@%
  790. %@NL@%
  791. %@CR:MCV13303@%%@4@%Although executable files prepared with the /CODEVIEW option can be%@EH@%
  792. executed from the DOS command line like any other executable files, they
  793. are larger because of the extra symbolic information in them. To minimize
  794. program size, you will probably want to recompile and link your final
  795. version without the /Zi option when you finish debugging a program.%@NL@%
  796. %@NL@%
  797. %@CR:MCV13304@%%@4@%Linking examples are given in the sections below on compiling and linking%@EH@%
  798. with specific languages.%@NL@%
  799. %@NL@%
  800. %@NL@%
  801. %@CR:MCV13400@%%@3@%%@AB@%1.3.4  Preparing C Programs%@AE@%%@EH@%%@NL@%
  802. %@NL@%
  803. %@CR:MCV13401@%%@4@%In order to use the CodeView debugger with a program written in C, you need%@EH@%
  804. to compile it with the Microsoft C Compiler, Version 4.0 or later. Earlier
  805. versions of the compiler do not support the CodeView compile options. You
  806. also need to link with the Microsoft Overlay Linker, Version 3.6 or later.%@NL@%
  807. %@NL@%
  808. %@CR:MCV13410@%%@4@%%@AB@%Writing C Source Code%@AE@%%@EH@%%@NL@%
  809. %@NL@%
  810. %@CR:MCV13411@%%@4@%Microsoft C supports the use of include files through the use of the%@EH@%
  811. %@AB@%#include%@AE@% directive. However, you will not be able to debug source code put
  812. into include files. Therefore, you should reserve the use of include files
  813. for %@AB@%#define%@AE@% prototypes, macros, and structure definitions.%@NL@%
  814. %@NL@%
  815. %@CR:MCV13412@%%@4@%The C language permits you to put more than one statement on a line. This%@EH@%
  816. practice makes it difficult for you to debug such lines of code. For
  817. example, the following code is legal in C:%@NL@%
  818. %@NL@%
  819.      code = buffer[count]; if (code == '\n') ++lines;%@NL@%
  820. %@NL@%
  821. %@CR:MCV13413@%%@4@%This code is made up of three separate source statements. When placed on the%@EH@%
  822. same line, the individual statements cannot be accessed during debugging.
  823. You could not, for example, stop program execution at %@AS@%++lines%@AE@%;. The same
  824. code would be easier to debug in the following form:%@NL@%
  825. %@NL@%
  826.      code = buffer[count];%@NL@%
  827.      if (code == '\n')%@NL@%
  828.              ++lines;%@NL@%
  829. %@NL@%
  830. %@CR:MCV13414@%%@4@%This makes code easier to read and corresponds with what is generally%@EH@%
  831. considered good programming practice.%@NL@%
  832. %@NL@%
  833. %@CR:MCV13415@%%@4@%You cannot easily debug macros with the CodeView debugger. The debugger will%@EH@%
  834. not break down the macro for you. Therefore, if you have complex macros with
  835. potential side effects, you may need to write them first as regular source
  836. statements.%@NL@%
  837. %@NL@%
  838. %@CR:MCV13420@%%@4@%%@AB@%Compiling and Linking C Programs%@AE@%%@EH@%%@NL@%
  839. %@NL@%
  840. %@CR:MCV13421@%%@4@%The /Zi, /Zd, and /Od options are all supported by the Microsoft C%@EH@%
  841. Compilers, Versions 4.0 and later. (For a description of these options, see
  842. Section 1.3.2%@BO:    b4af@%, "CodeView Compile Options.") The options are accepted by the
  843. CL driver and the  MSC driver, which was supplied with Version 4.0. Linking
  844. separately with /CO is necessary when you compile with MSC.%@NL@%
  845. %@NL@%
  846. %@CR:MCV13422@%%@4@%The CodeView debugger supports mixed-language programming. For an example of%@EH@%
  847. how to link a C module with modules from other languages, see Section 1.3.8%@BO:    fbcc@%,
  848. "Preparing Assembly Programs."%@NL@%
  849. %@NL@%
  850. %@CR:MCV13423@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  851. %@NL@%
  852.      CL /Zi /Od EXAMPLE.C%@NL@%
  853. %@NL@%
  854.      CL /Zi /Od /c EXAMPLE.C%@NL@%
  855.      LINK /CO EXAMPLE;%@NL@%
  856. %@NL@%
  857.      CL /Zi /Od /c MOD1.C%@NL@%
  858.      CL /Zd /Od /c MOD2.C%@NL@%
  859.      CL /Zi MOD1 MOD2%@NL@%
  860. %@NL@%
  861. %@CR:MCV13424@%%@4@%In the first example, CL is used to compile and link EXAMPLE.C, the source%@EH@%
  862. file. The CL driver creates an object file, EXAMPLE.OBJ, in the CodeView
  863. format, and then automatically invokes the linker with the /CO option. The
  864. second example demonstrates how to compile and link source file EXAMPLE.C by
  865. using the MSC program provided with Version 4.0 of the compiler. Since MSC
  866. does not invoke the linker, you must invoke the linker directly and specify
  867. /CO on the command line. Both examples will result in an executable file,
  868. EXAMPLE.EXE, which has the line-number information, symbol table, and
  869. unoptimized code required by the CodeView debugger.%@NL@%
  870. %@NL@%
  871. %@CR:MCV13425@%%@4@%In the third example, the source module MOD1.C is compiled to produce an%@EH@%
  872. object file with full symbolic and line information, while MOD2.C is
  873. compiled to produce an object file with limited information. Then, CL is
  874. used again to link the resulting object files. (This time, CL does not
  875. recompile because the arguments have no .C extension.) Typing /Zi on the
  876. command line causes the linker to be invoked with the /CO option. The result
  877. is an executable file in which one of the modules, MOD2.C, will be harder to
  878. debug. However, the executable file will take up less space on disk than it
  879. would if both modules were compiled with full symbolic information.%@NL@%
  880. %@NL@%
  881. %@NL@%
  882. %@CR:MCV13500@%%@3@%%@AB@%1.3.5  Preparing FORTRAN Programs%@AE@%%@EH@%%@NL@%
  883. %@NL@%
  884. %@CR:MCV13501@%%@4@%In order to use the CodeView debugger with a program written in FORTRAN, you%@EH@%
  885. will need to compile it with the Microsoft FORTRAN Compiler, Version 4.0 or
  886. later. Earlier versions of the compiler do not support CodeView compile
  887. options. You will also need to link with the Microsoft Overlay Linker,
  888. Version 3.6 or later.%@NL@%
  889. %@NL@%
  890. %@CR:MCV13510@%%@4@%%@AB@%Writing FORTRAN Source Code%@AE@%%@EH@%%@NL@%
  891. %@NL@%
  892. %@CR:MCV13511@%%@4@%The Microsoft FORTRAN Compiler supports the use of include files, through%@EH@%
  893. use of the %@AB@%$INCLUDE%@AE@% directive. However, you will not be able to debug source
  894. code in an include file. If you have source code that you wish to put in
  895. separate files, then you should use the technique of separately compiled
  896. modules. The CodeView debugger does support this technique by allowing you
  897. to trace through separate source files in the same session.%@NL@%
  898. %@NL@%
  899. %@CR:MCV13520@%%@4@%%@AB@%Compiling and Linking FORTRAN Programs%@AE@%%@EH@%%@NL@%
  900. %@NL@%
  901. %@CR:MCV13521@%%@4@%The /Zi, /Zd, and /Od options are all supported by the Microsoft FORTRAN%@EH@%
  902. Compiler, Version 4.0 or later. For a description of these options, see
  903. Section 1.3.2%@BO:    b4af@%, "CodeView Compile Options." The CodeView debugger supports
  904. mixed-language programming. For an example of how to link a FORTRAN module
  905. with modules from other languages, see Section 1.3.8%@BO:    fbcc@%, "Preparing Assembly
  906. Programs."%@NL@%
  907. %@NL@%
  908. %@CR:MCV13522@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  909. %@NL@%
  910.      FL /Zi /Od EXAMPLE.FOR%@NL@%
  911. %@NL@%
  912.      FL /Zi /Od /c EXAMPLE.FOR%@NL@%
  913.      LINK /CO EXAMPLE;%@NL@%
  914. %@NL@%
  915.      FL /Zi /Od /c MOD1.FOR%@NL@%
  916.      FL /Zd /Od /c MOD2.FOR%@NL@%
  917.      FL /Zi MOD1 MOD2%@NL@%
  918. %@NL@%
  919. %@CR:MCV13523@%%@4@%In the first example, the FL driver is used to compile and link the source%@EH@%
  920. file EXAMPLE.FOR. The FL driver creates an object file in the CodeView
  921. format, EXAMPLE.OBJ, and then automatically invokes the linker with the /CO
  922. option. The second example demonstrates how to compile and link the source
  923. file EXAMPLE.FOR by using separate steps for compiling and linking. In this
  924. case, the /CO option must be given explicitly to the linker. Both examples
  925. result in an executable file, EXAMPLE.EXE, which has the line-number
  926. information, symbol table, and unoptimized code required by the CodeView
  927. debugger.%@NL@%
  928. %@NL@%
  929. %@CR:MCV13524@%%@4@%In the third example, the source module MOD1.FOR is compiled to produce an%@EH@%
  930. object file with full symbolic and line information, while MOD2.FOR is
  931. compiled to produce an object file with limited information. Then FL is used
  932. again to link the object files. (Note that this time, FL does not recompile
  933. because the arguments have no .FOR extension.) Typing /Zi on the command
  934. line causes the linker to be invoked with the /CO option. The result is an
  935. executable file in which one of the modules, MOD2.FOR, will be harder to
  936. debug. However, the executable file takes up less space on disk than it
  937. would if both modules were compiled with full symbolic information.%@NL@%
  938. %@NL@%
  939. %@NL@%
  940. %@CR:MCV13600@%%@3@%%@AB@%1.3.6  Preparing BASIC Programs%@AE@%%@EH@%%@NL@%
  941. %@NL@%
  942. %@CR:MCV13601@%%@4@%In order to use the CodeView debugger with a program written in BASIC, you%@EH@%
  943. will need to compile it with Microsoft QuickBASIC, Version 4.0 or later. You
  944. will also need to link with the Microsoft Overlay Linker, Version 3.6 or
  945. later.%@NL@%
  946. %@NL@%
  947. %@CR:MCV13610@%%@4@%%@AB@%Writing BASIC Source Code%@AE@%%@EH@%%@NL@%
  948. %@NL@%
  949. %@CR:MCV13611@%%@4@%Microsoft BASIC supports the use of include files, through the use of the%@EH@%
  950. %@AB@%$INCLUDE%@AE@% directive. However, you will not be able to debug source code put
  951. into include files. The preferred practice for developing source code in
  952. separate files is to use separately compiled modules. The CodeView debugger
  953. does support this technique by allowing you to trace through separate source
  954. files in the same session.%@NL@%
  955. %@NL@%
  956. %@CR:MCV13612@%%@4@%BASIC also permits you to put more than one statement on a line. This%@EH@%
  957. practice makes it difficult for you to debug such lines of code. For
  958. example, the following code is legal, even common, in BASIC:%@NL@%
  959. %@NL@%
  960.      SUM=0 : FOR I=1 TO N : SUM=SUM+ARRAY(I) : NEXT I%@NL@%
  961. %@NL@%
  962. %@CR:MCV13613@%%@4@%This code is actually made up of four separate BASIC statements. When placed%@EH@%
  963. on the same line, the individual statements cannot be accessed during
  964. debugging. You could not, for example, stop program execution at %@AS@%SUM=SUM+%@AE@%
  965. %@AS@%ARRAY(I)%@AE@%. The same code would be easier to debug if it were written in the
  966. following form:%@NL@%
  967. %@NL@%
  968.      SUM=0%@NL@%
  969.      FOR I=1 TO N%@NL@%
  970.          SUM=SUM+ARRAY(I)%@NL@%
  971.      NEXT I%@NL@%
  972. %@NL@%
  973. %@CR:MCV13620@%%@4@%%@AB@%Compiling and Linking BASIC Programs%@AE@%%@EH@%%@NL@%
  974. %@NL@%
  975. %@CR:MCV13621@%%@4@%Microsoft QuickBASIC Versions 4.0 and later can prepare BASIC programs for%@EH@%
  976. use with the CodeView debugger, through the use of the BC command line.%@NL@%
  977. %@NL@%
  978. %@CR:MCV13622@%%@4@%You cannot prepare programs for use with CodeView when you are in the%@EH@%
  979. QuickBASIC editor itself. Instead, compile separately with the BC
  980. command-line option /Zi. The /Zi option is described in Section 1.3.2%@BO:    b4af@%,
  981. "CodeView Compile Options." You must also link separately with /CO.%@NL@%
  982. %@NL@%
  983. %@CR:MCV13623@%%@4@%The CodeView debugger supports mixed-language programming. For an example of%@EH@%
  984. how to link a BASIC module with modules from other languages, see Section
  985. 1.3.8%@BO:    fbcc@%, "Preparing Assembly Programs."%@NL@%
  986. %@NL@%
  987. %@CR:MCV13624@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  988. %@NL@%
  989.      BC /Zi EXAMPLE;%@NL@%
  990.      LINK /CO EXAMPLE;%@NL@%
  991. %@NL@%
  992. %@CR:MCV13625@%%@4@%The example above compiles the source file EXAMPLE.BAS to produce an object%@EH@%
  993. file, EXAMPLE.OBJ, which contains the symbol and line-number information
  994. required by the CodeView debugger. Then the linker is invoked with the /CO
  995. option to create an executable file that can be used with the debugger.%@NL@%
  996. %@NL@%
  997. %@NL@%
  998. %@CR:MCV13700@%%@3@%%@AB@%1.3.7  Preparing Pascal Programs%@AE@%%@EH@%%@NL@%
  999. %@NL@%
  1000. %@CR:MCV13701@%%@4@%In order to use the CodeView debugger with a program written in Pascal, you%@EH@%
  1001. need to compile it with the Microsoft Pascal Compiler, Version 4.0 or later.
  1002. Earlier versions of Pascal do not support the CodeView compile options. You
  1003. also need to link with the Microsoft Overlay Linker, Version 3.6 or later.%@NL@%
  1004. %@NL@%
  1005. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1006. %@AI@%NOTE%@AE@%%@NL@%
  1007.    If you have a version of Microsoft Pascal earlier than Version 4.0, you%@NL@%
  1008.    can use the CodeView debugger to a limited extent. However, the debugger%@NL@%
  1009.    will not be able to evaluate program symbols in CodeView commands.%@NL@%
  1010.    Compile a program as you would normally, and then link with the %@AB@%/CO%@AE@%
  1011.    option as explained below. You will then be able to use CodeView to step
  1012.    through your program and set breakpoints.The debugger will also be able
  1013.    to display machine-level code and domemory dumps. This version of Code
  1014.    View does not include a Pascal expression evaluator.%@NL@%
  1015. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1016. %@NL@%
  1017. %@CR:MCV13710@%%@4@%%@AB@%Writing Pascal Source Code%@AE@%%@EH@%%@NL@%
  1018. %@NL@%
  1019. %@CR:MCV13711@%%@4@%Microsoft Pascal supports the use of include files by providing the %@AB@%$include%@AE@%%@EH@%
  1020. metacommand. However, you will not be able to debug source code put into
  1021. include files. You can easily debug code in separately compiled source
  1022. files. Use this technique, rather than that of include files, to debug a
  1023. large program.%@NL@%
  1024. %@NL@%
  1025. %@CR:MCV13712@%%@4@%Pascal allows you to put more than one statement on a line; yet it is%@EH@%
  1026. difficult to debug programs with multiple statements on a single line. For
  1027. example, the following code is legal in Pascal:%@NL@%
  1028. %@NL@%
  1029.      if i = max then begin k := k+1; i = 0 end;%@NL@%
  1030. %@NL@%
  1031. %@CR:MCV13713@%%@4@%This code is actually made up of five separate source statements. When%@EH@%
  1032. placed on the same line, the individual statements cannot be accessed during
  1033. debugging. You could not, for example, stop program execution at %@AS@%k := k+1%@AE@%;.
  1034. The same code would be easier to debug if it were written as the following:%@NL@%
  1035. %@NL@%
  1036.      if i = max then%@NL@%
  1037.            begin%@NL@%
  1038.               k := k+1;%@NL@%
  1039.               i := 0%@NL@%
  1040.            end;%@NL@%
  1041. %@NL@%
  1042. %@CR:MCV13714@%%@4@%Writing only one statement on a line makes code easier to read and%@EH@%
  1043. corresponds with what is generally considered good programming practice.%@NL@%
  1044. %@NL@%
  1045. %@CR:MCV13720@%%@4@%%@AB@%Compiling and Linking Pascal Programs%@AE@%%@EH@%%@NL@%
  1046. %@NL@%
  1047. %@CR:MCV13721@%%@4@%Versions 4.0 and later of Microsoft Pascal support the CodeView options /Zi%@EH@%
  1048. and /Zd when you use the PL driver program. (For a description of these
  1049. options, see Section 1.3.2%@BO:    b4af@%, "CodeView Compile Options.") The CodeView
  1050. compile options are put on the command line when invoking the first pass of
  1051. the Pascal compiler.%@NL@%
  1052. %@NL@%
  1053. %@CR:MCV13722@%%@4@%The /CO option is necessary only when you link separately.%@EH@%%@NL@%
  1054. %@NL@%
  1055. %@CR:MCV13723@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  1056. %@NL@%
  1057.      PL /Zi /c TEST%@NL@%
  1058.      LINK /CO TEST;%@NL@%
  1059. %@NL@%
  1060. %@CR:MCV13724@%%@4@%The example above compiles the source file TEST.PAS to produce an object%@EH@%
  1061. file, TEST.OBJ, which contains the symbol and line-number information
  1062. required by the CodeView debugger. Then the linker is invoked with the /CO
  1063. option.%@NL@%
  1064. %@NL@%
  1065. %@CR:MCV13725@%%@4@%The CodeView debugger supports mixed-language programming. For an example of%@EH@%
  1066. how to link a Pascal module with modules from other languages, see Section
  1067. 1.3.8%@BO:    fbcc@% below.%@NL@%
  1068. %@NL@%
  1069. %@NL@%
  1070. %@CR:MCV13800@%%@3@%%@AB@%1.3.8  Preparing Assembly Programs%@AE@%%@EH@%%@NL@%
  1071. %@NL@%
  1072. %@CR:MCV13801@%%@4@%In order to use all the features of the CodeView debugger with assembly%@EH@%
  1073. programs, you need to assemble with Microsoft Macro Assembler, Version 5.0
  1074. or later. (Section 1.7%@BO:   1ab8d@% discusses how to use earlier versions of Microsoft
  1075. Macro Assembler with the debugger.) No matter what version of the assembler
  1076. you use, you will need to link with the Microsoft Overlay Linker, Version
  1077. 3.6 or later.%@NL@%
  1078. %@NL@%
  1079. %@CR:MCV13810@%%@4@%%@AB@%Writing Assembler Source Code%@AE@%%@EH@%%@NL@%
  1080. %@NL@%
  1081. %@CR:MCV13811@%%@4@%If you have Version 5.0 or later of the Microsoft Macro Assembler, you can%@EH@%
  1082. use the simplified segment directives described in the %@AI@%Microsoft%@AE@% %@AI@%Macro%@AE@%
  1083. %@AI@%Assembler Programmer's Guide.%@AE@% Use of these directives ensures that segments
  1084. are declared in the correct way for use with the CodeView debugger. (These
  1085. directives also aid mixed-language programming.) If you do not use these
  1086. directives, make sure that the class name for the code segment ends with the
  1087. letters %@AS@%CODE%@AE@%.%@NL@%
  1088. %@NL@%
  1089. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1090. %@AI@%NOTE%@AE@%%@NL@%
  1091.    The CodeView debugger correctly recognizes floating-point values only%@NL@%
  1092.    when they are in the IEEE (Institute of Electrical and Electronics%@NL@%
  1093.    Engineers, Inc.) format. You should use the IEEE format with any program%@NL@%
  1094.    that you are going to run with the CodeView debugger if that program uses%@NL@%
  1095.    floating-point variables. The IEEE format is the default for Version 5.0%@NL@%
  1096.    or later of the Microsoft Macro Assembler. You can always specify IEEE%@NL@%
  1097.    format by using the %@AB@%.8087%@AE@% or %@AB@%.287%@AE@% directive, or by assembling with the%@NL@%
  1098.    %@AB@%/R%@AE@% option.%@NL@%
  1099. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1100. %@NL@%
  1101. %@CR:MCV13812@%%@4@%You will not be able to trace through macros while in source mode. Macros%@EH@%
  1102. will be treated as single instructions unless you are in assembly or mixed
  1103. mode, so you will not see comments or directives within macros. Therefore,
  1104. you may want to debug code before putting it into a macro.%@NL@%
  1105. %@NL@%
  1106. %@CR:MCV13813@%%@4@%The Microsoft Macro Assembler also supports include files, but you will not%@EH@%
  1107. be able to debug code in an include file. You are better off reserving
  1108. include files for macro and structure definitions.%@NL@%
  1109. %@NL@%
  1110. %@CR:MCV13814@%%@4@%Because the assembler does not have its own expression evaluator, you will%@EH@%
  1111. have to use either the C, FORTRAN, or BASIC expression evaluator. C is the
  1112. default because it is the closest to assembly language. To make sure the
  1113. expression evaluator recognizes your symbols and labels, you should observe
  1114. the following guidelines when writing assembly modules:%@NL@%
  1115. %@NL@%
  1116. %@CR:MCV13815@%  1. The assembler has no explicit way to declare real numbers. However, it%@NL@%
  1117.      will pass the correct symbolic information for reals and integers if%@NL@%
  1118.      you initialize each real number with a decimal point and each integer%@NL@%
  1119.      without a decimal point. (The default type is integer.) For example,%@NL@%
  1120.      the following statements correctly initialize %@AS@%REALSUM%@AE@% as a real number%@NL@%
  1121.      and %@AS@%COUNTER%@AE@% as an integer:%@NL@%
  1122. %@NL@%
  1123.          %@AS@%REALSUM    DD    0.0%@AE@%%@NL@%
  1124.          %@AS@%COUNTER    DD    0%@AE@%%@NL@%
  1125. %@NL@%
  1126.      You must initialize real number data in data definitions. If you use %@AS@%?%@AE@%,%@NL@%
  1127.      the assembler will consider the variable an integer when it generates%@NL@%
  1128.      symbolic information. The CodeView debugger, in turn, will not properly%@NL@%
  1129.      evaluate the value of the variable.%@NL@%
  1130. %@NL@%
  1131.   2. Avoid the use of special characters in symbol names. The C, FORTRAN,%@NL@%
  1132.      and BASIC expression evaluators each apply their own standards in%@NL@%
  1133.      detemining what is a legal symbol name. Generally, only alphanumeric%@NL@%
  1134.      characters and the underscore (_) are recognized. BASIC accepts certain%@NL@%
  1135.      type-declaration characters at the end of a name, but C and FORTRAN do%@NL@%
  1136.      not.%@NL@%
  1137. %@NL@%
  1138.   3. Assemble with /MX or /ML to avoid conflicts due to case when you do%@NL@%
  1139.      mixed-language programming. By default, the assembler converts all%@NL@%
  1140.      symbols to uppercase when it generates object code. C, however, does%@NL@%
  1141.      not do this conversion. Therefore, the CodeView debugger will not%@NL@%
  1142.      recognize that %@AS@%var%@AE@% in a C program and %@AS@%var%@AE@% in an assembly program are%@NL@%
  1143.      the same variable unless you leave Case Sense off when using the%@NL@%
  1144.      debugger.%@NL@%
  1145. %@NL@%
  1146.   4. If you access command-line data in the Program Segment Prefix (PSP),%@NL@%
  1147.      note that the CodeView debugger changes the PSP; tabs, quote marks, and%@NL@%
  1148.      extra spaces are removed so that exactly one space separates each%@NL@%
  1149.      argument. The debugger retains quote marks (along with any quoted%@NL@%
  1150.      material) for command lines given with the %@AB@%L%@AE@% command.%@NL@%
  1151. %@NL@%
  1152. %@CR:MCV13820@%%@4@%%@AB@%Assembling and Linking%@AE@%%@EH@%%@NL@%
  1153. %@NL@%
  1154. %@CR:MCV13821@%%@4@%The assembler supports the /Zi and /Zd assemble-time options. The /Od option%@EH@%
  1155. does not apply, and so is not supported. Assembler options are not case
  1156. sensitive. You may therefore enter /ZI or /ZD on the assembler command line
  1157. to produce an object file in the CodeView format.%@NL@%
  1158. %@NL@%
  1159. %@CR:MCV13822@%%@4@%If you link your assembly program with a module written in C (which is case%@EH@%
  1160. sensitive), you probably need to assemble with /MX or /ML.%@NL@%
  1161. %@NL@%
  1162. %@CR:MCV13823@%%@4@%After assembling, link with the /CO option to produce an executable file in%@EH@%
  1163. the CodeView format.%@NL@%
  1164. %@NL@%
  1165. %@CR:MCV13824@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  1166. %@NL@%
  1167.      MASM /ZI EXAMPLE;%@NL@%
  1168.      LINK /CO EXAMPLE;%@NL@%
  1169. %@NL@%
  1170.      MASM /ZI MOD1;%@NL@%
  1171.      MASM /ZD MOD2;%@NL@%
  1172.      LINK /CO MOD1 MOD2;%@NL@%
  1173. %@NL@%
  1174.      CL /Zi /Od /c /AL prog.c%@NL@%
  1175.      BC /Zi sub1;%@NL@%
  1176.      MASM /ZI /MX sub2;%@NL@%
  1177.      LINK /CO prog sub1 sub2%@NL@%
  1178. %@NL@%
  1179. %@CR:MCV13825@%%@4@%The first example assembles the source file EXAMPLE.ASM and produces the%@EH@%
  1180. object file EXAMPLE.OBJ, which is in the CodeView format. The linker is then
  1181. invoked with the /CO option and produces an executable file with the symbol
  1182. table and line-number information required by the debugger.%@NL@%
  1183. %@NL@%
  1184. %@CR:MCV13826@%%@4@%The second example produces the object file MOD1.OBJ, which contains symbol%@EH@%
  1185. and line-number information, and the object file MOD2.OBJ, which contains
  1186. line-number information but no symbol table. The object files are then
  1187. linked. The result is an executable file in which the second module will be
  1188. harder to debug. This executable file, however, will be smaller than it
  1189. would be if both modules were assembled with the /ZI option.%@NL@%
  1190. %@NL@%
  1191. %@CR:MCV13827@%%@4@%The last example demonstrates how to create a mixed-language executable file%@EH@%
  1192. that can be used with the CodeView debugger. The debugger is able to trace
  1193. through different source files in the same session, regardless of the
  1194. language.%@NL@%
  1195. %@NL@%
  1196. %@NL@%
  1197. %@CR:MCV14000@%%@2@%%@AB@%1.4  Starting the CodeView Debugger%@AE@%%@EH@%%@NL@%
  1198. %@NL@%
  1199. %@CR:MCV14001@%%@4@%Before starting the debugger, make sure all the files it requires are%@EH@%
  1200. available. The following files are recommended for source-level debugging:%@NL@%
  1201. %@NL@%
  1202. %@CR:MCV14002@%%@AB@%File                        Location%@AE@%%@NL@%
  1203. %@NL@%
  1204. CV.EXE                      The CodeView program file can be in the current%@NL@%
  1205.                             directory or in any directory accessible with%@NL@%
  1206.                             the PATH command. For example, if you are using%@NL@%
  1207.                             a hard disk setup, you might put CV.EXE in the%@NL@%
  1208.                             \BIN directory. If you have an older version of%@NL@%
  1209.                             the debugger, take care to remove any copies of%@NL@%
  1210.                             CV.EXE from directories in your PATH. The%@NL@%
  1211.                             debugger has an overlay manager that reloads the%@NL@%
  1212.                             file CV.EXE from time to time. If it reloads the%@NL@%
  1213.                             wrong version of this file, your machine will%@NL@%
  1214.                             likely crash.%@NL@%
  1215. %@NL@%
  1216. CV.HLP                      If you want to have the on-line help available%@NL@%
  1217.                             during your session, you should have this file%@NL@%
  1218.                             either in the current directory or in any%@NL@%
  1219.                             directory accessible with the PATH command. For%@NL@%
  1220.                             example, if you set up your compiler files on a%@NL@%
  1221.                             hard disk using the SETUP program provided on%@NL@%
  1222.                             the distribution disk, you might put CV.HLP in%@NL@%
  1223.                             the \BIN directory. If the CodeView debugger%@NL@%
  1224.                             cannot find the help file, you can still use the%@NL@%
  1225.                             debugger, but you will see an error message if%@NL@%
  1226.                             you use one of the help commands.%@NL@%
  1227. %@NL@%
  1228. %@AI@%program%@AE@%.EXE                 The executable file for the program you wish to%@NL@%
  1229.                             debug must be in the current directory or in a%@NL@%
  1230.                             drive and directory you specify as part of the%@NL@%
  1231.                             start-up file specification. The CodeView%@NL@%
  1232.                             debugger will display an error message and will%@NL@%
  1233.                             not start unless the executable file is found.%@NL@%
  1234. %@NL@%
  1235. %@AI@%source%@AE@%%@AB@%.%@AE@%%@AI@%ext%@AE@% (extension       Normally, source files should be in the current%@NL@%
  1236. depends on language)        directory. However, if you specify a file%@NL@%
  1237.                             specification for the source file during%@NL@%
  1238.                             compilation, that specification becomes part of%@NL@%
  1239.                             the symbolic information stored in the%@NL@%
  1240.                             executable file. For example, if you compiled%@NL@%
  1241.                             with the command line argument %@AS@%DEMO%@AE@%, the%@NL@%
  1242.                             CodeView debugger expects the source file to be%@NL@%
  1243.                             in the current directory. However, if you%@NL@%
  1244.                             compiled with the command line argument%@NL@%
  1245.                             %@AS@%\SOURCE\DEMO%@AE@%, the debugger expects the source%@NL@%
  1246.                             file to be in the directory %@AS@%%@AE@%%@AS@%\SOURCE%@AE@%. If the%@NL@%
  1247.                             debugger cannot find the source file in the%@NL@%
  1248.                             directory specified in the executable file%@NL@%
  1249.                             (usually the current directory), the program%@NL@%
  1250.                             prompts you for a new directory. You can either%@NL@%
  1251.                             enter a new directory, or you can press ENTER%@NL@%
  1252.                             to indicate that you do not want a source file%@NL@%
  1253.                             to be used for this module. If no source file is%@NL@%
  1254.                             specified, you must debug in assembly mode.%@NL@%
  1255. %@NL@%
  1256. %@CR:MCV14003@%%@4@%If the appropriate files are in the correct directories, you can enter the%@EH@%
  1257. CodeView command line at the DOS command prompt. The command line has the
  1258. following form:%@NL@%
  1259. %@NL@%
  1260.      CV «%@AI@%options%@AE@%» %@AI@%executablefile%@AE@% «%@AI@%arguments%@AE@%»%@NL@%
  1261. %@NL@%
  1262. %@CR:MCV14004@%%@4@%The %@AI@%options%@AE@% are one or more of the options described in Section 1.5.%@BO:   136bc@% The%@EH@%
  1263. %@AI@%executablefile%@AE@% is the name of an executable file to be loaded by the
  1264. debugger. It must have the extension .EXE or .COM. If you try to load a
  1265. nonexecutable file, the following message appears:%@NL@%
  1266. %@NL@%
  1267.      Not an executable file%@NL@%
  1268. %@NL@%
  1269. %@CR:MCV14005@%%@4@%Compiled programs and assembly-language programs containing CodeView%@EH@%
  1270. symbolic information will always have the extension .EXE. Files with the
  1271. extension .COM can be debugged in assembly mode, but they can never contain
  1272. symbolic information.%@NL@%
  1273. %@NL@%
  1274. %@CR:MCV14006@%%@4@%The optional %@AI@%arguments%@AE@% are parameters passed to the %@AI@%executablefile%@AE@%. If the%@EH@%
  1275. program you are debugging does not accept command-line arguments, you do not
  1276. need to pass any arguments.%@NL@%
  1277. %@NL@%
  1278. %@CR:MCV14007@%%@4@%If you specify the %@AI@%executablefile%@AE@% as a file name with no extension, the%@EH@%
  1279. CodeView debugger searches for a file with the given base name and the
  1280. extension .EXE. Therefore, you must specify the .COM extension if you are
  1281. debugging a .COM file. If the file is not in the CodeView format, the
  1282. debugger starts in assembly mode and displays the following message:%@NL@%
  1283. %@NL@%
  1284.      No symbolic information%@NL@%
  1285. %@NL@%
  1286. %@CR:MCV14008@%%@4@%You must specify an executable file when you start the CodeView debugger. If%@EH@%
  1287. you omit the executable file, the debugger displays a message showing the
  1288. correct command-line format.%@NL@%
  1289. %@NL@%
  1290. %@CR:MCV14009@%%@4@%When you give the debugger a valid command line, the executable program and%@EH@%
  1291. the source file are loaded, the address data are processed, and the CodeView
  1292. display appears. The initial display will be in window mode or sequential
  1293. mode, depending on the options you specify and the type of computer you
  1294. have.%@NL@%
  1295. %@NL@%
  1296. %@CR:MCV1400A@%%@4@%For example, if you wanted to debug the program BENCHMRK.EXE, you could%@EH@%
  1297. start the debugger with the following command line:%@NL@%
  1298. %@NL@%
  1299.      CV BENCHMRK%@NL@%
  1300. %@NL@%
  1301. %@CR:MCV1400B@%%@4@%If you give this command line on an IBM Personal Computer, window mode is%@EH@%
  1302. selected automatically. The display will look like Figure 1.1%@FN@%
  1303. Figure 1.1 is found on page 19 of the printed version.%@EF@%.%@NL@%
  1304. %@NL@%
  1305. %@CR:MCV1400C@%%@4@%If you give the same command line on most non-IBM computers, sequential mode%@EH@%
  1306. will be selected. The following lines appear:%@NL@%
  1307. %@NL@%
  1308.      Microsoft (R) CodeView (R)  Version 2.3%@NL@%
  1309.      (C) Copyright Microsoft Corp. 1986-1989. All rights reserved.%@NL@%
  1310. %@NL@%
  1311.      >%@NL@%
  1312. %@NL@%
  1313. %@CR:MCV1400D@%%@4@%You can use CodeView options to override the default start-up mode.%@EH@%%@NL@%
  1314. %@NL@%
  1315. %@CR:MCV1400E@%%@4@%If your program is written in a high-level language, the CodeView debugger%@EH@%
  1316. is now at the beginning of the start-up code that precedes your program. In
  1317. source mode, you can enter an execution command (such as Trace or Program
  1318. Step) to execute automatically through the start-up code to the beginning of
  1319. your program. At this point, you are ready to start debugging your program,
  1320. as described in Chapters 3%@BO:   2d605@%-11.%@NL@%
  1321. %@NL@%
  1322. %@NL@%
  1323. %@CR:MCV15000@%%@2@%%@AB@%1.5  Using CodeView Options%@AE@%%@EH@%%@NL@%
  1324. %@NL@%
  1325. %@CR:MCV15001@%%@4@%You can change the start-up behavior of the debugger by specifying options%@EH@%
  1326. in the command line. An option is a sequence of characters preceded by
  1327. either a forward slash (/) or a dash (-).%@NL@%
  1328. %@NL@%
  1329. %@CR:MCV15002@%%@4@%For brevity, this manual will list only the forward slash when describing%@EH@%
  1330. options, but you may use either. Unlike compiler command-line options,
  1331. CodeView command-line options are not case sensitive.%@NL@%
  1332. %@NL@%
  1333. %@CR:MCV15003@%%@4@%A file whose name begins with a dash must be renamed before you use it with%@EH@%
  1334. the CodeView debugger so the debugger will not interpret the dash as an
  1335. option designator. You can use more than one option in a command line, but
  1336. each option must have its own option designator, and spaces must separate
  1337. each option from other elements of the line.%@NL@%
  1338. %@NL@%
  1339. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1340. %@AI@%NOTE%@AE@%%@NL@%
  1341.    The CodeView debugger's defaults for IBM Personal Computers are different%@NL@%
  1342.    from the defaults it has for other computers. However, the debugger may%@NL@%
  1343.    not always recognize the difference between computers, and defaults may%@NL@%
  1344.    vary accordingly.%@NL@%
  1345. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1346. %@NL@%
  1347. %@CR:MCV15004@%%@4@%The following list suggests some situations in which you might want to use%@EH@%
  1348. an option. If more than one condition applies, you can use more than one
  1349. option (in any order). If none of the conditions applies, you need not use
  1350. any options.%@NL@%
  1351. %@NL@%
  1352. %@CR:MCV15005@%%@AB@%Condition                                               Option%@AE@%%@NL@%
  1353. %@NL@%
  1354. You want to use two monitors with the                   /2%@NL@%
  1355. CodeView debugger.          %@NL@%
  1356. %@NL@%
  1357. You want a 43-line display and you have an              /43%@NL@%
  1358. IBM or IBM-compatible computer with an                  %@NL@%
  1359. enhanced graphics adapter (EGA) and an                  %@NL@%
  1360. enhanced color display.     %@NL@%
  1361. %@NL@%
  1362. You want a 50-line display and you have a               /50%@NL@%
  1363. graphics adapter card that supports 50-line             %@NL@%
  1364. mode. %@NL@%
  1365. %@NL@%
  1366. You have a two-color monitor, a color                   /B%@NL@%
  1367. graphics adapter, and an IBM or                         %@NL@%
  1368. IBM-compatible computer.                                %@NL@%
  1369. %@NL@%
  1370. You want the CodeView debugger to                       /C%@AI@%commands%@AE@%%@NL@%
  1371. automatically execute a series of commands when         %@NL@%
  1372. it starts up.               %@NL@%
  1373. %@NL@%
  1374. You are using an IBM-compatible computer                /D%@NL@%
  1375. that does not support certain IBM-specific              %@NL@%
  1376. interrupt-trapping functions.                           %@NL@%
  1377. %@NL@%
  1378. You have expanded memory and want the                   /E%@NL@%
  1379. CodeView debugger to take advantage of it.              %@NL@%
  1380. %@NL@%
  1381. You are using an IBM-compatible computer                /F%@NL@%
  1382. to debug a program that does not use graphics           %@NL@%
  1383. or multiple video-display pages,                        %@NL@%
  1384. and you want to be able to see the output               %@NL@%
  1385. screen.                     %@NL@%
  1386. %@NL@%
  1387. You are using a non-IBM-compatible                      /I%@NL@%
  1388. computer and want to enable CTRL+C and                  %@NL@%
  1389. CTRL+BREAK.                 %@NL@%
  1390. %@NL@%
  1391. You run CodeView (CVP) in OS/2 protected mode           /L%@NL@%
  1392. and want to debug dynamic-link libraries.               %@NL@%
  1393. %@NL@%
  1394. You have a mouse installed in your                      /M%@NL@%
  1395. system, but do not want to use it during the            %@NL@%
  1396. debugging session.          %@NL@%
  1397. %@NL@%
  1398. You run CodeView (CVP) with OS/2, Version 1.10          /O%@NL@%
  1399. or later, and wish to debug multiple processes.         %@NL@%
  1400. %@NL@%
  1401. You have a non-IBM EGA and have problems                /P%@NL@%
  1402. running the debugger.       %@NL@%
  1403. %@NL@%
  1404. You have a 386 processor and wish to                    /R%@NL@%
  1405. use the debug registers to speed up the                 %@NL@%
  1406. execution of tracepoints.                               %@NL@%
  1407. %@NL@%
  1408. You are debugging a graphics program or a               /S%@NL@%
  1409. program that uses multiple video-display%@NL@%
  1410. pages, and you want to be able to see the%@NL@%
  1411. output screen.%@NL@%
  1412. %@NL@%
  1413. You are using a non-IBM-compatible                      /S%@NL@%
  1414. computer and want to be able to see the output%@NL@%
  1415. screen.%@NL@%
  1416. %@NL@%
  1417. You have an IBM computer, but wish to                   /T%@NL@%
  1418. debug in sequential mode (for example, with
  1419. redirection).
  1420. %@NL@%
  1421. You have an IBM-compatible computer                     /W%@NL@%
  1422. and want to use window mode.
  1423. %@NL@%
  1424. %@CR:MCV15006@%%@4@%For example, assume you are using an IBM-compatible computer with a color%@EH@%
  1425. graphics adapter (CGA) and a two-color monitor. The program you are
  1426. debugging, which you could name GRAPHIX.EXE, plots points in graphics mode.
  1427. You want to be able to see the output screen during the debugging session.
  1428. Finally, you want to be able to start the debugger several times without
  1429. having to remember all the options, and you want to execute the high-level
  1430. language start-up code automatically each time. You could create a batch
  1431. file consisting of the following line:%@NL@%
  1432. %@NL@%
  1433.      CV /W /B /S /CGmain GRAPHIX%@NL@%
  1434. %@NL@%
  1435. %@CR:MCV15007@%%@4@%The CodeView options are described in more detail in Sections 1.5.1%@BO:   14c56@%-1.5.16%@EH@%
  1436. below.%@NL@%
  1437. %@NL@%
  1438. %@NL@%
  1439. %@CR:MCV15100@%%@3@%%@AB@%1.5.1  Using Two Video Adapters%@AE@%%@EH@%%@NL@%
  1440. %@NL@%
  1441. %@CR:MCV15101@%%@AB@%Option%@AE@%%@NL@%
  1442. %@NL@%
  1443.      /2%@NL@%
  1444. %@NL@%
  1445. %@CR:MCV15102@%%@4@%The /2 option permits the use of two monitors with the CodeView debugger.%@EH@%
  1446. The program display will appear on the current default monitor, while the
  1447. CodeView display appears on the other monitor. You must have two monitors
  1448. and two adapters to use the /2 option. For instance, if you have both a
  1449. color graphics adapter and a monochrome adapter, you might want to set the
  1450. CGA up as the default adapter. You could then debug a graphics program with
  1451. the graphics display appearing on the graphics monitor and the debugging
  1452. display appearing on the monochrome monitor.%@NL@%
  1453. %@NL@%
  1454. %@NL@%
  1455. %@CR:MCV15200@%%@3@%%@AB@%1.5.2  Using the Enhanced Graphics Adapter's 43-Line Mode%@AE@%%@EH@%%@NL@%
  1456. %@NL@%
  1457. %@CR:MCV15201@%%@AB@%Option%@AE@%%@NL@%
  1458. %@NL@%
  1459.      /43%@NL@%
  1460. %@NL@%
  1461. %@CR:MCV15202@%%@4@%If you have an enhanced graphics adapter (EGA) and a monochrome monitor or%@EH@%
  1462. an enhanced color display monitor (or a compatible monitor), you can use the
  1463. /43 option to enable a 43-line-by-80-column text mode. You cannot use this
  1464. mode with other monitors, such as a CGA or a monochrome adapter (MA). The
  1465. CodeView debugger will ignore the option if it does not detect an EGA.%@NL@%
  1466. %@NL@%
  1467. %@CR:MCV15203@%%@4@%The EGA's 43-line mode performs the same as the normal 25-line-by-80-column%@EH@%
  1468. mode used by default on the EGA, CGA, and MA. The advantage of the 43-line
  1469. mode is that more text fits on the CodeView display; the disadvantage is
  1470. that the text is smaller and harder to read. If you have an EGA, you can
  1471. experiment to see which size you prefer.%@NL@%
  1472. %@NL@%
  1473. %@CR:MCV15204@%%@4@%The video graphics adapter (VGA) card also supports this option.%@EH@%%@NL@%
  1474. %@NL@%
  1475. %@CR:MCV15205@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  1476. %@NL@%
  1477.      CV /43 CALC CALC.DAT%@NL@%
  1478. %@NL@%
  1479. %@CR:MCV15206@%%@4@%The example above starts the CodeView debugger in 43-line mode if you have%@EH@%
  1480. an EGA video adapter and an enhanced color or monochrome monitor. The option
  1481. will be ignored if you lack the hardware to support it.%@NL@%
  1482. %@NL@%
  1483. %@NL@%
  1484. %@CR:MCV15300@%%@3@%%@AB@%1.5.3  Using 50-Line Mode%@AE@%%@EH@%%@NL@%
  1485. %@NL@%
  1486. %@CR:MCV15301@%%@AB@%Option%@AE@%%@NL@%
  1487. %@NL@%
  1488.      /50%@NL@%
  1489. %@NL@%
  1490. %@CR:MCV15302@%%@4@%If you have a graphics adapter card (such as a VGA) and monitor that support%@EH@%
  1491. 50-line mode, then you can use the /50 option to enable a
  1492. 50-line-by-80-column text mode. You cannot use this mode with most adapters,
  1493. such as a CGA or an MA. The CodeView debugger will ignore the option if your
  1494. hardware does not support 50-line mode.%@NL@%
  1495. %@NL@%
  1496. %@CR:MCV15303@%%@4@%The 50-line mode performs the same as the normal 25-line-by-80-column mode%@EH@%
  1497. used by default on the EGA, VGA, CGA, and MA. The advantage of the 50-line
  1498. mode is that more text fits on the CodeView display; the disadvantage is
  1499. that the text is smaller and harder to read.%@NL@%
  1500. %@NL@%
  1501. %@CR:MCV15304@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  1502. %@NL@%
  1503.      CV /50 CALC CALC.DAT%@NL@%
  1504. %@NL@%
  1505. %@CR:MCV15305@%%@4@%The example above starts the CodeView debugger in 50-line mode if this mode%@EH@%
  1506. is supported by your hardware.%@NL@%
  1507. %@NL@%
  1508. %@NL@%
  1509. %@CR:MCV15400@%%@3@%%@AB@%1.5.4  Starting with a Black-and-White Display%@AE@%%@EH@%%@NL@%
  1510. %@NL@%
  1511. %@CR:MCV15401@%%@AB@%Option%@AE@%%@NL@%
  1512. %@NL@%
  1513.      /B%@NL@%
  1514. %@NL@%
  1515. %@CR:MCV15402@%%@4@%The /B option forces the CodeView debugger to display in two colors even if%@EH@%
  1516. you have a color adapter (CGA, EGA, or compatible). By default, the debugger
  1517. checks on start-up to see what kind of display adapter is attached to your
  1518. computer. If the debugger detects an MA, it displays in two colors. If it
  1519. detects a color adapter, it displays in multiple colors.%@NL@%
  1520. %@NL@%
  1521. %@CR:MCV15403@%%@4@%If you use a two-color monitor with a CGA or EGA, you may want to disable%@EH@%
  1522. color. Monitors that display in only two colors (usually green and black, or
  1523. amber and black) often attempt to show colors with different cross-hatching
  1524. patterns, or in gray-scale shades of the display color. In either case, you
  1525. may find the display easier to read if you use the /B option to force
  1526. black-and-white display. Most two-color monitors still have four color
  1527. distinctions: background (black), normal text, high-intensity text, and
  1528. reverse-video text.%@NL@%
  1529. %@NL@%
  1530. %@CR:MCV15404@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  1531. %@NL@%
  1532.      CV /B CALC CALC.DAT%@NL@%
  1533. %@NL@%
  1534. %@CR:MCV15405@%%@4@%The example above starts the CodeView debugger in black-and-white mode. This%@EH@%
  1535. is the only mode available if you have an MA. The display is usually easier
  1536. to read in this mode if you have a CGA and a two-color monitor.%@NL@%
  1537. %@NL@%
  1538. %@NL@%
  1539. %@CR:MCV15500@%%@3@%%@AB@%1.5.5  Specifying Start-Up Commands%@AE@%%@EH@%%@NL@%
  1540. %@NL@%
  1541. %@CR:MCV15501@%%@AB@%Option%@AE@%%@NL@%
  1542. %@NL@%
  1543.      /C%@AI@%commands%@AE@%%@NL@%
  1544. %@NL@%
  1545. %@CR:MCV15502@%%@4@%The /C option allows you to specify one or more %@AI@%commands%@AE@% that will be%@EH@%
  1546. executed automatically upon start-up. You can use these options to invoke
  1547. the debugger from a batch or MAKE file. Each command is separated from the
  1548. previous command by a semicolon.%@NL@%
  1549. %@NL@%
  1550. %@CR:MCV15503@%%@4@%If one or more of your start-up commands have arguments that require spaces%@EH@%
  1551. between them, you should enclose the entire option in double quotation
  1552. marks. Otherwise, the debugger will interpret each argument as a separate
  1553. CodeView command-line argument rather than as a debugging-command argument.%@NL@%
  1554. %@NL@%
  1555. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1556. %@AI@%WARNING%@AE@%%@NL@%
  1557.    Any start-up option that uses the less-than (<) or greater-than (>)%@NL@%
  1558.    symbol must be enclosed in double quotation marks even if it does not%@NL@%
  1559.    require spaces. This ensures that the redirection command will be%@NL@%
  1560.    interpreted by the CodeView debugger rather than by DOS.%@NL@%
  1561. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1562. %@NL@%
  1563. %@CR:MCV15504@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  1564. %@NL@%
  1565.      CV /CGmain CALC CALC.DAT%@NL@%
  1566. %@NL@%
  1567. %@CR:MCV15505@%%@4@%The example above loads the CodeView debugger with %@AS@%CALC%@AE@% as the executable%@EH@%
  1568. file and %@AS@%CALC.DAT%@AE@% as the argument. Upon start-up, the debugger executes the
  1569. high-level-language start-up code with the command %@AS@%Gmain%@AE@%. Since no space is
  1570. required between the CodeView command %@AS@%(G)%@AE@% and its argument %@AS@%(main)%@AE@%, the
  1571. option is not enclosed in double quotation marks.%@AS@%%@NL@%
  1572. %@NL@%
  1573.      CV "/C;S&;G INTEGRAL;DS ARRAYX L 20" CALC CALC.DAT%@NL@%
  1574. %@NL@%
  1575. %@CR:MCV15506@%%@4@%The example above loads the same file with the same argument as the first%@EH@%
  1576. example, but the command list is more extensive. The debugger starts in
  1577. mixed source/assembly mode ( %@AS@%S&%@AE@%). It executes to the routine %@AS@%INTEGRAL%@AE@%(%@AS@%G%@AE@%
  1578. %@AS@%INTEGRAL%@AE@%), and then dumps 20 short real numbers, starting at the address of
  1579. the variable %@AS@%ARRAYX%@AE@% (%@AS@%DS ARRAYX%@AE@%%@AS@%L 20%@AE@%). Since several of the commands use
  1580. spaces, the entire option is enclosed in double quotation marks.%@NL@%
  1581. %@NL@%
  1582.      CV "/C<INPUT.FIL" CALC CALC.DAT%@NL@%
  1583. %@NL@%
  1584. %@CR:MCV15507@%%@4@%The example above loads the same file and argument as the first example, but%@EH@%
  1585. the start-up command directs the debugger to accept the input from the file
  1586. %@AS@%INPUT.FIL%@AE@% rather than from the keyboard. Although the option does not
  1587. include any spaces, it must be enclosed in double quotation marks so that
  1588. the less-than symbol will be read by the CodeView debugger rather than by
  1589. DOS.%@NL@%
  1590. %@NL@%
  1591. %@NL@%
  1592. %@CR:MCV15600@%%@3@%%@AB@%1.5.6  Handling Interrupt Trapping (DOS Only)%@AE@%%@EH@%%@NL@%
  1593. %@NL@%
  1594. %@CR:MCV15601@%%@4@%%@AB@%Options%@AE@%%@EH@%%@NL@%
  1595. %@NL@%
  1596.      /D%@NL@%
  1597. %@NL@%
  1598. %@CR:MCV15602@%%@4@%The /D option turns off nonmaskable interrupt (NMI) trapping and 8259%@EH@%
  1599. interrupt trapping. If you are using an IBM PC Convertible, Tandy(R) 1000,
  1600. or the AT&T(R) 6300 Plus and you are experiencing system crashes with
  1601. CodeView, try starting with the /D option. To enable window mode, use /W
  1602. with /D; otherwise sequential mode is set automatically. Note that because
  1603. this option turns off interrupt trapping, CTRL+C and CTRL+BREAK will not
  1604. work, and an external interrupt may occur during a trace operation. If this
  1605. happens, you may find yourself tracing the interrupt handler instead of your
  1606. program.%@NL@%
  1607. %@NL@%
  1608. %@CR:MCV15603@%%@4@%The /I option forces the debugger to handle NMI and 8259 interrupt trapping.%@EH@%
  1609. Use this option to enable CTRL+C and CTRL+BREAK on computers not recognized
  1610. as being IBM compatible by the debugger, such as the Eagle(R) PC. Window
  1611. mode is set automatically with the /I option; you don't have to specify /W.
  1612. Using the /I option lets you stop program execution at any point while you
  1613. are using the CodeView debugger.%@NL@%
  1614. %@NL@%
  1615. %@NL@%
  1616. %@CR:MCV15700@%%@3@%%@AB@%1.5.7  Using Expanded Memory (DOS Only)%@AE@%%@EH@%%@NL@%
  1617. %@NL@%
  1618. %@CR:MCV15701@%%@AB@%Option%@AE@%%@NL@%
  1619. %@NL@%
  1620.      /E%@NL@%
  1621. %@NL@%
  1622. %@CR:MCV15702@%%@4@%"Expanded memory" refers to memory made accessible according to the%@EH@%
  1623. Microsoft/Lotus(R)/Intel(R) EMS specification. This access provides your
  1624. system with memory above the 640K MS-DOS limitation on RAM. However, since
  1625. MS-DOS will not recognize this additional memory, programs can make use of
  1626. expanded memory in limited ways.%@NL@%
  1627. %@NL@%
  1628. %@CR:MCV15703@%%@4@%The /E option enables the use of expanded memory. If expanded memory is%@EH@%
  1629. present, the CodeView debugger uses it to store the symbolic information of
  1630. the program. This may be as much as 85% of the size of the executable file
  1631. for the program, and represents space that would otherwise be taken up in
  1632. main memory.%@NL@%
  1633. %@NL@%
  1634. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1635. %@AI@%NOTE%@AE@%%@NL@%
  1636.    This option enables only expanded memory, not %@AI@%extended%@AE@% memory. Extended
  1637.    memory makes use of protected-mode instructions,rather than the
  1638.    Microsoft/Lotus/Intel specification for memory paging.%@NL@%
  1639. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1640. %@NL@%
  1641. %@NL@%
  1642. %@CR:MCV15800@%%@3@%%@AB@%1.5.8  Setting the Screen-Exchange Mode (DOS Only)%@AE@%%@EH@%%@NL@%
  1643. %@NL@%
  1644. %@CR:MCV15801@%%@4@%%@AB@%Options%@AE@%%@EH@%%@NL@%
  1645. %@NL@%
  1646.      /F%@NL@%
  1647.      /S%@NL@%
  1648. %@NL@%
  1649. %@CR:MCV15802@%%@4@%The CodeView debugger allows you to move quickly back and forth between the%@EH@%
  1650. output screen, which contains the output from your program, and the
  1651. debugging screen, which contains the debugging display. The debugger can
  1652. handle this screen exchange in two ways: screen flipping or screen swapping.
  1653. The /F option (screen flipping) and the /S option (screen swapping) allow
  1654. you to choose the method from the command line. If neither method is
  1655. specified (possible only on non-IBM computers), the Screen Exchange command
  1656. will not work. No screen exchange is the default for non-IBM computers.
  1657. Screen flipping is the default for IBM computers with graphics adapters, and
  1658. screen swapping is the default for IBM computers with monochrome adapters.
  1659. Screen flipping uses the video-display pages of the graphics adapter to
  1660. store each screen of text. Video-display pages are a special memory buffer
  1661. reserved for multiple screens of video output. This method is faster and
  1662. uses less memory than screen swapping. However, screen flipping cannot be
  1663. used with an MA, nor to debug programs that produce graphics or use the
  1664. video-display pages. In addition, the CodeView debugger's screen flipping
  1665. works only with IBM and IBM-compatible microcomputers.%@NL@%
  1666. %@NL@%
  1667. %@CR:MCV15803@%%@4@%Screen swapping has none of the limitations of screen flipping, but is%@EH@%
  1668. significantly slower and requires more memory. In the screen-swapping
  1669. method, the CodeView debugger creates a buffer in memory and uses it to
  1670. store the screen that is not being used. When the user requests the other
  1671. screen, the debugger swaps the screen in the display buffer for the one in
  1672. the storage buffer.%@NL@%
  1673. %@NL@%
  1674. %@CR:MCV15804@%%@4@%When you use screen swapping, the buffer size is 16K for all adapters. The%@EH@%
  1675. amount of memory used by the CodeView debugger is increased by the size of
  1676. the buffer.%@NL@%
  1677. %@NL@%
  1678. %@CR:MCV15805@%%@4@%Table 1.1 shows the default exchange mode (swapping or flipping) and the%@EH@%
  1679. default display mode (sequential or window) for various configurations.
  1680. Display modes are discussed in Section 1.5.14%@BO:   19f30@%, "Enabling Window or
  1681. Sequential Mode."%@NL@%
  1682. %@NL@%
  1683. %@CR:MCV1T100@%%@4@%%@AB@%Table 1.1  Default Exchange and Display Modes%@AE@%%@EH@%%@NL@%
  1684. %@TH:   18    980  3 21 16 12 47 @%%@AB@%                     Display         Default%@AE@%%@AB@%Computer             Adapter         Modes       Alternate Modes%@AE@%IBM                  CGA or EGA      /F /W       /S if your program uses video-                                                 display pages or graphics; /T for sequential                                                 modeIBM compatible       CGA or EGA      /T          /W for window mode; /F for screen flipping                                                 with text programs; or /S for screen swapping                                                 with programs that use video-display pages or                                                 graphicsIBM                  MA              /S /W       /T for sequential modeIBM compatible       MA              /T          /W for window mode; /S for screen swappingNoncompatible        Any             /T          /S for screen swapping%@TE:   18    980  3 21 16 12 47 @%
  1685. %@NL@%
  1686. %@CR:MCV15806@%%@4@%If you are not sure if your computer is completely IBM compatible, you can%@EH@%
  1687. experiment. If the basic input/output system (BIOS) of your computer is not
  1688. compatible enough, the CodeView debugger may not work with the /F option.%@NL@%
  1689. %@NL@%
  1690. %@CR:MCV15807@%%@4@%If you specify the /F option with an MA, the debugger ignores the option%@EH@%
  1691. and uses screen swapping. If you try to use screen flipping to debug a
  1692. program that produces graphics or uses the video-display pages, you may get
  1693. unexpected results and have to start over with the /S option.%@NL@%
  1694. %@NL@%
  1695. %@CR:MCV15808@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  1696. %@NL@%
  1697.      CV /F CALC CALC.DAT%@NL@%
  1698. %@NL@%
  1699. %@CR:MCV15809@%%@4@%The example above starts the CodeView debugger with screen flipping. You%@EH@%
  1700. might use this command line if you have an IBM-compatible computer, and you
  1701. want to override the default screen-exchange mode in order to use less
  1702. memory and switch screens more quickly. The option would not be necessary on
  1703. an IBM computer, since screen flipping is the default.%@NL@%
  1704. %@NL@%
  1705.      CV /S GRAFIX%@NL@%
  1706. %@NL@%
  1707. %@CR:MCV1580A@%%@4@%The example above starts the debugger with screen swapping. You might use%@EH@%
  1708. this command line if your program uses graphics mode.%@NL@%
  1709. %@NL@%
  1710. %@NL@%
  1711. %@CR:MCV15900@%%@3@%%@AB@%1.5.9  Loading Information from Dynamic-Link Libraries (OS/2 Only)%@AE@%%@EH@%%@NL@%
  1712. %@NL@%
  1713. %@CR:MCV15901@%%@AB@%Option%@AE@%%@NL@%
  1714. %@NL@%
  1715.      /L %@AI@%dynlib%@AE@%%@NL@%
  1716. %@NL@%
  1717. %@CR:MCV15902@%%@4@%The /L option directs the protected-mode CodeView debugger (CVP) to search%@EH@%
  1718. %@AI@%dynlib%@AE@% for symbolic information. At least one space must separate /L from
  1719. %@AI@%dynlib%@AE@%.%@NL@%
  1720. %@NL@%
  1721. %@CR:MCV15903@%%@4@%CVP can debug dynamic-link libraries, but only if it is told what libraries%@EH@%
  1722. to search at run time. When you place a module in a dynamic-link library,
  1723. neither code nor symbolic information for that module is stored in an
  1724. application's executable (.EXE) file. Instead, the code and symbols are
  1725. stored in the library and are not brought together with the main program
  1726. until run time.%@NL@%
  1727. %@NL@%
  1728. %@CR:MCV15904@%%@4@%Thus, the protected-mode debugger needs to search the dynamic-link library%@EH@%
  1729. for symbolic information. Because the debugger does not automatically know
  1730. which libraries to look for, use /L to load symbolic information for
  1731. dynamic-link libraries. You should use this option only with libraries that
  1732. you have created and wish to debug.%@NL@%
  1733. %@NL@%
  1734. %@CR:MCV15905@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  1735. %@NL@%
  1736.      CVP /L DLIB1.DLL /L GRAFLIB.DLL PROG%@NL@%
  1737. %@NL@%
  1738. %@CR:MCV15906@%%@4@%In the example above, CVP is invoked to debug the program PROG.EXE. To find%@EH@%
  1739. symbolic information needed for debugging each module, CVP searches
  1740. libraries DLIB1.DLL and DLIB2.DLL, as well as the executable file PROG.EXE.%@NL@%
  1741. %@NL@%
  1742. %@NL@%
  1743. %@CR:MCV15A00@%%@3@%%@AB@%1.5.10  Turning Off the Mouse%@AE@%%@EH@%%@NL@%
  1744. %@NL@%
  1745. %@CR:MCV15A01@%%@AB@%Option%@AE@%%@NL@%
  1746. %@NL@%
  1747.      /M%@NL@%
  1748. %@NL@%
  1749. %@CR:MCV15A02@%%@4@%If you have a mouse installed on your system, you can tell the CodeView%@EH@%
  1750. debugger to ignore it by using the /M option. You may need to use this
  1751. option if you are debugging a program that uses the mouse and your mouse is
  1752. not a Microsoft Mouse. This is due to a conflict between the program's use
  1753. of the mouse and the debugger's use of it. Use of /M may possibly disable
  1754. the program's use of the mouse, as well as CodeView's.%@NL@%
  1755. %@NL@%
  1756. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1757. %@AI@%NOTE%@AE@%%@NL@%
  1758.    The same conflict between program and debugger applies if you are not%@NL@%
  1759.    using the current Microsoft Mouse driver program (%@AB@%MOUSE.SYS%@AE@%), which is%@NL@%
  1760.    included on the distribution disks for certain Microsoft products. You%@NL@%
  1761.    may want to replace your old mouse driver program with the updated%@NL@%
  1762.    version. You will then be able to use the mouse with both the CodeView%@NL@%
  1763.    debugger and the program you are debugging. If you did not install a%@NL@%
  1764.    mouse driver when you set up Version 4.0 of Microsoft FORTRAN, Version%@NL@%
  1765.    5.0 or later of Microsoft C, or Version 5.0 or later of Macro Assembler,%@NL@%
  1766.    see your user's guide for information on installing %@AB@%MOUSE.SYS%@AE@%. These%@AE@%%@NL@%
  1767.    programs may not work with pointing devices from other manufacturers.%@NL@%
  1768. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1769. %@NL@%
  1770. %@NL@%
  1771. %@CR:MCV15B00@%%@3@%%@AB@%1.5.11  Debugging Multiple Processes (OS/2 only)%@AE@%%@EH@%%@NL@%
  1772. %@NL@%
  1773. %@CR:MCV15B01@%%@AB@%Option%@AE@%%@NL@%
  1774. %@NL@%
  1775.      /O%@NL@%
  1776. %@NL@%
  1777. %@CR:MCV15B02@%%@4@%If you are running OS/2, version 1.10 or later, you can use the /O option to%@EH@%
  1778. enable debugging of multiple processes. See Chapter 12%@BO:   80899@%, "Debugging in
  1779. Protected Mode," for more information on how to debug multiple processes.%@NL@%
  1780. %@NL@%
  1781. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1782. %@AI@%NOTE%@AE@%%@NL@%
  1783.    The /O option is incompatible with the /2 option.%@NL@%
  1784. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1785. %@NL@%
  1786. %@NL@%
  1787. %@CR:MCV15C00@%%@3@%%@AB@%1.5.12  Extending EGA Compatibility%@AE@%%@EH@%%@NL@%
  1788. %@NL@%
  1789. %@CR:MCV15C01@%%@AB@%Option%@AE@%%@NL@%
  1790. %@NL@%
  1791.      /P%@NL@%
  1792. %@NL@%
  1793. %@CR:MCV15C02@%%@4@%The use of the /P option may enable the CodeView debugger to run properly in%@EH@%
  1794. window mode on a non-IBM version of the enhanced graphics adapter (EGA).%@NL@%
  1795. %@NL@%
  1796. %@CR:MCV15C03@%%@4@%Normally, the debugger saves and restores the palette registers of an EGA.%@EH@%
  1797. However, although this procedure works perfectly well with an IBM EGA, it
  1798. can create conflicts with other EGAs. The /P option prevents the saving and
  1799. restoring of palette registers, and so may enhance compatibility.%@NL@%
  1800. %@NL@%
  1801. %@CR:MCV15C04@%%@4@%Symptoms that may indicate the need for using /P include the debugging%@EH@%
  1802. screen starting in nonstandard colors and the debugger appearing to crash
  1803. while in window mode.%@NL@%
  1804. %@NL@%
  1805. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1806. %@AI@%NOTE%@AE@%%@NL@%
  1807.    The %@AB@%/P%@AE@% option may cause the program being debugged to lose some colors%@NL@%
  1808.    whenever you switch back and forth between the debugging screen and the%@NL@%
  1809.    output screen. Therefore, do not use the %@AB@%/P%@AE@% option unless necessary.%@NL@%
  1810. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1811. %@NL@%
  1812. %@NL@%
  1813. %@CR:MCV15D00@%%@3@%%@AB@%1.5.13  Using Debug Registers (386 Only)%@AE@%%@EH@%%@NL@%
  1814. %@NL@%
  1815. %@CR:MCV15D01@%%@AB@%Option%@AE@%%@NL@%
  1816. %@NL@%
  1817.      /R%@NL@%
  1818. %@NL@%
  1819. %@CR:MCV15D02@%%@4@%If you have a 386 processor, you can enable the four debug registers by%@EH@%
  1820. giving the /R option. The debug registers can hold up to four tracepoints.
  1821. Normally,   tracepoints slow down execution of the program substantially
  1822. since CodeView must interrupt the program after each instruction and test
  1823. all tracepoints and watchpoints. Use of debug registers lets CodeView
  1824. implement tracepoints through the processor itself. CodeView can therefore
  1825. execute the program at normal speed even though areas of memory are being
  1826. monitored.%@NL@%
  1827. %@NL@%
  1828. %@CR:MCV15D03@%%@4@%If you specify more than four watchpoints or specify any watch expression,%@EH@%
  1829. CodeView does not use the debug registers.%@NL@%
  1830. %@NL@%
  1831. %@NL@%
  1832. %@CR:MCV15E00@%%@3@%%@AB@%1.5.14  Enabling Window or Sequential Mode%@AE@%%@EH@%%@NL@%
  1833. %@NL@%
  1834. %@CR:MCV15E01@%%@4@%%@AB@%Options%@AE@%%@EH@%%@NL@%
  1835. %@NL@%
  1836.      /T%@NL@%
  1837. %@NL@%
  1838. %@CR:MCV15E02@%%@4@%The CodeView debugger can operate in window mode or sequential mode. Window%@EH@%
  1839. mode displays up to four windows, enabling you to see different aspects of
  1840. the debugging-session program simultaneously. You can also use a mouse in
  1841. window mode. Window mode requires an IBM or IBM-compatible microcomputer.
  1842. Sequential mode works with any computer and is useful with redirection
  1843. commands. Debugging information is displayed sequentially on the screen.%@NL@%
  1844. %@NL@%
  1845. %@CR:MCV15E03@%%@4@%The behavior of each mode is discussed in detail in Chapter 2%@BO:   1b3d8@%, "The%@EH@%
  1846. CodeView Display." Refer back to Table 1.1 for the default and alternate
  1847. modes for your computer. If you are not sure if your computer is completely
  1848. IBM compatible, you can experiment with the options. If the BIOS of your
  1849. computer is not compatible enough, you may not be able to use window mode
  1850. (the /W option).%@NL@%
  1851. %@NL@%
  1852. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1853. %@AI@%NOTE%@AE@%%@NL@%
  1854.    Although window mode is more convenient, any debugging operation that can%@NL@%
  1855.    be done in window mode can also be done in sequential mode.%@NL@%
  1856. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1857. %@NL@%
  1858. %@CR:MCV15E04@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  1859. %@NL@%
  1860.      CV /W SIEVE%@NL@%
  1861. %@NL@%
  1862. %@CR:MCV15E05@%%@4@%The example above starts the CodeView debugger in window mode. You will%@EH@%
  1863. probably want to use the /W option if you have an IBM-compatible computer
  1864. since the default sequential mode is less convenient for most debugging
  1865. tasks.%@NL@%
  1866. %@NL@%
  1867.      CV /T SIEVE%@NL@%
  1868. %@NL@%
  1869. %@CR:MCV15E06@%%@4@%The example above starts the debugger in sequential mode. You might want to%@EH@%
  1870. use this option if you have an IBM computer and have a specific reason for
  1871. using sequential mode. For instance, sequential mode usually works better if
  1872. you are redirecting your debugging output to a remote terminal.%@NL@%
  1873. %@NL@%
  1874. %@NL@%
  1875. %@CR:MCV16000@%%@2@%%@AB@%1.6  Debugging Large Programs%@AE@%%@EH@%%@NL@%
  1876. %@NL@%
  1877. %@CR:MCV16001@%%@4@%Because the CodeView debugger must reside in memory along with the program%@EH@%
  1878. you are debugging, there may not be enough room to debug some large programs
  1879. that could otherwise run in memory alone. However, there are at least three
  1880. ways to get around memory limitations:%@NL@%
  1881. %@NL@%
  1882. %@CR:MCV16002@%  1. If you have expanded memory, use the /E option described earlier. This%@NL@%
  1883.      will enable CodeView to put the symbol table in expanded memory, thus%@NL@%
  1884.      freeing up a good deal of main memory.%@NL@%
  1885. %@NL@%
  1886.   2. Since CodeView now supports the debugging of overlaid programs, you can%@NL@%
  1887.      substantially reduce the amount of memory required to run your program%@NL@%
  1888.      by using overlays when you link your program.%@NL@%
  1889. %@NL@%
  1890.   3. Save space by using /Zi with modules you plan to focus on in the%@NL@%
  1891.      debugging session only, using /Zd with other modules.%@NL@%
  1892. %@NL@%
  1893. %@NL@%
  1894. %@CR:MCV17000@%%@2@%%@AB@%1.7  Working with Older Versions of the Assembler%@AE@%%@EH@%%@NL@%
  1895. %@NL@%
  1896. %@CR:MCV17001@%%@4@%You can run the CodeView debugger with files developed using older versions%@EH@%
  1897. of the Microsoft or IBM assemblers (prior to 5.0). Since older versions do
  1898. not write line numbers to object files, some of the CodeView debugger's
  1899. features will not be available when you debug programs developed with the
  1900. older assemblers. The following considerations apply in addition to the
  1901. considerations mentioned in Section 1.3.8%@BO:    fbcc@%, "Preparing Assembly Programs."%@NL@%
  1902. %@NL@%
  1903. %@CR:MCV17002@%%@4@%The procedure for assembling and debugging .EXE files by using older%@EH@%
  1904. versions of the assembler is summarized below. The debugger can be used on
  1905. either .EXE or .COM files, but you can only view symbolic information in
  1906. .EXE files.%@NL@%
  1907. %@NL@%
  1908. %@CR:MCV17003@%  1. In your source file, declare public any symbols, such as labels and%@NL@%
  1909.      variables, that you want to reference in the debugger. If the file is%@NL@%
  1910.      small, you may want to declare all symbols public.%@NL@%
  1911. %@NL@%
  1912.   2. As mentioned earlier, make sure that the code segment class name ends%@NL@%
  1913.      with the letters %@AS@%CODE%@AE@%. (For example: %@AS@%'MYCODE%@AE@%.)%@NL@%
  1914. %@NL@%
  1915.   3. Assemble as usual. No special options are required, and all assembly%@NL@%
  1916.      options are allowed.%@NL@%
  1917. %@NL@%
  1918.   4. Use LINK, Version 3.6 or later. Do not use the linker provided with%@NL@%
  1919.      older assembler versions. Use the /CODEVIEW option when linking.%@NL@%
  1920. %@NL@%
  1921.   5. Debug in assembly mode (this is the start-up default if the debugger%@NL@%
  1922.      fails to find line-number information). You cannot use source mode for%@NL@%
  1923.      debugging, but you can load the source file into the display window and%@NL@%
  1924.      view it in source mode. Any labels or variables that you declared%@NL@%
  1925.      public in the source file can be displayed and referenced by name%@NL@%
  1926.      instead of by address. However, they cannot be used in expressions%@NL@%
  1927.      because type information is not written to the object file.%@NL@%
  1928. %@NL@%
  1929. %@NL@%
  1930. %@CR:MCV20000@%%@1@%%@AB@%Chapter 2  The CodeView Display%@AE@%%@EH@%%@NL@%
  1931. ───────────────────────────────────────────────────────────────────────────%@NL@%
  1932. %@NL@%
  1933. %@CR:MCV20001@%%@4@%The Microsoft CodeView debugger screen display can appear in two different%@EH@%
  1934. modes──window and sequential. Either mode provides a useful debugging
  1935. environment, but window mode is more powerful and convenient. The CodeView
  1936. debugger accepts either window commands or dialog commands. Dialog commands
  1937. are entered as command lines following the CodeView prompt (%@AS@%>%@AE@%) in sequential
  1938. mode. They are discussed in Chapter 3%@BO:   2d605@%, "Using Dialog Commands."%@NL@%
  1939. %@NL@%
  1940. %@CR:MCV20002@%%@4@%You will probably want to use window mode if you have the hardware to%@EH@%
  1941. support it. In window mode, the pull-down menus, function keys, and mouse
  1942. support offer fast access to the most common commands. Different aspects of
  1943. the program and debugging environment can be seen in different windows
  1944. simultaneously. Window mode is described in Section 2.1%@BO:   1b99f@% below.%@NL@%
  1945. %@NL@%
  1946. %@CR:MCV20003@%%@4@%Sequential mode is similar to the display mode of the CodeView debugger's%@EH@%
  1947. forerunner, the Microsoft Symbolic Debug Utility (SYMDEB) and the DOS DEBUG
  1948. utility. This mode is required if you do not have an IBM-compatible
  1949. computer, and it is sometimes useful when redirecting command input or
  1950. output. Sequential mode is described in Section 2.2.%@BO:   2c28f@%%@NL@%
  1951. %@NL@%
  1952. %@NL@%
  1953. %@CR:MCV21000@%%@2@%%@AB@%2.1  Using Window Mode%@AE@%%@EH@%%@NL@%
  1954. %@NL@%
  1955. %@CR:MCV21001@%%@4@%The elements of the CodeView display marked in Figure 2.1%@FN@%
  1956. Figure 2.1 is found on page 34 of the printed version.%@EF@% below include the%@EH@%
  1957. following:%@NL@%
  1958. %@NL@%
  1959. %@CR:MCV21002@%  1. The display window shows the program being debugged. It can contain%@NL@%
  1960.      source code (as in the example), assembly-language instructions, or any%@NL@%
  1961.      specified text file.%@NL@%
  1962. %@NL@%
  1963.   2. The current location line (the next line the program will execute) is%@NL@%
  1964.      displayed in reverse video or in a different color. This line may not%@NL@%
  1965.      always be visible because you can scroll to earlier or later parts of%@NL@%
  1966.      the program.%@NL@%
  1967. %@NL@%
  1968.   3. Lines containing previously set breakpoints are shown in high-intensity%@NL@%
  1969.      text.%@NL@%
  1970. %@NL@%
  1971.   4. The dialog window is where you enter dialog commands. These are the%@NL@%
  1972.      commands with optional arguments that you can enter at the CodeView%@NL@%
  1973.      prompt (%@AS@%>%@AE@%). You can scroll up or down in this window to view previous%@NL@%
  1974.      dialog commands and command output.%@NL@%
  1975. %@NL@%
  1976.   5. The cursor is a thin, blinking line that shows the location at which%@NL@%
  1977.      you can enter commands from the keyboard. You can move the cursor up%@NL@%
  1978.      and down, and place it in either the dialog or display window.%@NL@%
  1979. %@NL@%
  1980.   6. The display/dialog separator line divides the dialog window from the%@NL@%
  1981.      display window.%@NL@%
  1982. %@NL@%
  1983.   7. The register window shows the current status of processor registers and%@NL@%
  1984.      flags. It is an optional window that can be opened or closed with one%@NL@%
  1985.      keystroke or with the mouse. If the 386 option is on, a much wider%@NL@%
  1986.      register window is displayed, with 32-bit registers. The register%@NL@%
  1987.      window also displays the effective address at the bottom; the effective%@NL@%
  1988.      address shows the actual location of an operand in physical memory. It%@NL@%
  1989.      is useful when debugging in assembly mode.%@NL@%
  1990. %@NL@%
  1991.   8. The scroll bars are the vertical bars on the right side of the screen.%@NL@%
  1992.      Each scroll bar has an up arrow and a down arrow you can use to scroll%@NL@%
  1993.      through the display with a mouse.%@NL@%
  1994. %@NL@%
  1995.   9. The optional watch window shows the current status of specified%@NL@%
  1996.      variables or expressions. The watch window appears automatically%@NL@%
  1997.      whenever you create watch statements.%@NL@%
  1998. %@NL@%
  1999.  10. The menu bar shows titles of menus and commands that you can activate%@NL@%
  2000.      with the keyboard or the mouse. "Trace" and "Go" represent commands;%@NL@%
  2001.      the other titles are all menus.%@NL@%
  2002. %@NL@%
  2003.  11. Menus can be opened by specifying the appropriate title on the menu%@NL@%
  2004.      bar. On the sample screen, the Watch menu has been opened.%@NL@%
  2005. %@NL@%
  2006.  12. The menu "highlight" is a reverse-video or colored strip indicating the%@NL@%
  2007.      current selection in a menu. You can move the highlight up or down to%@NL@%
  2008.      change the current selection.%@NL@%
  2009. %@NL@%
  2010.  13. The mouse pointer indicates the current position of the mouse. It is%@NL@%
  2011.      shown only if you have a mouse installed on your system.%@NL@%
  2012. %@NL@%
  2013.  14. Dialog boxes (not shown) appear in the center of the screen when you%@NL@%
  2014.      choose a menu selection that requires a response. The dialog box%@NL@%
  2015.      prompts you for a response and then it disappears when you enter your%@NL@%
  2016.      answer.%@NL@%
  2017. %@NL@%
  2018.  15. Message boxes (not shown) appear in the center of the screen to display%@NL@%
  2019.      errors or other messages.%@NL@%
  2020. %@NL@%
  2021. %@CR:MCV21003@%%@4@%The Microsoft CodeView debugger screen elements are described in greater%@EH@%
  2022. detail in the rest of this chapter.%@NL@%
  2023. %@NL@%
  2024. %@NL@%
  2025. %@CR:MCV21100@%%@3@%%@AB@%2.1.1  Executing Window Commands with the Keyboard%@AE@%%@EH@%%@NL@%
  2026. %@NL@%
  2027. %@CR:MCV21101@%%@4@%The most common CodeView debugging commands, and all the commands for%@EH@%
  2028. managing the CodeView display, are available with window commands. Window
  2029. commands are one-keystroke commands that can be entered with CTRL-key
  2030. combinations, ALT-key combinations, or the direction keys on the numeric
  2031. keypad.%@NL@%
  2032. %@NL@%
  2033. %@CR:MCV21102@%%@4@%Most window commands can also be entered with a mouse, as described in%@EH@%
  2034. Section 2.1.2.1%@BO:   20e91@%, "Changing the Screen with the Mouse." The window commands
  2035. available from the keyboard are described by category in Sections
  2036. 2.1.1.1%@BO:   1cb3e@%-2.1.1.4 below.%@NL@%
  2037. %@NL@%
  2038. %@CR:MCV21110@%%@4@%%@AB@%2.1.1.1  Moving the Cursor with Keyboard Commands%@AE@%%@EH@%%@NL@%
  2039. %@NL@%
  2040. %@CR:MCV21111@%%@4@%The following keys move the cursor or scroll text up or down in the display%@EH@%
  2041. or dialog window.%@NL@%
  2042. %@CR:MCV21112@%%@NL@%
  2043. %@TH:   97   5324  2 28 48 @%%@AB@%Key                         Function(Switch Cursor)%@AE@%F6                          Moves the cursor between the display and dialog                            windows.                            If the cursor is in the dialog window when you                            press F6, it will move to its previous position                            in the display window. If the cursor is in the                            display window, it will move to its previous                            position in the dialog window.CTRL+G                      Makes the size of the dialog window or display                            window grow.                            This works for whichever window the cursor is                            in. If the cursor is in the display window, the                            display/dialog separator line will move down                            one line. If the cursor is in the dialog window,                            the separator line will move up one line.CTRL+T                      Makes the size of the dialog or display window                            smaller.                            This works for whichever window the cursor is                            in. If the cursor is in the display window, the                            display/dialog separator line will move up one                            line. If the cursor is in the dialog window, the                            separator line will move down one line.UP ARROW                    Moves the cursor up one line in either the                            display or dialog window.DOWN ARROW                  Moves the cursor down one line in either the                            display or dialog window.PGUP                        Scrolls up one page.                            If the cursor is in the display window, the                            source lines or assembly-language instructions                            scroll up. If the cursor is in the dialog                            window, the buffer of commands entered during                            the session scrolls up. The cursor remains at                            its current position in the window. The length                            of a page is the current number of lines in the                            window.PGDN                        Scrolls down one page.                            If the cursor is in the display window, the                            source lines or assembly-language instructions                            scroll down. If the cursor is in the dialog                            window, the buffer of commands entered during                            the session scrolls down. The cursor remains at                            its current position in the window. The length                            of a page is the current number of lines in the                            window.HOME                        Scrolls to the top of the file, first local                            variable, or beginning of the current command.                            If the cursor is in the display or locals                            window, the text scrolls to the start of the                            source file, program instructions, or local                            variables. If the cursor is in the dialog window                            and you are currently entering a command, the                            cursor moves to the beginning of the line, right                            after the prompt.CTRL+HOME                   Scrolls to the top of the file, first local                            variable, or beginning of the command buffer.                            This key produces the same effect that the HOME                            key does, except that in the dialog window it                            moves the cursor to the beginning of the command                            buffer. The top of the command buffer may be                            blank if you have not yet entered enough                            commands to fill the buffer. The cursor remains                            at its current position in the window.END                         Scrolls to the bottom of the file, last local                            variable, or the end of the current command.                            If the cursor is in the display or locals                            window, the text scrolls to the end of the                            source file, program instructions, or local                            variables. If the cursor is in the dialog window                            and you are entering a command, the cursor moves                            to the end of the command.CTRL+END                    Scrolls to the bottom of the file, to the last                            local variables, or to the end of the command                            buffer.                            This key produces the same effect that the END                            key does, except that in the dialog window, this                            key moves the cursor to the end of the command                            buffer.%@TE:   97   5324  2 28 48 @%
  2044. %@NL@%
  2045. %@CR:MCV21120@%%@4@%%@AB@%2.1.1.2  Changing the Screen with Keyboard Commands%@AE@%%@EH@%%@NL@%
  2046. %@NL@%
  2047. %@CR:MCV21121@%%@4@%The following keys change the screen or switch to a different screen.%@EH@%%@NL@%
  2048. %@NL@%
  2049. %@CR:MCV21122@%%@NL@%
  2050. %@TH:   30   1576  2 28 48 @%%@AB@%Key                         Function%@AE@%F1                          Displays initial on-line Help screen.                            The Help system is discussed in Section 2.1.4.%@BO:   2bcdf@%                            You can also take advantage of the Help system                            by using the Help menu, as mentioned in Section                            2.1.3.9.%@BO:   2ba10@%F2                          Toggles the register window.                            The window disappears if present, or appears if                            absent. You can also toggle the register window                            with the Register selection from the View menu,                            as described in Section 2.1.3.2.%@BO:   250d8@%F3                          Switches between source, mixed, and asse                            Source mode shows source code in the display                            window, whereas assembly mode shows                            assembly-language instructions. Mixed mode shows                            both. You can also change modes with the Source,                            Mixed, and Assembly selections from the View                            menu, as described in Section 2.1.3.2.%@BO:   250d8@%F4                          Switches to the output screen.                            The output screen shows the output, if any, from                            your program. Press any key to return to the                            CodeView screen.%@TE:   30   1576  2 28 48 @%
  2051. %@NL@%
  2052. %@CR:MCV21130@%%@4@%%@AB@%2.1.1.3  Controlling Program Execution with Keyboard Commands%@AE@%%@EH@%%@NL@%
  2053. %@NL@%
  2054. %@CR:MCV21131@%%@4@%The following keys set and clear breakpoints, trace through your program, or%@EH@%
  2055. execute to a breakpoint.%@NL@%
  2056. %@CR:MCV21132@%%@NL@%
  2057. %@TH:   54   3123  2 28 48 @%%@AB@%Key                         Function%@AE@%F5                          Executes to the next breakpoint or to the end of                            the program if no breakpoint is encountered.                            This keyboard command corresponds to the Go                            dialog command when it is given without a                            destination breakpoint argument.F7                          Sets a temporary breakpoint on the line with the                            cursor, and executes to that line (or to a                            previously set breakpoint or the end of the                            program if either is encountered before the                            temporary breakpoint).                            In source mode, if the line does not correspond                            to code (for example, data declaration or                            comment lines), the CodeView debugger sounds a                            warning and ignores the command. This window                            command corresponds to the Go dialog command                            when it is given with a destination breakpoint.F8                          Executes a Trace command.                            The CodeView debugger executes the next source                            line in source mode or the next instruction in                            assembly mode. If the source line or instruction                            contains a call to a routine or interrupt, the                            debugger starts tracing through the call (enters                            the call and is ready to execute the first                            source line or instruction). This command will                            not trace into DOS function calls.F9                          Sets a breakpoint or clears a breakpoint on the                            line with the cursor.                            If the line does not currently have a                            breakpoint, one is set on that line. If the line                            already has a breakpoint, the breakpoint is                            cleared. If the cursor is in the dialog window,                            the CodeView debugger sounds a warning and                            ignores the command. This window command                            corresponds to the Breakpoint Set and Breakpoint                            Clear dialog commands.F10                         Executes the Program Step command.                            The debugger executes the next source line in                            source mode or the next instruction in assembly                            mode. If the source line or instruction contains                            a call to a routine or interrupt, the debugger                            steps over the entire call (executes it to the                            return) and is ready to execute the line or                            instruction after the call.%@TE:   54   3123  2 28 48 @%
  2058. %@NL@%
  2059. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2060. %@AI@%NOTE%@AE@%%@NL@%
  2061.    You can usually interrupt program execution by pressing either CTRL+BREAK%@NL@%
  2062.    or CTRL+C. These key combinations can be used to exit endless loops or to%@NL@%
  2063.    interrupt loops slowed by the Watchpoint or Tracepoint commands (see%@NL@%
  2064.    Chapter 8%@BO:   5c045@%, "Managing Watch Statements"). CTRL+BREAK or CTRL+C may not%@NL@%
  2065.    work if your program has a special use for one or both of these key%@NL@%
  2066.    combinations. If you have an IBM Personal Computer AT (or an%@NL@%
  2067.    AT-compatible), you can use the SYSTEM-REQUEST key to interrupt execution%@NL@%
  2068.    regardless of your program's use of CTRL+BREAK and CTRL+C.%@NL@%
  2069. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2070. %@NL@%
  2071. %@CR:MCV21140@%%@4@%%@AB@%2.1.1.4  Selecting from Menus with the Keyboard%@AE@%%@EH@%%@NL@%
  2072. %@NL@%
  2073. %@CR:MCV21141@%%@4@%This section discusses how to make selections from menus with the keyboard.%@EH@%
  2074. The effects of the selections are discussed in Section 2.1.3%@BO:   23f2f@%, "Using Menu
  2075. Selections," below.%@NL@%
  2076. %@NL@%
  2077. %@CR:MCV21142@%%@4@%The menu bar at the top of the screen has eleven titles: File, View, Search,%@EH@%
  2078. Run, Watch, Options, Language, Calls, Help, Trace, and Go. The first nine
  2079. titles are menus, and the last two are commands. The Trace and Go titles are
  2080. provided primarily for mouse users.%@NL@%
  2081. %@NL@%
  2082. %@CR:MCV21143@%%@4@%The four steps for opening a menu and making a selection are described%@EH@%
  2083. below.%@NL@%
  2084. %@NL@%
  2085. %@CR:MCV21144@%  1. To open a menu, press ALT and the mnemonic (the first letter) of the%@NL@%
  2086.      menu title. This can be accomplished either by pressing ALT first,%@NL@%
  2087.      releasing the key, and pressing the letter; or you can hold down ALT%@NL@%
  2088.      and then press the letter. For example, press ALT+S to open the Search%@NL@%
  2089.      menu. The menu title is highlighted, and a menu box listing the%@NL@%
  2090.      selections pops up below the title.%@NL@%
  2091. %@NL@%
  2092.      The mnemonic is a single letter that represents the selection. In color%@NL@%
  2093.      displays, this letter is in red; in black-and-white displays, it is in%@NL@%
  2094.      bold. In most cases, but not all, the letter is simply the first letter%@NL@%
  2095.      of the name of the selection. You can type an uppercase or a lowercase%@NL@%
  2096.      letter for the same selection.%@NL@%
  2097. %@NL@%
  2098.   2. There are two ways to make a selection from an open menu:%@NL@%
  2099. %@NL@%
  2100.      a.   Press the DOWN ARROW key on the numeric keypad to move down the%@NL@%
  2101.           menu. The highlight will follow your movement. When the item you%@NL@%
  2102.           want is highlighted, press ENTER to execute the command.%@NL@%
  2103.           You can also press the UP ARROW key to move up the menu. If you%@NL@%
  2104.           move off the top or bottom of the menu, the highlight wraps around%@NL@%
  2105.           to the other end of the menu.%@NL@%
  2106. %@NL@%
  2107.      b.   Press the key corresponding to the menu-selection mnemonic.%@NL@%
  2108. %@NL@%
  2109.   3. After a selection is made from the menu, one of three things will%@NL@%
  2110.      happen:%@NL@%
  2111. %@NL@%
  2112.      a.   For most menu selections, the choice is executed immediately.%@NL@%
  2113. %@NL@%
  2114.      b.   The items on the View, Options, and Language menus have small%@NL@%
  2115.           double arrows next to them if the option is on, or no arrows if%@NL@%
  2116.           the option is off.  Choosing the item toggles the option.  The%@NL@%
  2117.           status of the arrows will be reversed the next time an option is%@NL@%
  2118.           chosen.%@NL@%
  2119. %@NL@%
  2120.      c.   Some items require a response. In this case, there is another step%@NL@%
  2121.           in the menu-selection process.%@NL@%
  2122. %@NL@%
  2123.   4. If the item you select requires a response, a dialog box opens when you%@NL@%
  2124.      select a menu item. Type your response to the prompt in the box and%@NL@%
  2125.      press ENTER. For example, the Find dialog box asks you to enter a%@NL@%
  2126.      regular expression (see Appendix A%@BO:   d21a7@% for a complete explanation of%@NL@%
  2127.      regular expressions).%@NL@%
  2128. %@NL@%
  2129.      If your response is valid, the command will be executed. If you enter%@NL@%
  2130.      an invalid response, a message box will appear, telling you the problem%@NL@%
  2131.      and asking you to press a key. Press any key to make the message box%@NL@%
  2132.      disappear.%@NL@%
  2133. %@NL@%
  2134. %@CR:MCV21145@%%@4@%At any point during the process of selecting a menu item, you can press%@EH@%
  2135. ESCAPE to cancel the menu. While a menu is open, you can press the LEFT
  2136. ARROW or RIGHT ARROW key to move from one menu to an adjacent menu, or to
  2137. one of the command titles on the menu bar. Pressing ENTER without entering
  2138. any characters in response to a message box will also cancel the menu.%@NL@%
  2139. %@NL@%
  2140. %@NL@%
  2141. %@CR:MCV21200@%%@3@%%@AB@%2.1.2  Executing Window Commands with the Mouse%@AE@%%@EH@%%@NL@%
  2142. %@NL@%
  2143. %@CR:MCV21201@%%@4@%The CodeView debugger is designed to work with the Microsoft Mouse (it also%@EH@%
  2144. works with some compatible pointing devices). By moving the mouse on a flat
  2145. surface, you can move the mouse pointer in a corresponding direction on the
  2146. screen. The following terms refer to the way you select items or execute
  2147. commands with the mouse.%@NL@%
  2148. %@NL@%
  2149. %@CR:MCV21202@%%@NL@%
  2150. %@AB@%Term                        Definition     %@AE@%%@NL@%
  2151. %@NL@%
  2152. Point                       Move the mouse until the mouse pointer rests on%@NL@%
  2153.                             the item you want to select.%@NL@%
  2154. %@NL@%
  2155. Click                       Quickly press and release a mouse button while%@NL@%
  2156.                             pointing at an item you want to select.%@NL@%
  2157. %@NL@%
  2158. Drag                        Press a mouse button while on a selected item,%@NL@%
  2159.                             then hold the button down while moving the%@NL@%
  2160.                             mouse. The item moves in the direction of the%@NL@%
  2161.                             mouse movement. When the item you are moving is%@NL@%
  2162.                             where you want it, release the button; the item%@NL@%
  2163.                             will stay at that place.%@NL@%
  2164. %@NL@%
  2165. %@NL@%
  2166. %@CR:MCV21203@%%@4@%The CodeView debugger uses two mouse buttons. The terms "click Right,"%@EH@%
  2167. "click Left," "click both," and "click either" are sometimes used to
  2168. designate which buttons to use. When dragging, either button can be used.%@NL@%
  2169. %@NL@%
  2170. %@CR:MCV21210@%%@4@%%@AB@%2.1.2.1  Changing the Screen with the Mouse%@AE@%%@EH@%%@NL@%
  2171. %@NL@%
  2172. %@CR:MCV21211@%%@4@%You can change various aspects of the screen display by pointing to one of%@EH@%
  2173. the following elements and then either clicking or dragging.%@NL@%
  2174. %@CR:MCV21212@%%@NL@%
  2175. %@TH:   44   3054  2 28 48 @%%@AB@%Item                        Action     %@AE@%%@NL@%%@NL@%Single line separating      Drag the separator line up to increase the size%@NL@%display and dialog          of the dialog window while decreasing the size%@NL@%windows                     of the display window, or drag the line down to%@NL@%                            increase the size of the display window while%@NL@%                            decreasing the size of the dialog window. You%@NL@%                            can eliminate either window completely by%@NL@%                            dragging the line all the way up or down%@NL@%                            (providing the cursor is not in the window you%@NL@%                            want to eliminate).%@NL@%%@NL@%UP ARROW or DOWN ARROW      Point and click Left on one of the four arrows%@NL@%on the scroll bar           on the scroll bars to scroll up or down. If you%@NL@%                            are in the display window, source code scrolls%@NL@%                            up or down. If you are in the dialog window, the%@NL@%                            buffer containing dialog commands entered during%@NL@%                            the session scrolls up or down.%@NL@%%@NL@%                            Click Left to scroll up or down just one line at%@NL@%                            a time. Press Left and hold it down in order to%@NL@%                            scroll continuously. Continuous scrolling is%@NL@%                            easier to use when you want to scroll more than%@NL@%                            a couple of lines. The scrolling stops as soon%@NL@%                            as you release the mouse button.%@NL@%%@NL@%Scroll bar elevator         Each scroll bar has an "elevator," which is a%@NL@%                            highlighted rectangle on the bar that can be%@NL@%                            moved up or down with the mouse. In the display%@NL@%                            window, the elevator indicates your relative%@NL@%                            position in the source file; if you are in mixed%@NL@%                            or assembly mode, the elevator indicates your%@NL@%                            position in the executable file relative to the%@NL@%                            instructions that correspond to the source file.%@NL@%                            You can move quickly through the source file by%@NL@%                            dragging the display window elevator up or down.%@NL@%%@NL@%                            In the dialog window, the position of the%@NL@%                            elevator does not have any significance.%@NL@%%@NL@%                            To move up one page (either in the display or%@NL@%                            dialog window), click the scroll bar anywhere%@NL@%                            above the elevator. To move down a page, click%@NL@%                            the scroll bar anywhere below the elevator.%@NL@%%@TE:   44   3054  2 28 48 @%
  2176. %@NL@%
  2177. %@CR:MCV21220@%%@4@%%@AB@%2.1.2.2  Controlling Program Execution with the Mouse%@AE@%%@EH@%%@NL@%
  2178. %@NL@%
  2179. %@CR:MCV21221@%%@4@%By clicking the following mouse items, you can set and clear breakpoints,%@EH@%
  2180. trace through your program, execute to a breakpoint, or change flag bits.%@NL@%
  2181. %@CR:MCV21222@%
  2182. %@TH:   80   4887  2 28 48 @%%@AB@%Item                        Action%@AE@%Source line or              Point and click on a source line in source modeinstruction                 or on an instruction in assembly mode to take                            one of the following actions:                            %@AB@%Button        Result%@AE@%                            Click Left    If the line under the mouse cursor                                          does not have a breakpoint, one is                                          set there.  If the line already                                          has a breakpoint, the breakpoint                                          is removed. Lines with breakpoints                                          are shown in high-intensity text.                            Click Right   A temporary breakpoint is set on                                          the line, and the CodeView                                          debugger executes until it reaches                                          the line (or until it reaches a                                          previously set breakpoint or the                                          end of the program if either is                                          encountered before the temporary                                          breakpoint).                            If you click on a line that does not correspond                            to code (for example, a declaration or comment),                            the CodeView debugger will sound a warning and                            ignore the command."Trace" on menu bar         Point and click to trace the next instruction.                            The kind of trace is determined by which button                            is clicked:                            %@AB@%Button        Result%@AE@%                            Click Left    The Trace command is executed.                                          The CodeView debugger executes                                          the next source line in source                                          mode or the next instruction in                                          assembly mode. If the source line                                          or instruction contains a call to                                          a routine or interrupt, the                                          debugger starts tracing through                                          the call (it enters the call and                                          is ready to execute the first                                          source line or instruction). This                                          command will not trace into DOS                                          function calls.                            Click Right   The Program Step command is                                          executed. The debugger executes                                          the next source line in source                                          mode, or the next instruction in                                          assembly mode. If the source line                                          or instruction contains a call to                                          a routine or interrupt, the                                          CodeView debugger steps over the                                          entire call (it executes the call                                          to the return) and is ready to                                          execute the line or instruction                                          after the call.                            These two commands are different only if the                            current location is the start of a procedure, an                            interrupt, or a call."Go" on menu bar            Point and click either button to execute to the                            next breakpoint, or to the end of the program if                            no breakpoints are encountered.Flag in register window     Point to a flag name and click either button to                            reverse the flag. If the flag bit is set, it                            will be cleared; if the flag bit is cleared, it                            will be set. The flag name is changed on the                            screen to match the new status. If you are using                            color mode, the color of the flag mnemonic will                            also change. This command can only be used when                            the register window is open. Use the command                            with caution since changing flag bits can change                            program execution at the lowest level.%@TE:   80   4887  2 28 48 @%
  2183. %@NL@%
  2184. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2185. %@AI@%NOTE%@AE@%%@NL@%
  2186.    You can usually interrupt program execution by pressing either CTRL+BREAK%@NL@%
  2187.    or CTRL+C. See the note in Section 2.1.1.3%@BO:   1e85f@%, "Controlling Program%@NL@%
  2188.    Execution with Keyboard Commands," for more information.%@NL@%
  2189. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2190. %@NL@%
  2191. %@CR:MCV21230@%%@4@%%@AB@%2.1.2.3  Selecting from Menus with the Mouse%@AE@%%@EH@%%@NL@%
  2192. %@NL@%
  2193. %@CR:MCV21231@%%@4@%This section discusses how to make selections from menus with the mouse. The%@EH@%
  2194. effect of each selection is discussed in Section 2.1.3%@BO:   23f2f@%, "Using Menu
  2195. Selections."%@NL@%
  2196. %@NL@%
  2197. %@CR:MCV21232@%%@4@%The menu bar at the top of the screen has eleven titles: File, View, Search,%@EH@%
  2198. Run, Watch, Options, Language, Calls, Help, Trace, and Go. The first nine
  2199. are menus, and the last two are commands that you can execute by clicking
  2200. with the mouse. The five steps for opening a menu and making a selection are
  2201. described below:%@NL@%
  2202. %@NL@%
  2203. %@CR:MCV21233@%  1. To open a menu, point to the title of the menu you want to select.%@NL@%
  2204. %@NL@%
  2205.   2. With the mouse pointer on the title, press and hold down either mouse%@NL@%
  2206.      button. The selected title is highlighted and a menu box with a list of%@NL@%
  2207.      selections pops up below the title.%@NL@%
  2208. %@NL@%
  2209.   3. Press and drag the mouse toward you. The highlight follows the mouse%@NL@%
  2210.      movement. You can move the highlight up or down in the menu box.%@NL@%
  2211. %@NL@%
  2212.      If you move off the box, the highlight will disappear. However, as long%@NL@%
  2213.      as you do not release the button, you can move the pointer back onto%@NL@%
  2214.      the menu to make the highlight reappear.%@NL@%
  2215. %@NL@%
  2216.   4. When the selection you want is highlighted, release the mouse button.%@NL@%
  2217. %@NL@%
  2218.      When you release the button, the menu selection is executed. One of%@NL@%
  2219.      three things will happen:%@NL@%
  2220. %@NL@%
  2221.      a.   For most menu selections, the choice is executed immediately.%@NL@%
  2222. %@NL@%
  2223.      b.   The items on the View, Options, and Language menus have small%@NL@%
  2224.           double arrows next to them if the option is on, or no arrows if%@NL@%
  2225.           the option is off. Choosing the item toggles the option. The%@NL@%
  2226.           status of the arrows on a chosen item will appear reversed the%@NL@%
  2227.           next time you open the menu.%@NL@%
  2228. %@NL@%
  2229.      c.   Some items require a response. In this case, there is another step%@NL@%
  2230.           in the menu-selection process.%@NL@%
  2231. %@NL@%
  2232.   5. If the item you select requires a response, a dialog box with a prompt%@NL@%
  2233.      appears. Type your response and press ENTER or a mouse button. For%@NL@%
  2234.      example, if you select Find, the prompt will ask you to enter a regular%@NL@%
  2235.      expression (see Section 2.1.3.3%@BO:   25bfd@%, "The Search Menu," or Appendix A%@BO:   d21a7@% for%@NL@%
  2236.      an explanation of regular expressions).%@NL@%
  2237. %@NL@%
  2238.      If your response is valid, the command will be executed. If you enter%@NL@%
  2239.      an invalid response in the dialog box, a message box will appear%@NL@%
  2240.      telling you the problem and asking you to press a key. Press any key or%@NL@%
  2241.      click a mouse button to make the message box disappear.%@NL@%
  2242. %@NL@%
  2243.      Also, if you press ENTER without entering any characters, the message%@NL@%
  2244.      box will disappear.%@NL@%
  2245. %@NL@%
  2246. %@CR:MCV21234@%%@4@%There are several shortcuts you can take when selecting menu items with the%@EH@%
  2247. mouse. If you change your mind and decide not to select an item from a menu,
  2248. just move off the menu and release the mouse button──the menu will
  2249. disappear. You can move from one menu to another by dragging the pointer
  2250. directly from the current menu to the title of the new menu.%@NL@%
  2251. %@NL@%
  2252. %@NL@%
  2253. %@CR:MCV21300@%%@3@%%@AB@%2.1.3  Using Menu Selections%@AE@%%@EH@%%@NL@%
  2254. %@NL@%
  2255. %@CR:MCV21301@%%@4@%This section describes the selections on each of the CodeView menus. These%@EH@%
  2256. selections can be made with the keyboard, as described in Section 2.1.1%@BO:   1c85a@%, or
  2257. with the mouse, as described in Section 2.1.2.%@BO:   20854@%%@NL@%
  2258. %@NL@%
  2259. %@CR:MCV21302@%%@4@%Note that although the Trace and Go commands appear on the menu bar, they%@EH@%
  2260. are not menus. These titles are provided primarily for mouse users.%@NL@%
  2261. %@NL@%
  2262. %@CR:MCV21310@%%@4@%%@AB@%2.1.3.1  The File Menu%@AE@%%@EH@%%@NL@%
  2263. %@NL@%
  2264. %@CR:MCV21311@%%@4@%The File menu includes selections for working on the current source or%@EH@%
  2265. program file. The File menu is shown in Figure 2.2%@FN@%
  2266. Figure 2.2 is found on page 46 of the printed version.%@EF@%, and the selections are
  2267. explained below.%@NL@%
  2268. %@CR:MCV21312@%%@NL@%
  2269. %@TH:   59   3605  2 28 48 @%%@AB@%Selection                   Action%@AE@%Open                        Opens a new file.                            When you make this selection, a dialog box                            appears asking for the name of the new file you                            want to open. Type the name of a source file, an                            include file, or any other text file. The text                            of the new file replaces the current contents of                            the display window                            (if you are in assembly mode, the CodeView                            debugger will switch to source mode). When you                            finish viewing the file, you can reopen the                            original file. The last location and breakpoints                            will still be marked when you return.                            You may not need to open a new file to see                            source files for a different module of your                            program. The CodeView debugger automatically                            switches to the source file of a module when                            program execution enters that module. Although                            switching source files is never necessary, it                            may be desirable if you want to set breakpoints                            or execute to a line in a module not currently                            being executed.                            Note that if the debugger cannot find the source                            file when it switches modules, a dialog box                            appears asking for a file specification for the                            source file. You can either enter a new file                            specification if the file is in another                            directory, or press ENTER if no source file                            exists. If you press ENTER, the module can only                            be debugged in assembly mode.DOS Shell                   Exits to a DOS shell. This where you can execute                            DOS commands or executable files. To return to                            the CodeView debugger, type %@AS@%exit%@AE@% at the DOS                            command prompt. The CodeView screen reappears                            with the same status it had when you left it.                            The Shell Escape command works by saving the                            current processes in memory and then executing a                            second copy of %@AB@%C%@AE@% OMMAND.COM. This requires more                            than 200K of free memory, since the debugger,                            COMMAND.COM, symbol tables, and the debugged                            program must all be saved in memory. If you do                            not have enough memory to execute the Shell                            Escape command, an error message appears. Even                            if you have enough memory to execute the                            command, you may not have enough memory left to                            execute large programs from the shell.                            The Shell Escape command does not work under                            certain conditions. See Section 11.7%@BO:   7b01d@% for                            additional information.Exit                        Terminates the debugger and returns to DOS.%@TE:   59   3605  2 28 48 @%
  2270. %@CR:MCV21320@%%@4@%%@AB@%2.1.3.2  The View Menu%@AE@%%@EH@%%@NL@%
  2271. %@NL@%
  2272. %@CR:MCV21321@%%@4@%The View menu includes selections for switching between source and assembly%@EH@%
  2273. modes, and for switching between the debugging screen and the output screen.
  2274. The corresponding function keys for menu selection are shown on the right
  2275. side of the menu where appropriate. The View menu is shown in Figure 2.3%@FN@%
  2276. Figure 2.3 is found on page 48 of the printed version.%@EF@%,
  2277. and the selections are explained below.%@NL@%
  2278. %@NL@%
  2279. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2280. %@AI@%NOTE%@AE@%%@NL@%
  2281.    The terms "source mode" and "assembly mode" apply to Microsoft Macro%@NL@%
  2282.    Assembler programs as well as to high-level-language programs. Source%@NL@%
  2283.    mode used with assembler programs shows the source code as originally%@NL@%
  2284.    written, including comments and directives. Assembly mode displays%@NL@%
  2285.    unassembled machine code, without symbolic information.%@NL@%
  2286. %@NL@%
  2287.    The use of one mode or another affects Trace and Program Step commands,%@NL@%
  2288.    as explained in Chapter 5%@BO:   3d63b@%, "Executing Code."%@NL@%
  2289. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2290. %@NL@%
  2291. %@CR:MCV21322@%%@4@%At all times exactly one of the following selections will have a small%@EH@%
  2292. double arrow to the left of the name: Source, Mixed, and Assembly. This
  2293. arrow indicates which of the three display modes is in use. If you select a
  2294. mode when you are already in that mode, the selection will be ignored. The
  2295. Registers selection may or may not have a double arrow to the left,
  2296. depending on whether or not the register window is being displayed.%@AB@%%@NL@%
  2297. %@CR:MCV21323@%%@NL@%
  2298. %@AB@%Selection                   Action     %@AE@%%@EH@%%@NL@%
  2299. %@NL@%
  2300. Source                      Changes to source mode (showing source lines%@NL@%
  2301.                             only).%@NL@%
  2302. %@NL@%
  2303. Mixed                       Changes to mixed mode (showing both unassembled%@NL@%
  2304.                             machine code and source lines).%@NL@%
  2305. %@NL@%
  2306. Assembly                    Changes to assembly mode (showing only%@NL@%
  2307.                             unassembled machine code).%@NL@%
  2308. %@NL@%
  2309. Registers                   Selecting this option will toggle the register%@NL@%
  2310.                             window on and off. You can also turn the%@NL@%
  2311.                             register on and off by pressing F2.%@NL@%
  2312. %@NL@%
  2313. Output                      Selecting this option will display the output%@NL@%
  2314.                             screen. The entire CodeView display will%@NL@%
  2315.                             temporarily disappear, but come back as soon as%@NL@%
  2316.                             you press any key. The Output command can also%@NL@%
  2317.                             be selected with F4.%@NL@%
  2318. %@NL@%
  2319. %@NL@%
  2320. %@CR:MCV21330@%%@4@%%@AB@%2.1.3.3  The Search Menu%@AE@%%@EH@%%@NL@%
  2321. %@NL@%
  2322. %@CR:MCV21331@%%@4@%The Search menu includes selections for searching through text files for%@EH@%
  2323. text strings and searching executable code for labels. The Search menu is
  2324. shown in Figure 2.4%@FN@%
  2325. Figure 2.4 is found on page 49 of the printed version.%@EF@%, and the selections are explained below.%@NL@%
  2326. %@CR:MCV21332@%%@NL@%
  2327. %@TH:   86   5324  2 28 48 @%%@AB@%Selection                   Action     %@AE@%Find                        Searches the current source file or other text                            file for a specified regular expression. (This                            selection can also be made without pulling down                            a menu by pressing CTRL+F.)                            When you make this selection, a dialog box opens                            asking you to enter a regular expression. Type                            the expression you want to search for and press                            ENTER. The CodeView debugger starts at the                            current or most recent cursor position in the                            display window and searches for the expression.                            If your entry is found, the cursor moves to the                            first source line containing the expression. If                            you are in assembly mode, the debugger                            automatically switches to source mode when the                            expression is found. If the entry is not found,                            a message box opens, telling you the problem and                            asking you to press a key (you can also click a                            mouse button) to continue.                            Regular expressions are a method of specifying                            variable text strings. This method is similar to                            the DOS method of using wild cards in file                            names. Regular expressions are explained in                            detail in Appendix A of this manual.                            You can use the Search selections without                            understanding regular expressions. Since text                            strings are the simplest form of regular                            expressions, you can simply enter a string of                            characters as the expression you want to find.                            For example, you could enter %@AS@%count%@AE@% if you wanted                            to search for the word "count."                            The following characters have a special meaning                            in regular expressions: backslash (%@AB@%\%@AE@%), asterisk                            (%@AB@%*%@AE@%), left bracket (%@AB@%[%@AE@%), period (%@AB@%.%@AE@%), dollar sign                            (%@AB@%$%@AE@%), and caret (%@AB@%^%@AE@%). In order to find strings                            containing these characters, you must precede                            the characters with a backslash; this cancels                            their special meanings.                            For example, the periods in FORTRAN relational                            and logical operators must be preceded by                            back-slashes. You would use %@AS@%%@AE@%%@AS@%\.EQ%@AE@%%@AS@% %@AE@%%@AS@%%@AE@% to find the%@AS@%.EQ%@AE@%                            operator. With C, you would use %@AS@%%@AE@%%@AS@%\*ptr%@AE@%%@AS@% %@AE@%%@AS@%%@AE@% to find%@AE@%                            %@AS@%%@AE@%%@AS@%*ptr%@AE@%; with BASIC, you would use %@AS@%%@AE@%%@AS@%NAME\$%@AE@% to find%@AE@%                            %@AS@%%@AE@%%@AS@%NAME$%@AE@%.                            The Case Sense selection from the Options menu                            has no effect on searching for regular                            expressions.Next                        Searches for the next match of the current                            regular expression.                            This selection is meaningful only after you have                            used the Search command to specify the current                            regular expression. If the CodeView debugger                            searches to the end of the file without finding                            another match for the expression, it wraps                            around and starts searching at the beginning of                            the file.Previous                    Searches for the previous match of the current                            regular expression.                            This selection is meaningful only after you have                            used the Search command to specify the current                            regular expression. If the debugger searches to                            the beginning of the file without finding                            another match for the expression, it wraps                            around and starts searching at the end of the                            file.Label                       Searches the executable code for an                            assembly-language label.                            If the label is found, the cursor moves to the                            instruction containing the label. If you start                            the search in source mode, the debugger will                            switch to assembly mode to show a label in a                            library routine or an assembly-language module.%@TE:   86   5324  2 28 48 @%
  2328. %@NL@%
  2329. %@CR:MCV21340@%%@4@%%@AB@%2.1.3.4  The Run Menu%@AE@%%@EH@%%@NL@%
  2330. %@NL@%
  2331. %@CR:MCV21341@%%@4@%The Run menu includes selections for running your program. The Run menu is%@EH@%
  2332. shown in Figure 2.5%@FN@%
  2333. Figure 2.5 is found on page 51 of the printed version.%@EF@%, and the selections are explained below.%@NL@%
  2334. %@CR:MCV21342@%
  2335. %@TH:   33   1676  2 28 48 @%%@AB@%Selection                   Action%@AE@%Start                       Starts the program from the beginning and runs                            it.                            Any previously set breakpoints or watch                            statements will still be in effect. The CodeView                            debugger will run your program from the                            beginning to the first breakpoint, or to the end                            of the program if no breakpoint is encountered.                            This has the same effect as selecting Restart                            (see the next selection), then entering the Go                            command.Restart                     Restarts the current program, but does not begin                            executing it.                            You can debug the program again from the                            beginning. Any previously set breakpoints or                            watch statements will still be in effect.Execute                     Executes from the current instruction.                            This is the same as the Execute dialog command                            (%@AB@%E%@AE@%). To stop execution, press any key or a mouse                            button.Clear Breakpoints           Clears all breakpoints.                            This selection may be convenient after selecting                            Restart if you don't want to use previously set                            breakpoints. Note that watch statements are not                            cleared by this command.%@TE:   33   1676  2 28 48 @%
  2336. %@NL@%
  2337. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2338. %@AI@%NOTE%@AE@%%@NL@%
  2339.    Although the Start and Restart selections retain breakpoints along with%@NL@%
  2340.    pass count and arguments, any instructions entered with the Assemble%@NL@%
  2341.    command will be overwritten by the original program.%@NL@%
  2342. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2343. %@NL@%
  2344. %@CR:MCV21350@%%@4@%%@AB@%2.1.3.5  The Watch Menu%@AE@%%@EH@%%@NL@%
  2345. %@NL@%
  2346. %@CR:MCV21351@%%@4@%The Watch menu includes selections for managing the watch window. Selections%@EH@%
  2347. on this menu are also available with dialog commands. The Watch menu is
  2348. shown in Figure 2.6%@FN@%
  2349. Figure 2.6 is found on page 52 of the printed version.%@EF@%, and the selections are explained below.%@NL@%
  2350. %@CR:MCV21352@%%@NL@%
  2351. %@TH:   81   5051  2 28 49 @%%@AB@%Selection                   Action%@AE@%Add Watch                   Adds a watch-expression statement to the watch                            window. (This selection can also be made                            directly, by pressing CTRL+W.)                            A dialog window opens, asking for the                            source-level expression (which may be simply a                            variable) whose value you want to see displayed                            in the watch window. Type the expression and                            press ENTER or a mouse button. The statement                            appears in the watch window in normal text. You                            cannot specify a memory range to be displayed                            with the Add Watch selection as with the Watch                            dialog command.                            You can specify the format in which the value                            will be displayed. Type the expression, followed                            by a comma and a CodeView format specifier. If                            you do not give a format specifier, the CodeView                            debugger displays the value in a default format.                            See Chapter 6%@BO:   43f5c@%, "Examining Data and Expressions,"                            for more information about format specifiers and                            the default format. See Section 8.2%@BO:   5ceb8@%, "Setting                            Watch-Expression and Watch-Memory Statements,"                            for more information about the Watch command.Watchpoint                  Adds a watchpoint statement to the window.                            A dialog window opens, asking for the                            source-level expression whose value you want to                            test. The watchpoint statement appears in the                            watch window in high-intensity text when you                            enter the expression. A watchpoint is a                            conditional breakpoint that causes execution to                            stop when the expression becomes nonzero (true).                            See Section 8.3%@BO:   5ebff@%, "Setting Watchpoints," for                            more information.Tracepoint                  Adds a tracepoint statement to the watch window.                            A dialog window opens, asking for the                            source-level expression or memory range whose                            value you want to test. The tracepoint statement                            appears in the watch window in high-intensity                            text when you enter the expression. A tracepoint                            is a conditional breakpoint that causes                            execution to stop when the value of a given                            expression changes. You cannot specify a memory                            range to be tested with the Tracepoint selection                            as you can with the Tracepoint dialog command.                            When setting a tracepoint expression, you can                            specify the format in which the value will be                            displayed. After the expression type a comma and                            a format specifier. If you do not give a format                            specifier, the CodeView debugger displays the                            value in a default format. See Chapter 6%@BO:   43f5c@%,                            "Examining Data and Expressions," for more                            information about format specifiers and default.                            See Section 8.4%@BO:   6059c@%, "Setting Tracepoints," for                            more information about tracepoints.Delete Watch                Deletes a statement from the watch window. (This                            selection can also be made directly, by pressing                            CTRL+U.)                            A dialog window opens, showing the current watch                            statements. If you are using a mouse, move the                            pointer to the statement you want to delete and                            click either button. If you are using the                            keyboard, press the UP ARROW or DOWN ARROW key                            to move the highlight to the statement you want                            to delete, then press ENTER.Delete All Watch            Deletes all statements in the watch window.                            All watch, watchpoint, and tracepoint statements                            are deleted, the watch window disappears, and                            the display window is redrawn to take advantage                            of the freed space on screen.%@TE:   81   5051  2 28 49 @%
  2352. %@NL@%
  2353. %@CR:MCV21360@%%@4@%%@AB@%2.1.3.6  The Options Menu%@AE@%%@EH@%%@NL@%
  2354. %@NL@%
  2355. %@CR:MCV21361@%%@4@%The Options menu allows you to set options that affect various aspects of%@EH@%
  2356. the behavior of the CodeView debugger. The Options menu is shown in Figure
  2357. 2.7%@FN@%
  2358. Figure 2.7 is found on page 54 of the printed version.%@EF@%, and the selections are explained below.%@NL@%
  2359. %@NL@%
  2360. %@CR:MCV21362@%%@4@%Selections on the Options menu have small double arrows to the left of the%@EH@%
  2361. selection name when the option is on. The status of the option (and the
  2362. presence of the double arrows) is reversed each time you select the option.
  2363. By default, the Flip/Swap and Bytes Coded options are on and the 386 option
  2364. is off when you start the CodeView debugger. Depending on which language
  2365. your main program is in, the debugger will automatically turn Case Sense on
  2366. (if your program is in C) or off (if your program is in another language)
  2367. when you start debugging.%@AB@%%@NL@%
  2368. %@NL@%
  2369. %@CR:MCV21363@%%@4@%The selections from the Options menu are discussed below.%@EH@%%@NL@%
  2370. %@CR:MCV21364@%%@NL@%
  2371. %@TH:   80   4684  2 28 58 @%%@AB@%Selection                   Action%@AE@%Flip/Swap                   When on (the default), screen swapping or screen                            flipping (whichever the debugger was started                            with) is active; when off, swapping or flipping                            is disabled.                            Turning off swapping or flipping makes the                            screen scroll more smoothly. You will not see                            the program flip or swap each time you execute                            part of the program. This option has no effect                            if neither swapping nor flipping was selected                            during start-up.                            ───────────────────────────────────────────────                            %@AI@%WARNING%@AE@%                               Any time your program writes to the screen,                               make sure flipping or swapping is on. If                               swapping and flipping are off, your program                               writes the output at the location of the                               cursor. The CodeView debugger detects the                               screen has changed and redraws the screen,                               thus destroying the program output. An error                               message is also displayed: %@AS@%Flip/Swap%@AE@%                               %@AS@%option off - application output lost%@AE@%.                            ───────────────────────────────────────────────Bytes Coded                 When on (the default), the instructions,                            instruction addresses, and the bytes for each                            instruction are shown; when off, only the                            instructions are shown.                            This option affects only assembly mode. The                            following display shows the appearance of sample                            code when the option is off:                            The following display shows the appearance of                            the same code when the option is on:                            27:              name = gets(namebuf);<R>                                      LEA       AX,Word Ptr [namebuf]<R>                                      PUSH      AX<R>                                      CALL      _gets (03E1)<R>                                      ADD       SP,02<R>                                      MOV       Word Ptr [name],AX                            The following display shows the appearance of                            the same code when the option is on:                            27:              name = gets(namebuf);                            32AF:003E 8D46DE    LEA   AX,Word Ptr [namebuf]                            32AF:0041 50        PUSH  AX                            32AF:0042 E89C03    CALL  _gets (03E1)                            32AF:0045 83C402    ADD   SP,02                            32AF:0048 8946DA    MOV   Word Ptr [name],AXCase Sense                  When the selection is turned on, the CodeView                            debugger assumes that symbol names are case                            sensitive (each lowercase letter is different                            from the corresponding uppercase letter); when                            off, symbol names are not case sensitive.                            This option is on by default for C programs and                            off by default for FORTRAN, BASIC, and assembly                            programs. You will probably want to leave the                            option in its default setting.386 (DOS Only)              When on, the register window will display the                            registers in the wider, 386 format. Furthermore,                            this option will enable you to assemble and                            execute instructions that reference 32-bit                            registers. If the 386 option is not on, any data                            stored in the high-order word of a 32-bit                            register will be lost.                            To use this option, you should have a 386                            processor running in 386 mode. If you do not                            have a 386 processor, the debugger will respond                            with the message, %@AS@%CPU is not an 80386%@AE@%, and leave                            the option turned off.%@TE:   80   4684  2 28 58 @%
  2372. %@NL@%
  2373. %@CR:MCV21370@%%@4@%%@AB@%2.1.3.7  The Language Menu%@AE@%%@EH@%%@NL@%
  2374. %@NL@%
  2375. %@CR:MCV21371@%%@4@%The Language menu allows you to either select the expression evaluator or%@EH@%
  2376. instruct the CodeView debugger to select it for you automatically. The
  2377. Language menu is shown in Figure 2.8%@FN@%
  2378. Figure 2.8 is found on page 56 of the printed version.%@EF@%, and the selections are explained
  2379. below.%@NL@%
  2380. %@NL@%
  2381. %@CR:MCV21372@%%@4@%As with the Options menu, the selection on is marked by double arrows.%@EH@%
  2382. Unlike the Options menu, however, exactly one item (and no more) on the
  2383. Language menu is selected at any given time.%@AB@%%@NL@%
  2384. %@NL@%
  2385. %@CR:MCV21373@%%@4@%The Auto selection causes the debugger to select automatically the%@EH@%
  2386. expression evaluator each time a new source file is loaded. The debugger
  2387. will examine the extension of the source file in order to determine which
  2388. expression evaluator to select. The Auto selection will use the C expression
  2389. evaluator if the current source file does not have a .BAS, .F, .FOR, or .PAS
  2390. extension.%@NL@%
  2391. %@NL@%
  2392. %@CR:MCV21374@%%@4@%If you change to a source module with an .ASM extension, Auto will cause the%@EH@%
  2393. debugger to select the C expression evaluator, but not all of the C defaults
  2394. will be used; system radix will be hexadecimal, case sensitivity will be
  2395. turned off, and the register window will be displayed.%@NL@%
  2396. %@NL@%
  2397. %@CR:MCV21375@%%@4@%When a language expression evaluator is selected, the debugger uses that%@EH@%
  2398. evaluator, regardless of what kind of program is being debugged.%@NL@%
  2399. %@NL@%
  2400. %@CR:MCV21380@%%@4@%%@AB@%2.1.3.8  The Calls Menu%@AE@%%@EH@%%@NL@%
  2401. %@NL@%
  2402. %@CR:MCV21381@%%@4@%The Calls menu is different from other menus in that its contents and size%@EH@%
  2403. change depending on the status of your program. The Calls menu is shown in
  2404. Figure 2.9%@FN@%
  2405. Figure 2.9 is found on page 57 of the printed version.%@EF@%.%@NL@%
  2406. %@NL@%
  2407. %@CR:MCV21382@%%@4@%The mnemonic for each item in the Calls menu is a number. Type the number%@EH@%
  2408. displayed immediately to the left of a routine in order to select it. You
  2409. can also use the UP ARROW or DOWN ARROW key to move to your selection, and
  2410. then press ENTER. You can use the mouse to select from the Calls menu as
  2411. well.%@NL@%
  2412. %@NL@%
  2413. %@CR:MCV21383@%%@4@%The effect of making a selection from the Calls menu is to view a routine.%@EH@%
  2414. The cursor will go to the line at which the selected routine was last
  2415. executing. For example, selecting %@AS@%main%@AE@% in the example above will cause
  2416. CodeView to display %@AS@%main%@AE@%, at the point at which %@AS@%main%@AE@% made a call to %@AS@%calc%@AE@%
  2417. (the function immediately above it). Note that selecting a routine from the
  2418. Calls menu does not (by itself) affect program execution. It simply provides
  2419. a convenient way to view previously called routines.%@NL@%
  2420. %@NL@%
  2421. %@CR:MCV21384@%%@4@%It is not required that one of the routines be selected. The Calls menu is%@EH@%
  2422. useful for viewing the list of previously called routines.%@NL@%
  2423. %@NL@%
  2424. %@CR:MCV21385@%%@4@%The Calls menu shows the current routine and the trail of routines from%@EH@%
  2425. which it was called. The current routine is always at the top. The routine
  2426. from which the current routine was called is directly below. Other active
  2427. routines are shown in the reverse order in which they were called. With C
  2428. and FORTRAN programs, the bottom routine should always be %@AB@%main%@AE@%. (The only
  2429. time %@AB@%main%@AE@% will not be the bottom routine is when you are tracing through the
  2430. standard library's start-up or termination routines.)%@NL@%
  2431. %@NL@%
  2432. %@CR:MCV21386@%%@4@%The current value of each argument, if any, is shown in parentheses%@EH@%
  2433. following the routine. The menu expands to accommodate the arguments of the
  2434. widest routine. Arguments are shown in the current radix (the default is
  2435. decimal). If there are more active routines than will fit on the screen, or
  2436. if the routine arguments are too wide, the display will expand to both the
  2437. left and right. The Stack Trace dialog command (%@AB@%K%@AE@%) also shows all the
  2438. routines and arguments.%@NL@%
  2439. %@NL@%
  2440. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2441. %@AI@%NOTE%@AE@%%@NL@%
  2442.    If you are using the CodeView debugger to debug assembly-language%@NL@%
  2443.    programs, routines will be shown in the Calls menu only if they use one%@NL@%
  2444.    of the Microsoft calling conventions. These calling conventions are%@NL@%
  2445.    explained in the Microsoft Mixed-Language Programming Guide.%@NL@%
  2446. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2447. %@NL@%
  2448. %@CR:MCV21390@%%@4@%%@AB@%2.1.3.9  The Help Menu%@AE@%%@EH@%%@NL@%
  2449. %@NL@%
  2450. %@CR:MCV21391@%%@4@%The Help menu lists the major topics in the on-line Help. For Help, open the%@EH@%
  2451. Help menu and select the topic you want to view.%@NL@%
  2452. %@NL@%
  2453. %@CR:MCV21392@%%@4@%Each topic may have any number of subtopics. You must go to the major topic%@EH@%
  2454. first. Information on how to move around within the help system is provided
  2455. in the next section.%@NL@%
  2456. %@NL@%
  2457. %@CR:MCV21393@%%@4@%The bottom selection on the Help menu is the About command. When you make%@EH@%
  2458. this selection, the debugger displays a small box at the center of the
  2459. screen that gives the time, the name of the product, and the version number.%@NL@%
  2460. %@NL@%
  2461. %@NL@%
  2462. %@CR:MCV21400@%%@3@%%@AB@%2.1.4  Using On-Line Help%@AE@%%@EH@%%@NL@%
  2463. %@NL@%
  2464. %@CR:MCV21401@%%@4@%The CodeView on-line Help system uses tree-structured menus to give you%@EH@%
  2465. quick access to help screens on a variety of subjects. Help uses a
  2466. combination of menu access and sequentially linked screens, as explained
  2467. below.%@NL@%
  2468. %@NL@%
  2469. %@CR:MCV21402@%%@4@%The Help file is called CV.HLP. It must be present in the current directory%@EH@%
  2470. or in one of the directories specified with the DOS PATH command. If the
  2471. Help file is not found, the CodeView debugger will still operate, but you
  2472. will not be able to use Help. An error message will appear if you try to use
  2473. a Help command.%@NL@%
  2474. %@NL@%
  2475. %@CR:MCV21403@%%@4@%When you request help, either by pressing F1, by using the %@AB@%H%@AE@% dialog command,%@EH@%
  2476. or by selecting the Help menu, the first help screen appears. You can select
  2477. Next and Previous buttons to page through the screens. The screens are
  2478. arranged in a circular fashion, so that selecting Next on the last screen
  2479. gets you to the first screen. Select the Cancel button to return to the
  2480. CodeView screen. Pressing the PGDN, PGUP, and ESC keys achieves the same
  2481. results as selecting Next, Previous, and Cancel, respectively, with the
  2482. mouse.%@NL@%
  2483. %@NL@%
  2484. %@CR:MCV21404@%%@4@%You can enter Help at a particular topic by selecting the topic from the%@EH@%
  2485. Help menu. Once in Help, use Next and Previous to page to other screens.%@NL@%
  2486. %@NL@%
  2487. %@NL@%
  2488. %@CR:MCV22000@%%@2@%%@AB@%2.2  Using Sequential Mode%@AE@%%@EH@%%@NL@%
  2489. %@NL@%
  2490. %@CR:MCV22001@%%@4@%Sequential mode is required if you have neither an IBM Personal Computer nor%@EH@%
  2491. a closely compatible computer. In sequential mode, the CodeView debugger
  2492. works much like its forerunner, the Microsoft Symbolic Debug Utility
  2493. (SYMDEB) and the DOS DEBUG utility. Sequential mode is also useful when you
  2494. are using redirected CodeView input and output.%@NL@%
  2495. %@NL@%
  2496. %@CR:MCV22002@%%@4@%In sequential mode, the CodeView debugger's input and output always move%@EH@%
  2497. down the screen from the current location. When the screen is full, the old
  2498. output scrolls off the top of the screen to make room for new output
  2499. appearing at the bottom. You can never return to examine previous commands
  2500. once they scroll off, but in many cases, you can reenter the command to put
  2501. the same information on the screen again.%@NL@%
  2502. %@NL@%
  2503. %@CR:MCV22003@%%@4@%Most window commands cannot be used in sequential mode. However, the%@EH@%
  2504. following function keys, which are used as commands in window mode, are also
  2505. available in sequential mode.%@NL@%
  2506. %@CR:MCV22004@%%@NL@%
  2507. %@TH:   60   3138  2 28 48 @%%@AB@%Command                     Action%@AE@%F1                          Displays a command-syntax summary.F2                          Displays the registers.                            This is equivalent to the Register (%@AB@%R%@AE@%) dialog                            command.F3                          Toggles between source, mixed, and assembly                            modes.                            Pressing this key will rotate the mode between                            source, mixed, and assembly. You can achieve the                            same effect by using the Set Assembly (%@AB@%S-%@AE@%), Set                            Mixed (%@AB@%S&%@AE@%), and Set Source (%@AB@%S+%@AE@%) dialog commands.F4                          Switches to the output screen, which shows the                            output of your program.                            Press any key to return to the CodeView                            debugging screen. This is equivalent to the                            Screen Exchange (%@AB@%\%@AE@%) dialog command.F5                          Executes from the current instruction until a                            breakpoint or the end of the program is                            encountered.                            This is equivalent to the Go dialog command (%@AB@%G%@AE@%)                            with no argument.F8                          Executes the next source line in source mode, or                            the next instruction in assembly mode.                            If the source line or instruction contains a                            function, procedure, or interrupt call, the                            CodeView debugger executes the first source line                            or instruction of the call and is ready to                            execute the next source line or instruction                            within the call. This is equivalent to the Trace                            (%@AB@%T%@AE@%) dialog command.F9                          Sets or clears a breakpoint at the current                            program location.                            If the current program location has no                            breakpoint, one is set. If the current location                            has a breakpoint, it is removed. This is                            equivalent to the Breakpoint Set (%@AB@%BP%@AE@%) dialog                            command with no argument.F10                         Executes the next source line in source mode or                            the next instruction in assembly mode.                            If the source line or instruction contains a                            function, procedure, or interrupt call, the call                            is executed to the end, and the CodeView                            debugger is ready to execute the line or                            instruction after the call. This is equivalent                            to the Program Step (%@AB@%P%@AE@%) dialog command.%@TE:   60   3138  2 28 48 @%
  2508. %@NL@%
  2509. %@CR:MCV22005@%%@4@%The CodeView Watch (%@AB@%W%@AE@%), Watchpoint (%@AB@%WP%@AE@%), and Tracepoint (%@AB@%TP%@AE@%) commands work
  2510. in sequential mode, but since there is no watch window, the watch statements
  2511. are not shown. You must use the Watch List command (%@AB@%W%@AE@%) to examine watch 
  2512. statements and watch values. See Chapter 8%@BO:   5c045@% for information on watch 
  2513. statement commands.%@NL@%
  2514. %@NL@%
  2515. %@CR:MCV22006@%%@4@%All the CodeView commands that affect program operation (such as Trace, Go,%@EH@%
  2516. and Breakpoint Set) are available in sequential mode. Any debugging
  2517. operation done in window mode can also be done in sequential mode.%@NL@%
  2518. %@NL@%
  2519. %@NL@%
  2520. %@CR:MCV30000@%%@1@%%@AB@%Chapter 3  Using Dialog Commands%@AE@%%@EH@%%@NL@%
  2521. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2522. %@NL@%
  2523. %@CR:MCV30001@%%@4@%CodeView dialog commands can be used in sequential mode or from the dialog%@EH@%
  2524. window. In sequential mode, they are the primary method of entering
  2525. commands. In window mode, dialog commands are used to enter commands that
  2526. require arguments or do not have corresponding window commands.%@NL@%
  2527. %@NL@%
  2528. %@CR:MCV30002@%%@4@%Many window commands have duplicate dialog commands. Generally, the window%@EH@%
  2529. version of a command is more convenient, but the dialog version is more
  2530. powerful.  For example, to set a breakpoint on a source line in window mode,
  2531. put the cursor on the source line and press F9, or point to the line and
  2532. click the left mouse button.  The dialog version of the Breakpoint command
  2533. (%@AB@%BP%@AE@%) requires more keystrokes, but it allows you to specify an address, a
  2534. pass count, and a string of commands to be taken whenever the breakpoint is
  2535. encountered.%@NL@%
  2536. %@NL@%
  2537. %@CR:MCV30003@%%@4@%The rest of this chapter explains how to enter dialog commands and how to%@EH@%
  2538. select text on the screen for use with commands.%@NL@%
  2539. %@NL@%
  2540. %@NL@%
  2541. %@CR:MCV31000@%%@2@%%@AB@%3.1  Entering Commands and Arguments%@AE@%%@EH@%%@NL@%
  2542. %@NL@%
  2543. %@CR:MCV31001@%%@4@%Dialog commands are entered at the CodeView prompt(%@AS@%>%@AE@%). Type the command and%@EH@%
  2544. arguments and press ENTER.%@NL@%
  2545. %@NL@%
  2546. %@CR:MCV31002@%%@4@%In window mode, you can enter commands whether or not the cursor is at the%@EH@%
  2547. CodeView prompt. If the cursor is not in the dialog window, it moves to the
  2548. dialog window as soon as you type text.%@NL@%
  2549. %@NL@%
  2550. %@NL@%
  2551. %@CR:MCV31100@%%@3@%%@AB@%3.1.1  Using Special Keys%@AE@%%@EH@%%@NL@%
  2552. %@NL@%
  2553. %@CR:MCV31101@%%@4@%When entering dialog commands or viewing output from commands, you can use%@EH@%
  2554. the following special keys:%@NL@%
  2555. %@CR:MCV31102@%%@NL@%
  2556. %@TH:   25   1636  2 28 48 @%%@AB@%Key                         Action%@AE@%CTRL+C                      Stops the current output or cancels the current                            command line. For example, if you are watching a                            long display from a Dump command, you can press                            CTRL+C to interrupt the output and return to the                            CodeView prompt. If you make a mistake while                            entering a command, you can press CTRL+C to                            cancel the command without executing it. A new                            prompt appears, and you can reenter the command.CTRL+S                      Pauses during the output of a command. You can                            press any key to continue output. For example,                            if you are watching a long display from a Dump                            command, you can press CTRL+S when a part of the                            display appears that you want to examine more                            closely. Then press any key when you are ready                            for the output to continue scrolling.BACKSPACE                   Deletes the previous character on the command                            line and moves the cursor back one space. For                            example, if you make an error while typing a                            command, you can use the BACKSPACE key to delete                            the characters back to the error──then retype                            the remainder of the command.%@AB@%%@TE:   25   1636  2 28 48 @%
  2557. %@NL@%
  2558. %@CR:MCV31200@%%@3@%%@AB@%3.1.2  Using the Command Buffer%@AE@%%@EH@%%@NL@%
  2559. %@NL@%
  2560. %@CR:MCV31201@%%@4@%In window mode, the CodeView debugger has a command buffer where the last%@EH@%
  2561. 2-4 screens of commands and command output are stored. The command buffer is
  2562. not available in sequential mode.%@NL@%
  2563. %@NL@%
  2564. %@CR:MCV31202@%%@4@%When the cursor is in the dialog window, you can scroll up or down to view%@EH@%
  2565. the commands you have entered earlier in the session. The commands for
  2566. moving the cursor and scrolling through the buffer are explained in sections
  2567. 2.1.1.1%@BO:   1cb3e@% and 2.1.2.1%@BO:   20e91@%.%@NL@%
  2568. %@NL@%
  2569. %@CR:MCV31203@%%@4@%Scrolling through the buffer is particularly useful for viewing the output%@EH@%
  2570. from commands, such as Dump or Examine Symbols, whose output may scroll off
  2571. the top of the dialog window.%@NL@%
  2572. %@NL@%
  2573. %@CR:MCV31204@%%@4@%If you have scrolled through the dialog buffer to look at previous commands%@EH@%
  2574. and output, you can still enter new commands. When you type a command, the
  2575. cursor moves to the end of the command buffer and the text appears on a new
  2576. line.%@NL@%
  2577. %@NL@%
  2578. %@CR:MCV31205@%%@4@%When you start the debugger, the buffer is empty except for the copyright%@EH@%
  2579. message. As you enter commands during the session, the buffer is gradually
  2580. filled from the bottom to the top. If you have not filled the entire buffer
  2581. and you press HOME to go to the top of the buffer, you will not see the
  2582. first commands of the session. Instead you will see blank lines, since there
  2583. is nothing at the top of the buffer.%@NL@%
  2584. %@NL@%
  2585. %@NL@%
  2586. %@CR:MCV32000@%%@2@%%@AB@%3.2  Format for CodeView Commands and Arguments%@AE@%%@EH@%%@NL@%
  2587. %@NL@%
  2588. %@CR:MCV32001@%%@4@%The CodeView command format is similar to the format of the earlier%@EH@%
  2589. Microsoft debuggers, SYMDEB and DEBUG. However, some features, particularly
  2590. operators and expressions, are different. The general format for CodeView
  2591. commands is shown below:%@NL@%
  2592. %@NL@%
  2593.      %@AI@%command%@AE@% «%@AI@%arguments%@AE@%» «;%@AI@%command2%@AE@%»%@NL@%
  2594. %@NL@%
  2595. %@CR:MCV32002@%%@4@%The %@AI@%command%@AE@% is a one-, two-, or three-character command name, and %@AI@%arguments%@AE@%%@EH@%
  2596. are expressions that represent values or addresses to be used by the
  2597. command. The %@AI@%command%@AE@% is not case sensitive; any combination of uppercase
  2598. and lowercase letters can be used. However, %@AI@%arguments%@AE@% consisting of
  2599. source-level expressions may or may not be case sensitive. (For example, C
  2600. expressions are normally case sensitive; FORTRAN expressions are not. Case
  2601. sensitivity can be affected by the language selected for expression
  2602. evaluation.) Usually, the first %@AI@%argument%@AE@% can be placed immediately after
  2603. %@AI@%command%@AE@% with no space separating the two fields.%@NL@%
  2604. %@NL@%
  2605. %@CR:MCV32003@%%@4@%The number of arguments required or allowed with each command varies. If a%@EH@%
  2606. command takes two or more arguments, you must separate the arguments with
  2607. spaces. A semicolon (%@AB@%;%@AE@%) can be used as a command separator if you want to
  2608. specify more than one command on a line.%@NL@%
  2609. %@NL@%
  2610. %@CR:MCV32004@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  2611. %@NL@%
  2612.      DB 100 200      %@AI@%;* Example 1%@AE@%%@NL@%
  2613. %@NL@%
  2614.      >U Label1       %@AI@%;* Example 2, C variable as argument%@AE@%%@NL@%
  2615. %@NL@%
  2616.      >U SUM          %@AI@%;* Example 3, FORTRAN variable as argument%@AE@%%@NL@%
  2617. %@NL@%
  2618.      >U SUM; DB      %@AI@%;* Example 4, multiple commands%@AE@%%@NL@%
  2619. %@NL@%
  2620. %@CR:MCV32005@%%@4@%In Example 1, %@AS@%DB%@AE@% is the first command (for the Dump Bytes command). The%@EH@%
  2621. arguments to the command are %@AS@%100%@AE@% and %@AS@%200%@AE@%. The second command on this line is
  2622. the Comment command (%@AS@%*%@AE@%). A semicolon is used to separate the two commands.
  2623. The Comment command is used throughout the rest of the manual to number
  2624. examples.%@NL@%
  2625. %@NL@%
  2626. %@CR:MCV32006@%%@4@%In Example 2, %@AS@%U%@AE@% is the first command (for the Unassemble command), and the%@EH@%
  2627. C-language variable %@AS@%Label1%@AE@% is a command argument.%@NL@%
  2628. %@NL@%
  2629. %@CR:MCV32007@%%@4@%In Example 3, %@AS@%U%@AE@% is again the first command (for the Unassemble command), and%@EH@%
  2630. the FORTRAN variable %@AS@%SUM%@AE@% is a command argument.%@NL@%
  2631. %@NL@%
  2632. %@CR:MCV32008@%%@4@%Example 4 consists of three commands, separated by semicolons. The first is%@EH@%
  2633. the Unassemble command ( %@AS@%U%@AE@%) with the FORTRAN variable %@AS@%SUM%@AE@% as an argument.
  2634. The second is the Dump Bytes command (%@AS@%DB%@AE@%) with no arguments. The third is
  2635. the Comment command (%@AS@%*%@AE@%).%@NL@%
  2636. %@NL@%
  2637. %@NL@%
  2638. %@CR:MCV33000@%%@2@%%@AB@%3.3  Selecting Text for Use with Commands%@AE@%%@EH@%%@NL@%
  2639. %@NL@%
  2640. %@CR:MCV33001@%%@4@%If you run CodeView in window mode, you can select text on the screen and%@EH@%
  2641. use this same text as a command. This technique is useful for reusing a
  2642. dialog command that is not among the last 20. Any text that appears in any
  2643. window can be selected.%@NL@%
  2644. %@NL@%
  2645. %@CR:MCV33002@%%@4@%To select and use text onscreen, follow these steps:%@EH@%%@NL@%
  2646. %@NL@%
  2647. %@CR:MCV33003@%  1. Select text with either the mouse or keyboard.%@NL@%
  2648. %@NL@%
  2649.      To select text with the mouse, move the mouse cursor to the beginning%@NL@%
  2650.      of the desired text, hold the left mouse button down and drag the mouse%@NL@%
  2651.      to the left. When you have dragged the mouse to the end of the desired%@NL@%
  2652.      text, release the button.%@NL@%
  2653. %@NL@%
  2654.      To select text with the keyboard, move the cursor to the beginning of%@NL@%
  2655.      the desired text, hold the SHIFT key down, and move the cursor to the%@NL@%
  2656.      right. When the cursor is at the end of the desired text, release the%@NL@%
  2657.      SHIFT key and press ENTER.%@NL@%
  2658. %@NL@%
  2659.   2. To use the selected text, press INS.%@NL@%
  2660. %@NL@%
  2661.   3. Edit the command if desired, and press ENTER to execute.%@NL@%
  2662. %@NL@%
  2663. %@NL@%
  2664. %@CR:MCV40000@%%@1@%%@AB@%Chapter 4  CodeView Expressions%@AE@%%@EH@%%@NL@%
  2665. ───────────────────────────────────────────────────────────────────────────%@NL@%
  2666. %@NL@%
  2667. %@CR:MCV40001@%%@4@%CodeView command arguments are expressions that can include symbols,%@EH@%
  2668. constant numbers, operators, and registers. Arguments can be simple
  2669. machine-level expressions that directly specify an address or range in
  2670. memory, or they can be source-level expressions that correspond to operators
  2671. and symbols used in Microsoft C, FORTRAN, BASIC, or the Macro Assembler. For
  2672. each high-level language (C, FORTRAN, and  BASIC), CodeView has an
  2673. expression evaluator that computes the value of source-level expressions.%@NL@%
  2674. %@NL@%
  2675. %@CR:MCV40002@%%@4@%Each of the three expression evaluators has a different set of operators and%@EH@%
  2676. rules of precedence. However, the basic syntax for registers, addresses, and
  2677. line numbers is the same regardless of the language.  You can always change
  2678. the expression evaluator. If you specify a language other than the one used
  2679. in the source file, the expression evaluator will still recognize your
  2680. program symbols──if possible. (C and FORTRAN, however, will not accept BASIC
  2681. type tags.) If you are debugging an assembly routine called from BASIC or
  2682. FORTRAN, you may want to choose the language of the main program rather than
  2683. C, the default for assembly programs.%@NL@%
  2684. %@NL@%
  2685. %@CR:MCV40003@%%@4@%If the Auto option is on, the debugger examines the file extension of each%@EH@%
  2686. new source file you trace through. Both C and assembly modules cause the
  2687. debugger to select C as the expression evaluator.%@NL@%
  2688. %@NL@%
  2689. %@CR:MCV40004@%%@4@%This chapter first deals with the expressions specific to each language.%@EH@%
  2690. Line-number expressions are presented next; they work the same way
  2691. regardless of the language. Then, register and address expressions are
  2692. described. Generally, these do not have to be mastered unless you are doing
  2693. assembly-level debugging. Finally, the chapter describes how to switch the
  2694. expression evaluator.%@NL@%
  2695. %@NL@%
  2696. %@NL@%
  2697. %@CR:MCV41000@%%@2@%%@AB@%4.1  C Expressions%@AE@%%@EH@%%@NL@%
  2698. %@NL@%
  2699. %@CR:MCV41001@%%@4@%The C expression evaluator uses a subset of the most commonly used C%@EH@%
  2700. operators. It also supports the colon operator (%@AB@%:%@AE@%), which is described in
  2701. Section 4.6.2%@BO:   3a308@%, "Addresses," and the three memory operators (%@AB@%BY%@AE@%, %@AB@%WO%@AE@%, and %@AB@%DW%@AE@%),
  2702. which are discussed in Section 4.7.%@BO:   3b6ea@% The memory operators are primarily
  2703. useful for debugging assembly source code. The CodeView C expression
  2704. operators are listed in Table 4.1 in order of precedence. The superscripts
  2705. a, b, and c refer to explanatory footnotes.%@NL@%
  2706. %@NL@%
  2707. %@CR:MCV4T100@%%@4@%%@AB@%Table 4.1  CodeView C Expression Operators%@AE@%%@EH@%%@NL@%
  2708. %@TH:   25   1414  1 16 60 @%%@AB@%Precedence      Operators%@AE@%(Highest)1               %@AB@%( )  [ ]  ->  .%@AE@%2               %@AB@%!  ~  -%@AE@%%@FN@%The minus sign with precedence 2 is the %@AI@%unary minus%@AE@% indicating the sign ofa number; the minus sign with precedence 4 is a %@AI@%binary minus%@AE@% indicatingsubtraction.%@EF@%  (%@AI@%type%@AE@%) %@AB@%++  -- %@AE@%%@AB@%*%@AE@%%@FN@%The asterisk with precedence 2 is the pointer operator; the asterisk withprecedence 3 is the multiplication operator.%@EF@%  %@AB@%&%@AE@%%@FN@%The ampersand with precedence 2 is the address-of operator. The ampersandas a bitwise %@AB@%AND%@AE@% operator is not supported by the CodeViewdebugger.%@EF@%  %@AB@%sizeof%@AE@%3               %@AB@%*%@AE@%%@FN@%The asterisk with precedence 2 is the pointer operator; the asterisk withprecedence 3 is the multiplication operator.%@EF@%  %@AB@%/  %  :%@AE@%4               %@AB@%+  -%@AE@%%@FN@%The minus sign with precedence 2 is the %@AI@%unary minus%@AE@% indicating the sign ofa number; the minus sign with precedence 4 is a %@AI@%binary minus%@AE@% indicatingsubtraction.%@EF@%5               %@AB@%<  >  <=  >=%@AE@%6               %@AB@%==  !=%@AE@%7               %@AB@%&&%@AE@%8               %@AB@%||%@AE@%9               %@AB@%=   +=    -=     *=     /=     %=%@AE@%10              %@AB@%BY   WO   DW%@AE@%(Lowest)%@TE:   25   1414  1 16 60 @%
  2709. %@NL@%
  2710. %@CR:MCV41002@%%@4@%See the %@AI@%Microsoft C Compiler Language Reference%@AE@% for a description of how C%@EH@%
  2711. operators can be combined with identifiers and constants to form
  2712. expressions. With the C expression evaluator, the period (%@AB@%.%@AE@%) has its normal
  2713. use as a member selection operator, but it also has an extended use as a
  2714. specifier of local variables in parent functions. The syntax is shown below:%@NL@%
  2715. %@NL@%
  2716.      %@AI@%function%@AE@%.%@AI@%variable%@AE@%%@NL@%
  2717. %@NL@%
  2718. %@CR:MCV41003@%%@4@%The %@AI@%function%@AE@% must be a high-level-language function, and the %@AI@%variable%@AE@% must%@EH@%
  2719. be a local variable within the specified function.  The %@AI@%variable%@AE@% cannot be a
  2720. register variable. For example, you can use the expression %@AS@%main.argc%@AE@% to
  2721. refer to the local variable %@AS@%argc%@AE@% when you are in a function that has been
  2722. called by %@AS@%main%@AE@%.%@NL@%
  2723. %@NL@%
  2724. %@CR:MCV41004@%%@4@%The %@AI@%type%@AE@% operator (used in type casting) can be any of the predefined C%@EH@%
  2725. types. The CodeView debugger limits casts of pointer types to one level of
  2726. indirection.  For example, %@AS@%(char *)sym%@AE@% is accepted, but %@AS@%(char **)sym%@AE@% is not.%@NL@%
  2727. %@NL@%
  2728. %@CR:MCV41005@%%@4@%When a C expression is used as an argument with a command that takes%@EH@%
  2729. multiple arguments, the expression should not have any internal spaces. For
  2730. example, %@AS@%count+6%@AE@% is allowed, but %@AS@%count + 6%@AE@% may be interpreted as three
  2731. separate arguments.  Some commands (such as the Display Expression command)
  2732. do permit spaces in expressions.%@NL@%
  2733. %@NL@%
  2734. %@NL@%
  2735. %@CR:MCV41100@%%@3@%%@AB@%4.1.1  C Symbols%@AE@%%@EH@%%@NL@%
  2736. %@NL@%
  2737. %@CR:MCV41101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  2738. %@NL@%
  2739.      %@AI@%name%@AE@%%@NL@%
  2740. %@NL@%
  2741. %@CR:MCV41102@%%@4@%A symbol is a name that represents a register, a segment address, an offset%@EH@%
  2742. address, or a full 32-bit address. At the C source level, a symbol is a
  2743. variable name or the name of a function. Symbols (also called identifiers)
  2744. follow the naming rules of the C compiler. Although CodeView command letters
  2745. are not case sensitive, symbols given as arguments are case sensitive
  2746. (unless you have turned off case sensitivity with the Case Sense selection
  2747. from the Options menu).%@NL@%
  2748. %@NL@%
  2749. %@CR:MCV41103@%%@4@%In assembly-language output or in output from the Examine Symbols command,%@EH@%
  2750. the CodeView debugger displays some symbol names in the object-code format
  2751. produced by the Microsoft C Compiler. This format includes a leading
  2752. underscore. For example, the function %@AS@%main%@AE@% is displayed as %@AS@%_main.%@AE@% Only
  2753. global labels (such as procedure names) are shown in this format. You do not
  2754. need to include the underscore when specifying such a symbol in CodeView
  2755. commands. Labels within library routines are sometimes displayed with a
  2756. double underscore %@AS@%(__chkstk)%@AE@%. You must use two leading underscores when
  2757. accessing these labels with CodeView commands.%@NL@%
  2758. %@NL@%
  2759. %@NL@%
  2760. %@CR:MCV41200@%%@3@%%@AB@%4.1.2  C Constants%@AE@%%@EH@%%@NL@%
  2761. %@NL@%
  2762. %@CR:MCV41201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  2763. %@NL@%
  2764.      %@AI@%digits%@AE@%                    Default radix%@NL@%
  2765.      %@AB@%0%@AE@%%@AI@%digits%@AE@%                   Octal radix%@NL@%
  2766.      %@AB@%0x%@AE@%%@AI@%digits%@AE@%                  Hexadecimal radix%@NL@%
  2767.      %@AB@%0n%@AE@%%@AI@%digits%@AE@%                  Decimal radix%@NL@%
  2768. %@NL@%
  2769. %@CR:MCV41202@%%@4@%Numbers used in CodeView commands represent integer constants. They are made%@EH@%
  2770. up of octal, hexadecimal, or decimal digits, and are entered in the current
  2771. input radix.  The C-language format for entering numbers of different
  2772. radixes can be used to override the current input radix.%@NL@%
  2773. %@NL@%
  2774. %@CR:MCV41203@%%@4@%The default radix for the C expression evaluator is decimal.  However, you%@EH@%
  2775. can use the Radix command (%@AB@%N%@AE@%) to specify an octal or hexadecimal radix, as
  2776. explained in Section 11.3%@BO:   77bd5@%, "Radix Command."%@NL@%
  2777. %@NL@%
  2778. %@CR:MCV41204@%%@4@%If the current radix is 16 (hexadecimal) or 8 (octal), you can enter decimal%@EH@%
  2779. numbers in the special CodeView format %@AB@%0n%@AE@%%@AI@%digits%@AE@%. For example, you would
  2780. enter 21 decimal as %@AS@%0n21%@AE@%.%@NL@%
  2781. %@NL@%
  2782. %@CR:MCV41205@%%@4@%With radix 16, it is possible to enter a value or argument that could be%@EH@%
  2783. interpreted either as a symbol or as a hexadecimal number. The CodeView
  2784. debugger resolves the ambiguity by searching first for a symbol (identifier)
  2785. with that name.  If no symbol is found, the debugger interprets the value as
  2786. a hexadecimal number.  If you want to enter a number that overrides an
  2787. existing symbol, use the hexadecimal format (%@AB@%0x%@AE@%%@AI@%digits%@AE@%).%@NL@%
  2788. %@NL@%
  2789. %@CR:MCV41206@%%@4@%For example, if you enter %@AS@%abc%@AE@% as an argument when the program contains a%@EH@%
  2790. variable or function named %@AS@%abc%@AE@%, the CodeView debugger interprets the
  2791. argument as the symbol.  If you want to enter %@AS@%abc%@AE@% as a number, enter it as%@AE@%
  2792. %@AS@%0xabc%@AE@%.%@NL@%
  2793. %@NL@%
  2794. %@CR:MCV41207@%%@4@%Table 4.2 shows how a sample number (63 decimal) would be represented in%@EH@%
  2795. each radix.%@NL@%
  2796. %@NL@%
  2797. %@CR:MCV4T200@%%@4@%%@AB@%Table 4.2  C Radix Examples%@AE@%%@EH@%%@NL@%
  2798. %@NL@%
  2799. %@AB@%Input Radix      Octal     Decimal     Hexadecimal%@AE@%%@NL@%
  2800. %@NL@%
  2801. 8                %@AS@%77        0n63        0x3F %@AE@%%@NL@%
  2802. %@NL@%
  2803. 10               %@AS@%077       63          0x3F %@AE@%%@NL@%
  2804. %@NL@%
  2805. 16               %@AS@%077       0n63        3F%@AE@%%@NL@%
  2806. %@NL@%
  2807. %@NL@%
  2808. %@CR:MCV41300@%%@3@%%@AB@%4.1.3  C Strings%@AE@%%@EH@%%@NL@%
  2809. %@NL@%
  2810. %@CR:MCV41301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  2811. %@NL@%
  2812.      %@AB@%"%@AE@%%@AI@%null-terminated-string%@AE@%%@AB@%"%@AE@%%@NL@%
  2813. %@NL@%
  2814. %@CR:MCV41302@%%@4@%Strings can be specified as expressions in the C format.  You can use C%@EH@%
  2815. escape characters within strings. For example, double quotation marks within
  2816. a string are specified with the escape character %@AS@%\"%@AE@%.%@NL@%
  2817. %@NL@%
  2818. %@CR:MCV41303@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  2819. %@NL@%
  2820.      EA message "This \"string\" is okay."%@NL@%
  2821. %@NL@%
  2822. %@CR:MCV41304@%%@4@%The example uses the Enter ASCII command (%@AB@%EA%@AE@%) to enter the given string into%@EH@%
  2823. memory starting at the address of the variable %@AS@%message.%@AE@%%@NL@%
  2824. %@NL@%
  2825. %@NL@%
  2826. %@CR:MCV42000@%%@2@%%@AB@%4.2  FORTRAN Expressions%@AE@%%@EH@%%@NL@%
  2827. %@NL@%
  2828. %@CR:MCV42001@%%@4@%The FORTRAN expression evaluator uses a subset of the most commonly used%@EH@%
  2829. FORTRAN operators. It also supports two additional operators, the period (%@AB@%.%@AE@%)
  2830. and the colon (%@AB@%:%@AE@%). A number of FORTRAN intrinsic functions, which are listed
  2831. in Section 4.2.4%@BO:   34369@%, are also supported. FORTRAN function calls are permitted,
  2832. but statement function names and COMMON block names are not. (Note that
  2833. these limitations only apply to the arguments of CodeView commands. They
  2834. do not apply to the source program, which can contain any valid FORTRAN
  2835. expression.)%@NL@%
  2836. %@NL@%
  2837. %@CR:MCV42002@%%@4@%The CodeView FORTRAN operators are listed in Table 4.3 in order of%@EH@%
  2838. precedence.%@NL@%
  2839. %@NL@%
  2840. %@CR:MCV4T300@%%@4@%%@AB@%Table 4.3  CodeView FORTRAN Operators%@AE@%%@EH@%%@NL@%
  2841. %@TH:   27    514  2 16 60 @%%@AB@%Precedence      Operators%@AE@%(Highest)1               %@AB@%()%@AE@%2               %@AB@%.  :%@AE@%3               Unary  %@AB@%+  -%@AE@%4               %@AB@%*  /%@AE@%5               Binary  %@AB@%+  -%@AE@%6               %@AB@%.LT.  .LE.  .EQ.  .NE.  .GT.  .GE.%@AE@%7               %@AB@%.NOT.%@AE@%8               %@AB@%.AND.%@AE@%9               %@AB@%.OR.%@AE@%10              %@AB@%.EQV.  .NEQV.%@AE@%11              %@AB@%=%@AE@%(Lowest)%@TE:   27    514  2 16 60 @%
  2842. %@NL@%
  2843. %@CR:MCV42003@%%@4@%The FORTRAN expression evaluator does not support the character%@EH@%
  2844. concatenation operator (%@AB@%//%@AE@%) or the exponentiation operator (%@AB@%**%@AE@%). Relational
  2845. operators are not supported for string variables or constants.%@NL@%
  2846. %@NL@%
  2847. %@CR:MCV42004@%%@4@%The order and precedence with which the CodeView debugger evaluates FORTRAN%@EH@%
  2848. expressions are the same as in the Microsoft FORTRAN language. See Chapter
  2849. 1%@BO:    9668@%, "Elements of FORTRAN" of the %@AI@%Microsoft FORTRAN Reference%@AE@% for a
  2850. description of how FORTRAN operators can be combined with symbols and
  2851. constants to form expressions.%@NL@%
  2852. %@NL@%
  2853. %@CR:MCV42005@%%@4@%The colon operator (%@AB@%:%@AE@%) may be used when specifying a memory address. It acts%@EH@%
  2854. as a %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% separator, as described in Section 4.6.2%@BO:   3a308@%, "Addresses."%@NL@%
  2855. %@NL@%
  2856. %@CR:MCV42006@%%@4@%In the CodeView debugger, the period (%@AB@%.%@AE@%) has an extended use as a specifier%@EH@%
  2857. of local variables in parent routines. The syntax is shown below:%@NL@%
  2858. %@NL@%
  2859.      %@AI@%routine%@AE@%.%@AI@%variable%@AE@%%@NL@%
  2860. %@NL@%
  2861. %@CR:MCV42007@%%@4@%The %@AI@%routine%@AE@% must be a high-level-language routine and the %@AI@%variable%@AE@% must be a%@EH@%
  2862. local variable within the specified routine. For example, you can use the
  2863. expression %@AS@%main.X%@AE@% to refer to the local variable %@AS@%X%@AE@% in the procedure %@AS@%main%@AE@% if
  2864. you are in a routine called by %@AS@%main%@AE@%. Note that in this example, %@AS@%main%@AE@% refers
  2865. to the main routine of a FORTRAN or C program. It does not appear in FORTRAN
  2866. source code.%@NL@%
  2867. %@NL@%
  2868. %@NL@%
  2869. %@CR:MCV42100@%%@3@%%@AB@%4.2.1  FORTRAN Symbols%@AE@%%@EH@%%@NL@%
  2870. %@NL@%
  2871. %@CR:MCV42101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  2872. %@NL@%
  2873.      %@AI@%name%@AE@%%@NL@%
  2874. %@NL@%
  2875. %@CR:MCV42102@%%@4@%A symbol is a name that represents a register, a segment address, an offset%@EH@%
  2876. address, or a full 32-bit address. At the FORTRAN source level, a symbol is
  2877. simply a variable name or the name of a routine; you do not necessarily need
  2878. to know what kind of address it represents. When given as arguments, symbols
  2879. are never case sensitive with the FORTRAN expression evaluator. If you have
  2880. turned on case sensitivity with the Case Sense selection from the Options
  2881. menu, it is turned off automatically when a symbol is used.%@NL@%
  2882. %@NL@%
  2883. %@CR:MCV42103@%%@4@%In assembly-language output or in output from the Examine Symbols command,%@EH@%
  2884. the CodeView debugger displays some symbol names in the object-code format
  2885. produced by the Microsoft FORTRAN Optimizing Compiler. This format includes
  2886. a leading underscore. For example, the main routine in your program is
  2887. displayed as %@AS@%_main%@AE@%. Only global labels (such as procedure names) are shown
  2888. in this format. You do not need to include the underscore when specifying
  2889. such a symbol in CodeView commands. Labels within library routines are
  2890. sometimes displayed with a double underscore %@AS@%(__chkstk)%@AE@%. You must use
  2891. leading underscores when accessing these labels with CodeView commands.%@NL@%
  2892. %@NL@%
  2893. %@NL@%
  2894. %@CR:MCV42200@%%@3@%%@AB@%4.2.2  FORTRAN Constants%@AE@%%@EH@%%@NL@%
  2895. %@NL@%
  2896. %@CR:MCV42201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  2897. %@NL@%
  2898.      %@AI@%digits%@AE@%                      Default radix%@NL@%
  2899.      %@AI@%radix#digits%@AE@%                Specified radix%@NL@%
  2900.      %@AI@%#digits%@AE@%                     Hexadecimal radix%@NL@%
  2901. %@NL@%
  2902. %@CR:MCV42202@%%@4@%Numbers used in CodeView commands represent integer constants. These%@EH@%
  2903. constants are entered in the current input radix (base). When you are using
  2904. the FORTRAN expression evaluator, the debugger will recognize any explicitly
  2905. specified radix between 2 and 36 inclusive, as in %@AS@%20#2G.%@AE@% The FORTRAN radix
  2906. specifiers can be used to override the current radix. Note that a
  2907. hexadecimal number may be entered in two ways. For example, 3F hex could be
  2908. entered as either %@AS@%#3F%@AE@% or %@AS@%16#3F%@AE@%. In this manual, the number sign alone is
  2909. used to indicate hexadecimal numbers.%@NL@%
  2910. %@NL@%
  2911. %@CR:MCV42203@%%@4@%The default radix for the FORTRAN version of the CodeView debugger is%@EH@%
  2912. decimal. However, you can use the Radix command (%@AB@%N%@AE@%) to specify an octal or
  2913. hexadecimal radix, as explained in Section 11.3%@BO:   77bd5@%, "Radix Command."%@NL@%
  2914. %@NL@%
  2915. %@CR:MCV42204@%%@4@%With radix 16, it is possible to enter a value or argument that could be%@EH@%
  2916. interpreted either as an identifier or as a hexadecimal number. The CodeView
  2917. debugger resolves the ambiguity by searching first for a symbol (identifier)
  2918. with that name. If no symbol is found, the debugger interprets the value as
  2919. a hexadecimal number. If you want to enter a number that overrides an
  2920. existing symbol, use the hexadecimal format (%@AS@%#%@AE@%%@AI@%digits%@AE@%).%@NL@%
  2921. %@NL@%
  2922. %@CR:MCV42205@%%@4@%For example, if you enter %@AS@%ABC%@AE@% as an argument when the program contains a%@EH@%
  2923. variable or function named %@AS@%ABC%@AE@%, the CodeView debugger interprets the
  2924. argument as the symbol. If you want to enter %@AS@%ABC%@AE@% as a number, enter it as
  2925. %@AS@%#ABC.%@AE@%%@NL@%
  2926. %@NL@%
  2927. %@CR:MCV42206@%%@4@%Table 4.4 shows how a sample number (63 decimal) would be represented in the%@EH@%
  2928. octal, decimal, and hexadecimal radixes.%@NL@%
  2929. %@NL@%
  2930. %@CR:MCV4T400@%%@4@%%@AB@%Table 4.4  FORTRAN Radix Examples%@AE@%%@EH@%%@NL@%
  2931. %@NL@%
  2932. %@AB@%Input Radix      Octal     Decimal     Hexadecimal%@AE@%%@NL@%
  2933. %@NL@%
  2934.  8               %@AS@%77        10#63       #3F  %@AE@%%@NL@%
  2935. %@NL@%
  2936. 10               %@AS@%8#77      63          #3F  %@AE@%%@NL@%
  2937. %@NL@%
  2938. 16               %@AS@%8#77      10#63       3F              %@AE@%%@NL@%
  2939. %@NL@%
  2940. %@NL@%
  2941. %@CR:MCV42300@%%@3@%%@AB@%4.2.3  FORTRAN Strings%@AE@%%@EH@%%@NL@%
  2942. %@NL@%
  2943. %@CR:MCV42301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  2944. %@NL@%
  2945.      %@AB@%'%@AE@%%@AI@%string%@AE@%%@AB@%'%@AE@%%@NL@%
  2946. %@NL@%
  2947. %@CR:MCV42302@%%@4@%Strings can be specified as character expressions in the FORTRAN format.%@EH@%
  2948. Single quotation marks within a string must be specified by two single
  2949. quotation marks.%@NL@%
  2950. %@NL@%
  2951. %@CR:MCV42303@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  2952. %@NL@%
  2953.      EA MESSAGE 'This ''string'' is okay.  '%@NL@%
  2954. %@NL@%
  2955. %@CR:MCV42304@%%@4@%The example above uses the Enter ASCII command (%@AB@%EA%@AE@%) to enter the given%@EH@%
  2956. string into memory, starting at the address of the variable %@AS@%MESSAGE%@AE@%. Notice
  2957. that the string includes embedded single quotation marks and trailing
  2958. blanks.%@NL@%
  2959. %@NL@%
  2960. %@NL@%
  2961. %@CR:MCV42400@%%@3@%%@AB@%4.2.4  FORTRAN Intrinsic Functions%@AE@%%@EH@%%@NL@%
  2962. %@NL@%
  2963. %@CR:MCV42401@%%@4@%When entering a FORTRAN expression, you may use a limited number of FORTRAN%@EH@%
  2964. intrinsic functions. The primary use of these functions is to convert a
  2965. FORTRAN variable or value from one type to another for purposes of
  2966. calculation. The intrinsic functions recognized by the expression evaluator
  2967. of the CodeView debugger are listed in Table 4.5. See Chapter 5%@BO:   3d63b@%, "Intrinsic
  2968. Functions and Additional Procedures" of the %@AI@%Microsoft FORTRAN Reference%@AE@% for
  2969. a complete description of the FORTRAN intrinsic functions.%@NL@%
  2970. %@NL@%
  2971. %@CR:MCV4T500@%%@4@%%@AB@%Table 4.5  FORTRAN Intrinsic Functions Supported by the CodeView Debugger%@AE@%%@EH@%
  2972. %@TH:   51   2760  3 23 17 26 10 @%%@AB@%                       Argument         Function%@AE@%%@AB@%Name                   Definition       Type                      Type%@AE@%%@AB@%CHAR(%@AE@%%@AI@%int%@AE@%%@AB@%)%@AE@%              Data-type        int                       char%@FN@%The abbreviations used for the different data types in this table are listedin Chapter 5, "Intrinsic Functions and Additional Procedures" of the%@AI@%Microsoft FORTRAN Reference%@AE@%.%@EF@%                       conversion%@AB@%CMPLX(%@AE@%%@AI@%genA%@AE@%«,%@AI@%genB%@AE@%»)     Data-type        int, real, or cmp         cmp8                       conversion%@AB@%DBLE(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%              Data-type        int, real, or cmp         dbl                       conversion%@AB@%DCMPLX(%@AE@%%@AI@%genA%@AE@%«,%@AI@%genB%@AE@%»)    Data-type        int, real, or cmp         cmp16                       conversion%@AB@%DIMAG(%@AE@%%@AI@%cmp16%@AE@%%@AB@%)%@AE@%           Imaginary        cmp16                     dbl                       part of cmp16                       number%@AB@%DREAL(%@AE@%%@AI@%cmp16%@AE@%%@AB@%)%@AE@%           Data-type        cmp16                     dbl                       conversion%@AB@%ICHAR(%@AE@%%@AI@%char%@AE@%%@AB@%)%@AE@%            Data-type        char                      int                       conversion%@AB@%IMAG(%@AE@%%@AI@%cmp%@AE@%%@AB@%)%@AE@%              Imaginary        cmp                       real%@FN@%If argument is %@AB@%COMPLEX*8%@AE@%, function is %@AB@%REAL*4%@AE@%. If argument is %@AB@%COMPLEX*16%@AE@%,function is %@AB@%DOUBLE PRECISION%@AE@%%@EF@%                       part of cmp                       number%@AB@%INT(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%               Data-type        int, real, or cmp         int                       conversion%@AB@%INT1(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%              Data-type        int, real, or cmp         int1                       conversion%@AB@%INT4(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%              Data-type        int, real, or cmp         int4                       conversion%@AB@%INTC(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%              Data-type        int, real, or cmp         %@AB@%INTEGER%@AE@%[%@AB@%C%@AE@%]                       conversion%@AB@%LOCFAR(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%            Segmented        int, real, or cmp         int4                       address%@AB@%LOCNEAR%@AE@%(%@AI@%gen%@AE@%%@AB@%)%@AE@%           Unsegmented      int, real, or cmp         int2                       address%@AB@%REAL(%@AE@%%@AI@%gen%@AE@%%@AB@%)%@AE@%              Data-type        int, real, or cmp         real4                       conversion%@TE:   51   2760  3 23 17 26 10 @%
  2973. %@NL@%
  2974. %@CR:MCV43000@%%@2@%%@AB@%4.3  BASIC Expressions%@AE@%%@EH@%%@NL@%
  2975. %@NL@%
  2976. %@CR:MCV43001@%%@4@%The BASIC expression evaluator uses a subset of the most commonly used BASIC%@EH@%
  2977. operators. It also supports one important BASIC command──the %@AB@%LET%@AE@%
  2978. command──and one operator in addition to the BASIC operators──the colon (%@AB@%:%@AE@%).
  2979. The CodeView BASIC operators are listed in Table 4.6 in order of precedence.%@NL@%
  2980. %@NL@%
  2981. %@CR:MCV4T700@%%@4@%%@AB@%Table 4.6  CodeView BASIC Operators%@AE@%%@EH@%%@NL@%
  2982. %@TH:   31    573  2 16 60 @%%@AB@%Precedence      Operators%@AE@%(Highest)1               %@AB@%()%@AE@%2               %@AB@%.  :%@AE@%3               %@AB@%*  /%@AE@%4               %@AB@%\  MOD%@AE@%5               %@AB@%+  -%@AE@%6               %@AB@%=  <>  <  >  <=  >=%@AE@%7               %@AB@%NOT%@AE@%8               %@AB@%AND%@AE@%9               %@AB@%OR%@AE@%10              %@AB@%XOR%@AE@%11              %@AB@%EQV%@AE@%12              %@AB@%IMP%@AE@%13              %@AB@%LET%@AE@% %@AI@%variable%@AE@% %@AB@%=%@AE@%(Lowest)%@TE:   31    573  2 16 60 @%
  2983. %@NL@%
  2984. %@CR:MCV43002@%%@4@%The BASIC expression evaluator does not support the exponentiation operator%@EH@%
  2985. (%@AB@%^%@AE@%). Nor does it support string assignment, the string concatenation
  2986. operator (%@AB@%+%@AE@%), or any of the relational operators (%@AB@%=%@AE@%,%@AB@%<%@AE@%,%@AB@%>%@AE@%,etc.), when used
  2987. with strings. However, arrays, records, and user-defined types are all
  2988. supported.%@AS@%%@NL@%
  2989. %@NL@%
  2990. %@CR:MCV43003@%%@4@%The order and precedence with which the CodeView debugger evaluates BASIC%@EH@%
  2991. expressions are the same as in the Microsoft BASIC language. See your BASIC
  2992. documentation for a description of how BASIC operators can be combined with
  2993. symbols and constants to form expressions.%@NL@%
  2994. %@NL@%
  2995. %@CR:MCV43004@%%@4@%The assignment operator %@AB@%LET%@AE@% is supported for numerical operations only. When%@EH@%
  2996. you use %@AB@%LET%@AE@% in a BASIC expression, the return value will not be useful.
  2997. However, an assignment will take place whenever the expression is
  2998. evaluated. This gives you a convenient way of manipulating data. For
  2999. example, after the expression %@AS@%LET A = 5%@AE@% is evaluated, the variable %@AS@%A%@AE@% will
  3000. contain the value 5. You must use the keyword %@AB@%LET%@AE@% to specify assignment;
  3001. otherwise, the BASIC expression evaluator will interpret the equal sign (%@AB@%=%@AE@%)
  3002. as a test for equality.%@NL@%
  3003. %@NL@%
  3004. %@CR:MCV43005@%%@4@%The colon operator (%@AB@%:%@AE@%) may be used to specify a memory address. It acts as a%@EH@%
  3005. %@AI@%segment%@AE@%%@AS@%:%@AE@%%@AI@%offset%@AE@% separator, as described in Section 4.6.2%@BO:   3a308@%, "Addresses."%@NL@%
  3006. %@NL@%
  3007. %@CR:MCV43006@%%@4@%In the CodeView debugger, the period (.) has an extended use as a specifier%@EH@%
  3008. of local variables in parent routines. The syntax is shown below:%@NL@%
  3009. %@NL@%
  3010.      routine.variable%@NL@%
  3011. %@NL@%
  3012. %@CR:MCV43007@%%@4@%The %@AS@%routine%@AE@% must be a high-level-language routine and the %@AS@%variable%@AE@% must be a%@EH@%
  3013. local variable within the routine.%@NL@%
  3014. %@NL@%
  3015. %@CR:MCV43008@%%@4@%When a BASIC expression is used as an argument with a command that takes%@EH@%
  3016. multiple arguments, the expression should not have any internal spaces. For
  3017. example, %@AS@%COUNT+6%@AE@% is allowed, but %@AS@%COUNT%@AE@%%@AS@%+ 6%@AE@% may be interpreted as three
  3018. arguments. Some commands (such as the Display Expression command) only take
  3019. one argument; these commands do permit spaces in expressions.%@NL@%
  3020. %@NL@%
  3021. %@NL@%
  3022. %@CR:MCV43100@%%@3@%%@AB@%4.3.1  BASIC Symbols%@AE@%%@EH@%%@NL@%
  3023. %@NL@%
  3024. %@CR:MCV43101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3025. %@NL@%
  3026.      %@AI@%name%@AE@%%@NL@%
  3027. %@NL@%
  3028. %@CR:MCV43102@%%@4@%A symbol is a name that represents a register, a segment address, an offset%@EH@%
  3029. address, or a full 32-bit address. At the BASIC source level, a symbol is
  3030. simply a variable name or the name of a routine; you do not necessarily need
  3031. to know what kind of address it represents. With the BASIC expression
  3032. evaluator, symbols follow the naming rules of the BASIC compiler. In
  3033. particular, all the type specifiers used in BASIC (%@AB@%$%@AE@%, %@AB@%%%@AE@%, %@AB@%&%@AE@%, %@AB@%!%@AE@%, and %@AB@%#%@AE@%) are
  3034. accepted by the BASIC expression evaluator. Symbols are never case sensitive
  3035. to BASIC, whether the Case Sense option is on or not.%@AS@%%@NL@%
  3036. %@NL@%
  3037. %@NL@%
  3038. %@CR:MCV43200@%%@3@%%@AB@%4.3.2  BASIC Constants%@AE@%%@EH@%%@NL@%
  3039. %@NL@%
  3040. %@CR:MCV43201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3041. %@NL@%
  3042.      %@AI@%fixed-point-string%@AE@%«%@AS@%#%@AE@%|%@AS@%!%@AE@%»        Single or double, fixed-point format
  3043.      %@AI@%floating-point-string%@AE@%«%@AS@%#%@AE@%| %@AS@%!%@AE@%»    Single or double, floating-point format
  3044.  
  3045.      %@AI@%digits%@AE@%                         Integer, default radix
  3046.      %@AB@%&O%@AE@%%@AI@%digits%@AE@%                       Octal radix
  3047.      %@AB@%&%@AE@%%@AI@%digits%@AE@%                        Alternative octal radix
  3048.      %@AB@%&H%@AE@%%@AI@%digits%@AE@%                       Hexadecimal radix
  3049. %@NL@%
  3050. %@CR:MCV43202@%%@4@%With the BASIC expression evaluator, numbers can be entered as integer,%@EH@%
  3051. long, single-precision, or double-precision data objects. Constants are
  3052. formed according to the rules of the Microsoft BASIC Compiler. A single- or
  3053. double-precision constant must be entered in decimal radix, regardless of
  3054. the current system radix. To enter a single or double, use the Microsoft
  3055. BASIC rules for forming fixed and floating point strings.%@NL@%
  3056. %@NL@%
  3057. %@CR:MCV43203@%%@4@%Integer constants are entered in the system radix and are made up of octal,%@EH@%
  3058. decimal, or hexadecimal digits. You may override the system radix by using
  3059. the octal, or hexadecimal prefix. In addition, you can use the %@AB@%&%@AE@% suffix on
  3060. any integer constant to indicate that the integer is to be stored as a long
  3061. (four-byte) integer, rather than as a short (two-byte) integer. To enter
  3062. integers in the decimal format, the system radix must be 10, and you use the
  3063. default radix. There is no way to enter decimal integers when the system
  3064. radix is other than 10, unless you switch to another expression evaluator.%@NL@%
  3065. %@NL@%
  3066. %@CR:MCV43204@%%@4@%The default radix for the BASIC expression evaluator is decimal. However,%@EH@%
  3067. you can use the Radix command (%@AB@%N%@AE@%) to specify an octal or hexadecimal radix,
  3068. as explained in Section 11.3%@BO:   77bd5@%, "Radix Command." With radix 16, it is possible
  3069. to enter a value or argument that could be interpreted either as an
  3070. identifier or as a hexadecimal number. The CodeView debugger resolves the
  3071. ambiguity by searching first for a symbol (identifier) with that name. If no
  3072. symbol is found, the debugger interprets the value as a hexadecimal number.
  3073. If you want to enter a number that overrides an existing symbol, use the
  3074. hexadecimal format (%@AB@%&H%@AE@%%@AI@%digits%@AE@%).%@NL@%
  3075. %@NL@%
  3076. %@CR:MCV43205@%%@4@%For example, if you enter %@AS@%ABC%@AE@% as an argument when the program contains a%@EH@%
  3077. variable or function named %@AS@%ABC%@AE@%, the CodeView debugger interprets the
  3078. argument as the symbol. If you want to enter %@AS@%ABC%@AE@% as a number, enter it as
  3079. %@AS@%&HABC%@AE@%.%@NL@%
  3080. %@NL@%
  3081. %@CR:MCV43206@%%@4@%Table 4.7 shows how a sample number (63 decimal) would be represented in the%@EH@%
  3082. octal, decimal, and hexadecimal radixes.%@NL@%
  3083. %@NL@%
  3084. %@CR:MCV4T800@%%@4@%%@AB@%Table 4.7  BASIC Radix Examples%@AE@%%@EH@%%@NL@%
  3085. %@NL@%
  3086. %@AB@%Input Radix      Octal     Decimal     Hexadecimal%@AE@%%@NL@%
  3087. %@NL@%
  3088. 8                %@AS@%77        -           &H3F %@AE@%%@NL@%
  3089. %@NL@%
  3090. 10               %@AS@%&O77      63          &H3F %@AE@%%@NL@%
  3091. %@NL@%
  3092. 16               %@AS@%&O77      -           3F              %@AE@%%@NL@%
  3093. %@NL@%
  3094. %@NL@%
  3095. %@CR:MCV43300@%%@3@%%@AB@%4.3.3  BASIC Strings%@AE@%%@EH@%%@NL@%
  3096. %@NL@%
  3097. %@CR:MCV43301@%%@4@%The BASIC expression evaluator does not allow you to input strings while%@EH@%
  3098. debugging. However, it does recognize both fixed and variable-length string
  3099. variables, as defined by the BASIC compiler. (This includes arrays and
  3100. records of strings.) Expressions that refer to strings will probably be
  3101. quite simple, because string operators (concatenation and relational
  3102. operators) are not supported by the BASIC expression evaluator.%@NL@%
  3103. %@NL@%
  3104. %@CR:MCV43302@%%@4@%By using the Enter Address command, you can enter a string literal at a%@EH@%
  3105. given address. To use this technique effectively, however, you will need to
  3106. understand how BASIC handles string variables. For more information, see
  3107. Chapter 6%@BO:   43f5c@%, "Examining Data and Expressions."%@NL@%
  3108. %@NL@%
  3109. %@NL@%
  3110. %@CR:MCV43400@%%@3@%%@AB@%4.3.4  BASIC Intrinsic Functions%@AE@%%@EH@%%@NL@%
  3111. %@NL@%
  3112. %@CR:MCV43401@%%@4@%When entering a BASIC expression, you may use a limited number of BASIC%@EH@%
  3113. intrinsic functions. The primary use of these functions is to convert a
  3114. BASIC variable or value from one type to another for purposes of
  3115. calculation. The intrinsic functions recognized by the expression evaluator
  3116. of the CodeView debugger are listed in Table 4.8. See your BASIC compiler
  3117. manual for a complete description of the BASIC intrinsic functions.%@NL@%
  3118. %@NL@%
  3119. %@CR:MCV4T900@%%@4@%%@AB@%Table 4.8  BASIC Intrinsic Functions Supported by the CodeView Debugger%@AE@%%@EH@%%@NL@%
  3120. %@TH:   38   2180  3 24 27 27 18 @%%@AB@%                                                   Argument                   Function%@AE@%%@AB@%Name                    Definition                 Type                       Type%@AE@%%@AB@%ASC%@AE@%%@FN@%Except where noted, each of the functions in this table takes exactly oneargument of the type indicated in the third column%@EF@%                    ASCII value of first       string                     integer                        character%@AB@%CDBL%@AE@%                    Data-type conversion       numerical expression       double%@AB@%CINT%@AE@%                    Conversion, with           numerical expression       integer                        rounding%@AB@%CSGN%@AE@%                    Data-type conversion       numerical expression       single%@AB@%CVI%@AE@%                     Data-type conversion       two-byte string            integer%@AB@%CVL%@AE@%                     Data-type conversion       four-byte string           long%@AB@%CVS%@AE@%                     Data-type conversion       four-byte string           short%@AB@%CVD%@AE@%                     Data-type conversion       eight-byte string          double%@AB@%FIX%@AE@%                     Conversion, with           numerical expression       integer                        truncation%@AB@%INT%@AE@%                     Conversion, with           numerical expression       integer                        truncation%@AB@%LBOUND(%@AE@%%@AI@%arr%@AE@%%@AB@%«,%@AE@%%@AI@%dim%@AE@%%@AB@%»)%@AE@%       Lowest index of array      array, dimension           integer%@AB@%UBOUND(%@AE@%%@AI@%arr%@AE@%%@AB@%«,%@AE@%%@AI@%dim%@AE@%%@AB@%»)%@AE@%       Highest index of array     array, dimension           integer%@AB@%VAL%@AE@%                     Numerical value of         string                     integer, long,                        string                                                single, or double%@AB@%VARPTR%@AE@%                  Offset of variable         variable name              integer%@AB@%VARSEG%@AE@%                  Segment of variable        variable name              integer%@TE:   38   2180  3 24 27 27 18 @%
  3121. %@NL@%
  3122. %@CR:MCV44000@%%@2@%%@AB@%4.4  Assembly Expressions%@AE@%%@EH@%%@NL@%
  3123. %@NL@%
  3124. %@CR:MCV44001@%%@4@%The /ZI option, available with Version 5.0 and later of the Microsoft Macro%@EH@%
  3125. Assembler, provides variable size information for the CodeView debugger.
  3126. This makes for correct evaluation of expressions derived from assembly code
  3127. (except with arrays, which are discussed later in this section). If you have
  3128. an earlier version of the Macro Assembler, you will need to use C type casts
  3129. to get correct evaluation.%@NL@%
  3130. %@NL@%
  3131. %@CR:MCV44002@%%@4@%When a program assembles or when the Auto switch is on, source files with an%@EH@%
  3132. .ASM extension will cause CodeView to select the C expression evaluator.
  3133. How-ever, the following options will be set differently from the C default
  3134. options:%@NL@%
  3135. %@NL@%
  3136. %@CR:MCV44003@%  ■  System radix is hexadecimal (not decimal).%@NL@%
  3137. %@NL@%
  3138.   ■  Register window is on.%@NL@%
  3139. %@NL@%
  3140.   ■  Case sense is off.%@NL@%
  3141. %@NL@%
  3142. %@CR:MCV44004@%%@4@%The C expression evaluator supports the memory operators described in%@EH@%
  3143. Section 4.7%@BO:   3b6ea@%, and generally is the appropriate expression evaluator with
  3144. which to debug assembly because of its flexibility.%@NL@%
  3145. %@NL@%
  3146. %@CR:MCV44005@%%@4@%However, you cannot always use the C expression evaluator to specify an%@EH@%
  3147. expression exactly as it would appear in assembly code. The list below
  3148. describes the principal differences between assembler syntax and syntax used
  3149. with the C expression evaluator.%@NL@%
  3150. %@NL@%
  3151. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3152. %@AI@%NOTE%@AE@%%@NL@%
  3153.    The examples below present expressions, not CodeView commands. You can%@NL@%
  3154.    see the results of these expressions by using them as operands for the%@NL@%
  3155.    Display Expression command (%@AB@%?%@AE@%), described in Chapter 6%@BO:   43f5c@%, "Examining Data%@NL@%
  3156.    and Expressions."%@NL@%
  3157. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3158. %@NL@%
  3159. %@CR:MCV44006@%%@4@%In the following list, examples of assembly source code are shown in the%@EH@%
  3160. left-hand column. Corresponding CodeView expressions (with the C expression
  3161. evaluator) are shown in the right-hand column.%@NL@%
  3162. %@NL@%
  3163. %@CR:MCV44007@%  1. Register indirection.%@NL@%
  3164. %@NL@%
  3165.      The C expression evaluator does not extend the use of brackets to%@NL@%
  3166.      registers. To refer to the byte, word, or double word pointed to by a%@NL@%
  3167.      register, use the %@AB@%BY%@AE@%, %@AB@%WO%@AE@%, or %@AB@%DW%@AE@% operator.%@NL@%
  3168. %@NL@%
  3169.           %@AS@%BYTE PTR [bx]                    BY bx%@AE@%%@NL@%
  3170.           %@AS@%WORD PTR [bp]                    WO bp%@AE@%%@NL@%
  3171.           %@AS@%DWORD PTR [bp]                   DW bp%@AE@%%@NL@%
  3172. %@NL@%
  3173.   2. Register indirection with displacement.%@NL@%
  3174. %@NL@%
  3175.      To perform based, indexed, or based-index indirection with a%@NL@%
  3176.      displacement, use either the %@AB@%BY%@AE@%, %@AB@%WO%@AE@%, or %@AB@%DW%@AE@% operator along with addition%@NL@%
  3177.      in a complex expression:%@NL@%
  3178. %@NL@%
  3179.           %@AS@%BYTE PTR [di+6]                  BY di+6%@AE@%%@NL@%
  3180.           %@AS@%BYTE PTR [si][bp+6]              BY si+bp+6%@AE@%%@NL@%
  3181.           %@AS@%WORD PTR [bx][si]                WO bx+si%@AE@%%@NL@%
  3182. %@NL@%
  3183.   3. Taking the address of a variable.%@NL@%
  3184. %@NL@%
  3185.      Use the ampersand (%@AB@%&%@AE@%) to get the address of a variable with the C%@NL@%
  3186.      expression evaluator.%@NL@%
  3187. %@NL@%
  3188.           %@AS@%OFFSET var                       &var%@AE@%%@NL@%
  3189. %@NL@%
  3190.   4. The %@AB@%PTR%@AE@% operator.%@NL@%
  3191. %@NL@%
  3192.      With the CodeView debugger, C type casts perform the same function as%@NL@%
  3193.      the assembler %@AB@%PTR%@AE@% operator.%@NL@%
  3194. %@NL@%
  3195.           %@AS@%BYTE PTR var                      (char) var%@AE@%%@NL@%
  3196.           %@AS@%WORD PTR var                      (int) var%@AE@%%@NL@%
  3197.           %@AS@%DWORD PTR var                     (long) var%@AE@%%@NL@%
  3198. %@NL@%
  3199.   5. Accessing array elements.%@NL@%
  3200. %@NL@%
  3201.      Accessing arrays declared in assembly code is problematic because the%@NL@%
  3202.      Macro Assembler emits no type information to indicate which variables%@NL@%
  3203.      are arrays. Therefore the CodeView debugger treats an array name like%@NL@%
  3204.      any other variable.%@NL@%
  3205. %@NL@%
  3206.      In C, an array name is equated with the address of the first element.%@NL@%
  3207.      Therefore, if you prefix an array with the address operator (%@AB@%&%@AE@%), the C%@NL@%
  3208.      expression evaluator gives correct results for array operations.%@NL@%
  3209. %@NL@%
  3210.           %@AS@%string[12]                         (&string)[12]%@AE@%%@NL@%
  3211.           %@AS@%warray[bx+di]                      (&warray)(bx+di)/2%@AE@%%@NL@%
  3212.           %@AS@%darray[4]                          (&darray)[1]%@AE@%%@NL@%
  3213. %@NL@%
  3214.      %@CR:MCV44008@%%@4@%In the second and third examples above, notice that the indexes used%@EH@%
  3215.      in the assembly source-code expressions differ from the indexes used
  3216.      in the CodeView expressions. This difference is necessary because C
  3217.      arrays are automatically scaled according to the size of elements. In
  3218.      assembly, the program must do the scaling.%@NL@%
  3219. %@NL@%
  3220. %@NL@%
  3221. %@CR:MCV45000@%%@2@%%@AB@%4.5  Line Numbers%@AE@%%@EH@%%@NL@%
  3222. %@NL@%
  3223. %@CR:MCV45001@%%@4@%Line numbers are useful for source-level debugging. They correspond to the%@EH@%
  3224. lines in source-code files (BASIC, C, FORTRAN, or Macro Assembler). In
  3225. source mode, you see a program displayed with each line numbered
  3226. sequentially. The CodeView debugger allows you to use these same numbers to
  3227. access parts of a program.%@NL@%
  3228. %@NL@%
  3229. %@CR:MCV45002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3230. %@NL@%
  3231.      .«%@AI@%filename%@AE@%:»%@AI@%linenumber%@AE@%%@NL@%
  3232. %@NL@%
  3233. %@CR:MCV45003@%%@4@%The address corresponding to a source-line number can be specified as %@EH@%
  3234. %@AI@%linenumber%@AE@% prefixed with a period (%@AB@%.%@AE@%). The CodeView debugger assumes that
  3235. the source line is in the current source file, unless you specify the
  3236. optional %@AI@%filename%@AE@% followed by a colon and the line number.%@NL@%
  3237. %@NL@%
  3238. %@CR:MCV45004@%%@4@%The CodeView debugger displays an error message if %@AI@%filename%@AE@% does not exist,%@EH@%
  3239. or if no source line exists for the specified number.%@NL@%
  3240. %@NL@%
  3241. %@CR:MCV45005@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  3242. %@NL@%
  3243.      >V .100%@NL@%
  3244. %@NL@%
  3245. %@CR:MCV45006@%%@4@%The example above uses the View command (%@AB@%V%@AE@%) to display code starting at the%@EH@%
  3246. source line %@AS@%100%@AE@%. Since no file is indicated, the current source file is
  3247. assumed.%@NL@%
  3248. %@NL@%
  3249.      >V .SAMPLE.FOR:10%@NL@%
  3250. %@NL@%
  3251.      >V .EXAMPLE.BAS:22%@NL@%
  3252. %@NL@%
  3253.      >V .DEMO.C:301%@NL@%
  3254. %@NL@%
  3255. %@CR:MCV45007@%%@4@%The examples above use %@AB@%V%@AE@% to display source code starting at line %@AS@%10%@AE@% of%@EH@%
  3256. %@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@%
  3257. %@NL@%
  3258. %@NL@%
  3259. %@CR:MCV46000@%%@2@%%@AB@%4.6  Registers and Addresses%@AE@%%@EH@%%@NL@%
  3260. %@NL@%
  3261. %@CR:MCV46001@%%@4@%This section presents alternative ways to refer to objects in memory,%@EH@%
  3262. including values stored in the processor's registers. Addresses are basic to
  3263. each of the expression evaluators. A data symbol represents an address in a
  3264. data segment; a procedure name represents an address in a code segment. All
  3265. of the syntax in this section can be considered as an extension to the
  3266. BASIC, C, or FORTRAN expression evaluator.%@NL@%
  3267. %@NL@%
  3268. %@NL@%
  3269. %@CR:MCV46100@%%@3@%%@AB@%4.6.1  Registers%@AE@%%@EH@%%@NL@%
  3270. %@NL@%
  3271. %@CR:MCV46101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3272. %@NL@%
  3273.      «@»%@AI@%register%@AE@%%@NL@%
  3274. %@NL@%
  3275. %@CR:MCV46102@%%@4@%You can specify a register name if you want to use the current value stored%@EH@%
  3276. in the register. Registers are rarely needed in source-level debugging, but
  3277. they are used frequently for assembly-language debugging.%@NL@%
  3278. %@NL@%
  3279. %@CR:MCV46103@%%@4@%When you specify an identifier, the CodeView debugger first checks the%@EH@%
  3280. symbol table for a symbol with that name. If the debugger does not find a
  3281. symbol, it checks to see if the identifier is a valid register name. If you
  3282. want the identifier to be considered a register, regardless of any name in
  3283. the symbol table, use the "at" sign (%@AB@%@%@AE@%) as a prefix to the register name.
  3284. For example, if your program has a symbol called %@AS@%AX%@AE@%, you could specify %@AS@%@AX%@AE@%
  3285. to refer to the AX register. You can avoid this problem entirely by making
  3286. sure that identifier names in your program do not conflict with register
  3287. names.%@NL@%
  3288. %@NL@%
  3289. %@CR:MCV46104@%%@4@%The register names known to the CodeView debugger are shown in Table 4.9.%@EH@%
  3290. Note that the 32-bit registers are available only if the 386 option is on
  3291. and if the computer is a 386 machine running in 386 mode.%@NL@%
  3292. %@NL@%
  3293. %@CR:MCV4TB00@%%@4@%%@AB@%Table 4.9  Registers%@AE@%%@EH@%%@NL@%
  3294. %@NL@%
  3295. %@AB@%Type                        Names%@AE@%%@NL@%
  3296. %@NL@%
  3297. 8-bit high byte             AH   BH   CH   DH%@NL@%
  3298. %@NL@%
  3299. 8-bit low byte              AL   BL   CL   DL%@NL@%
  3300. %@NL@%
  3301. 16-bit general purpose      AX   BX   CX   DX%@NL@%
  3302. %@NL@%
  3303. 16-bit segment              CS   DS   SS   ES%@NL@%
  3304. %@NL@%
  3305. 16-bit pointer              SP   BP   IP%@NL@%
  3306. %@NL@%
  3307. 16-bit index                SI   DI%@NL@%
  3308. %@NL@%
  3309. 32-bit general purpose      EAX  EBX  ECX  EDX%@NL@%
  3310. %@NL@%
  3311. 32-bit pointer              ESP  EBP%@NL@%
  3312. %@NL@%
  3313. 32-bit index                ESI  EDI%@NL@%
  3314. %@NL@%
  3315. %@NL@%
  3316. %@CR:MCV46200@%%@3@%%@AB@%4.6.2  Addresses%@AE@%%@EH@%%@NL@%
  3317. %@NL@%
  3318. %@CR:MCV46201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3319. %@NL@%
  3320.      «%@AI@%segment%@AE@%:»%@AI@%offset%@AE@%%@NL@%
  3321. %@NL@%
  3322. %@CR:MCV46202@%%@4@%Addresses can be specified in the CodeView debugger through the use of the%@EH@%
  3323. colon operator as a %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% connector. Both the %@AI@%segment%@AE@% and the
  3324. %@AI@%offset%@AE@% are made up of expressions.%@NL@%
  3325. %@NL@%
  3326. %@CR:MCV46203@%%@4@%A full address has a %@AI@%segment%@AE@% and an %@AI@%offset%@AE@%, separated by a colon. A partial%@EH@%
  3327. address has just an %@AI@%offset%@AE@%; a default segment is assumed. The default
  3328. segment varies, depending on the command with which the address is used.
  3329. Commands that refer to data (Dump, Enter, Watch, and Tracepoint) use the
  3330. contents of the DS register. Commands that refer to code (Assemble,
  3331. Breakpoint Set, Go, Unassemble, and View) use the contents of the CS
  3332. register.%@NL@%
  3333. %@NL@%
  3334. %@CR:MCV46204@%%@4@%Full addresses are seldom necessary in source-level debugging. Occasionally%@EH@%
  3335. they may be convenient for referring to addresses outside the program, such
  3336. as BIOS (basic input/output system) or DOS addresses.%@NL@%
  3337. %@NL@%
  3338. %@CR:MCV46205@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  3339. %@NL@%
  3340.      >DB 100%@NL@%
  3341. %@NL@%
  3342. %@CR:MCV46206@%%@4@%In the example above, the Dump Bytes command (%@AB@%DB%@AE@%) is used to dump memory%@EH@%
  3343. starting at offset address %@AS@%100%@AE@%. Since no segment is given, the data segment
  3344. (the default for Dump commands) is assumed.%@NL@%
  3345. %@NL@%
  3346.      >DB ARRAY(COUNT)     %@AI@%;* FORTRAN/BASIC example%@AE@%%@NL@%
  3347. %@NL@%
  3348. %@CR:MCV46207@%%@4@%In the example above, the Dump Bytes command is used to dump memory starting%@EH@%
  3349. at the address of the variable %@AS@%ARRAY(COUNT)%@AE@%. In C, a similar variable might
  3350. be denoted as %@AS@%array[count]%@AE@%.%@NL@%
  3351. %@NL@%
  3352.      >DB label+10%@NL@%
  3353. %@NL@%
  3354. %@CR:MCV46208@%%@4@%In the example above, the Dump Bytes command is used to dump memory starting%@EH@%
  3355. at a point 10 bytes beyond the symbol %@AS@%label%@AE@%.%@NL@%
  3356. %@NL@%
  3357.      >DB ES:200%@NL@%
  3358. %@NL@%
  3359. %@CR:MCV46209@%%@4@%In the example above, the Dump Bytes command is used to dump memory at the%@EH@%
  3360. address having the segment value stored in ES and the offset address %@AS@%200%@AE@%.%@NL@%
  3361. %@NL@%
  3362. %@NL@%
  3363. %@CR:MCV46300@%%@3@%%@AB@%4.6.3  Address Ranges%@AE@%%@EH@%%@NL@%
  3364. %@NL@%
  3365. %@CR:MCV46301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3366. %@NL@%
  3367.      %@AI@%startaddress%@AE@% %@AI@%endaddress%@AE@%%@NL@%
  3368.      %@AI@%startaddress%@AE@% %@AB@%L%@AE@% %@AI@%count%@AE@%%@NL@%
  3369. %@NL@%
  3370. %@CR:MCV46302@%%@4@%A "range" is a pair of memory addresses that bound a sequence of contiguous%@EH@%
  3371. memory locations.%@NL@%
  3372. %@NL@%
  3373. %@CR:MCV46303@%%@4@%You can specify a range in two ways. One way is to give the start and end%@EH@%
  3374. points. In this case, the range covers %@AI@%startaddress%@AE@% to %@AI@%endaddress%@AE@%,
  3375. inclusively. If a command takes a range, but if you do not supply a second
  3376. address, the CodeView debugger usually assumes the default range. Each
  3377. command has its own default range. (The most common default range is 128
  3378. bytes.)%@NL@%
  3379. %@NL@%
  3380. %@CR:MCV46304@%%@4@%You can also specify a range by giving its starting point and the number of%@EH@%
  3381. objects you want included in the range. This type of range is called an
  3382. object range. In specifying an object range, %@AI@%startaddress%@AE@% is the address of
  3383. the first object in the list, %@AB@%L%@AE@% indicates that this is an object range
  3384. rather than an ordinary range, and %@AI@%count%@AE@% specifies the number of objects in
  3385. the range.%@NL@%
  3386. %@NL@%
  3387. %@CR:MCV46305@%%@4@%The size of the objects is the size taken by the command. For example, the%@EH@%
  3388. Dump Bytes command (%@AB@%DB%@AE@%) has byte objects, the Dump Words command (%@AB@%DW%@AE@%) has
  3389. words, the Unassemble command (%@AB@%U%@AE@%) has instructions, and so on.%@NL@%
  3390. %@NL@%
  3391. %@CR:MCV46306@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  3392. %@NL@%
  3393.      >DB buffer%@NL@%
  3394. %@NL@%
  3395. %@CR:MCV46307@%%@4@%The example above dumps a range of memory starting at the symbol %@AS@%buffer%@AE@%.%@EH@%
  3396. Since the end of the range is not given, the default size (128 bytes for the
  3397. Dump Bytes command) is assumed.%@NL@%
  3398. %@NL@%
  3399.      >DB buffer buffer+20%@NL@%
  3400. %@NL@%
  3401. %@CR:MCV46308@%%@4@%The example above dumps a range of memory starting at %@AS@%buffer%@AE@% and ending at%@EH@%
  3402. %@AS@%buffer+20%@AE@% (the point 20 bytes beyond %@AS@%buffer%@AE@%).%@NL@%
  3403. %@NL@%
  3404.      >DB buffer L 20%@NL@%
  3405. %@NL@%
  3406. %@CR:MCV46309@%%@4@%The example above uses an object range to dump the same range as in the%@EH@%
  3407. previous example. The %@AS@%L%@AE@% indicates that the range is an object range, and %@AS@%20%@AE@%
  3408. is the number of objects in the range. Each object has a size of 1 byte,
  3409. since that is the command size.%@NL@%
  3410. %@NL@%
  3411.      >U funcname-30 funcname%@NL@%
  3412. %@NL@%
  3413. %@CR:MCV4630A@%%@4@%The example above uses the Unassemble command (%@AS@%U%@AE@%) to list the%@EH@%
  3414. assembly-language statements starting 30 instructions before %@AS@%funcname%@AE@% and
  3415. continuing to %@AS@%funcname%@AE@%.%@NL@%
  3416. %@NL@%
  3417. %@NL@%
  3418. %@CR:MCV47000@%%@2@%%@AB@%4.7  Memory Operators%@AE@%%@EH@%%@NL@%
  3419. %@NL@%
  3420. %@CR:MCV47001@%%@4@%Memory operators return the content of specific locations in memory. They%@EH@%
  3421. are unary operators that work in the same way regardless of the language
  3422. selected and return the result of a direct memory operation. They are
  3423. chiefly of interest to programmers who debug in assembly mode, and are not
  3424. necessary for high-level debugging.%@NL@%
  3425. %@NL@%
  3426. %@CR:MCV47002@%%@4@%All of the operators listed in this section are part of the CodeView C%@EH@%
  3427. expression evaluator and should not be confused with CodeView commands. As
  3428. opera-tors, they can only build expressions, which in turn are used as
  3429. arguments in commands.%@NL@%
  3430. %@NL@%
  3431. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3432. %@AI@%NOTE%@AE@%%@NL@%
  3433.    The memory operators discussed in this section are only available with%@NL@%
  3434.    the C expression evaluator and have the lowest precedence of any C%@NL@%
  3435.    operators.%@NL@%
  3436. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3437. %@NL@%
  3438. %@NL@%
  3439. %@CR:MCV47100@%%@3@%%@AB@%4.7.1  Accessing Bytes (BY)%@AE@%%@EH@%%@NL@%
  3440. %@NL@%
  3441. %@CR:MCV47101@%%@4@%You can access the byte at an address by using the %@AB@%BY%@AE@% operator. This%@EH@%
  3442. operator is useful for simulating the %@AB@%BYTE PTR%@AE@% operation of the Microsoft
  3443. Macro Assembler. It is useful for watching the byte pointed to by a
  3444. particular register.%@NL@%
  3445. %@NL@%
  3446. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3447. %@AI@%NOTE%@AE@%%@NL@%
  3448.    The examples that follow in this section make use of the Display%@NL@%
  3449.    Expression (%@AB@%?%@AE@%) Command, which is described in Section 6.1.%@BO:   44676@% The %@AB@%x%@AE@% format%@NL@%
  3450.    specifier causes the debugger to produce output in hexadecimal.%@NL@%
  3451. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3452. %@NL@%
  3453. %@CR:MCV47102@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3454. %@NL@%
  3455.      %@AB@%BY%@AE@% %@AI@%address%@AE@%%@NL@%
  3456. %@NL@%
  3457. %@CR:MCV47103@%%@4@%The result is a short integer that contains the value of the first byte%@EH@%
  3458. stored at %@AI@%address%@AE@%.%@NL@%
  3459. %@NL@%
  3460. %@CR:MCV47104@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  3461. %@NL@%
  3462.      >? BY sum%@NL@%
  3463.      %@AS@%101%@NL@%
  3464. %@NL@%
  3465. %@CR:MCV47105@%%@4@%The example above returns the first byte at the address of %@AS@%sum.%@AE@%%@EH@%%@NL@%
  3466. %@NL@%
  3467.      >? BY bp+6%@NL@%
  3468.      %@AS@%42%@NL@%
  3469. %@NL@%
  3470. %@CR:MCV47106@%%@4@%This example returns the byte pointed to by the BP register, with a%@EH@%
  3471. displacement of 6.%@NL@%
  3472. %@NL@%
  3473. %@NL@%
  3474. %@CR:MCV47200@%%@3@%%@AB@%4.7.2  Accessing Words (WO)%@AE@%%@EH@%%@NL@%
  3475. %@NL@%
  3476. %@CR:MCV47201@%%@4@%You can access the word at an address by using the %@AB@%WO%@AE@% operator. This%@EH@%
  3477. operator is useful for simulating the %@AB@%WORD PTR%@AE@% operation of the assembler.
  3478. It is particularly useful for watching the word pointed to by a particular
  3479. register, such as the stack pointer.%@NL@%
  3480. %@NL@%
  3481. %@CR:MCV47202@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3482. %@NL@%
  3483.      %@AB@%WO%@AE@% %@AI@%address%@AE@%%@NL@%
  3484. %@NL@%
  3485. %@CR:MCV47203@%%@4@%The result is a short integer that contains the value of the first two bytes%@EH@%
  3486. stored at %@AI@%address%@AE@%.%@NL@%
  3487. %@NL@%
  3488. %@CR:MCV47204@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  3489. %@NL@%
  3490.      >? WO sum%@NL@%
  3491.      %@AS@%>13120%@NL@%
  3492. %@NL@%
  3493. %@CR:MCV47205@%%@4@%The example above returns the first word at the address of %@AS@%sum.%@AE@%%@EH@%%@NL@%
  3494. %@NL@%
  3495.      >? WO sp,x%@NL@%
  3496.      %@AS@%>2F38%@NL@%
  3497. %@NL@%
  3498. %@CR:MCV47206@%%@4@%This example returns the word pointed to by the stack pointer; the word%@EH@%
  3499. therefore represents the last word pushed (the "top" of the stack).%@NL@%
  3500. %@NL@%
  3501. %@NL@%
  3502. %@CR:MCV47300@%%@3@%%@AB@%4.7.3  Accessing Double Words (DW)%@AE@%%@EH@%%@NL@%
  3503. %@NL@%
  3504. %@CR:MCV47301@%%@4@%You can access the word at an address by using the %@AB@%DW%@AE@% operator. This%@EH@%
  3505. operator is useful for simulating the %@AB@%DWORD PTR%@AE@% operation of the Microsoft
  3506. Macro Assembler. It is particularly useful for watching the word pointed to
  3507. by a particular register.%@NL@%
  3508. %@NL@%
  3509. %@CR:MCV47302@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  3510. %@NL@%
  3511.      %@AB@%DW%@AE@% %@AI@%address%@AE@%%@NL@%
  3512. %@NL@%
  3513. %@CR:MCV47303@%%@4@%The result is a long integer that contains the value of the first four bytes%@EH@%
  3514. stored at %@AI@%address%@AE@%.%@NL@%
  3515. %@NL@%
  3516. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3517. %@AI@%NOTE%@AE@%%@NL@%
  3518.    Be careful not to confuse the %@AB@%DW%@AE@% operator with the %@AB@%DW%@AE@% comm and. The%@NL@%
  3519.    operator is only useful for building expressions; it occurs within a%@NL@%
  3520.    CodeView command line, but never at the beginning. The second use of %@AB@%DW%@AE@%%@NL@%
  3521.    mentioned above, the Dump Words Command, occurs only at the beginning of%@NL@%
  3522.    a CodeView command line. It displays an entire range of memory (in words,%@NL@%
  3523.    not double words) rather than returning a single result.%@NL@%
  3524. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3525. %@NL@%
  3526. %@CR:MCV47304@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  3527. %@NL@%
  3528.      >? DW sum%@NL@%
  3529.      %@AS@%>132120365%@NL@%
  3530. %@NL@%
  3531. %@CR:MCV47305@%%@4@%The example above returns the first double word at the address of %@AS@%sum%@AE@%.%@EH@%%@NL@%
  3532. %@NL@%
  3533.      >? DW si,x%@NL@%
  3534.      %@AS@%>3F880000%@NL@%
  3535. %@NL@%
  3536. %@CR:MCV47306@%%@4@%This example returns the double word pointed to by the SI register.%@EH@%%@NL@%
  3537. %@NL@%
  3538. %@NL@%
  3539. %@CR:MCV48000@%%@2@%%@AB@%4.8  Switching Expression Evaluators%@AE@%%@EH@%%@NL@%
  3540. %@NL@%
  3541. %@CR:MCV48001@%%@4@%The CodeView debugger allows you to specify a particular expression%@EH@%
  3542. evaluator: BASIC, C, or FORTRAN. You may want to specify the expression
  3543. evaluator if you are debugging a source module that does not use the
  3544. standard extension of the source language (such as .C for C, .BAS for BASIC,
  3545. etc.), or if you want to use a feature of a different language. For example,
  3546. you might be debugging a C program and want to evaluate a string of binary
  3547. digits. The FORTRAN expression evaluator accepts base 2, so you might want
  3548. to switch temporarily to the FORTRAN expression evaluator.%@NL@%
  3549. %@NL@%
  3550. %@CR:MCV48002@%%@4@%It is normally not necessary to specify the evaluator, even if you are%@EH@%
  3551. debugging a mixed-language program; the Auto selection changes the
  3552. expression evaluator for you.%@NL@%
  3553. %@NL@%
  3554. %@CR:MCV48003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  3555. %@NL@%
  3556. %@CR:MCV48004@%%@4@%To switch expression evaluators with the mouse, open the Language menu and%@EH@%
  3557. click the appropriate language selection.%@NL@%
  3558. %@NL@%
  3559. %@CR:MCV48005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  3560. %@NL@%
  3561. %@CR:MCV48006@%%@4@%To switch expression evaluators with a keyboard command, press ALT+L to open%@EH@%
  3562. up the Language menu, use the direction keys (or mnemonic letter) to move to
  3563. the appropriate language, then press RETURN.%@NL@%
  3564. %@NL@%
  3565. %@CR:MCV48007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  3566. %@NL@%
  3567. %@CR:MCV48008@%%@4@%To switch expression evaluators using a dialog command, enter a command line%@EH@%
  3568. with the syntax%@NL@%
  3569. %@NL@%
  3570.      %@AB@%USE%@AE@% «%@AI@%language%@AE@%»%@NL@%
  3571. %@NL@%
  3572. %@CR:MCV48009@%%@4@%where %@AI@%language%@AE@% is C, FORTRAN, BASIC, or Auto. The command is not case%@EH@%
  3573. sensitive, and you can enter the language name in any combination of
  3574. uppercase and lowercase letters. Entered on a line by itself, %@AB@%USE%@AE@% displays
  3575. the name of the current expression evaluator. The %@AB@%USE%@AE@% command always
  3576. displays the name of the current expression evaluator or the new expression
  3577. evaluator (if specified).%@NL@%
  3578. %@NL@%
  3579. %@CR:MCV4800A@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  3580. %@NL@%
  3581.      >USE fortran%@NL@%
  3582.      %@AS@%FORTRAN%@NL@%
  3583. %@NL@%
  3584. %@CR:MCV4800B@%%@4@%The example above switches to the FORTRAN expression evaluator.%@EH@%%@NL@%
  3585. %@NL@%
  3586.      >USE%@NL@%
  3587.      %@AS@%BASIC%@NL@%
  3588. %@NL@%
  3589. %@CR:MCV4800C@%%@4@%The example above displays the name of the current expression evaluator,%@EH@%
  3590. which in this case happens to be BASIC.%@NL@%
  3591. %@NL@%
  3592. %@NL@%
  3593. %@CR:MCV50000@%%@1@%%@AB@%Chapter 5  Executing Code%@AE@%%@EH@%%@NL@%
  3594. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3595. %@NL@%
  3596. %@CR:MCV50001@%%@4@%Several commands execute code within a program. Among the differences%@EH@%
  3597. between the commands is the size of step executed by each. The commands and
  3598. their step sizes are listed below.%@NL@%
  3599. %@NL@%
  3600. %@CR:MCV50002@%  ■  Trace (%@AB@%T%@AE@%)%@NL@%
  3601. %@NL@%
  3602.      Executes the current source line in source mode, or the current%@NL@%
  3603.      instruction in assembly mode; traces into routines, procedures, or%@NL@%
  3604.      interrupts%@NL@%
  3605. %@NL@%
  3606.   ■  Program Step (%@AB@%P%@AE@%)%@NL@%
  3607. %@NL@%
  3608.      Executes the current source line in source mode, or the current%@NL@%
  3609.      instruction in assembly mode; steps over routines, procedures, or%@NL@%
  3610.      interrupts%@NL@%
  3611. %@NL@%
  3612.   ■  Go (%@AB@%G%@AE@%)%@NL@%
  3613. %@NL@%
  3614.      Executes the current program%@NL@%
  3615. %@NL@%
  3616.   ■  Execute (%@AB@%E%@AE@%)%@NL@%
  3617. %@NL@%
  3618.      Executes the current program in slow motion%@NL@%
  3619. %@NL@%
  3620.   ■  Restart (%@AB@%L%@AE@%)%@NL@%
  3621. %@NL@%
  3622.      Restarts the current program%@NL@%
  3623. %@NL@%
  3624. %@NL@%
  3625. %@CR:MCV51000@%%@2@%%@AB@%5.1  Window and Sequential Mode Commands%@AE@%%@EH@%%@NL@%
  3626. %@NL@%
  3627. %@CR:MCV51001@%%@4@%In window mode, the screen is updated to reflect changes that occur when you%@EH@%
  3628. execute a Trace, Program Step, or Go command. The highlight marking the
  3629. current location is moved to the new instruction in the display window. When
  3630. appropriate, values are changed in the register and watch windows.%@NL@%
  3631. %@NL@%
  3632. %@CR:MCV51002@%%@4@%In sequential mode, the current source line or instruction is displayed%@EH@%
  3633. after each Trace, Program Step, or Go command. The format of the display
  3634. depends on the display mode. The three display modes in sequential mode
  3635. (source, assembly, and mixed) are discussed in Chapter 9%@BO:   6542b@%, "Examining Code."%@NL@%
  3636. %@NL@%
  3637. %@CR:MCV51003@%%@4@%If the display mode is source (%@AB@%S+%@AE@%) in sequential mode, the current source%@EH@%
  3638. line is shown. If the display mode is assembly (%@AB@%S-%@AE@%), the status of the
  3639. registers and the flags and the new instruction are shown in the format of
  3640. the Register command (see Chapter 6%@BO:   43f5c@%, "Examining Data and Expressions"). If
  3641. the display mode is mixed (%@AB@%S&%@AE@%), then the registers, the new source line, and
  3642. the new instruction are all shown.%@NL@%
  3643. %@NL@%
  3644. %@CR:MCV51004@%%@4@%The commands that execute code are explained in Sections 5.2%@BO:   3e3a8@%-5.6.%@EH@%%@NL@%
  3645. %@NL@%
  3646. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3647. %@AI@%NOTE%@AE@%%@NL@%
  3648.    If you are executing a section of code with the Go or Program Step%@NL@%
  3649.    command, you can usually interrupt program execution by pressing%@NL@%
  3650.    CTRL+BREAK or CTRL+C. This can terminate endless loops, or it can%@NL@%
  3651.    interrupt loops that are delayed by the Watchpoint or Tracepoint command%@NL@%
  3652.    (see Chapter 8%@BO:   5c045@%, "Managing Watch Statements").%@NL@%
  3653. %@NL@%
  3654.    CTRL+BREAK or CTRL+C may not work if your program has a special use for%@NL@%
  3655.    either of these key combinations. If you have an IBM Personal Computer AT%@NL@%
  3656.    (or a compatible computer), you can use the SYSTEM-REQUEST key to%@NL@%
  3657.    interrupt execution regardless of your program's use of CTRL+BREAK and%@NL@%
  3658.    CTRL+C.%@NL@%
  3659. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3660. %@NL@%
  3661. %@NL@%
  3662. %@CR:MCV52000@%%@2@%%@AB@%5.2  Trace Command%@AE@%%@EH@%%@NL@%
  3663. %@NL@%
  3664. %@CR:MCV52001@%%@4@%The Trace command executes the current source line in source mode, or the%@EH@%
  3665. current instruction in assembly mode. The current source line or instruction
  3666. is the one pointed to by the CS and IP registers. In window mode, the
  3667. current instruction is shown in reverse video or in a contrasting color.%@NL@%
  3668. %@NL@%
  3669. %@CR:MCV52002@%%@4@%In source mode, if the current source line contains a call, the CodeView%@EH@%
  3670. debugger executes the first source line of the called routine. In this mode,
  3671. the debugger will only trace into functions and routines that have source
  3672. code. For example, if the current line contains a call to an intrinsic
  3673. function or a standard C library function, the debugger will simply execute
  3674. the function if you are in source mode, since the source code for Microsoft
  3675. standard libraries is not available.%@NL@%
  3676. %@NL@%
  3677. %@CR:MCV52003@%%@4@%If you are in assembly or mixed mode, the debugger will trace into the%@EH@%
  3678. function. In this mode, if the current instruction is %@AB@%CALL%@AE@%, %@AB@%INT%@AE@% or %@AB@%REP%@AE@%, the
  3679. debugger executes the first instruction of the procedure, interrupt, or
  3680. repeated string sequence.%@NL@%
  3681. %@NL@%
  3682. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3683. %@AI@%NOTE%@AE@%%@NL@%
  3684.    When you debug Microsoft Macro Assembler programs in source mode, the%@NL@%
  3685.    paragraph above still applies. The debugger will not trace into an %@AB@%INT%@AE@% or%@NL@%
  3686.    %@AB@%REP%@AE@% sequence when you are in source mode.%@NL@%
  3687. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3688. %@NL@%
  3689. %@CR:MCV52004@%%@4@%Use the Trace command i execute calls without tracing into them, you should%@EH@%
  3690. use the Program Step command (%@AB@%P%@AE@%) instead. Both commands execute DOS function
  3691. calls without tracing into them. There is no direct way to trace into DOS
  3692. function calls. However, you can trace through BIOS calls in assembly or
  3693. mixed mode.%@NL@%
  3694. %@NL@%
  3695. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3696. %@AI@%NOTE%@AE@%%@NL@%
  3697.    The Trace command (%@AB@%T%@AE@%) uses the hardware trace mode of the 8086 family of%@NL@%
  3698.    processors. Consequently, you can also trace instructions stored in ROM%@NL@%
  3699.    (read-only memory). However, the Program Step command (%@AB@%P%@AE@%) will not work%@NL@%
  3700.    in ROM.Using the Program Step command has the same effect as using the%@NL@%
  3701.    Gocommand (%@AB@%G%@AE@%).%@NL@%
  3702. ───────────────────────────────────────────────────────────────────────────%@NL@%
  3703. %@NL@%
  3704. %@CR:MCV52005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  3705. %@NL@%
  3706. %@CR:MCV52006@%%@4@%To execute the Trace command with the mouse, point to Trace on the menu bar%@EH@%
  3707. and click Left.%@NL@%
  3708. %@NL@%
  3709. %@CR:MCV52007@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  3710. %@NL@%
  3711. %@CR:MCV52008@%%@4@%To execute the Trace command with a keyboard command, press F8. This works%@EH@%
  3712. in both window and sequential modes.%@NL@%
  3713. %@NL@%
  3714. %@CR:MCV52009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  3715. %@NL@%
  3716. %@CR:MCV5200A@%%@4@%To execute the Trace command using a dialog command, enter a command line%@EH@%
  3717. with the following syntax:%@NL@%
  3718. %@NL@%
  3719.      %@AB@%T%@AE@% «%@AI@%count%@AE@%»%@NL@%
  3720. %@NL@%
  3721. %@CR:MCV5200B@%%@4@%If the optional %@AI@%count%@AE@% is specified, the command executes %@AI@%count%@AE@% times before%@EH@%
  3722. stopping.%@NL@%
  3723. %@NL@%
  3724. %@CR:MCV5200C@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  3725. %@NL@%
  3726. %@CR:MCV5200D@%%@4@%The following example shows the Trace command in sequential mode. (In window%@EH@%
  3727. mode, there would be no output from the commands, but the display would be
  3728. updated to show changes caused by the command.)%@NL@%
  3729. %@NL@%
  3730.      S+       %@AI@%;* FORTRAN example%@AE@%%@NL@%
  3731.      source%@NL@%
  3732.      >.%@NL@%
  3733.      9:        CALL INPUT (DATA,N,INPFMT)%@NL@%
  3734.      >T 3%@NL@%
  3735.      34:  OPEN (1,FILE='EXAMPLE.DAT',STATUS='OLD')%@NL@%
  3736.      35:       DO 100 I=1,N%@NL@%
  3737.      36:       READ (1,'(BN,I10)',END=999) DATA(I)%@NL@%
  3738.      %@NL@%
  3739.      >%@NL@%
  3740. %@NL@%
  3741. %@CR:MCV5200E@%%@4@%The FORTRAN example above sets the display mode to source, and then uses the%@EH@%
  3742. Source Line command to display the current source line. (See Chapter 9%@BO:   6542b@%,
  3743. "Examining Code," for a further explanation of the Set Source and Source
  3744. Line commands.) Note that the current source line calls the subroutine
  3745. %@AS@%INPUT%@AE@%. The Trace command is then used to execute the next three source
  3746. lines. These lines will be the first three lines of the subroutine %@AS@%INPUT%@AE@%.%@NL@%
  3747. %@NL@%
  3748. %@CR:MCV5200F@%%@4@%Debugging C and BASIC source code is very similar. If you execute the Trace%@EH@%
  3749. command when the current source line contains a C function call or a BASIC
  3750. subprogram call, the debugger will execute the first line of the called
  3751. routine.%@NL@%
  3752. %@NL@%
  3753.      S-%@NL@%
  3754.      assembly%@NL@%
  3755.      >T%@NL@%
  3756.      AX=0058  BX=3050  CX=000B  DX=3FB0  SP=304C  BP=3056  SI=00CC  DI=40E0%@NL@%
  3757.      DS=49B7  ES=49B7  SS=49B7  CS=3FB0  IP=0013  NV UP EI PL NZ AC PONC%@NL@%
  3758.      3FB0:0013 50             PUSH      AX%@NL@%
  3759.      >%@NL@%
  3760. %@NL@%
  3761. %@CR:MCV5200G@%%@4@%The example above sets the display mode to assembly and traces the current%@EH@%
  3762. instruction. (This example and the next example are the same as the examples
  3763. of the Program Step command in Section 5.3.%@BO:   3fb26@%) The Trace and Program Step
  3764. commands behave differently only when the current instruction is a %@AB@%CALL%@AE@%,
  3765. %@AB@%INT%@AE@%, or %@AB@%REP%@AE@% instruction.%@NL@%
  3766. %@NL@%
  3767.      S&%@NL@%
  3768.      mixed%@NL@%
  3769.      >T%@NL@%
  3770.      AX=0000 BX=319C  CX=0028  DX=0000  SP=304C  BP=3056  SI=00CC  DI=40E0%@NL@%
  3771.      DS=49B7  ES=49B7  SS=49B7  CS=3FB0  IP=003C  NV UP EI PL NZ NA PONC%@NL@%
  3772.      8:        IF (N.LT.1 .OR. N.GT.1000) GO TO 100%@NL@%
  3773.      3FB0:003C 833ECE2101   CMP     Word Ptr [21CE],+01        DS:21CE=0028%@NL@%
  3774.      >%@NL@%
  3775. %@NL@%
  3776. %@CR:MCV5200H@%%@4@%The example above sets the display mode to mixed and traces the current%@EH@%
  3777. instruction.%@NL@%
  3778. %@NL@%
  3779. %@NL@%
  3780. %@CR:MCV53000@%%@2@%%@AB@%5.3  Program Step Command%@AE@%%@EH@%%@NL@%
  3781. %@NL@%
  3782. %@CR:MCV53001@%%@4@%The Program Step command executes the current source line in source mode, or%@EH@%
  3783. the current instruction in assembly mode. The current source line or
  3784. instruction is the one pointed to by the CS and IP registers. In window
  3785. mode, the current instruction is shown in reverse video or in a contrasting
  3786. color.%@NL@%
  3787. %@NL@%
  3788. %@CR:MCV53002@%%@4@%In source mode, if the current source line contains a call, the CodeView%@EH@%
  3789. debugger executes the entire routine and is ready to execute the line after
  3790. the call. In assembly mode, if the current instruction is %@AB@%CALL%@AE@%, %@AB@%INT%@AE@%, or %@AB@%REP%@AE@%,
  3791. the debugger executes the entire procedure, interrupt, or repeated string
  3792. sequence.  Use the Program Step command if you want to execute over routine,
  3793. function, procedure, and interrupt calls. If you want to trace into calls,
  3794. you should use the Trace command (%@AB@%T%@AE@%) instead. Both commands execute DOS
  3795. function calls without tracing into them. There is no direct way to trace
  3796. into DOS function calls.%@NL@%
  3797. %@NL@%
  3798. %@CR:MCV53003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  3799. %@NL@%
  3800. %@CR:MCV53004@%%@4@%To execute the Program Step command with the mouse, point to Trace on the%@EH@%
  3801. menu bar and click Right.%@NL@%
  3802. %@NL@%
  3803. %@CR:MCV53005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  3804. %@NL@%
  3805. %@CR:MCV53006@%%@4@%To execute the Program Step command with a keyboard command, press F10. This%@EH@%
  3806. works in both window and sequential modes.%@NL@%
  3807. %@NL@%
  3808. %@CR:MCV53007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  3809. %@NL@%
  3810. %@CR:MCV53008@%%@4@%To execute the Program Step command with a dialog command, enter a command%@EH@%
  3811. line with the following syntax:%@NL@%
  3812. %@NL@%
  3813.      %@AB@%P%@AE@% «%@AI@%count%@AE@%»%@NL@%
  3814. %@NL@%
  3815. %@CR:MCV53009@%%@4@%If the optional %@AI@%count%@AE@% is specified, the command executes %@AI@%count%@AE@% times before%@EH@%
  3816. stopping.%@NL@%
  3817. %@NL@%
  3818. %@CR:MCV5300A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  3819. %@NL@%
  3820. %@CR:MCV5300B@%%@4@%This example shows the Program Step command in sequential mode. In window%@EH@%
  3821. mode, there would be no output from the commands, but the display would be
  3822. updated to show changes.%@NL@%
  3823. %@NL@%
  3824.      S+       %@AI@%;* FORTRAN/BASIC example%@AE@%%@NL@%
  3825.      source%@NL@%
  3826.      >.%@NL@%
  3827.      9:        CALL INPUT (DATA,N,INPFMT)%@NL@%
  3828.      >P 3%@NL@%
  3829.      10:       CALL BUBBLE (DATA,N)%@NL@%
  3830.      11:       CALL STATS (DATA,N)%@NL@%
  3831.      12:       END%@NL@%
  3832.      >%@NL@%
  3833. %@NL@%
  3834. %@CR:MCV5300C@%%@4@%The example above (in FORTRAN or BASIC) sets the display mode to source, and%@EH@%
  3835. then uses the Source Line command to display the current source line. (See
  3836. Chapter 9%@BO:   6542b@%, "Examining Code," for an explanation of the Set Source and
  3837. Source Line commands.) Notice that the current source line calls the
  3838. subprogram %@AS@%INPUT%@AE@%. The Program Step command is then used to execute the next
  3839. three source lines. The first program step executes the entire subprogram
  3840. %@AS@%INPUT%@AE@%. The next two steps execute the subprograms %@AS@%BUBBLE%@AE@% and %@AS@%STATS%@AE@% in their
  3841. entirety.%@NL@%
  3842. %@NL@%
  3843. %@CR:MCV5300D@%%@4@%The same program, written in C, would behave exactly the same way with the%@EH@%
  3844. Program Step command. The Program Step command will not trace into a C
  3845. function call.%@NL@%
  3846. %@NL@%
  3847.      S-%@NL@%
  3848.      assembly%@NL@%
  3849.      >P%@NL@%
  3850.      AX=0058 BX=3050  CX=000B  DX=3FB0  SP=304C  BP=3056  SI=00CC  DI=40E0%@NL@%
  3851.      DS=49B7  ES=49B7  SS=49B7  CS=3FB0  IP=0013  NV UP EI PL NZ AC PONC%@NL@%
  3852.      3FB0:0013 50             PUSH      AX%@NL@%
  3853.      >%@NL@%
  3854. %@NL@%
  3855. %@CR:MCV5300E@%%@4@%The example above sets the display mode to assembly and steps through the%@EH@%
  3856. current instruction. (This example and the next example are the same as the
  3857. examples of the Trace command in Section 5.2.%@BO:   3e3a8@%) The Trace and Program Step
  3858. commands behave differently only when the current instruction is a %@AB@%CALL%@AE@%,
  3859. %@AB@%INT%@AE@%, or %@AB@%REP%@AE@% instruction.%@NL@%
  3860. %@NL@%
  3861.      S&%@NL@%
  3862.      mixed%@NL@%
  3863.      >P%@NL@%
  3864.      AX=0000 BX=319C  CX=0028  DX=0000  SP=304C  BP=3056  SI=00CC  DI=40E0%@NL@%
  3865.      DS=49B7  ES=49B7  SS=49B7  CS=3FB0  IP=003C  NV UP EI PL NZ NA PONC%@NL@%
  3866.      8:        IF (N.LT.1 .OR. N.GT.1000) GO TO 100%@NL@%
  3867.      3FB0:003C 833ECE2101   CMP     Word Ptr [21CE],+01         DS:21CE=0028%@NL@%
  3868.      >%@NL@%
  3869. %@NL@%
  3870. %@CR:MCV5300F@%%@4@%The example above sets the display mode to mixed and steps through the%@EH@%
  3871. current instruction.%@NL@%
  3872. %@NL@%
  3873. %@NL@%
  3874. %@CR:MCV54000@%%@2@%%@AB@%5.4  Go Command%@AE@%%@EH@%%@NL@%
  3875. %@NL@%
  3876. %@CR:MCV54001@%%@4@%The Go command starts execution at the current address. There are two%@EH@%
  3877. variations of the Go command──Go and Goto. The Go variation simply starts
  3878. execution and continues to the end of the program or until a breakpoint set
  3879. earlier with the Breakpoint Set (%@AB@%BP%@AE@%), Watchpoint (%@AB@%WP%@AE@%), or Tracepoint (%@AB@%TP%@AE@%)
  3880. command is encountered. The other variation is a Goto command, in which a
  3881. destination is given with the command.%@NL@%
  3882. %@NL@%
  3883. %@CR:MCV54002@%%@4@%If a destination address is given but never encountered (for example, if the%@EH@%
  3884. destination is on a program branch that is never taken), the CodeView
  3885. debugger executes to the end of the program.%@NL@%
  3886. %@NL@%
  3887. %@CR:MCV54003@%%@4@%If you enter the Go command and the debugger does not encounter a%@EH@%
  3888. breakpoint, the entire program is executed and the following message is
  3889. displayed:%@NL@%
  3890. %@NL@%
  3891.      %@AS@%Program terminated normally  (%@AE@%%@AI@%number%@AE@%%@AS@%)%@AE@%%@NL@%
  3892. %@NL@%
  3893. %@CR:MCV54004@%%@4@%The %@AI@%number%@AE@% in parentheses is the value returned by the program (sometimes%@EH@%
  3894. called the exit or "errorlevel" code).%@NL@%
  3895. %@NL@%
  3896. %@CR:MCV54005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  3897. %@NL@%
  3898. %@CR:MCV54006@%%@4@%To execute the Go command with no destination, point to Go on the menu bar%@EH@%
  3899. and press either button.%@NL@%
  3900. %@NL@%
  3901. %@CR:MCV54007@%%@4@%To execute the Goto variation of the Go command, point to the source line or%@EH@%
  3902. instruction you wish to go to, then press the right button. The highlight
  3903. marking the current location will move to the source line or instruction you
  3904. pointed to (unless a breakpoint is encountered first). The CodeView debugger
  3905. will sound a warning and take no action if you try to go to a comment line
  3906. or other source line that does not correspond to code.%@NL@%
  3907. %@NL@%
  3908. %@CR:MCV54008@%%@4@%If the line you wish to go to is in another module, you can use the Load%@EH@%
  3909. command from the Files menu to load the source file for the other module.
  3910. Then point to the destination line and press the right button.%@NL@%
  3911. %@NL@%
  3912. %@CR:MCV54009@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  3913. %@NL@%
  3914. %@CR:MCV5400A@%%@4@%To use a keyboard command to execute the Go command with no destination,%@EH@%
  3915. press F5. This works in both window and sequential modes.%@NL@%
  3916. %@NL@%
  3917. %@CR:MCV5400B@%%@4@%To execute the Goto variation of the Go command, point to the source line or%@EH@%
  3918. instruction you wish to go to then press the right button. The highlight
  3919. marking the current location will move to the source line or instruction to
  3920. which you wish to go. If the cursor is in the dialog window, first press F6
  3921. to move the cursor to the display window. When the cursor is at the
  3922. appropriate line in the display window, press F7. The highlight marking the
  3923. current location will move to the source line or instruction you pointed to
  3924. (unless a breakpoint is encountered first). If you try to go to a comment
  3925. line or to another source line that does not correspond to code, the
  3926. CodeView debugger will sound a warning and take no action.%@NL@%
  3927. %@NL@%
  3928. %@CR:MCV5400C@%%@4@%If the line you wish to go to is in another module, you can use the Load%@EH@%
  3929. command from the Files menu to load the source file for the other module.
  3930. Then move the cursor to the destination line and press F7.%@NL@%
  3931. %@NL@%
  3932. %@CR:MCV5400D@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  3933. %@NL@%
  3934. %@CR:MCV5400E@%%@4@%To execute the Go command with a dialog command, enter a command line with%@EH@%
  3935. the following syntax:%@NL@%
  3936. %@NL@%
  3937.      %@AB@%G%@AE@% «%@AI@%breakaddress%@AE@%»%@NL@%
  3938. %@NL@%
  3939. %@CR:MCV5400F@%%@4@%If the command is given with no argument, execution continues until a%@EH@%
  3940. breakpoint or the end of the program is encountered.%@NL@%
  3941. %@NL@%
  3942. %@CR:MCV5400G@%%@4@%The Goto form of the command can be given by specifying %@AI@%breakaddress%@AE@%. The%@EH@%
  3943. %@AI@%breakaddress%@AE@% can be given as a symbol, a line number, or an address in the
  3944. %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% format. If the offset address is given without a segment, the
  3945. address in the CS register is used as the default segment. If %@AI@%breakaddress%@AE@%
  3946. is given as a line number, but the corresponding source line is a comment,
  3947. declaration, or blank line, the following message appears:%@NL@%
  3948. %@NL@%
  3949.      %@AS@%No code at this line number%@AE@%%@NL@%
  3950. %@NL@%
  3951. %@CR:MCV5400H@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  3952. %@NL@%
  3953. %@CR:MCV5400I@%%@4@%The following examples show the Go command in sequential mode. In window%@EH@%
  3954. mode there would be no output from the commands, but the display would be
  3955. updated to show changes caused by the command.%@NL@%
  3956. %@NL@%
  3957.      >G%@NL@%
  3958.      %@NL@%
  3959.      Program terminated normally (0)%@NL@%
  3960.      >%@NL@%
  3961. %@NL@%
  3962. %@CR:MCV5400J@%%@4@%The example above passes control to the instruction pointed to by the%@EH@%
  3963. current values of the CS and IP registers. No breakpoint is encountered, so
  3964. that the CodeView debugger executes to the end of the program, where it
  3965. prints a termination message and the exit code returned by the program ( %@AS@%0%@AE@%
  3966. in the example).%@NL@%
  3967. %@NL@%
  3968.      S+     %@AI@%;* FORTRAN/BASIC example (source mode)%@AE@%%@NL@%
  3969.      source%@NL@%
  3970.      >G BUBBLE%@NL@%
  3971.      17:        A = B + C%@NL@%
  3972.      >%@NL@%
  3973. %@NL@%
  3974. %@CR:MCV5400K@%%@4@%In the example above, the display mode is first set to source %@AS@%(S+)%@AE@%. (See%@EH@%
  3975. Chapter 9%@BO:   6542b@%, "Examining Code," for information on setting the display mode.)
  3976. When the Go command is entered, the CodeView debugger starts program
  3977. execution at the current address and continues until it reaches the start of
  3978. the subprogram %@AS@%BUBBLE%@AE@%.%@NL@%
  3979. %@NL@%
  3980.      S&     %@AI@%;* C example (mixed mode)%@AE@%%@NL@%
  3981.      mixed%@NL@%
  3982.      >G .22%@NL@%
  3983.      AX=02F4  BX=0002  CX=00A8  DX=0000  SP=3036  BP=3042  SI=0070  DI=40E0%@NL@%
  3984.      DS=49B7  ES=49B7  SS=49B7  CS=3FB0  IP=0141  NV UP EI PL NZ NAPO NC%@NL@%
  3985.      22:        x[i] = x[j];%@NL@%
  3986.      3FB0:0141 8B7608       MOV     SI,Word Ptr [BP+08]         SS:304A=0070%@NL@%
  3987.      >%@NL@%
  3988. %@NL@%
  3989. %@CR:MCV5400L@%%@4@%The example above passes execution control to the program at the current%@EH@%
  3990. address and executes to the address of source line %@AS@%22%@AE@%. If the address with
  3991. the breakpoint is never encountered (for example, if the program has less
  3992. than 22 lines, or if the breakpoint is on a program branch that is never
  3993. taken), the CodeView debugger executes to the end of the program.%@NL@%
  3994. %@NL@%
  3995.      S-%@NL@%
  3996.      assembly%@NL@%
  3997.      >G #2A8%@NL@%
  3998.      AX=0049  BX=0049  CX=028F  DX=0000  SP=12F2  BP=12F6  SI=04BA  DI=1344%@NL@%
  3999.      DS=5DAF  ES=5DAF  SS=5DAF  CS=58BB  IP=02A8  NV UP EI PL NZ NA PENC%@NL@%
  4000.      58BB:02A8 98             CBW%@NL@%
  4001.      >%@NL@%
  4002. %@NL@%
  4003. %@CR:MCV5400M@%%@4@%The example above executes to the hexadecimal address CS:2A8. Since no%@EH@%
  4004. segment address is given, the CS register is assumed.%@NL@%
  4005. %@NL@%
  4006. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4007. %@AI@%NOTE%@AE@%%@NL@%
  4008.    Mixed and source mode can be used equally well with all three languages.%@NL@%
  4009.    The examples alternate languages in this chapter simply to be accessible%@NL@%
  4010.    to more users.%@NL@%
  4011. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4012. %@NL@%
  4013. %@NL@%
  4014. %@CR:MCV55000@%%@2@%%@AB@%5.5  Execute Command%@AE@%%@EH@%%@NL@%
  4015. %@NL@%
  4016. %@CR:MCV55001@%%@4@%The Execute command is similar to the Go command with no arguments except%@EH@%
  4017. that it executes in slow motion (several source lines per second). Execution
  4018. starts at the current address and continues to the end of the program or
  4019. until a breakpoint, tracepoint, or watchpoint is reached. You can also stop
  4020. automatic program execution by pressing any key or a mouse button.%@NL@%
  4021. %@NL@%
  4022. %@CR:MCV55002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  4023. %@NL@%
  4024. %@CR:MCV55003@%%@4@%To execute code in slow motion with the mouse, point to Run on the menu bar,%@EH@%
  4025. press a mouse button and drag the highlight down to the Execute selection,
  4026. and then release the button.%@NL@%
  4027. %@NL@%
  4028. %@CR:MCV55004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  4029. %@NL@%
  4030. %@CR:MCV55005@%%@4@%To execute code in slow motion with a keyboard command, press ALT+R to open%@EH@%
  4031. the Run menu, and then press ALT+E to select Execute.%@NL@%
  4032. %@NL@%
  4033. %@CR:MCV55006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  4034. %@NL@%
  4035. %@CR:MCV55007@%%@4@%To execute code in slow motion with a dialog command, enter a command line%@EH@%
  4036. with the following syntax:%@NL@%
  4037. %@NL@%
  4038.      %@AB@%E%@AE@%%@NL@%
  4039. %@NL@%
  4040. %@CR:MCV55008@%%@4@%You cannot set a destination for the Execute command as you can for the Go%@EH@%
  4041. command.%@NL@%
  4042. %@NL@%
  4043. %@CR:MCV55009@%%@4@%In sequential mode, the output from the Execute command depends on the%@EH@%
  4044. display mode (source, assembly, or mixed). In assembly or mixed mode, the
  4045. command executes one instruction at a time. The command displays the current
  4046. status of the registers and the instruction. In mixed mode, it will also
  4047. show a source line if there is one at the instruction. In source mode, the
  4048. command executes one source line at a time, displaying the lines as it
  4049. executes them.%@NL@%
  4050. %@NL@%
  4051. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4052. %@AI@%NOTE%@AE@%%@NL@%
  4053.    The Execute command has the same command letter (%@AB@%E%@AE@%)as the Enter command.%@NL@%
  4054.    If the command has at least one argument, it is interpreted as Enter; if%@NL@%
  4055.    not, it is interpreted as Execute.%@NL@%
  4056. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4057. %@NL@%
  4058. %@NL@%
  4059. %@CR:MCV56000@%%@2@%%@AB@%5.6  Restart Command%@AE@%%@EH@%%@NL@%
  4060. %@NL@%
  4061. %@CR:MCV56001@%%@4@%The Restart command restarts the current program. The program is ready to be%@EH@%
  4062. executed just as if you had restarted the CodeView debugger. Program
  4063. variables are reinitialized, but any existing breakpoints or watch
  4064. statements are retained. The pass count for all breakpoints is reset to 1.
  4065. Any program arguments are also retained, though they can be changed with the
  4066. dialog version of the command.%@NL@%
  4067. %@NL@%
  4068. %@CR:MCV56002@%%@4@%The Restart command can only be used to restart the current program. If you%@EH@%
  4069. wish to load a new program, you must exit and restart the CodeView debugger
  4070. with the new program name.%@NL@%
  4071. %@NL@%
  4072. %@CR:MCV56003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  4073. %@NL@%
  4074. %@CR:MCV56004@%%@4@%To restart the program with the mouse, point to Run on the menu bar, press a%@EH@%
  4075. mouse button and drag the highlight down to the Restart or Start selection,
  4076. and then release the button. The program will be restarted. If the Restart
  4077. selection is chosen, the program will be ready to start executing from the
  4078. beginning (but not actually running). If the Start selection is chosen, the
  4079. program starts executing from the beginning and continues until a breakpoint
  4080. or the end of the program is encountered.%@NL@%
  4081. %@NL@%
  4082. %@CR:MCV56005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  4083. %@NL@%
  4084. %@CR:MCV56006@%%@4@%To restart the program with a keyboard command, press ALT+R to open the Run%@EH@%
  4085. menu, and then press either ALT+R to select Restart or ALT+S to select
  4086. Start. The program will be restarted. If the Restart selection is chosen,
  4087. the program will be ready to start executing from the beginning (but not
  4088. actually running). If the Start selection is chosen, the program starts
  4089. executing from the beginning and continues until a breakpoint or the end of
  4090. the program is encountered.%@NL@%
  4091. %@NL@%
  4092. %@CR:MCV56007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  4093. %@NL@%
  4094. %@CR:MCV56008@%%@4@%To restart the program with a dialog command, enter a command line with the%@EH@%
  4095. following syntax:%@NL@%
  4096. %@NL@%
  4097.      %@AB@%L%@AE@% «%@AI@%arguments%@AE@%»%@NL@%
  4098. %@NL@%
  4099. %@CR:MCV56009@%%@4@%When you restart using the dialog version of the command, the program will%@EH@%
  4100. be ready to start executing from the beginning. If you want to restart with
  4101. new program arguments, you can give optional %@AI@%arguments%@AE@%. You cannot specify
  4102. new arguments with the mouse or keyboard version of the command.%@NL@%
  4103. %@NL@%
  4104. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4105. %@AI@%NOTE%@AE@%%@NL@%
  4106.    The command letter %@AB@%L%@AE@% is a mnemonic for Load, but the command should not%@NL@%
  4107.    be confused with the Load selection from the File menu, since that%@NL@%
  4108.    selection only loads a source file without restarting the program.%@NL@%
  4109. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4110. %@NL@%
  4111. %@CR:MCV5600A@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  4112. %@NL@%
  4113.      L%@NL@%
  4114.      >%@NL@%
  4115. %@NL@%
  4116. %@CR:MCV5600B@%%@4@%The example above starts the current executable file, retaining any%@EH@%
  4117. breakpoints, watchpoints, tracepoints, and arguments.%@NL@%
  4118. %@NL@%
  4119.      L 6%@NL@%
  4120.      >%@NL@%
  4121. %@NL@%
  4122. %@CR:MCV5600C@%%@4@%The example above restarts the current executable file, but with %@AS@%6%@AE@% as the%@EH@%
  4123. new program argument.%@NL@%
  4124. %@NL@%
  4125. %@NL@%
  4126. %@CR:MCV60000@%%@1@%%@AB@%Chapter 6  Examining Data and Expressions%@AE@%%@EH@%%@NL@%
  4127. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4128. %@NL@%
  4129. %@CR:MCV60001@%%@4@%The CodeView debugger provides several commands for examining different%@EH@%
  4130. kinds of data such as expressions, symbols, memory, and registers. The
  4131. data-evaluation commands discussed in this chapter are summarized below.%@NL@%
  4132. %@NL@%
  4133. %@CR:MCV60002@%%@AB@%Command                     Action%@AE@%%@NL@%
  4134. %@NL@%
  4135. Display Expression (%@AB@%?%@AE@%)      Evaluates and displays locals, the value of%@NL@%
  4136.                             symbols, or expressions%@NL@%
  4137. %@NL@%
  4138. Graphic Display (%@AB@%??%@AE@%)        Displays local variables and complete data%@NL@%
  4139.                             structures in a scrollable dialog box and traces%@NL@%
  4140.                             pointer, structure, and array references%@NL@%
  4141. %@NL@%
  4142. Examine Symbol (%@AB@%X?%@AE@%)         Displays the addresses of symbols%@NL@%
  4143. %@NL@%
  4144. Dump (%@AB@%D%@AE@%)                    Displays sections of memory containing data%@NL@%
  4145.                             (with variations for examining different kinds%@NL@%
  4146.                             of data)%@NL@%
  4147. %@NL@%
  4148. Compare Memory (%@AB@%C%@AE@%)          Compares two blocks of memory, byte by byte%@NL@%
  4149. %@NL@%
  4150. Search Memory (%@AB@%S%@AE@%)           Scans memory for specified byte values%@NL@%
  4151. %@NL@%
  4152. Port Input (%@AB@%I%@AE@%)              Reads a byte from a hardware port%@NL@%
  4153. %@NL@%
  4154. Register (%@AB@%R%@AE@%)                Shows the current value of each register and%@NL@%
  4155.                             each flag (and optionally changes them)%@NL@%
  4156. %@NL@%
  4157. 8087 (%@AB@%7%@AE@%)                    Shows the current value in the 8087 or 80287%@NL@%
  4158.                             register%@NL@%
  4159. %@NL@%
  4160. %@NL@%
  4161. %@CR:MCV61000@%%@2@%%@AB@%6.1  Display Expression Command%@AE@%%@EH@%%@NL@%
  4162. %@NL@%
  4163. %@CR:MCV61001@%%@4@%The Display Expression command displays the value of a CodeView expression.%@EH@%%@NL@%
  4164. %@NL@%
  4165. %@CR:MCV61002@%%@4@%Each of the expression evaluators (C, FORTRAN, and BASIC) accepts a%@EH@%
  4166. different set of symbols, operators, functions, and constants, as explained
  4167. in Chapter 4%@BO:   2faf9@%, "CodeView Expressions." The resulting expressions can contain
  4168. the intrinsic functions listed for the FORTRAN and BASIC expression
  4169. evaluators. They may also contain functions that are part of the executable
  4170. file. The simplest form of expression is a symbol representing a single
  4171. variable or routine.%@NL@%
  4172. %@NL@%
  4173. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4174. %@AI@%NOTE%@AE@%%@NL@%
  4175.    FORTRAN subroutines and BASIC subprograms do not return values as%@NL@%
  4176.    functions do. They can be used in expressions, and may be useful for%@NL@%
  4177.    observing side effects. However, the value returned by the expression%@NL@%
  4178.    will be meaningless.%@NL@%
  4179. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4180. %@NL@%
  4181. %@CR:MCV61003@%%@4@%In addition to displaying values, the Display Expression command can also%@EH@%
  4182. set values as a side effect. For example, with the C expression evaluator
  4183. you can increment the variable %@AS@%n%@AE@% by using the expression %@AS@%++n%@AE@% with the
  4184. Display Expression command. With the FORTRAN expression evaluator you would
  4185. use %@AS@%N=N+1%@AE@%, and with the BASIC expression evaluator you would use %@AS@%LET N=N+1%@AE@%.
  4186. After being incremented, the new value will be displayed.%@NL@%
  4187. %@NL@%
  4188. %@CR:MCV61004@%%@4@%You can specify the format in which the values of expressions are displayed%@EH@%
  4189. by the Display Expression command. Type a comma after the expression,
  4190. followed by a CodeView format specifier. The format specifiers used in the
  4191. CodeView debugger are a subset of those used by the C %@AB@%printf%@AE@% function. They
  4192. are listed in Table 6.1.%@NL@%
  4193. %@NL@%
  4194. %@CR:MCV6T100@%%@4@%%@AB@%Table 6.1  CodeView Format Specifiers%@AE@%%@EH@%%@NL@%
  4195. %@TH:   31   2189  3 13 35 14 14 @%%@AB@%             Output                             Sample        Sample%@AE@%%@AB@%Character    Format                             Expression    Output%@AE@%%@AB@%d%@AE@%            Signed decimal integer             %@AS@%? 40000,d      40000%@AE@%%@AB@%i%@AE@%            Signed decimal integer             %@AS@%? 40000,i      40000%@AE@%%@AB@%u%@AE@%%@FN@%FORTRAN and BASIC have no unsigned data types. Using an unsigned formatspecifier has  no effect on the output of positive numbers, but causesnegative numbers to be output as positive values.%@EF@%           Unsigned decimal integer           %@AS@%? 40000,u      40000%@AE@%%@AB@%o%@AE@%            Unsigned octal integer             %@AS@%? 40000,o      116100%@AE@%%@AB@%x%@AE@% or %@AB@%X%@AE@%       Hexadecimal integer                %@AS@%? 40000,x      9c40%@AE@%%@AB@%f%@AE@%            Signed value in floating-point     %@AS@%? 3./2.,f      1.500000%@AE@%             decimal format with six decimal             places%@AB@%e%@AE@% or %@AB@%E%@AE@%%@FN@%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%@AB@%g%@AE@%.%@EF@%      Signed value in scientific-        %@AS@%? 3./2.,e      1.500000e+000%@AE@%             notation format with up to six             decimal places (trailing zeros             and decimal point are truncated)%@AB@%g%@AE@% or %@AB@%G%@AE@%%@FN@%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%@AB@%g%@AE@%.%@EF@%      Signed value with floating-point   %@AS@%? 3./2.,g      1.5%@AE@%             decimal format (%@AB@%f%@AE@%) or scientific-             notation format (%@AB@%g%@AE@% or %@AB@%G%@AE@%),             whichever is more compact%@AB@%c%@AE@%            Single character                   %@AS@%? 65,c         A%@AE@%%@AB@%s%@AE@%%@FN@%The %@AB@%s%@AE@% string format is used only with the C expression evaluator; it printscharacters up to the first null.%@EF@%           Characters printed up to the       %@AS@%? "String",s   String%@AE@%             first null character%@TE:   31   2189  3 13 35 14 14 @%
  4196. %@NL@%
  4197. %@CR:MCV61005@%%@4@%If no format specifier is given, single- and double-precision real numbers%@EH@%
  4198. are displayed as if the format specifier had been given as %@AB@%g%@AE@%. (If you are
  4199. familiar with the C language, you should note that the %@AB@%n%@AE@% and %@AB@%p%@AE@% format
  4200. specifiers and the %@AB@%F%@AE@% and %@AB@%H%@AE@% prefixes are not supported by the CodeView
  4201. debugger, even though they are supported by the C %@AB@%printf%@AE@% function.)%@NL@%
  4202. %@NL@%
  4203. %@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@%
  4204. %@AB@%X%@AE@%) to specify a two-byte integer. The prefix %@AB@%l%@AE@% can be used with the same
  4205. types to specify a four-byte integer. For example, the command %@AS@%?100000,ld%@AE@%
  4206. produces the output %@AS@%100000%@AE@%. However, the command %@AS@%?100000,hd%@AE@% evaluates only
  4207. the low-order two bytes, producing the output %@AS@%-31072%@AE@%.%@NL@%
  4208. %@NL@%
  4209. %@CR:MCV61007@%%@4@%You can specify individual members of a C structure or BASIC user-defined%@EH@%
  4210. type, or display the entire structure. Each member of a structure or BASIC
  4211. user-defined type is displayed, within the limits of the dialog box. (See
  4212. Section 6.2%@BO:   48adf@%, "The Graphic Display Command," for information on how to see
  4213. all the fields of a large structure.)%@NL@%
  4214. %@NL@%
  4215. %@CR:MCV61008@%%@4@%The Display Expression command does not work for programs assembled with%@EH@%
  4216. Microsoft Macro Assembler Versions 4.0 and earlier because the assembler
  4217. does not write information to the object file about the type size of each
  4218. variable. Use the Dump command instead.%@NL@%
  4219. %@NL@%
  4220. %@CR:MCV61009@%%@4@%When calling a FORTRAN subroutine that uses alternate returns, the value of%@EH@%
  4221. the return labels in the actual parameter list must be 0. For example, the
  4222. subroutine call %@AS@%CALL PROCESS (I,*10,J,*20,*30)%@AE@% must be called from the
  4223. debugger as%@AS@%?PROCESS(IARG1,0,IARG2,0,0)%@AE@%. Using other values as return labels
  4224. will cause the error %@AS@%Type%@AE@%%@AS@%clash in function argument%@AE@% or %@AS@%Unknown symbol%@AE@%.%@NL@%
  4225. %@NL@%
  4226. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4227. %@AI@%NOTE%@AE@%%@NL@%
  4228.    Do not use a %@AI@%type specifier when evaluating strings in FORTRAN  or%@AE@% %@AI@%BASIC.%@AE@%%@NL@%
  4229.    %@AI@%Simply leave off the type specifier, and the expression evaluator%@AE@% %@AI@%will%@AE@%%@NL@%
  4230.    %@AI@%display the string correctly. The%@AE@% %@AI@%s%@AE@%%@AI@% type%@AE@% %@AI@%specifier assumes the C language%@AE@%%@NL@%
  4231.    string format, with which other languages conflict; if you use %@AI@%s%@AE@%, then%@NL@%
  4232.    the debugger will simply display characters at the given address until a%@NL@%
  4233.    null is encountered.%@NL@%
  4234. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4235. %@NL@%
  4236. %@CR:MCV6100A@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  4237. %@NL@%
  4238. %@CR:MCV6100B@%%@4@%The Display Expression command cannot be executed with the mouse.%@EH@%%@NL@%
  4239. %@NL@%
  4240. %@CR:MCV6100C@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  4241. %@NL@%
  4242. %@CR:MCV6100D@%%@4@%The Display Expression command cannot be executed by using a keyboard%@EH@%
  4243. command.%@NL@%
  4244. %@NL@%
  4245. %@CR:MCV6100E@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  4246. %@NL@%
  4247. %@CR:MCV6100F@%%@4@%To display the value of an expression using a dialog command, enter a%@EH@%
  4248. command line with the following syntax:%@NL@%
  4249. %@NL@%
  4250.      %@AB@%?%@AE@% %@AI@%expression%@AE@%[[%@AB@%,%@AE@%%@AI@%format%@AE@%]]%@NL@%
  4251. %@NL@%
  4252. %@CR:MCV6100G@%%@4@%The %@AI@%expression%@AE@% is any valid CodeView expression, and the optional %@AI@%format%@AE@% is%@EH@%
  4253. a CodeView format specifier.%@NL@%
  4254. %@NL@%
  4255. %@CR:MCV6100H@%%@4@%The remainder of this section first gives examples that are relevant to all%@EH@%
  4256. languages and then gives examples specific to C, FORTRAN, and BASIC.%@NL@%
  4257. %@NL@%
  4258. %@CR:MCV6100I@%%@4@%If you are debugging code written with the assembler, you will use the C%@EH@%
  4259. expression evaluator by default. See Section 4.4%@BO:   37e4e@% for guidelines on how to
  4260. use the C expression evaluator with assembly code.%@NL@%
  4261. %@NL@%
  4262. %@CR:MCV6100J@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  4263. %@NL@%
  4264.      >? amount%@NL@%
  4265.      500%@NL@%
  4266.      >? amount,x%@NL@%
  4267.      1f4%@NL@%
  4268.      >? amount,o%@NL@%
  4269.      764%@NL@%
  4270.      >%@NL@%
  4271. %@NL@%
  4272. %@CR:MCV6100K@%%@4@%The example above displays the value stored in the variable %@AS@%amount%@AE@%, an%@EH@%
  4273. integer. This value is first displayed in the system radix (in this case,
  4274. decimal), then in hexadecimal, and then in octal.%@NL@%
  4275. %@NL@%
  4276.      ? mystruct%@NL@%
  4277.      {c1=123, c2={a=1, b=2}, c3=0x1000:2d34}%@NL@%
  4278. %@NL@%
  4279. %@CR:MCV6100L@%%@4@%The example above shows how the CodeView debugger displays a C structure or%@EH@%
  4280. BASIC user-defined type. Note that nested structures are displayed within an
  4281. extra set of braces.%@NL@%
  4282. %@NL@%
  4283.      >? 92,x%@NL@%
  4284.      5c%@NL@%
  4285.      >? 109*(35+2),o%@NL@%
  4286.      7701%@NL@%
  4287.      >? 118,c%@NL@%
  4288.      v%@NL@%
  4289.      >%@NL@%
  4290. %@NL@%
  4291. %@CR:MCV6100M@%%@4@%The example above shows how the CodeView debugger can be used as a%@EH@%
  4292. calculator. You can convert between radixes, calculate the value of constant
  4293. expressions, or check ASCII equivalences.%@NL@%
  4294. %@NL@%
  4295.      >? chance,f%@NL@%
  4296.      0.083333%@NL@%
  4297.      >? chance,e%@NL@%
  4298.      8. 333333e-002%@NL@%
  4299.      >? chance,E%@NL@%
  4300.      8.333333E-002%@NL@%
  4301. %@NL@%
  4302. %@CR:MCV6100N@%%@4@%The example above shows a double-precision real number, %@AS@%chance%@AE@%, displayed in%@EH@%
  4303. three formats. The %@AB@%f%@AE@% format always displays six digits of precision. The %@AB@%e%@AE@%
  4304. format uses scientific notation. Note that the %@AB@%E%@AE@% format yields essentially
  4305. the same display as %@AB@%e%@AE@% does.%@NL@%
  4306. %@NL@%
  4307. %@CR:MCV6100O@%%@4@%The rest of the examples in this section are specific to particular%@EH@%
  4308. languages.%@NL@%
  4309. %@NL@%
  4310. %@CR:MCV6100P@%%@4@%%@AB@%C Examples%@AE@%%@EH@%%@NL@%
  4311. %@NL@%
  4312. %@CR:MCV6100Q@%%@4@%The following examples assume that a C source file is being debugged and it%@EH@%
  4313. contains the following declarations:%@NL@%
  4314. %@NL@%
  4315.      char *text = "Here is a string."%@NL@%
  4316.      int  amount;%@NL@%
  4317.      struct {%@NL@%
  4318.           char name[20];%@NL@%
  4319.           int  id;%@NL@%
  4320.           long class;%@NL@%
  4321.      } student, *pstudent;%@NL@%
  4322. %@NL@%
  4323.      int square(int);%@NL@%
  4324. %@NL@%
  4325. %@CR:MCV6100R@%%@4@%Assume also that the program has been executed where the above variables%@EH@%
  4326. have been assigned values, and that the C expression evaluator is in use.%@NL@%
  4327. %@NL@%
  4328.      >? text, X%@NL@%
  4329.      13f3%@NL@%
  4330.      >DA 0x13F3%@NL@%
  4331.      3D83:13F0  Here is a string.%@NL@%
  4332.      >? text,s%@NL@%
  4333.      Here is a string.%@NL@%
  4334.      >%@NL@%
  4335. %@NL@%
  4336. %@CR:MCV6100S@%%@4@%The example above shows how to examine strings. One method is to evaluate%@EH@%
  4337. the variable that points to the string, and then dump the values at that
  4338. address (the Dump commands are explained in Section 6.4%@BO:   4e3b9@%). A more direct
  4339. method is to use the %@AB@%s%@AE@% type specifier.%@NL@%
  4340. %@NL@%
  4341.      >? student.id%@NL@%
  4342.      19643%@NL@%
  4343.      >? pstudent->id%@NL@%
  4344.      19643%@NL@%
  4345.      >%@NL@%
  4346. %@NL@%
  4347. %@CR:MCV6100T@%%@4@%The example above illustrates how to display the values of members of a%@EH@%
  4348. structure. The same syntax applies to unions.%@NL@%
  4349. %@NL@%
  4350.      >? amount%@NL@%
  4351.      500%@NL@%
  4352.      >? ++amount%@NL@%
  4353.      501%@NL@%
  4354.      >? amount=600%@NL@%
  4355.      600%@NL@%
  4356.      >%@NL@%
  4357. %@NL@%
  4358. %@CR:MCV6100U@%%@4@%The example above shows how the Display Expression command can be used with%@EH@%
  4359. the C expression evaluator to change the values of variables.%@NL@%
  4360. %@NL@%
  4361.      >? square(9)%@NL@%
  4362.      81%@NL@%
  4363.      >%@NL@%
  4364. %@NL@%
  4365. %@CR:MCV6100V@%%@4@%The example above shows how functions can be evaluated in expressions. The%@EH@%
  4366. CodeView debugger executes the function %@AS@%square%@AE@% with an argument of %@AS@%9%@AE@%, and
  4367. displays the value returned by the function. Note that you can use symbols
  4368. as well as constants as function arguments. However, you can only display
  4369. function values after you have executed into the function %@AS@%main%@AE@%.%@NL@%
  4370. %@NL@%
  4371. %@CR:MCV6100W@%%@4@%The C expression evaluator also supports type casts. The equivalent of a%@EH@%
  4372. type cast in another language is a type-conversion function.%@NL@%
  4373. %@NL@%
  4374. %@CR:MCV6100X@%%@4@%%@AB@%FORTRAN Examples%@AE@%%@EH@%%@NL@%
  4375. %@NL@%
  4376. %@CR:MCV6100Y@%%@4@%The examples below assume that the FORTRAN source file contains the%@EH@%
  4377. following variable declarations, in which %@AS@%SQUARE%@AE@% is a function:%@NL@%
  4378. %@NL@%
  4379.             INTEGER*2 SQUARE%@NL@%
  4380.             INTEGER*2 AMOUNT%@NL@%
  4381.             CHARACTER*16 STR%@NL@%
  4382.             STR = 'Here is a string'%@NL@%
  4383. %@NL@%
  4384. %@CR:MCV6100Z@%%@4@%Assume also that the program has executed to the point where these variables%@EH@%
  4385. have been assigned values, and that the FORTRAN expression evaluator has
  4386. been selected.%@NL@%
  4387. %@NL@%
  4388.      >? STR%@NL@%
  4389.      'Here is a string'%@AS@%%@NL@%
  4390. %@NL@%
  4391. %@CR:MCV6100a@%%@4@%The example above shows how to examine strings with the FORTRAN expression%@EH@%
  4392. evaluator. The %@AB@%s%@AE@% format specifier is not required.%@NL@%
  4393. %@NL@%
  4394.      ? AMOUNT%@NL@%
  4395.      500%@NL@%
  4396.      >? AMOUNT=AMOUNT+1%@NL@%
  4397.      501%@NL@%
  4398.      >? AMOUNT=600%@NL@%
  4399.      600%@NL@%
  4400.      >? AMOUNT%@NL@%
  4401.      600%@NL@%
  4402.      >%@AS@%%@NL@%
  4403. %@NL@%
  4404. %@CR:MCV6100b@%%@4@%The example above shows how the Display Expression command can be used to%@EH@%
  4405. change values with the FORTRAN expression evaluator.%@NL@%
  4406. %@NL@%
  4407.      ? SQUARE(9)%@NL@%
  4408.      81%@NL@%
  4409.      >%@NL@%
  4410. %@NL@%
  4411. %@CR:MCV6100c@%%@4@%The example above shows how functions can be evaluated in expressions. The%@EH@%
  4412. CodeView debugger executes the function %@AS@%SQUARE%@AE@% with an argument of %@AS@%9%@AE@%, and
  4413. displays the value returned by the function. You can only display the values
  4414. of functions after you have executed into the main program level.%@NL@%
  4415. %@NL@%
  4416. %@CR:MCV6100d@%%@4@%%@AB@%BASIC Examples%@AE@%%@EH@%%@NL@%
  4417. %@NL@%
  4418. %@CR:MCV6100e@%%@4@%These examples assume the BASIC source file contains the following%@EH@%
  4419. statements:%@NL@%
  4420. %@NL@%
  4421.      amount% = 500%@NL@%
  4422.      str$ = "Here is a string"%@NL@%
  4423. %@NL@%
  4424. %@CR:MCV6100f@%%@4@%Assume also that the program has been executed up to these statements and%@EH@%
  4425. that the BASIC expression evaluator is in use.%@NL@%
  4426. %@NL@%
  4427.      >? str$%@NL@%
  4428.      Here is a %@AS@%string%@NL@%
  4429. %@NL@%
  4430. %@CR:MCV6100g@%%@4@%The first example above shows how to examine strings with the BASIC%@EH@%
  4431. expression evaluator. The %@AB@%s%@AE@% format specifier should not be used.%@NL@%
  4432. %@NL@%
  4433.      ? ASC(str$)%@NL@%
  4434.      72%@AS@%%@NL@%
  4435. %@NL@%
  4436. %@CR:MCV6100h@%%@4@%The second example demonstrates one of the BASIC intrinsic functions%@EH@%
  4437. supported by the CodeView debugger, %@AB@%ASC%@AE@%, which returns the ASCII value of
  4438. the first character in a string.%@NL@%
  4439. %@NL@%
  4440.      >? amount%%@NL@%
  4441.      500%@NL@%
  4442.      >? LET amount%=amount%+1%@NL@%
  4443.      501%@NL@%
  4444.      >? LET amount%=600%@NL@%
  4445.      600%@NL@%
  4446.      >? amount%%@NL@%
  4447.      600%@NL@%
  4448.      >%@NL@%
  4449. %@NL@%
  4450. %@CR:MCV6100i@%%@4@%The example above shows how the Display Expression command can be used to%@EH@%
  4451. change values with the BASIC expression evaluator. With BASIC, the %@AB@%LET%@AE@%
  4452. command can only be applied to numeric data, not strings.%@NL@%
  4453. %@NL@%
  4454. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4455. %@AI@%NOTE%@AE@%%@NL@%
  4456.    The BASIC expression evaluator cannot evaluate functions defined in the%@NL@%
  4457.    program, as the C and FORTRAN expression evaluators can.%@NL@%
  4458. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4459. %@NL@%
  4460. %@CR:MCV6100j@%%@4@%%@AB@%Assembly Examples%@AE@%%@EH@%%@NL@%
  4461. %@NL@%
  4462. %@CR:MCV6100k@%%@4@%By default, the C expression evaluator is used for debugging assembly%@EH@%
  4463. modules. However, some C expressions are particularly helpful for debugging
  4464. assembly code. Some typical examples are presented below.%@NL@%
  4465. %@NL@%
  4466.      >? BY bx%@NL@%
  4467.      12%@NL@%
  4468.      >%@NL@%
  4469. %@NL@%
  4470. %@CR:MCV6100l@%%@4@%The example above displays the first byte at the location pointed to by BX,%@EH@%
  4471. and is equivalent to the assembly expression %@AS@%BYTE PTR%@AE@%%@AS@%[bx]%@AE@%.%@NL@%
  4472. %@NL@%
  4473.      >? WO bp+8%@NL@%
  4474.      9359%@NL@%
  4475.      >%@NL@%
  4476. %@NL@%
  4477. %@CR:MCV6100m@%%@4@%The example above displays the first word at the location pointed to by%@EH@%
  4478. %@AS@%[bp+8]%@AE@%.%@NL@%
  4479. %@NL@%
  4480.      >? DW si+12%@NL@%
  4481.      Y12555324%@NL@%
  4482.      >%@NL@%
  4483. %@NL@%
  4484. %@CR:MCV6100n@%%@4@%The example above displays the first double word at the location pointed to%@EH@%
  4485. by %@AS@%[si+12]%@AE@%.%@NL@%
  4486. %@NL@%
  4487.      >? (char) var%@NL@%
  4488.      5%@NL@%
  4489.      >? (int) var%@NL@%
  4490.      1005%@NL@%
  4491.      >%@NL@%
  4492. %@NL@%
  4493. %@CR:MCV6100o@%%@4@%The last two examples use type casts, which are similar to the assembler %@AB@%PTR%@AE@%%@EH@%
  4494. operator. The expression %@AS@%(char) var%@AE@% displays the byte at the address of %@AS@%var%@AE@%,
  4495. in signed format. The expression %@AS@%(int) var%@AE@% displays the word at the same
  4496. address, also in signed format. You can alter either of these commands to
  4497. display results in unsigned format simply by using the %@AB@%u%@AE@% format specifier.%@NL@%
  4498. %@NL@%
  4499.      >? (char) var,u%@NL@%
  4500. %@NL@%
  4501.      >? (int) var,u%@NL@%
  4502. %@NL@%
  4503. %@NL@%
  4504. %@CR:MCV62000@%%@2@%%@AB@%6.2  The Graphic Display Command%@AE@%%@EH@%%@NL@%
  4505. %@NL@%
  4506. %@CR:MCV62001@%%@4@%The Graphic Display command (%@AB@%??%@AE@%) is similar to the Examine Symbols command.%@EH@%
  4507. The Graphic Display command shows the value of any symbol you specify.
  4508. However, the Graphic Display command is the more efficient means for viewing
  4509. a multiple-field object such as a structure or a linked list of data.%@NL@%
  4510. %@NL@%
  4511. %@CR:MCV62002@%%@4@%The Graphic Display command lets you browse through related data. For%@EH@%
  4512. example, both C and BASIC let you define structures inside of other
  4513. structures. (In BASIC, structures are called "user-defined types.") The
  4514. Graphic Display command lets you quickly move up and down through layers of
  4515. structures. The command also works with C pointer variables; with a single
  4516. mouse click or a few keystrokes, you see the entire structure that a pointer
  4517. addresses. When you examine a list of structures linked through pointers,
  4518. the Graphic Display command lets you quickly move back and forth through the
  4519. list.%@NL@%
  4520. %@NL@%
  4521. %@CR:MCV62003@%%@4@%To resume debugging, you must remove the Graphic Display dialog box.%@EH@%
  4522. Pressing ESC terminates the dialog box.%@NL@%
  4523. %@NL@%
  4524. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4525. %@AI@%NOTE%@AE@%%@NL@%
  4526.    Throughout the rest of this section, the term "structure" is used to%@NL@%
  4527.    refer to any of the following: a C structure, Pascal record, or BASIC%@NL@%
  4528.    user-defined type.%@NL@%
  4529. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4530. %@NL@%
  4531. %@CR:MCV62004@%%@4@%This section discusses how to invoke the Graphic Display command and how to%@EH@%
  4532. browse through data once the Graphic Display dialog box appears. Regardless
  4533. of how you invoke the command, the same rules apply for browsing through the
  4534. data.%@NL@%
  4535. %@NL@%
  4536. %@NL@%
  4537. %@CR:MCV62100@%%@3@%%@AB@%6.2.1  Invoking the Graphic Display Command%@AE@%%@EH@%%@NL@%
  4538. %@NL@%
  4539. %@CR:MCV62101@%%@4@%The Graphic Display command is useful for evaluating a structure or pointer,%@EH@%
  4540. although you can legally use the command with any variable. To use this
  4541. command to display the contents of a variable, enter the following:%@NL@%
  4542. %@NL@%
  4543.      %@AB@%??%@AE@%%@AI@%symbol,%@AE@% %@AB@%c%@AE@%%@NL@%
  4544. %@NL@%
  4545. %@CR:MCV62102@%%@4@%In the syntax display above, %@AI@%symbol%@AE@% is the name of any recognized variable,%@EH@%
  4546. the second field is either blank or contains the character c.%@NL@%
  4547. %@NL@%
  4548. %@CR:MCV62103@%%@4@%The second field may contain the character %@AS@%c%@AE@%. This character is a C %@AB@%printf%@AE@%%@EH@%
  4549. format specifier that causes CodeView to display each byte of a character
  4550. array in its ASCII form, rather than display its numerical value.%@NL@%
  4551. %@NL@%
  4552. %@CR:MCV62104@%%@4@%As shown in the Figure 6.1%@FN@%
  4553. Figure 6.1 is found on page 108 of the printed version.%@EF@% below, structures are represented as three dots%@EH@%
  4554. enclosed in braces: {...}. Pointers are represented in the standard
  4555. %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% format. The Graphic Display dialog box also displays a title;
  4556. the title is the name of the variable or member currently displayed.%@NL@%
  4557. %@NL@%
  4558. %@CR:MCV62105@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  4559. %@NL@%
  4560.      ?? graduate, c%@NL@%
  4561. %@NL@%
  4562. %@CR:MCV62106@%%@4@%The example above displays the members of a structure, as shown in Figure%@EH@%
  4563. 6.1%@FN@%
  4564. Figure 6.1 is found on page 108 of the printed version.%@EF@%.%@NL@%
  4565. %@NL@%
  4566. %@CR:MCV62107@%%@4@%As is the case with the display of local variables, nested structures are%@EH@%
  4567. represented as three dots enclosed in braces, and pointers are represented
  4568. in the standard%@AI@%segment%@AE@%:%@AI@%offset%@AE@% format. Section 6.2.2%@BO:   49b89@%, "Changing the Display,"
  4569. explains how to select nested structures and pointers for display.%@NL@%
  4570. %@NL@%
  4571.      ?? Kount%@AB@%%@NL@%
  4572. %@NL@%
  4573. %@CR:MCV62108@%%@4@%Since %@AS@%Kount%@AE@% is neither a structure nor an array, CodeView responds by%@EH@%
  4574. displaying a single field as shown in Figure 6.2%@FN@%
  4575. Figure 6.2 is found on page 109 of the printed version.%@EF@%.%@NL@%
  4576. %@NL@%
  4577. %@CR:MCV62109@%%@4@%To close the Graphic display dialog box and continue debugging, click left%@EH@%
  4578. outside the dialog box or press ESC.%@NL@%
  4579. %@NL@%
  4580. %@NL@%
  4581. %@CR:MCV62200@%%@3@%%@AB@%6.2.2  Changing the Display%@AE@%%@EH@%%@NL@%
  4582. %@NL@%
  4583. %@CR:MCV62201@%%@4@%Once the Graphic Display dialog box appears, you change what information is%@EH@%
  4584. displayed by selecting an individual variable, member, or array element.
  4585. (However, the command displays array elements only when the current module
  4586. is a C module.) Making such a selection changes the subject matter of the
  4587. dialog box; for example, selecting a nested structure moves you one level
  4588. deeper within the structure. You can use either the mouse or the keyboard to
  4589. select an item.%@NL@%
  4590. %@NL@%
  4591. %@CR:MCV62202@%%@4@%%@AB@%Changing the Display with the Mouse%@AE@%%@EH@%%@NL@%
  4592. %@NL@%
  4593. %@CR:MCV62203@%%@4@%To select an item with the mouse, simply click the left mouse button on the%@EH@%
  4594. line where the item appears.%@NL@%
  4595. %@NL@%
  4596. %@CR:MCV62204@%%@4@%CodeView allows you to move backward through displays as well as forward.%@EH@%
  4597. After you select an item and move to a new display, CodeView remembers the
  4598. previous state of the dialog box. To move back to the previous display,
  4599. click the backward arrow just below the dialog box title, or click the right
  4600. mouse button.%@NL@%
  4601. %@NL@%
  4602. %@CR:MCV62205@%%@4@%To close the dialog box and continue debugging, click the left mouse button%@EH@%
  4603. while outside the dialog box.%@NL@%
  4604. %@NL@%
  4605. %@CR:MCV62206@%%@4@%%@AB@%Changing the Display with the Keyboard%@AE@%%@EH@%%@NL@%
  4606. %@NL@%
  4607. %@CR:MCV62207@%%@4@%To select an item with the keyboard, move the cursor to the desired item and%@EH@%
  4608. press ENTER.%@NL@%
  4609. %@NL@%
  4610. %@CR:MCV62208@%%@4@%CodeView allows you to move backward through displays as well as forward.%@EH@%
  4611. After you select an item and move to a new display, CodeView remembers the
  4612. previous state of the dialog box. To move back to the previous display,
  4613. press BACKSPACE.%@NL@%
  4614. %@NL@%
  4615. %@CR:MCV62209@%%@4@%To close the dialog box and continue debugging, press ESC.%@EH@%%@NL@%
  4616. %@NL@%
  4617. %@CR:MCV6220A@%%@4@%%@AB@%Effect of Selecting an Item%@AE@%%@EH@%%@NL@%
  4618. %@NL@%
  4619. %@CR:MCV6220B@%%@4@%Depending on the item you select, CodeView executes a specific action:%@EH@%%@NL@%
  4620. %@NL@%
  4621. %@CR:MCV6220C@%%@AB@%Item                        Action%@AE@%%@NL@%
  4622. %@NL@%
  4623. Nested structure            The structure is "expanded"; the nested%@NL@%
  4624.                             structure becomes the new subject of the dialog%@NL@%
  4625.                             box. The dialog box displays each member of the%@NL@%
  4626.                             nested structure.%@NL@%
  4627. %@NL@%
  4628. Pointer                     The pointer is "dereferenced"; in other words,%@NL@%
  4629.                             CodeView locates the data that the pointer%@NL@%
  4630.                             addresses. This data becomes the new subject of%@NL@%
  4631.                             the dialog box.%@NL@%
  4632. %@NL@%
  4633.                             The pointer's type determines how the debugger%@NL@%
  4634.                             displays the dereferenced data. The debugger%@NL@%
  4635.                             uses this type information even if the pointer%@NL@%
  4636.                             does not currently address any meaningful data.%@NL@%
  4637.                             If the pointer addresses a structure, CodeView%@NL@%
  4638.                             displays each element.%@NL@%
  4639. %@NL@%
  4640. Other items                 CodeView takes no action.%@NL@%
  4641. %@NL@%
  4642. %@CR:MCV6220D@%%@4@%No matter how many times you change the display, and no matter what the%@EH@%
  4643. previous display looked like, all the rules above apply. You can repeat
  4644. these operations any number of times. For example, given a sufficiently
  4645. complex structure, you can move down several levels of nested structures,
  4646. then follow a pointer reference to another variable.%@NL@%
  4647. %@NL@%
  4648. %@NL@%
  4649. %@CR:MCV63000@%%@2@%%@AB@%6.3  Examine Symbols Command%@AE@%%@EH@%%@NL@%
  4650. %@NL@%
  4651. %@CR:MCV63001@%%@4@%The Examine Symbols command displays the names and addresses and the names%@EH@%
  4652. of modules defined within a program. You can specify the group you want to
  4653. examine by module, procedure, or name.%@NL@%
  4654. %@NL@%
  4655. %@CR:MCV63002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  4656. %@NL@%
  4657. %@CR:MCV63003@%%@4@%The Examine Symbols command cannot be executed with the mouse.%@EH@%%@NL@%
  4658. %@NL@%
  4659. %@CR:MCV63004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  4660. %@NL@%
  4661. %@CR:MCV63005@%%@4@%The Examine Symbols command cannot be executed with a keyboard command.%@EH@%%@NL@%
  4662. %@NL@%
  4663. %@CR:MCV63006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  4664. %@NL@%
  4665. %@CR:MCV63007@%%@4@%To view the addresses of symbols with a dialog command, enter a command line%@EH@%
  4666. in one of the following formats:%@NL@%
  4667. %@NL@%
  4668.      %@AB@%XL%@AE@%%@NL@%
  4669.      %@AB@%X*%@AE@%%@NL@%
  4670.      %@AB@%X%@AE@%%@NL@%
  4671.      %@AB@%X?%@AE@% «%@AI@%module%@AE@%%@AB@%!%@AE@%» «%@AI@%routine%@AE@%%@AB@%.%@AE@%» «%@AI@%symbol%@AE@%» «%@AB@%*%@AE@%»%@NL@%
  4672. %@NL@%
  4673. %@CR:MCV63008@%%@4@%in which %@AI@%routine%@AE@% is in a program unit, such as a C function or a BASIC%@EH@%
  4674. subprogram, capable of having its own local variables.%@NL@%
  4675. %@NL@%
  4676. %@CR:MCV63009@%%@4@%The syntax combinations are listed in more detail below.%@EH@%%@NL@%
  4677. %@CR:MCV6300A@%%@NL@%
  4678. %@TH:   38   2297  2 28 48 @%%@AB@%Syntax                      Display%@AE@%%@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                            the specified %@AI@%module%@AE@%.%@AB@%X?%@AE@%%@AI@%module%@AE@%%@AB@%!%@AE@%%@AI@%routine%@AE@%%@AB@%.*%@AE@%          All symbols in the specified %@AI@%routine%@AE@% in the                            specified %@AI@%module%@AE@%.%@AB@%X?%@AE@%%@AI@%module%@AE@%%@AB@%!%@AE@%%@AI@%symbol%@AE@%             The specified %@AI@%symbol%@AE@% in the specified %@AI@%module%@AE@%                            (symbols within routines are not found).%@AB@%X?%@AE@%%@AI@%module%@AE@%%@AB@%!*%@AE@%                  All symbols in the specified %@AI@%module%@AE@%.%@AB@%X?%@AE@%%@AI@%routine%@AE@%%@AB@%.%@AE@%%@AI@%symbol%@AE@%            The specified %@AI@%symbol%@AE@% in the specified %@AI@%routine%@AE@%                            (looks for %@AI@%routine%@AE@% first in the current module,                            and then in other modules from first to last).%@AB@%X?%@AE@%%@AI@%routine%@AE@%%@AB@%.*%@AE@%                 All symbols in the specified %@AI@%routine%@AE@% (looks for                            %@AI@%routine%@AE@% first in the current module, and then in                            other modules from first to last).%@AB@%X?%@AE@%%@AI@%symbol%@AE@%                    Looks for the specified %@AI@%symbol%@AE@% in this order:                            1.  In the current routine.                            2.  In the current module.                            3.  In other modules, from first to last.%@AB@%X?*%@AE@%                         All symbols in the current routine.%@AB@%XL%@AE@%                          All local variables of the currently executing                            routine. This variation of the command uses a                            special format as explained below.%@AB@%X*%@AE@%                          All module names (file extensions are added to                            these names).%@AB@%X%@AE@%                           All symbolic names in the program, including all                            modules and symbols.%@TE:   38   2297  2 28 48 @%
  4679. %@NL@%
  4680. %@CR:MCV6300B@%%@4@%When you debug an assembly module, you cannot use the %@AI@%routine%@AE@% field; you%@EH@%
  4681. must use the %@AI@%module%@AE@% field. Therefore, the only versions of this command that
  4682. work with assembly modules are the following:%@NL@%
  4683. %@NL@%
  4684.      %@AB@%X?%@AE@%%@AI@%module%@AE@%%@AB@%!*%@AE@%%@NL@%
  4685.      %@AB@%X?%@AE@%%@AI@%module%@AE@%%@AB@%!%@AE@%%@AI@%symbol%@AE@%%@NL@%
  4686. %@NL@%
  4687. XL is a special variation of the Examine Symbol command. It lists local
  4688. variables for the currently executing routine and provides more information
  4689. than other variations of the command.%@NL@%
  4690. %@NL@%
  4691. %@CR:MCV6300C@%%@4@%Whereas most forms of the command display the address, type, and name of%@EH@%
  4692. each symbol, the %@AB@%XL%@AE@% variation displays the value of each local variable as
  4693. well. The value of a local variable is displayed in the same format that the
  4694. Display Expression command would use, assuming no type specifier.%@NL@%
  4695. %@NL@%
  4696. %@CR:MCV6300D@%%@4@%The following example shows the use of the %@AB@%XL%@AE@% command when the currently%@EH@%
  4697. executing routine has many local variables.%@NL@%
  4698. %@NL@%
  4699.      >XL%@NL@%
  4700.      [BP+0004]   int          argc = 1%@NL@%
  4701.      [BP+0006]   char * *     argv = 0x2f:0x1510%@NL@%
  4702.      [BP-0002]   int          i = 20%@NL@%
  4703.      SI register int          k = 7%@NL@%
  4704.      [BP-0078]   struct cat   item0 = {item1=0, item2=0, dog=0x2f:0x1476}%@NL@%
  4705.      [BP-0070]   struct cow   moo = {c1=11, c2=22, c3=36, c4=16}%@NL@%
  4706.      [BP-0008]   char *       wiz = 0x2f:0x1514%@NL@%
  4707.      [BP-0080]   int          duck = 0%@NL@%
  4708.      DI register int          j = 83%@NL@%
  4709. %@NL@%
  4710. %@CR:MCV6300E@%%@4@%In the example above, variables %@AS@%i%@AE@% and %@AS@%j%@AE@% are register variables assigned to%@EH@%
  4711. the registers %@AS@%SI%@AE@% and %@AS@%DI%@AE@%, respectively. The other variables are located on
  4712. the stack; %@AS@%XL%@AE@% shows the displacement of each variable from the %@AS@%BP%@AE@% register,
  4713. which holds the value of the stack pointer (SP) at the time of entry into
  4714. the procedure.%@NL@%
  4715. %@NL@%
  4716. %@CR:MCV6300F@%%@4@%If you have a parameter that is declared as a register in a C program, it%@EH@%
  4717. will appear twice: on the stack (as an offset from BP) and in the SI or DI
  4718. register.%@NL@%
  4719. %@NL@%
  4720. %@CR:MCV6300G@%%@4@%Note that if you program in assembly, local variables are not recognized by%@EH@%
  4721. CodeView unless you use the %@AB@%PROC%@AE@% and %@AB@%LOCALS%@AE@% directives provided with MASM
  4722. Version 5.1 and later.%@NL@%
  4723. %@NL@%
  4724. %@CR:MCV6300H@%%@4@%The rest of this section shows examples using the other variations of the%@EH@%
  4725. Examine Symbols command.%@NL@%
  4726. %@NL@%
  4727. %@CR:MCV6300I@%%@4@%%@AB@%C Examples%@AE@%%@EH@%%@NL@%
  4728. %@NL@%
  4729. %@CR:MCV6300J@%%@4@%For the following examples, assume that the program being examined is called%@EH@%
  4730. %@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@%
  4731. module is a skeleton consisting only of the %@AS@%main%@AE@% function, whereas the
  4732. %@AS@%math.c%@AE@% module has several functions.  Assume that the current function is
  4733. %@AB@%div%@AE@% within the %@AS@%math%@AE@% module.%@NL@%
  4734. %@NL@%
  4735.      >X*        %@AI@%;*Example 1%@AE@%%@NL@%
  4736.      PI.OBJ%@NL@%
  4737.      MATH.OBJ%@NL@%
  4738.      chkstk.asm%@NL@%
  4739.      crt0.asm%@NL@%
  4740.      .%@NL@%
  4741.      .%@NL@%
  4742.      .%@NL@%
  4743.      C:\LIB\SLIBC.LIB(xtoa.asm)%@NL@%
  4744.      >%@NL@%
  4745. %@NL@%
  4746. %@CR:MCV6300K@%%@4@%Example 1 lists the two user-created modules of the program, as well as the%@EH@%
  4747. library modules used in the program.%@NL@%
  4748. %@NL@%
  4749.      >X?*       %@AI@%;*Example 2%@AE@%%@NL@%
  4750.                DI        int              b%@NL@%
  4751.                [BP-0006] int              quotient%@NL@%
  4752.                SI        int              i%@NL@%
  4753.                [BP-0002] int              remainder%@NL@%
  4754.                [BP+0004] int              divisor%@NL@%
  4755.      >%@NL@%
  4756. %@NL@%
  4757. %@CR:MCV6300L@%%@4@%Example 2 lists the symbols in the current function (%@AB@%div%@AE@%). Local variables%@EH@%
  4758. are shown as being stored either in a register (%@AS@%b%@AE@% in register %@AS@%DI%@AE@%) or at a
  4759. memory location specified as an offset from a register (%@AS@%divisor%@AE@% at location
  4760. %@AS@%[BP+0004]%@AE@%).%@NL@%
  4761. %@NL@%
  4762.      >X?pi!*         %@AI@%;* Example 3%@AE@%%@NL@%
  4763.      3D37:19B2       int       _scratch0     3D37:0A10 char     _p[]%@NL@%
  4764.      3D37:2954 int       _scratch1           3D37:19B4 char     _t[]%@NL@%
  4765.      3D37:2956 int       _scratch2           3D37:19B0 int      _q%@NL@%
  4766.      3A79:0010 int       _main()               3A79:0010 int    main()%@NL@%
  4767.      3D37:19B2 int        scratch0%@NL@%
  4768.      3D37:0A10 char       p[]%@NL@%
  4769.      3D37:2954 int        scratch1%@NL@%
  4770.      3D37:19B4 char       t[]%@NL@%
  4771.      3D37:2956 int        scratch2%@NL@%
  4772.      3D37:19B0 int        q%@NL@%
  4773.      >%@NL@%
  4774. %@NL@%
  4775. %@CR:MCV6300M@%%@4@%Example 3 shows all the symbols in the %@AS@%pi.c%@AE@% module.%@EH@%%@NL@%
  4776. %@NL@%
  4777.      >X?math!div.*   %@AI@%;*Example 4%@AE@%%@NL@%
  4778.      3A79:0264   int       div()%@NL@%
  4779.                   DI          int              b%@NL@%
  4780.                   [BP-0006]   int              quotient%@NL@%
  4781.                   SI          int              i%@NL@%
  4782.                   [BP-0002]   int              remainder%@NL@%
  4783.                   [BP+0004]   int              divisor%@NL@%
  4784.      >%@NL@%
  4785. %@NL@%
  4786. %@CR:MCV6300N@%%@4@%Example 4 shows the symbols in the %@AS@%div%@AE@% function in module %@AS@%math.c%@AE@%. You%@EH@%
  4787. wouldn't need to specify the module if %@AS@%math.c%@AE@% were the current module, but
  4788. you would if the current module were %@AS@%pi.c%@AE@%.%@NL@%
  4789. %@NL@%
  4790. %@CR:MCV6300O@%%@4@%Variables local to a function are indented under that function.%@EH@%%@NL@%
  4791. %@NL@%
  4792.      >X?math!arctan.s       %@AI@%;* Example 5%@AE@%%@AE@%%@NL@%
  4793.      3A79:00FA int              arc%@AS@%tan()%@AE@%%@NL@%
  4794.                    [BP+0004] int              s%@NL@%
  4795.      >%@NL@%
  4796. %@NL@%
  4797. %@CR:MCV6300P@%%@4@%Example 5 shows one specific variable (%@AS@%s%@AE@%) within the %@AS@%arctan%@AE@% function.%@EH@%%@NL@%
  4798. %@NL@%
  4799. %@CR:MCV6300Q@%%@4@%%@AB@%FORTRAN Examples%@AE@%%@EH@%%@NL@%
  4800. %@NL@%
  4801. %@CR:MCV6300R@%%@4@%For the following examples, assume that the program being examined is called%@EH@%
  4802. %@AS@%FRUST.EXE%@AE@%, and it consists of four modules: %@AS@%FRUST.FOR%@AE@%, %@AS@%FRUST1.FOR%@AE@%,
  4803. %@AS@%FRUST2.FOR%@AE@%, and %@AS@%FRUST3.FOR%@AE@%. Assume that the current routine is %@AS@%main%@AE@% within
  4804. the %@AS@%FRUST.FOR%@AE@% module.%@NL@%
  4805. %@NL@%
  4806.      >X*%@NL@%
  4807.      FRUST.OBJ%@NL@%
  4808.      FRUST1.OBJ%@NL@%
  4809.      FRUST2.OBJ%@NL@%
  4810.      FRUST3.OBJ%@NL@%
  4811.      fixups.asm%@NL@%
  4812.      crt0.asm%@NL@%
  4813.      .%@NL@%
  4814.      .%@NL@%
  4815.      .%@NL@%
  4816.      txtmode.asm%@NL@%
  4817.      _creat.asm%@NL@%
  4818. %@NL@%
  4819. %@CR:MCV6300S@%%@4@%The example above lists the four modules called by the program. The library%@EH@%
  4820. files called by the program are also listed.%@NL@%
  4821. %@NL@%
  4822.      >X?T%@NL@%
  4823.                    520D:0DE4 REAL*4    T%@NL@%
  4824. %@NL@%
  4825. %@CR:MCV6300T@%%@4@%The example above shows the address of the variable %@AS@%T%@AE@% in the current module.%@EH@%%@NL@%
  4826. %@NL@%
  4827.      >X?FRUST3!MULTPI.*%@NL@%
  4828.                    4B28:0005 INTEGER*4        MULTPI()%@NL@%
  4829.                    [BP+000A]                  V%@NL@%
  4830.                    [BP+0006]                  X%@NL@%
  4831.                    [BP-0004] INTEGER*4        MULTPI%@NL@%
  4832. %@NL@%
  4833. %@CR:MCV6300U@%%@4@%The example above lists the symbols in the function %@AS@%MULTPI%@AE@%, located in%@EH@%
  4834. module %@AS@%FRUST3%@AE@%. Variables local to the function are indented under the
  4835. function. You wouldn't need to specify the module if %@AS@%FRUST3%@AE@% were the current
  4836. module.%@NL@%
  4837. %@NL@%
  4838.      >X?FRUST2!SAREA.*%@NL@%
  4839.                    4B15:000E void             SAREA()%@NL@%
  4840.                    [BP+0012]                  R1%@NL@%
  4841.                    [BP+000E]                  R2%@NL@%
  4842.                    [BP+000A]                  H%@NL@%
  4843.                    [BP+0006]                  T%@NL@%
  4844.                    520D:0DEC REAL*4           S12%@NL@%
  4845.                    520D:0DE8 REAL*4           U%@NL@%
  4846. %@NL@%
  4847. %@CR:MCV6300V@%%@4@%The example above shows all the symbols in the routine %@AS@%SAREA%@AE@% in the module%@EH@%
  4848. %@AS@%FRUST2%@AE@%. Because %@AS@%SAREA%@AE@% is a subroutine instead of a function, the word %@AS@%void%@AE@%
  4849. appears where function return-value types are shown.%@NL@%
  4850. %@NL@%
  4851. %@CR:MCV6300W@%%@4@%%@AB@%BASIC Examples%@AE@%%@EH@%%@NL@%
  4852. %@NL@%
  4853. %@CR:MCV6300X@%%@4@%For the following examples, assume that the program being examined is called%@EH@%
  4854. %@AS@%PROG.EXE%@AE@%, and it consists of the following modules: %@AS@%PROG.BAS%@AE@% and %@AS@%SORT.BAS%@AE@%.
  4855. Assume that the current routine is the main program (which, unlike
  4856. subprograms, has no name in a BASIC program) and the module %@AS@%SORT.BAS%@AE@%
  4857. contains two subprograms, %@AS@%SORT%@AE@% and %@AS@%SWITCH%@AE@%.%@NL@%
  4858. %@NL@%
  4859.      >X*%@NL@%
  4860.      PROG.OBJ%@NL@%
  4861.      SORT.OBJ%@NL@%
  4862.      ftmdata.asm%@NL@%
  4863.      crt0.asm%@NL@%
  4864.      crt0dat.asm%@NL@%
  4865.      .%@NL@%
  4866.      .%@NL@%
  4867.      .%@NL@%
  4868.      xtoa.asm%@NL@%
  4869. %@NL@%
  4870. %@CR:MCV6300Y@%%@4@%The example above lists the two modules of the program, including %@AS@%PROG.OBJ%@AE@%,%@EH@%
  4871. which is the main module. The BASIC library files called by the program are
  4872. also listed.%@NL@%
  4873. %@NL@%
  4874.      >X?*%@NL@%
  4875.                    5825:17BE integer          A%[array]%@NL@%
  4876.                    5825:1780 single           HOURS!%@NL@%
  4877.                    5825:1784 integer          I%%@NL@%
  4878. %@NL@%
  4879. %@CR:MCV6300Z@%%@4@%The example above lists the symbols in the current routine, which happens to%@EH@%
  4880. be the main program. Although the main program has no label and therefore
  4881. will not show up in a stack trace, it is still an independent routine and
  4882. has its own local variables. In BASIC, local variables are not put on the
  4883. stack unless they are subprogram parameters.%@NL@%
  4884. %@NL@%
  4885.      >X?*SORT!*%@NL@%
  4886.                    572F:0033 integer          SORT()%@NL@%
  4887.                    572F:00E1 integer          SWITCH()%@NL@%
  4888. %@NL@%
  4889. %@CR:MCV6300a@%%@4@%The example above lists the routines in the module %@AS@%SORT.OBJ%@AE@%. This form of%@EH@%
  4890. the Display Symbols command lists routines only, not variables. Note that
  4891. %@AS@%SORT()%@AE@% and %@AS@%SWITCH()%@AE@% are given with the addresses of the two subprograms by
  4892. that name.%@NL@%
  4893. %@NL@%
  4894.      >X?SORT!SWITCH.*%@NL@%
  4895.                    [BP+0008] integer          B%%@NL@%
  4896.                    [BP+0006] integer          C%%@NL@%
  4897.                    5824:1798 integer          TEMP%%@NL@%
  4898. %@NL@%
  4899. %@CR:MCV6300b@%%@4@%The example above shows all the symbols in the routine %@AS@%SWITCH%@AE@%, which is in%@EH@%
  4900. the %@AS@%SORT.OBJ%@AE@% module. Each represents an integer. However, %@AS@%B%%@AE@% and %@AS@%C%%@AE@%
  4901. represent subprogram parameters that were passed on the stack, whereas%@NL@%
  4902. %@NL@%
  4903. %@CR:MCV6300c@%%@4@%%@AS@%TEMP%%@AE@% is a true subprogram variable. Therefore, %@AS@%TEMP%%@AE@% has an absolute%@EH@%
  4904. address in memory, whereas %@AS@%B%%@AE@% and %@AS@%C%%@AE@% are addressed relative to the stack.%@AE@%
  4905. %@AS@%(%@AE@%%@AS@%BP%@AE@% points to the value of the stack at the time the routine %@AS@%SWITCH%@AE@% was
  4906. called.)%@NL@%
  4907. %@NL@%
  4908. %@NL@%
  4909. %@CR:MCV64000@%%@2@%%@AB@%6.4  Dump Commands%@AE@%%@EH@%%@NL@%
  4910. %@NL@%
  4911. %@CR:MCV64001@%%@4@%The CodeView debugger has several commands for dumping data from memory to%@EH@%
  4912. the screen (or other output device). The Dump commands are listed below.%@NL@%
  4913. %@NL@%
  4914. %@CR:MCV64002@%       %@AB@%Command                    Command Name%@AE@%%@NL@%
  4915. %@NL@%
  4916.        %@AB@%D%@AE@%                    Dump (size is the default type)%@NL@%
  4917. %@NL@%
  4918.        %@AB@%DB%@AE@%                   Dump Bytes%@NL@%
  4919. %@NL@%
  4920.        %@AB@%DA%@AE@%                   Dump ASCII%@NL@%
  4921. %@NL@%
  4922.        %@AB@%DI%@AE@%                   Dump Integers%@NL@%
  4923. %@NL@%
  4924.        %@AB@%DU%@AE@%                   Dump Unsigned Integers%@NL@%
  4925. %@NL@%
  4926.        %@AB@%DW%@AE@%                   Dump Words%@NL@%
  4927. %@NL@%
  4928.        %@AB@%DD%@AE@%                   Dump Double Words%@NL@%
  4929. %@NL@%
  4930.        %@AB@%DS%@AE@%                   Dump Short Reals%@NL@%
  4931. %@NL@%
  4932.        %@AB@%DL%@AE@%                   Dump Long Reals%@NL@%
  4933. %@NL@%
  4934.        %@AB@%DT%@AE@%                   Dump 10-Byte Reals%@NL@%
  4935. %@NL@%
  4936. %@CR:MCV64003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  4937. %@NL@%
  4938. %@CR:MCV64004@%%@4@%The Dump commands cannot be executed with the mouse.%@EH@%%@NL@%
  4939. %@NL@%
  4940. %@CR:MCV64005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  4941. %@NL@%
  4942. %@CR:MCV64006@%%@4@%The Dump commands cannot be executed with keyboard commands.%@EH@%%@NL@%
  4943. %@NL@%
  4944. %@CR:MCV64007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  4945. %@NL@%
  4946. %@CR:MCV64008@%%@4@%To execute a Dump command with a dialog command, enter a command line with%@EH@%
  4947. the following syntax:%@NL@%
  4948. %@NL@%
  4949.      %@AB@%D%@AE@%«%@AI@%type%@AE@%» «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  4950. %@NL@%
  4951. %@CR:MCV64009@%%@4@%The %@AI@%type%@AE@% is a one-letter specifier that indicates the type of the data to be%@EH@%
  4952. dumped. The Dump commands expect either a starting %@AI@%address%@AE@% or a %@AI@%range%@AE@% of
  4953. memory. If the starting %@AI@%address%@AE@% is given, the commands assume a default
  4954. range (usually%@NL@%
  4955. %@NL@%
  4956. %@CR:MCV6400A@%%@4@%determined by the size of the dialog window) starting at %@AI@%address%@AE@%. If %@AI@%range%@AE@%%@EH@%
  4957. is given, the commands dump from the start to the end of %@AI@%range%@AE@%. The maximum
  4958. size of %@AI@%range%@AE@% is 32K.%@NL@%
  4959. %@NL@%
  4960. %@CR:MCV6400B@%%@4@%If neither %@AI@%address%@AE@% nor %@AI@%range%@AE@% is given, the commands assume the current dump%@EH@%
  4961. address as the start of the range and the default size associated with the
  4962. size of the object as the length of the range. The Dump Real commands have a
  4963. default range size of one real number. The other Dump commands have a
  4964. default size determined by the size of the dialog window (if you are in
  4965. window mode), or a default size of 128 bytes otherwise.%@NL@%
  4966. %@NL@%
  4967. %@CR:MCV6400C@%%@4@%The current dump address is the byte following the last byte specified in%@EH@%
  4968. the previous Dump command. If no Dump command has been used during the
  4969. session, the dump address is the start of the data segment (DS). For
  4970. example, if you enter the Dump Words command with no argument as the first
  4971. command of a session, the CodeView debugger displays the first 64 words (128
  4972. bytes) of data declared in the data segment. If you repeat the same command,
  4973. the debugger displays the next 64 words following the ones dumped by the
  4974. first command.%@NL@%
  4975. %@NL@%
  4976. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4977. %@AI@%NOTE%@AE@%%@NL@%
  4978.    If the value in memory cannot be evaluated as a real number, the Dump%@NL@%
  4979.    commands that display real numbers (Dump Short Reals, Dump Long Reals, or%@NL@%
  4980.    Dump 10-Byte Reals) will display a number containing one of the following%@NL@%
  4981.    character sequences: %@AS@%#NAN%@AE@%, %@AS@%#INF%@AE@%, or %@AS@%#IND%@AE@%. NAN (not a number) indicates%@NL@%
  4982.    that the data cannot be evaluated as a real number. INF (infinity)%@NL@%
  4983.    indicates that the data evaluates to infinity. IND (indefinite) indicates%@NL@%
  4984.    that the data evaluates to an indefinite number.%@NL@%
  4985. ───────────────────────────────────────────────────────────────────────────%@NL@%
  4986. %@NL@%
  4987. %@CR:MCV6400D@%%@4@%Sections 6.4.1%@BO:   4f43b@%-6.4.10 discuss the variations of the Dump commands in order%@EH@%
  4988. of the size of data they display.%@NL@%
  4989. %@NL@%
  4990. %@NL@%
  4991. %@CR:MCV64100@%%@3@%%@AB@%6.4.1  Dump%@AE@%%@EH@%%@NL@%
  4992. %@NL@%
  4993. %@CR:MCV64101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  4994. %@NL@%
  4995.      %@AB@%D%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  4996. %@NL@%
  4997. %@CR:MCV64102@%%@4@%The Dump command displays the contents of memory at the specified %@AI@%address%@AE@% or%@EH@%
  4998. in the specified %@AI@%range%@AE@% of addresses. The command dumps data in the format of
  4999. the default type. The default type is the last type specified with a Dump,
  5000. Enter, Watch Memory, or Tracepoint Memory command. If none of these commands
  5001. has been entered during the session, the default type is bytes.%@NL@%
  5002. %@NL@%
  5003. %@CR:MCV64103@%%@4@%The Dump command displays one or more lines, depending on the address or%@EH@%
  5004. range specified. Each line displays the address of the first item displayed.
  5005. The Dump command must be separated by at least one space from any %@AI@%address%@AE@% or
  5006. %@AI@%range%@AE@% value. For example, to dump memory starting at symbol %@AS@%a%@AE@%, use the
  5007. command %@AS@%D a%@AE@%, not %@AS@%Da%@AE@%. The second syntax would be interpreted as the Dump
  5008. ASCII command.%@NL@%
  5009. %@NL@%
  5010. %@NL@%
  5011. %@CR:MCV64200@%%@3@%%@AB@%6.4.2  Dump Bytes%@AE@%%@EH@%%@NL@%
  5012. %@NL@%
  5013. %@CR:MCV64201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  5014. %@NL@%
  5015.      %@AB@%DB%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  5016. %@NL@%
  5017. %@CR:MCV64202@%%@4@%The Dump Bytes command displays the hexadecimal and ASCII values of the%@EH@%
  5018. bytes at the specified %@AI@%address%@AE@% or in the specified %@AI@%range%@AE@% of addresses. The
  5019. command displays one or more lines, depending on the address or range
  5020. supplied.%@NL@%
  5021. %@NL@%
  5022. %@CR:MCV64203@%%@4@%Each line displays the address of the first byte in the line, followed by up%@EH@%
  5023. to 16 hexadecimal byte values. The byte values are immediately followed by
  5024. the corresponding ASCII values. The hexadecimal values are separated by
  5025. spaces, except the eighth and ninth values, which are separated by a dash
  5026. (-). ASCII values are printed without separation. Unprintable ASCII values
  5027. (less than 32 or greater than 126) are displayed as dots. No more than 16
  5028. hexadecimal values are displayed in a line. The command displays values and
  5029. characters until the end of the %@AI@%range%@AE@% or, if no %@AI@%range%@AE@% is given, until the
  5030. first 128 bytes have been displayed.%@NL@%
  5031. %@NL@%
  5032. %@CR:MCV64204@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  5033. %@NL@%
  5034.      >DB 0 36%@NL@%
  5035.      3D5E:0000 53 6F 6D 65 20 6C 65 74-74 65 72 73 20 61 6E 64 Someletters and%@NL@%
  5036.      3D5E:0010 20 6E 75 6D 62 65 72 73-3A 00 10 EA 89 FC FF EF  numbers:.......%@NL@%
  5037.      3D5E:0020 00 F0 00 CA E4         -                         .....%@NL@%
  5038.      >%@NL@%
  5039. %@NL@%
  5040. %@CR:MCV64205@%%@4@%The example above displays the byte values from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (36 decimal is%@EH@%
  5041. equivalent to 24 hexadecimal). The data segment is assumed if no segment is
  5042. given. ASCII characters are shown on the right.%@NL@%
  5043. %@NL@%
  5044. %@NL@%
  5045. %@CR:MCV64300@%%@3@%%@AB@%6.4.3  Dump ASCII%@AE@%%@EH@%%@NL@%
  5046. %@NL@%
  5047. %@CR:MCV64301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  5048. %@NL@%
  5049.      %@AB@%DA%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  5050. %@NL@%
  5051. %@CR:MCV64302@%%@4@%The Dump ASCII command displays the ASCII characters at a specified %@AI@%address%@AE@%%@EH@%
  5052. or in a specified %@AI@%range%@AE@% of addresses. The command displays one or more lines
  5053. of characters, depending on the %@AI@%address%@AE@% or %@AI@%range%@AE@% specified.%@NL@%
  5054. %@NL@%
  5055. %@CR:MCV64303@%%@4@%If no ending address is specified, the command dumps either 128 bytes or all%@EH@%
  5056. bytes preceding the first null byte, whichever comes first. Up to 64
  5057. characters per line are displayed. Unprintable characters, such as carriage
  5058. returns and line feeds, are displayed as dots. ASCII characters less than 32
  5059. and greater than 126 in number are unprintable.%@NL@%
  5060. %@NL@%
  5061. %@CR:MCV64304@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5062. %@NL@%
  5063.      >DA 0%@NL@%
  5064.      3D7C:0000 Some letters and numbers:%@NL@%
  5065.      >%@NL@%
  5066. %@NL@%
  5067. %@CR:MCV64305@%%@4@%The example above displays the ASCII values of the bytes starting at %@AS@%DS:0%@AE@%.%@EH@%
  5068. Since no ending address is given, values are displayed up to the first null
  5069. byte.%@NL@%
  5070. %@NL@%
  5071.      >DA 0 36%@NL@%
  5072.      3D7C:0000  Some letters and numbers:...........%@NL@%
  5073.      >%@NL@%
  5074. %@NL@%
  5075. %@CR:MCV64306@%%@4@%In the example above, an ending address is given, so that the characters%@EH@%
  5076. from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (24 hexadecimal) are shown. Unprintable characters are
  5077. shown as dots.%@NL@%
  5078. %@NL@%
  5079. %@NL@%
  5080. %@CR:MCV64400@%%@3@%%@AB@%6.4.4  Dump Integers%@AE@%%@EH@%%@NL@%
  5081. %@NL@%
  5082. %@CR:MCV64401@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  5083. %@NL@%
  5084.      %@AB@%DI%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  5085. %@NL@%
  5086. %@CR:MCV64402@%%@4@%The Dump Integers command displays the signed decimal values of the words%@EH@%
  5087. (two-byte values) starting at %@AI@%address%@AE@% or in the specified %@AI@%range%@AE@% of
  5088. addresses. The command displays one or more lines, depending on the address
  5089. or range specified. Each line displays the address of the first integer in
  5090. the line, followed by up to eight signed decimal words. The values are
  5091. separated by spaces. The command displays values until the end of the %@AI@%range%@AE@%
  5092. or until the first 64 two-byte integers have been displayed, whichever comes
  5093. first.%@NL@%
  5094. %@NL@%
  5095. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5096. %@AI@%NOTE%@AE@%%@NL@%
  5097.    In this manual an integer is considered a two-byte value since the%@NL@%
  5098.    CodeView debugger assumes that integer size. Note that a default FORTRAN%@NL@%
  5099.    integer is a four-byte value.%@NL@%
  5100. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5101. %@NL@%
  5102. %@CR:MCV64403@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  5103. %@NL@%
  5104.      >DI 0 36%@NL@%
  5105.      3D5E:0000   28499  25965  27680  29797  25972  29554  24864  25710%@NL@%
  5106.      3D5E:0010   28192  28021  25954  29554     58  -5616   -887  -4097%@NL@%
  5107.      3D5E:0020   -4096 -13824   2532%@NL@%
  5108.      >%@NL@%
  5109. %@NL@%
  5110. %@CR:MCV64404@%%@4@%The example above displays the byte values from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (24%@EH@%
  5111. hexadecimal). Compare the signed decimal numbers at the end of this dump
  5112. with the same values shown as unsigned integers in Section 6.4.5%@BO:   50cc7@% below.%@NL@%
  5113. %@NL@%
  5114. %@NL@%
  5115. %@CR:MCV64500@%%@3@%%@AB@%6.4.5  Dump Unsigned Integers%@AE@%%@EH@%%@NL@%
  5116. %@NL@%
  5117. %@CR:MCV64501@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  5118. %@NL@%
  5119.      %@AB@%DU%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  5120. %@NL@%
  5121. %@CR:MCV64502@%%@4@%The Dump Unsigned Integers command displays the unsigned decimal values of%@EH@%
  5122. the words (two-byte values) starting at %@AI@%address%@AE@% or in the specified %@AI@%range%@AE@% of
  5123. addresses. The command displays one or more lines, depending on the address
  5124. or range specified. Each line displays the address of the first unsigned
  5125. integer in the line, followed by up to eight decimal words. The values are
  5126. separated by spaces. The command displays values until the end of the %@AI@%range%@AE@%
  5127. or until the first 64 unsigned integers have been displayed, whichever comes
  5128. first.%@NL@%
  5129. %@NL@%
  5130. %@CR:MCV64503@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  5131. %@NL@%
  5132.      >DU 0 36%@NL@%
  5133.      3D5E:0000   28499  25965  27680  29797  25972  29554  24864  25710%@NL@%
  5134.      3D5E:0010   28192  28021  25954  29554     58  59920  64649  61439%@NL@%
  5135.      3D5E:0020   61440  51712   2532%@NL@%
  5136.      >%@NL@%
  5137. %@NL@%
  5138. %@CR:MCV64504@%%@4@%The example above displays the byte values from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (24%@EH@%
  5139. hexadecimal). Compare the unsigned decimal numbers at the end of this dump
  5140. with the same values shown as signed integers in Section 6.4.4%@BO:   505cb@% above.%@NL@%
  5141. %@NL@%
  5142. %@NL@%
  5143. %@CR:MCV64600@%%@3@%%@AB@%6.4.6  Dump Words%@AE@%%@EH@%%@NL@%
  5144. %@NL@%
  5145. %@CR:MCV64601@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  5146. %@NL@%
  5147.      %@AB@%DW%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  5148. %@NL@%
  5149. %@CR:MCV64602@%%@4@%The Dump Words command displays the hexadecimal values of the words%@EH@%
  5150. (two-byte values) starting at %@AI@%address%@AE@% or in the specified %@AI@%range%@AE@% of
  5151. addresses. The command displays one or more lines, depending on the address
  5152. or range specified. Each line displays the address of the first word in the
  5153. line, followed by up to eight hexadecimal words. The hexadecimal values are
  5154. separated by spaces. The command displays values until the end of the %@AI@%range%@AE@%
  5155. or until the first 64 words have been displayed, whichever comes first.%@NL@%
  5156. %@NL@%
  5157. %@CR:MCV64603@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  5158. %@NL@%
  5159.      >DW 0 36%@NL@%
  5160.      3D5E:0000  6F53 656D 6C20 7465 6574 7372 6120 646E%@NL@%
  5161.      3D5E:0010  6E20 6D75 6562 7372 003A EA10 FC89 EFFF%@NL@%
  5162.      3D5E:0020  F000 CA00 09E4%@NL@%
  5163.      >%@NL@%
  5164. %@NL@%
  5165. %@CR:MCV64604@%%@4@%The example above displays the word values from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (24%@EH@%
  5166. hexadecimal). No more than eight values per line are displayed.%@NL@%
  5167. %@NL@%
  5168. %@NL@%
  5169. %@CR:MCV64700@%%@3@%%@AB@%6.4.7  Dump Double Words%@AE@%%@EH@%%@NL@%
  5170. %@NL@%
  5171. %@CR:MCV64701@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  5172. %@NL@%
  5173.      %@AB@%DD%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  5174. %@NL@%
  5175. %@CR:MCV64702@%%@4@%The Dump Double Words command displays the hexadecimal values of the double%@EH@%
  5176. words (four-byte values) starting at %@AI@%address%@AE@% or in the specified %@AI@%range%@AE@% of
  5177. addresses.%@NL@%
  5178. %@NL@%
  5179. %@CR:MCV64703@%%@4@%The command displays one or more lines, depending on the address or range%@EH@%
  5180. specified. Each line displays the address of the first double word in the
  5181. line, followed by up to four hexadecimal double-word values. The words of
  5182. each double word are separated by a colon. The values are separated by
  5183. spaces. The command displays values until the end of the %@AI@%range%@AE@% or until the
  5184. first 32 double words have been displayed, whichever comes first.%@NL@%
  5185. %@NL@%
  5186. %@CR:MCV64704@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  5187. %@NL@%
  5188.      >DD 0 36%@NL@%
  5189.      3D5E:0000  656D:6F53 7465:6C20 7372:6574 646E:6120%@NL@%
  5190.      3D5E:0010  6D75:6E20 7372:6562 EA10:003A EFFF:FC89%@NL@%
  5191.      3D5E:0020  CA00:F000 6F73:09E4%@NL@%
  5192.      >%@NL@%
  5193. %@NL@%
  5194. %@CR:MCV64705@%%@4@%The example above displays the double-word values from %@AS@%DS:0%@AE@% to %@AS@%DS:36%@AE@% (24%@EH@%
  5195. hexadecimal). No more than four double-word values per line are displayed.%@NL@%
  5196. %@NL@%
  5197. %@NL@%
  5198. %@CR:MCV64800@%%@3@%%@AB@%6.4.8  Dump Short Reals%@AE@%%@EH@%%@NL@%
  5199. %@NL@%
  5200. %@CR:MCV64801@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  5201. %@NL@%
  5202.      %@AB@%DS%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  5203. %@NL@%
  5204. %@CR:MCV64802@%%@4@%The Dump Short Reals command displays the hexadecimal and decimal values of%@EH@%
  5205. the short (four-byte) floating-point numbers at %@AI@%address%@AE@% or in the specified
  5206. %@AI@%range%@AE@% of addresses.%@NL@%
  5207. %@NL@%
  5208. %@CR:MCV64803@%%@4@%The command displays one or more lines, depending on the address or range%@EH@%
  5209. specified. Each line displays the address of the floating-point number in
  5210. the first column. Next, the hexadecimal values of the bytes in the number
  5211. are shown, followed by the decimal value of the number. The hexadecimal
  5212. values are separated by spaces.%@NL@%
  5213. %@NL@%
  5214. %@CR:MCV64804@%%@4@%The decimal value has the following form:%@EH@%%@NL@%
  5215. %@NL@%
  5216.      «-»%@AI@%digit%@AE@%.%@AI@%digits%@AE@%%@AB@%E%@AE@%{+ | -}%@AI@%exponent%@AE@%%@NL@%
  5217. %@NL@%
  5218. %@CR:MCV64805@%%@4@%If the number is negative, it will have a minus sign; positive numbers have%@EH@%
  5219. no sign. The first digit of the number is followed by a decimal point. Six
  5220. decimal places are shown following the decimal point. The letter E follows
  5221. the decimal digits and marks the start of a three-digit signed %@AI@%exponent%@AE@%.%@NL@%
  5222. %@NL@%
  5223. %@CR:MCV64806@%%@4@%The command displays at least one value. If a %@AI@%range%@AE@% is specified, all values%@EH@%
  5224. in the range are displayed.%@NL@%
  5225. %@NL@%
  5226. %@CR:MCV64807@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  5227. %@NL@%
  5228.      >DS SPI%@NL@%
  5229.      5E68:0100  DB 0F 49 40  3.141593E+000%@NL@%
  5230.      >%@NL@%
  5231. %@NL@%
  5232. %@CR:MCV64808@%%@4@%The example above displays the short-real floating-point number at the%@EH@%
  5233. address of the variable %@AS@%SPI%@AE@%. Only one value is displayed per line.%@NL@%
  5234. %@NL@%
  5235. %@NL@%
  5236. %@CR:MCV64900@%%@3@%%@AB@%6.4.9  Dump Long Reals%@AE@%%@EH@%%@NL@%
  5237. %@NL@%
  5238. %@CR:MCV64901@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  5239. %@NL@%
  5240.      %@AB@%DL%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  5241. %@NL@%
  5242. %@CR:MCV64902@%%@4@%The Dump Long Reals command displays the hexadecimal and decimal values of%@EH@%
  5243. the long (eight-byte) floating-point numbers at the specified %@AI@%address%@AE@% or in
  5244. the specified %@AI@%range%@AE@% of addresses.%@NL@%
  5245. %@NL@%
  5246. %@CR:MCV64903@%%@4@%The command displays one or more lines, depending on the address or range%@EH@%
  5247. specified. Each line displays the address of the floating-point number in
  5248. the first column. Next, the hexadecimal values of the bytes in the number
  5249. are shown, followed by the decimal value of the number. The hexadecimal
  5250. values are separated by spaces.%@NL@%
  5251. %@NL@%
  5252. %@CR:MCV64904@%%@4@%The decimal value has the following form:%@EH@%%@NL@%
  5253. %@NL@%
  5254.      «-»%@AI@%digit.digits%@AE@%%@AB@%E%@AE@%{+ | -}%@AI@%exponent%@AE@%%@NL@%
  5255. %@NL@%
  5256. %@CR:MCV64905@%%@4@%If the number is negative, it will have a minus sign; positive numbers have%@EH@%
  5257. no sign. The first digit of the number is followed by a decimal point. Six
  5258. decimal places are shown following the decimal point. The letter E follows
  5259. the decimal digits and marks the start of a three-digit signed %@AI@%exponent%@AE@%.%@NL@%
  5260. %@NL@%
  5261. %@CR:MCV64906@%%@4@%The command displays at least one value. If a %@AI@%range%@AE@% is specified, all values%@EH@%
  5262. in the range are displayed.%@NL@%
  5263. %@NL@%
  5264. %@CR:MCV64907@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  5265. %@NL@%
  5266.      >DL LPI%@NL@%
  5267.      5E68:0200  11 2D 44 54 FB 21 09 40  3.141593E+000%@NL@%
  5268.      >%@NL@%
  5269. %@NL@%
  5270. %@CR:MCV64908@%%@4@%The example above displays the long-real floating-point number at the%@EH@%
  5271. address of the variable %@AS@%LPI%@AE@%. Only one value per line is displayed.%@NL@%
  5272. %@NL@%
  5273. %@NL@%
  5274. %@CR:MCV64A00@%%@3@%%@AB@%6.4.10  Dump 10-Byte Reals%@AE@%%@EH@%%@NL@%
  5275. %@NL@%
  5276. %@CR:MCV64A01@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  5277. %@NL@%
  5278.      %@AB@%DT%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  5279. %@NL@%
  5280. %@CR:MCV64A02@%%@4@%The Dump 10-Byte Reals command displays the hexadecimal and decimal values%@EH@%
  5281. of the 10-byte floating-point numbers at the specified %@AI@%address%@AE@% or in the
  5282. specified %@AI@%range%@AE@% of addresses.%@NL@%
  5283. %@NL@%
  5284. %@CR:MCV64A03@%%@4@%The command displays one or more lines, depending on the address or range%@EH@%
  5285. specified. Each line displays the address of the floating-point number in
  5286. the first column. Next, the hexadecimal values of the bytes in the number
  5287. are shown, followed by the decimal value of the number. The hexadecimal
  5288. values are separated by spaces.%@NL@%
  5289. %@NL@%
  5290. %@CR:MCV64A04@%%@4@%The decimal value has the following form:%@EH@%%@NL@%
  5291. %@NL@%
  5292.      «-»%@AI@%digit%@AE@%.%@AI@%digits%@AE@%%@AB@%E%@AE@%{+ | -}%@AI@%exponent%@AE@%%@NL@%
  5293. %@NL@%
  5294. %@CR:MCV64A05@%%@4@%If the number is negative, it will have a minus sign; positive numbers have%@EH@%
  5295. no sign. The first digit of the number is followed by a decimal point. Six
  5296. decimal places are shown following the decimal point. The letter E follows
  5297. the decimal digits and marks the start of a three-digit signed %@AI@%exponent%@AE@%.%@NL@%
  5298. %@NL@%
  5299. %@CR:MCV64A06@%%@4@%The command displays at least one value. If a %@AI@%range%@AE@% is specified, all values%@EH@%
  5300. in the range are displayed.%@NL@%
  5301. %@NL@%
  5302. %@CR:MCV64A07@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  5303. %@NL@%
  5304.      >DT TPI%@NL@%
  5305.      5E68:0300  DE 87 68 21 A2 DA 0F C9 00 40  3.141593E+000%@NL@%
  5306.      >%@NL@%
  5307. %@NL@%
  5308. %@CR:MCV64A08@%%@4@%The example above displays the 10-byte floating-point number at the address%@EH@%
  5309. of the variable %@AS@%TPI%@AE@%. Only one number per line is displayed.%@NL@%
  5310. %@NL@%
  5311. %@NL@%
  5312. %@CR:MCV65000@%%@2@%%@AB@%6.5  Compare Memory Command%@AE@%%@EH@%%@NL@%
  5313. %@NL@%
  5314. %@CR:MCV65001@%%@4@%The Compare Memory command provides a convenient way for comparing two%@EH@%
  5315. blocks of memory, specified by absolute addresses. This command is primarily
  5316. of interest to programmers using assembly mode; however, it can be useful to
  5317. anyone who wants to compare two large areas of data, such as arrays.%@NL@%
  5318. %@NL@%
  5319. %@CR:MCV65002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5320. %@NL@%
  5321. %@CR:MCV65003@%%@4@%The Compare Memory command cannot be executed with the mouse.%@EH@%%@NL@%
  5322. %@NL@%
  5323. %@CR:MCV65004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5324. %@NL@%
  5325. %@CR:MCV65005@%%@4@%The Compare Memory command cannot be executed with a keyboard command.%@EH@%%@NL@%
  5326. %@NL@%
  5327. %@CR:MCV65006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5328. %@NL@%
  5329. %@CR:MCV65007@%%@4@%To compare two blocks of memory, enter a command line with the following%@EH@%
  5330. syntax:%@NL@%
  5331. %@NL@%
  5332.      %@AB@%C%@AE@% %@AI@%range%@AE@% %@AI@%address%@AE@%%@NL@%
  5333. %@NL@%
  5334. %@CR:MCV65008@%%@4@%The bytes in the memory locations specified by %@AI@%range%@AE@% are compared with the%@EH@%
  5335. corresponding bytes in the memory locations beginning at %@AI@%address%@AE@%. If one or
  5336. more pairs of corresponding bytes do not match, each pair of mismatched
  5337. bytes is displayed.%@NL@%
  5338. %@NL@%
  5339. %@CR:MCV65009@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5340. %@NL@%
  5341.      >C 100 01FF 300     %@AI@%;* hexadecimal radix assumed%@AE@%%@NL@%
  5342.      39BB:0102 0A 00 39BB:0302%@NL@%
  5343.      39BB:0108 0A 01 39BB:0308%@NL@%
  5344.      >%@NL@%
  5345. %@NL@%
  5346. %@CR:MCV6500A@%%@4@%The first example (in which hexadecimal is assumed to be the default radix)%@EH@%
  5347. compares the block of memory from 100 to 1FF with the block of memory from
  5348. 300 to 3FF. It indicates that the third and ninth bytes differ in the two
  5349. areas of memory.%@NL@%
  5350. %@NL@%
  5351.      >C arr1(1) L 100  arr2(1)  %@AI@%;* BASIC/FORTRAN notation used%@AE@%%@NL@%
  5352.      >%@NL@%
  5353. %@NL@%
  5354. %@CR:MCV6500B@%%@4@%The second example compares the 100 bytes starting at the address of%@EH@%
  5355. %@AS@%arr1(1)%@AE@%, with the 100 bytes starting at address of %@AS@%arr2(1)%@AE@%. The CodeView
  5356. debugger produces no output in response, so this indicates that the first
  5357. 100 bytes of each array are identical. (In C language, this example would be
  5358. entered as %@AS@%Carr1[0] L 100 arr2[0]%@AE@%.)%@NL@%
  5359. %@NL@%
  5360. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5361. %@AI@%NOTE%@AE@%%@NL@%
  5362.    You can enter the Compare Memory command using any radix you like;%@NL@%
  5363.    however, any output will still be in hexadecimal format.%@NL@%
  5364. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5365. %@NL@%
  5366. %@NL@%
  5367. %@CR:MCV66000@%%@2@%%@AB@%6.6  Search Memory Command%@AE@%%@EH@%%@NL@%
  5368. %@NL@%
  5369. %@CR:MCV66001@%%@4@%The Search Memory command (not to be confused with the Search command%@EH@%
  5370. discussed in Section 11.5%@BO:   78f11@%) scans a specified area of memory, looking for
  5371. specific byte values. It is primarily of interest to programmers using
  5372. assembly mode and to users testing for the presence of specific values
  5373. within a range of data.%@NL@%
  5374. %@NL@%
  5375. %@CR:MCV66002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5376. %@NL@%
  5377. %@CR:MCV66003@%%@4@%The Search Memory command cannot be executed with the mouse.%@EH@%%@NL@%
  5378. %@NL@%
  5379. %@CR:MCV66004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5380. %@NL@%
  5381. %@CR:MCV66005@%%@4@%The Search Memory command cannot be executed with a keyboard command.%@EH@%%@NL@%
  5382. %@NL@%
  5383. %@CR:MCV66006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5384. %@NL@%
  5385. %@CR:MCV66007@%%@4@%To search a block of memory, enter the Search Memory command with the%@EH@%
  5386. following syntax:%@NL@%
  5387. %@NL@%
  5388.      %@AB@%S%@AE@% %@AI@%range%@AE@% %@AI@%list%@AE@%%@NL@%
  5389. %@NL@%
  5390. %@CR:MCV66008@%%@4@%The debugger will search the specified %@AI@%range%@AE@% of memory locations for the%@EH@%
  5391. byte values specified in the %@AI@%list%@AE@%. If bytes with the specified values are
  5392. found, the debugger displays the addresses of each occurrence of bytes in
  5393. the list.%@NL@%
  5394. %@NL@%
  5395. %@CR:MCV66009@%%@4@%The %@AI@%list%@AE@% can have any number of bytes. Each byte value must be separated by%@EH@%
  5396. a space or comma, unless the list is an ASCII string. If the list contains
  5397. more than one byte, the Search Memory command looks for a series of bytes
  5398. that precisely match the order and value of bytes in %@AI@%list%@AE@%. If found, the
  5399. beginning address of each such series is displayed.%@NL@%
  5400. %@NL@%
  5401. %@CR:MCV6600A@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5402. %@NL@%
  5403.      >S buffer L 1500 "error"%@NL@%
  5404.      2BBA:0404%@NL@%
  5405.      2BBA:05E3%@NL@%
  5406.      2BBA:0604%@NL@%
  5407.      >%@NL@%
  5408. %@NL@%
  5409. %@CR:MCV6600B@%%@4@%The first example displays the address of each memory location containing%@EH@%
  5410. the string %@AS@%error%@AE@%. The command searches the first 1500 bytes at the address
  5411. specified by %@AS@%buffer%@AE@%. The string was found at the three addresses displayed
  5412. by the CodeView debugger.%@NL@%
  5413. %@NL@%
  5414.      >S DS:100 200 0A   %@AI@%;* hexadecimal radix assumed%@AE@%%@NL@%
  5415.      3CBA:0132%@NL@%
  5416.      3CBA:01C2%@NL@%
  5417.      >%@NL@%
  5418. %@NL@%
  5419. %@CR:MCV6600C@%%@4@%The second example displays the address of each memory location that%@EH@%
  5420. contains the byte value 0A in the range DS:0100 to DS:0200 (hexadecimal).
  5421. The value was found at two addresses.%@NL@%
  5422. %@NL@%
  5423. %@NL@%
  5424. %@CR:MCV67000@%%@2@%%@AB@%6.7  Port Input Command%@AE@%%@EH@%%@NL@%
  5425. %@NL@%
  5426. %@CR:MCV67001@%%@4@%The Port Input command reads and displays a byte from a specified hardware%@EH@%
  5427. port. It is primarily of interest to assembly-language programmers writing
  5428. hardware-specific programs.%@NL@%
  5429. %@NL@%
  5430. %@CR:MCV67002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5431. %@NL@%
  5432. %@CR:MCV67003@%%@4@%The Port Input command cannot be executed with the mouse.%@EH@%%@NL@%
  5433. %@NL@%
  5434. %@CR:MCV67004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5435. %@NL@%
  5436. %@CR:MCV67005@%%@4@%The Port Input command cannot be executed with a keyboard command.%@EH@%%@NL@%
  5437. %@NL@%
  5438. %@CR:MCV67006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5439. %@NL@%
  5440. %@CR:MCV67007@%%@4@%The Port Input command is executed with the following syntax:%@EH@%%@NL@%
  5441. %@NL@%
  5442.      %@AB@%I%@AE@% %@AI@%port%@AE@%%@NL@%
  5443. %@NL@%
  5444. %@CR:MCV67008@%%@4@%The byte is read and displayed from the specified %@AI@%port%@AE@%, which can be any%@EH@%
  5445. 16-bit address.%@NL@%
  5446. %@NL@%
  5447. %@CR:MCV67009@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5448. %@NL@%
  5449.      >I 2f8   %@AI@%;* hexadecimal radix assumed%@NL@%
  5450.      E8%@NL@%
  5451.      >%@NL@%
  5452. %@NL@%
  5453. %@CR:MCV6700A@%%@4@%The preceding example reads input port, number %@AS@%2F8%@AE@%, and displays the result,%@EH@%
  5454. %@AS@%E8%@AE@%. You may enter the port address using any radix you want, but the result
  5455. will always be displayed in current radix.%@NL@%
  5456. %@NL@%
  5457. %@CR:MCV6700B@%%@4@%The Port Input command is often used in conjunction with the Port Output%@EH@%
  5458. command, which is described in Section 10.5.%@BO:   75046@%%@NL@%
  5459. %@NL@%
  5460. %@NL@%
  5461. %@CR:MCV68000@%%@2@%%@AB@%6.8  Register Command%@AE@%%@EH@%%@NL@%
  5462. %@NL@%
  5463. %@CR:MCV68001@%%@4@%The Register command has two functions. It displays the contents of the%@EH@%
  5464. central processing unit (CPU) registers. It can also change the values of
  5465. the registers. The display features of the Register command are explained
  5466. here. The modification features of the command are explained in Chapter 10%@BO:   6c3f1@%,
  5467. "Modifying Code or Data."%@NL@%
  5468. %@NL@%
  5469. %@CR:MCV68002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5470. %@NL@%
  5471. %@CR:MCV68003@%%@4@%To display the registers with the mouse, point to View on the menu bar,%@EH@%
  5472. press a mouse button and drag the highlight down to the Registers selection,
  5473. then release the button. The register window will appear on the right side
  5474. of the screen. If the register window is already on the screen, the same
  5475. command removes it.%@NL@%
  5476. %@NL@%
  5477. %@CR:MCV68004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5478. %@NL@%
  5479. %@CR:MCV68005@%%@4@%To display the registers using a keyboard command in window mode, press F2.%@EH@%
  5480. The register window will appear on the right side of the screen. If the
  5481. register window is already on the screen, the same command will remove it.%@NL@%
  5482. %@NL@%
  5483. %@CR:MCV68006@%%@4@%In sequential mode, the F2 key will display the current status of the%@EH@%
  5484. registers. (This produces the same effect as entering the Register dialog
  5485. command with no argument.)%@NL@%
  5486. %@NL@%
  5487. %@CR:MCV68007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5488. %@NL@%
  5489. %@CR:MCV68008@%%@4@%To display the registers in the dialog window (or sequentially in sequential%@EH@%
  5490. mode), enter a command line with the following syntax:%@NL@%
  5491. %@NL@%
  5492.      %@AB@%R%@AE@%%@NL@%
  5493. %@NL@%
  5494. %@CR:MCV68009@%%@4@%The current values of all registers and flags are displayed. The instruction%@EH@%
  5495. at the address pointed to by the current CS and IP register values is also
  5496. shown. (The Register command can also be given with arguments, but only when
  5497. used to modify registers, as explained in Chapter 10%@BO:   6c3f1@%, "Modifying Code or
  5498. Data.")%@NL@%
  5499. %@NL@%
  5500. %@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@%
  5501. Mode Command," for more information), the current source line is also
  5502. displayed by the Register command. If an operand of the instruction contains
  5503. memory expressions or immediate data, the CodeView debugger will evaluate
  5504. operands and show the value to the right of the instruction. This value is
  5505. referred to as the "effective address," and is also displayed at the bottom
  5506. of the register window. If the CS and IP registers are currently at a
  5507. breakpoint location, the register display will indicate the breakpoint
  5508. number.%@NL@%
  5509. %@NL@%
  5510. %@CR:MCV6800B@%%@4@%In sequential mode, the Trace (%@AB@%T%@AE@%), Program Step (%@AB@%P%@AE@%), and Go (%@AB@%G%@AE@%) commands%@EH@%
  5511. show registers in the same format as the Register command.%@NL@%
  5512. %@NL@%
  5513. %@CR:MCV6800C@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5514. %@NL@%
  5515.      >S&%@NL@%
  5516.      mixed%@NL@%
  5517.      >R%@NL@%
  5518.      AX=0005  BX=299E  CX=0000  DX=0000  SP=3800  BP=380E  SI=0070  DI=40D1%@NL@%
  5519.      DS=5067  ES=5067  SS=5067  CS=4684  IP=014F  NV UP EI PL NZ NA PO NC%@NL@%
  5520.      35:                           VARIAN = (N*SUMXSQ-SUMX**2)/(N-1)%@NL@%
  5521.      4684:014F 8B5E06      MOV        BX,Word Ptr [BP+06]     ;BR1  SS:3814=299E%@NL@%
  5522.      >%@NL@%
  5523. %@NL@%
  5524. %@CR:MCV6800D@%%@4@%The example above displays all register and flag values, as well as the%@EH@%
  5525. instruction at the address pointed to by the CS and IP registers. Because
  5526. the mode has been set to mixed (%@AB@%S&%@AE@%), the current source line is also shown.
  5527. The example is from a FORTRAN program, but applies equally well to BASIC and
  5528. C programs.%@NL@%
  5529. %@NL@%
  5530.      >S-%@NL@%
  5531.      assembly%@NL@%
  5532.      >R%@NL@%
  5533.      AX=0005  BX=299E  CX=0000  DX=0000  SP=3800  BP=380E  SI=0070  DI=40D1%@NL@%
  5534.      DS=5067  ES=5067  SS=5067  CS=4684  IP=014F  NV UP EI PL NZ NA PO NC%@NL@%
  5535.      4684:014F 8B5E06       MOV     BX,Word Ptr [BP+06]     ;BR1  SS:3814=299E%@NL@%
  5536.      >%@NL@%
  5537. %@NL@%
  5538. %@CR:MCV6800E@%%@4@%In the example above, the display mode is set to assembly (%@AB@%S-%@AE@%), so no source%@EH@%
  5539. line is shown. Note the breakpoint number at the right of the last line
  5540. indicating that the current address is at Breakpoint 1.%@NL@%
  5541. %@NL@%
  5542. %@NL@%
  5543. %@CR:MCV69000@%%@2@%%@AB@%6.9  8087 Command%@AE@%%@EH@%%@NL@%
  5544. %@NL@%
  5545. %@CR:MCV69001@%%@4@%The 8087 command dumps the contents of the 8087 registers. If you do not%@EH@%
  5546. have an 8087, 80287, or 80387 coprocessor chip on your system, this command
  5547. will dump the contents of the pseudoregisters created by the compiler's
  5548. emulator routines. This command is useful only if you have an 8087, 80287,
  5549. or 80387 chip installed or if your executable file includes math routines
  5550. from a Microsoft 8087-emulator library.%@NL@%
  5551. %@NL@%
  5552. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5553. %@AI@%NOTE%@AE@%%@NL@%
  5554.    This section does not attempt to explain how the registers of the Intel%@NL@%
  5555.    8087 and 80287 processors are organized or how they work. In order to%@NL@%
  5556.    interpret the command output, you must learn about the chip from an Intel%@NL@%
  5557.    reference manual or other book on the subject. Since the Microsoft%@NL@%
  5558.    emulator routines mimic the behavior of the 8087 coprocessor, these%@NL@%
  5559.    references will apply to emulator routines as well as to the chips%@NL@%
  5560.    themselves.%@NL@%
  5561. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5562. %@NL@%
  5563. %@CR:MCV69002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5564. %@NL@%
  5565. %@CR:MCV69003@%%@4@%The 8087 command cannot be executed with the mouse.%@EH@%%@NL@%
  5566. %@NL@%
  5567. %@CR:MCV69004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5568. %@NL@%
  5569. %@CR:MCV69005@%%@4@%The 8087 command cannot be executed with a keyboard command.%@EH@%%@NL@%
  5570. %@NL@%
  5571. %@CR:MCV69006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5572. %@NL@%
  5573. %@CR:MCV69007@%%@4@%To display the status of the 8087 or 80287 chip (or floating-point emulator%@EH@%
  5574. routines) with a dialog command, enter a command line with the following
  5575. syntax:%@NL@%
  5576. %@NL@%
  5577.      %@AB@%7%@AE@%%@NL@%
  5578. %@NL@%
  5579. %@CR:MCV69008@%%@4@%The current status of the chip is displayed when you enter the command. In%@EH@%
  5580. window mode, the output is to the dialog window. If you do not have an 8087
  5581. or 80287 chip and are not linking to an emulator library, the debugger will
  5582. report the error message %@AS@%Floating point not %@AE@%%@AS@%loaded%@AE@%. CodeView reports this
  5583. message each time you give the %@AB@%7%@AE@% command, unless a floating-point
  5584. instruction has been executed.%@NL@%
  5585. %@NL@%
  5586. %@CR:MCV69009@%%@4@%The following example shows a display for a machine that actually has an%@EH@%
  5587. 8087 or 80287 chip. The example at the end of this section shows the same
  5588. display for a machine using an emulator library instead of an actual math
  5589. coprocessor.%@NL@%
  5590. %@NL@%
  5591. %@CR:MCV6900A@%%@4@%%@AB@%8087 Example%@AE@%%@EH@%%@NL@%
  5592. %@NL@%
  5593.      >7%@NL@%
  5594.      cControl 037F  (Projective closure, Round nearest, 64-bit precision)%@NL@%
  5595.              iem=0 pm=1 um=1 om=1 zm=1 dm=1 im=1%@NL@%
  5596.      cStatus  6004  cond=1000 top=4 pe=0 ue=0 oe=0 ze=1 de=0 ie=0%@NL@%
  5597.      Tag     A1FF  instruction=59380  operand=59360  opcode=D9EE%@NL@%
  5598.      Stack         Exp  Mantissa           Value%@NL@%
  5599.      cST(3) special 7FFF 8000000000000000 = + Infinity%@NL@%
  5600.      cST(2) special 7FFF 0101010101010101 = + Not a Number%@NL@%
  5601.      cST(1) valid   4000 C90FDAA22168C235 = +3.141592265110390E+000%@NL@%
  5602.      cST(0) zero    0000 0000000000000000 = +0.000000000000000E+000%@NL@%
  5603.      >%@NL@%
  5604. %@NL@%
  5605. %@CR:MCV6900B@%%@4@%In the example above, the first line of the dump shows the current closure%@EH@%
  5606. method, rounding method, and the precision. The number %@AS@%037F%@AE@% is the
  5607. hexadecimal value in the control register. The rest of the line interprets
  5608. the bits of the number. The closure method can be either projective (as in
  5609. the example) or affine. The rounding method can be either rounding to the
  5610. nearest even number (as in the example), rounding down, rounding up, or
  5611. using the chop method of rounding (truncating toward zero). The precision
  5612. may be 64 bits (as in the example), 53 bits, or 24 bits.%@NL@%
  5613. %@NL@%
  5614. %@CR:MCV6900C@%%@4@%The second line of the display indicates whether each exception mask bit is%@EH@%
  5615. set or cleared. The masks are interrupt-enable mask (%@AS@%iem%@AE@%), precision mask
  5616. (%@AS@%pm%@AE@%), underflow mask (%@AS@%um%@AE@%), overflow mask (%@AS@%om%@AE@%), zero-divide mask (%@AS@%zm%@AE@%),
  5617. denormalized-operand mask (%@AS@%dm%@AE@%), and invalid-operation mask (%@AS@%im%@AE@%).%@NL@%
  5618. %@NL@%
  5619. %@CR:MCV6900D@%%@4@%The third line of the display shows the hexadecimal value of the status%@EH@%
  5620. register ( %@AS@%6004%@AE@% in the example), and then interprets the bits of the
  5621. register. The condition code (%@AS@%cond%@AE@%) in the example is the binary number
  5622. %@AS@%1000%@AE@%. The top of the stack (%@AS@%top%@AE@%) is register 4 (shown in decimal). The
  5623. other bits shown are precision exception (%@AS@%pe%@AE@%), underflow exception (%@AS@%ue%@AE@%),
  5624. overflow exception (%@AS@%oe%@AE@%), zero-divide exception (%@AS@%ze%@AE@%), denormalized-operand
  5625. exception (%@AS@%de%@AE@%), and invalid-operation exception (%@AS@%ie%@AE@%).%@NL@%
  5626. %@NL@%
  5627. %@CR:MCV6900E@%%@4@%The fourth line of the display first shows the 20-bit hexadecimal address%@EH@%
  5628. value of the tag register (%@AS@%A1FF%@AE@% in the example). It then gives the
  5629. hexadecimal offsets of the instruction (%@AS@%59380%@AE@%), the operand (%@AS@%59360%@AE@%), and
  5630. the operation code, or opcode, (%@AS@%D9EE%@AE@%).%@NL@%
  5631. %@NL@%
  5632. %@CR:MCV6900F@%%@4@%The fifth line is a heading for the subsequent lines that contain the%@EH@%
  5633. contents of each 8087 or 80287 stack register. The registers in the example
  5634. contain four types of numbers that may be held in these registers. Starting
  5635. from the bottom, register 0 contains zero. Register 1 contains a valid real
  5636. number. Its exponent (in hexadecimal) is %@AS@%4000%@AE@% and its mantissa is%@AE@%
  5637. %@AS@%C90FDAA22168C235%@AE@%. The number is shown in scientific notation in the
  5638. rightmost column. Register 2 contains a value that cannot be interpreted as
  5639. a number, and register 3 contains infinity.%@NL@%
  5640. %@NL@%
  5641. %@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@%
  5642. that an actual math-coprocessor chip is in use. If emulator routines were in
  5643. use instead of a chip, each %@AS@%c%@AE@% prefix would be replaced by %@AS@%e%@AE@%, as in the next
  5644. example.%@NL@%
  5645. %@NL@%
  5646. %@CR:MCV6900H@%%@4@%%@AB@%Floating-Point Emulator Example%@AE@%%@EH@%%@NL@%
  5647. %@NL@%
  5648.      >7%@NL@%
  5649.      eControl 037F  (Projective closure, Round nearest, 64-bit precision)%@NL@%
  5650.                              iem=0 pm=1 um=1 om=1 zm=1 dm=1 im=1%@NL@%
  5651.      eStatus  6004  cond=1000 top=4 pe=0 ue=0 oe=0 ze=1 de=0 ie=0%@NL@%
  5652.      Tag     A1FF  instruction=59380  operand=59360  opcode=D9EE%@NL@%
  5653.      Stack         Exp  Mantissa           Value%@NL@%
  5654.      eST(3) special 7FFF 8000000000000000 = + Infinity%@NL@%
  5655.      eST(2) special 7FFF 0101010101010101 = + Not a Number%@NL@%
  5656.      eST(1) valid   4000 C90FDAA22168C235 = +3.141592265110390E+000%@NL@%
  5657.      eST(0) zero    0000 0000000000000000 = +0.000000000000000E+000%@NL@%
  5658.      >%@NL@%
  5659. %@NL@%
  5660. %@CR:MCV6900I@%%@4@%Note the %@AS@%e%@AE@% at the beginning of the first, third, sixth, seventh, eighth, and%@EH@%
  5661. ninth lines. Aside from this replacement of the %@AS@%c%@AE@% prefix by %@AS@%e%@AE@%, the emulator
  5662. display is the same as the corresponding display for an 8087 chip.%@NL@%
  5663. %@NL@%
  5664. %@NL@%
  5665. %@CR:MCV70000@%%@1@%%@AB@%Chapter 7  Managing Breakpoints%@AE@%%@EH@%%@NL@%
  5666. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5667. %@NL@%
  5668. %@CR:MCV70001@%%@4@%The CodeView debugger enables you to control program execution by setting%@EH@%
  5669. breakpoints. A breakpoint is an address that stops program execution each
  5670. time the address is encountered. By setting breakpoints at key addresses in
  5671. your program, you can "freeze" program execution and examine the status of
  5672. memory or expressions at that point.%@NL@%
  5673. %@NL@%
  5674. %@CR:MCV70002@%%@4@%The commands listed below control breakpoints:%@EH@%%@NL@%
  5675. %@NL@%
  5676. %@CR:MCV70003@%%@AB@%Command                     Action%@AE@%%@NL@%
  5677. %@NL@%
  5678. Breakpoint Set (%@AB@%BP%@AE@%)         Sets a breakpoint and, optionally, a pass count%@NL@%
  5679.                             and break commands%@NL@%
  5680. %@NL@%
  5681. Breakpoint Clear (%@AB@%BC%@AE@%)       Clears one or more breakpoints%@NL@%
  5682. %@NL@%
  5683. Breakpoint Disable (%@AB@%BD%@AE@%)     Disables one or more breakpoints%@NL@%
  5684. %@NL@%
  5685. Breakpoint Enable (%@AB@%BE%@AE@%)      Enables one or more breakpoints%@NL@%
  5686. %@NL@%
  5687. Breakpoint List (%@AB@%BL%@AE@%)        Lists all breakpoints%@NL@%
  5688. %@NL@%
  5689. %@CR:MCV70004@%%@4@%In addition to these commands, the Watchpoint (%@AB@%WP%@AE@%) and Tracepoint (%@AB@%TP%@AE@%)%@EH@%
  5690. commands can be used to set conditional breakpoints (see Chapter 8%@BO:   5c045@%,
  5691. "Managing Watch Statements," for information on these two commands).%@NL@%
  5692. %@NL@%
  5693. %@NL@%
  5694. %@CR:MCV71000@%%@2@%%@AB@%7.1  Breakpoint Set Command%@AE@%%@EH@%%@NL@%
  5695. %@NL@%
  5696. %@CR:MCV71001@%%@4@%The Breakpoint Set command (%@AB@%BP%@AE@%) creates a breakpoint at a specified address.%@EH@%
  5697. Any time a breakpoint is encountered during program execution, the program
  5698. halts and waits for a new command.%@NL@%
  5699. %@NL@%
  5700. %@CR:MCV71002@%%@4@%The CodeView debugger allows up to 20 breakpoints (0 through 19). Each new%@EH@%
  5701. breakpoint is assigned to the next available number. Breakpoints remain in
  5702. memory until you delete them or until you quit the debugger. They are not
  5703. canceled when you restart the program. Because breakpoints are not
  5704. automatically canceled, you are able to set up a complicated series of
  5705. breakpoints, then execute through the program several times without
  5706. resetting.%@NL@%
  5707. %@NL@%
  5708. %@CR:MCV71003@%%@4@%If you try to set a breakpoint at a comment line or other source line that%@EH@%
  5709. does not correspond to code, the CodeView debugger displays the following
  5710. message:%@NL@%
  5711. %@NL@%
  5712.      %@AS@%No code at this line number%@AE@%%@NL@%
  5713. %@NL@%
  5714. %@CR:MCV71004@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5715. %@NL@%
  5716. %@CR:MCV71005@%%@4@%To set a breakpoint with the mouse, point to the source line or instruction%@EH@%
  5717. where you want to set the breakpoint and then click the left button. The
  5718. line will be displayed in high-intensity text and will remain so until you
  5719. remove or disable the breakpoint.%@NL@%
  5720. %@NL@%
  5721. %@CR:MCV71006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5722. %@NL@%
  5723. %@CR:MCV71007@%%@4@%To set a breakpoint with a keyboard command in window mode, move the cursor%@EH@%
  5724. to the source line or instruction where you want to set a breakpoint. You
  5725. may have to press F6 to move the cursor to the display window. When the
  5726. cursor is on the appropriate source line, press F9. The line will be
  5727. displayed in high-intensity text and will remain so until you remove or
  5728. disable the breakpoint.%@NL@%
  5729. %@NL@%
  5730. %@CR:MCV71008@%%@4@%In sequential mode, the F9 key can be used to set a breakpoint at the%@EH@%
  5731. current location. You must use the dialog version of the command to set a
  5732. breakpoint at any other location.%@NL@%
  5733. %@NL@%
  5734. %@CR:MCV71009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5735. %@NL@%
  5736. %@CR:MCV7100A@%%@4@%To set a breakpoint using a dialog command, enter a command line with the%@EH@%
  5737. following syntax:%@NL@%
  5738. %@NL@%
  5739.      %@AB@%BP%@AE@% «%@AI@%address%@AE@% «%@AI@%passcount%@AE@%» «%@AB@%"%@AE@%%@AI@%commands%@AE@%%@AB@%"%@AE@%»»%@NL@%
  5740. %@NL@%
  5741. %@CR:MCV7100B@%%@4@%If no %@AI@%address%@AE@% is given, a breakpoint is created on the current source line%@EH@%
  5742. in source mode or on the current instruction in assembly mode. You can
  5743. specify the %@AI@%address%@AE@% in the %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% format or as a source line, a
  5744. routine name, or a label. If you give an offset address, the code segment is
  5745. assumed.%@NL@%
  5746. %@NL@%
  5747. %@CR:MCV7100C@%%@4@%The dialog version of the command is more powerful than the mouse or%@EH@%
  5748. keyboard version in that it allows you to give a %@AI@%passcount%@AE@% and a string of
  5749. %@AI@%commands%@AE@%.%@NL@%
  5750. %@NL@%
  5751. %@CR:MCV7100D@%%@4@%The %@AI@%passcount%@AE@% specifies the first time the breakpoint is to be taken. For%@EH@%
  5752. example, if the pass count is 5, the breakpoint will be ignored the first
  5753. four times it is encountered, and taken the fifth time. Thereafter, the
  5754. breakpoint is always taken.%@NL@%
  5755. %@NL@%
  5756. %@CR:MCV7100E@%%@4@%The %@AI@%commands%@AE@% are a list of dialog commands enclosed in quotation marks (%@AB@%" "%@AE@%)%@EH@%
  5757. and separated by semicolons (%@AB@%;%@AE@%). For example, if you specify the commands as
  5758. %@AS@%"? code;T"%@AE@%, the CodeView debugger will automatically display the value of
  5759. the variable %@AS@%code%@AE@% and then execute the Trace command each time the
  5760. breakpoint is encountered. The Trace and Display Expression commands are
  5761. described in Chapter 5%@BO:   3d63b@%, "Executing Code," and Chapter 6%@BO:   43f5c@%, "Examining Data and
  5762. Expressions," respectively.%@NL@%
  5763. %@NL@%
  5764. %@CR:MCV7100F@%%@4@%In window mode, a breakpoint entered with a dialog command has exactly the%@EH@%
  5765. same effect as one created with a window command. The source line or
  5766. instruction corresponding to the breakpoint location is shown in
  5767. high-intensity text.%@NL@%
  5768. %@NL@%
  5769. %@CR:MCV7100G@%%@4@%In sequential mode, information about the current instruction will be%@EH@%
  5770. displayed each time you execute to a breakpoint. The register values, the
  5771. current instruction, and the source line may be shown, depending on the
  5772. display mode. See Chapter 9%@BO:   6542b@%, "Examining Code," for more information about
  5773. display modes.%@NL@%
  5774. %@NL@%
  5775. %@CR:MCV7100H@%%@4@%When a breakpoint address is shown in the assembly-language format, the%@EH@%
  5776. breakpoint number will be shown as a comment to the right of the
  5777. instruction. This comment appears even if the breakpoint is disabled (but
  5778. not if it is deleted).%@NL@%
  5779. %@NL@%
  5780. %@CR:MCV7100I@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5781. %@NL@%
  5782.      >BP .19 10%@NL@%
  5783.      >%@NL@%
  5784. %@NL@%
  5785. %@CR:MCV7100J@%%@4@%The example above creates a breakpoint at line 19 of the current source file%@EH@%
  5786. (or if there is no executable statement at line 19, at the first executable
  5787. statement after line 19). The breakpoint is passed over nine times before
  5788. being taken on the tenth pass.%@NL@%
  5789. %@NL@%
  5790.      >BP STATS 10 "?COUNTER = COUNTER + 1;G"%@NL@%
  5791.      >%@NL@%
  5792. %@NL@%
  5793. %@CR:MCV7100K@%%@4@%The example above creates a breakpoint at the address of the routine %@AS@%STATS%@AE@%.%@EH@%
  5794. The breakpoint is passed over nine times before being taken on the 10th
  5795. pass. Each time execution stops for the breakpoint, the quoted commands are
  5796. executed. The Display Expression command increments %@AS@%COUNTER%@AE@%, then the Go
  5797. command restarts execution. If %@AS@%COUNTER%@AE@% is set to 0 when the breakpoint is
  5798. set, this has the effect of counting the number of times the breakpoint is
  5799. taken.%@NL@%
  5800. %@NL@%
  5801.      >S-       %@AI@%;* FORTRAN example - uses FORTRAN hexadecimal notation%@AE@%%@NL@%
  5802.      assembly%@NL@%
  5803.      >BP #0A94%@NL@%
  5804.      >G%@NL@%
  5805.      AX=0006  BX=304A  CX=000B  DX=465D  SP=3050  BP=3050  SI=00BB  DI=40D1%@NL@%
  5806.      DS=5064  ES=5064  SS=5064  CS=46A2  IP=0A94  NV UP EI PL NZ NA PENC%@NL@%
  5807.      46A2:0A94 7205         JB      __chkstk+13 (0A9B)      ;BR1%@NL@%
  5808.      >%@NL@%
  5809. %@NL@%
  5810. %@CR:MCV7100L@%%@4@%The example above first sets the mode to assembly and then creates a%@EH@%
  5811. breakpoint at the hexadecimal (offset) address %@AS@%#0A94%@AE@% in the default (CS)
  5812. segment. (The same address would be specified as %@AS@%0x0A94%@AE@% with the C
  5813. expression evaluator, and as %@AS@%&H0A9%@AE@% with the BASIC expression evaluator.) The
  5814. Go command (%@AB@%G%@AE@%) is then used to execute to the breakpoint. Note that in the
  5815. output to the Go command, the breakpoint number is shown as an
  5816. assembly-language comment (%@AS@%;BR1%@AE@%) to the right of the current instruction.
  5817. The Go command displays this output only in sequential mode; in window mode
  5818. no assembly-language information appears.%@NL@%
  5819. %@NL@%
  5820. %@NL@%
  5821. %@CR:MCV72000@%%@2@%%@AB@%7.2  Breakpoint Clear Command%@AE@%%@EH@%%@NL@%
  5822. %@NL@%
  5823. %@CR:MCV72001@%%@4@%The Breakpoint Clear command (%@AB@%BC%@AE@%) permanently removes one or more previously%@EH@%
  5824. set breakpoints.%@NL@%
  5825. %@NL@%
  5826. %@CR:MCV72002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5827. %@NL@%
  5828. %@CR:MCV72003@%%@4@%To clear a single breakpoint with the mouse, point to the breakpoint line or%@EH@%
  5829. instruction you want to clear. Breakpoint lines are shown in high-intensity
  5830. text. Press the left mouse button. The line will be shown in normal text to
  5831. indicate that the breakpoint has been removed.%@NL@%
  5832. %@NL@%
  5833. %@CR:MCV72004@%%@4@%To remove all breakpoints with the mouse, point to Run on the menu bar,%@EH@%
  5834. press a mouse button and drag the highlight down to the Clear Breakpoints
  5835. selection, then release the button.%@NL@%
  5836. %@NL@%
  5837. %@CR:MCV72005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5838. %@NL@%
  5839. %@CR:MCV72006@%%@4@%To clear a single breakpoint with a keyboard command, move the cursor to the%@EH@%
  5840. breakpoint line or instruction you want to clear. Breakpoint lines are shown
  5841. in high-intensity text. Press F9. The line will be shown in normal text to
  5842. indicate that the breakpoint has been removed.%@NL@%
  5843. %@NL@%
  5844. %@CR:MCV72007@%%@4@%To remove all breakpoints using a keyboard command, press ALT+R to open the%@EH@%
  5845. Run menu, and then press ALT+C to select Clear Breakpoints.%@NL@%
  5846. %@NL@%
  5847. %@CR:MCV72008@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5848. %@NL@%
  5849. %@CR:MCV72009@%%@4@%To clear breakpoints using a dialog command, enter a command line with the%@EH@%
  5850. following syntax:%@NL@%
  5851. %@NL@%
  5852.      %@AB@%BC%@AE@% %@AI@%list%@AE@%%@NL@%
  5853.      %@AB@%BC *%@NL@%
  5854. %@NL@%
  5855. %@CR:MCV7200A@%%@4@%If %@AI@%list%@AE@% is specified, the command removes the breakpoints named in the list.%@EH@%
  5856. The %@AI@%list%@AE@% can be any combination of integer values from 0 to 19. You can use
  5857. the Breakpoint List command (%@AB@%BL%@AE@%) if you need to see the numbers for each
  5858. existing breakpoint. If an asterisk (%@AB@%*%@AE@%) is given as the argument, all
  5859. breakpoints are removed.%@NL@%
  5860. %@NL@%
  5861. %@CR:MCV7200B@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5862. %@NL@%
  5863.      >BC 0 4 8%@NL@%
  5864.      >%@NL@%
  5865. %@NL@%
  5866. %@CR:MCV7200C@%%@4@%The example above removes breakpoints 0, 4, and 8.%@EH@%%@NL@%
  5867. %@NL@%
  5868.      >BC *%@NL@%
  5869.      >%@NL@%
  5870. %@NL@%
  5871. %@CR:MCV7200D@%%@4@%The example above removes all breakpoints.%@EH@%%@NL@%
  5872. %@NL@%
  5873. %@NL@%
  5874. %@CR:MCV73000@%%@2@%%@AB@%7.3  Breakpoint Disable Command%@AE@%%@EH@%%@NL@%
  5875. %@NL@%
  5876. %@CR:MCV73001@%%@4@%The Breakpoint Disable command (%@AB@%BD%@AE@%) temporarily disables one or more%@EH@%
  5877. existing breakpoints. The breakpoints are not deleted. They can be restored
  5878. at any time using the Breakpoint Enable command (%@AB@%BE%@AE@%).%@NL@%
  5879. %@NL@%
  5880. %@CR:MCV73002@%%@4@%When a breakpoint is disabled in window mode, it is shown in the display%@EH@%
  5881. window with normal text; when enabled, it is shown in high-intensity text.%@NL@%
  5882. %@NL@%
  5883. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5884. %@AI@%NOTE%@AE@%%@NL@%
  5885.    All disabled breakpoints are automatically enabled whenever you restart%@NL@%
  5886.    the program being debugged. The program can be restarted with the Start%@NL@%
  5887.    or Restart selection from the Run menu, or with the Restart dialog%@NL@%
  5888.    command%@AI@%(%@AE@%%@AI@%L%@AE@%%@AI@%). See%@AE@% Chapter 5%@BO:   3d63b@%, "Executing Code."%@NL@%
  5889. ───────────────────────────────────────────────────────────────────────────%@NL@%
  5890. %@NL@%
  5891. %@CR:MCV73003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5892. %@NL@%
  5893. %@CR:MCV73004@%%@4@%The Breakpoint Disable command cannot be executed with the mouse.%@EH@%%@NL@%
  5894. %@NL@%
  5895. %@CR:MCV73005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5896. %@NL@%
  5897. %@CR:MCV73006@%%@4@%The Breakpoint Disable command cannot be executed with a keyboard command.%@EH@%%@NL@%
  5898. %@NL@%
  5899. %@CR:MCV73007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5900. %@NL@%
  5901. %@CR:MCV73008@%%@4@%To disable breakpoints with a dialog command, enter a command line with the%@EH@%
  5902. following syntax:%@NL@%
  5903. %@NL@%
  5904.      %@AB@%BD%@AE@% %@AI@%list%@AE@%%@NL@%
  5905.      %@AB@%BD *%@NL@%
  5906. %@NL@%
  5907. %@CR:MCV73009@%%@4@%If %@AI@%list%@AE@% is specified, the command disables the breakpoints named in the%@EH@%
  5908. list. The %@AI@%list%@AE@% can be any combination of integer values from 0 to 19. Use
  5909. the Breakpoint List command (%@AB@%BL%@AE@%) if you need to see the numbers for each
  5910. existing breakpoint. If an asterisk (%@AB@%*%@AE@%) is given as the argument, all
  5911. breakpoints are disabled.%@NL@%
  5912. %@NL@%
  5913. %@CR:MCV7300A@%%@4@%The window commands for setting and clearing breakpoints can also be used to%@EH@%
  5914. enable or clear disabled breakpoints.%@NL@%
  5915. %@NL@%
  5916. %@CR:MCV7300B@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5917. %@NL@%
  5918.      >BD 0 4 8%@NL@%
  5919.      >%@NL@%
  5920. %@NL@%
  5921. %@CR:MCV7300C@%%@4@%The example above disables breakpoints 0, 4, and 8.%@EH@%%@NL@%
  5922. %@NL@%
  5923.      >BD *%@NL@%
  5924.      >%@NL@%
  5925. %@NL@%
  5926. %@CR:MCV7300D@%%@4@%The example above disables all breakpoints.%@EH@%%@NL@%
  5927. %@NL@%
  5928. %@NL@%
  5929. %@CR:MCV74000@%%@2@%%@AB@%7.4  Breakpoint Enable Command%@AE@%%@EH@%%@NL@%
  5930. %@NL@%
  5931. %@CR:MCV74001@%%@4@%The Breakpoint Enable command (%@AB@%BE%@AE@%) enables breakpoints that have been%@EH@%
  5932. temporarily disabled with the Breakpoint Disable command.%@NL@%
  5933. %@NL@%
  5934. %@CR:MCV74002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5935. %@NL@%
  5936. %@CR:MCV74003@%%@4@%To enable a disabled breakpoint with the mouse, point to the source line or%@EH@%
  5937. instruction of the breakpoint, and click Left. The line will be displayed in
  5938. high-intensity text, and will remain so until you remove or disable the
  5939. breakpoint. This is the same as creating a new breakpoint at that location.%@NL@%
  5940. %@NL@%
  5941. %@CR:MCV74004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5942. %@NL@%
  5943. %@CR:MCV74005@%%@4@%To enable a disabled breakpoint using a keyboard command, move the cursor to%@EH@%
  5944. the source line or instruction of the breakpoint, and press F9. The line is
  5945. displayed in high-intensity text and remains so until you remove or disable
  5946. the breakpoint. This is the same as creating a new breakpoint at that
  5947. location.%@NL@%
  5948. %@NL@%
  5949. %@CR:MCV74006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5950. %@NL@%
  5951. %@CR:MCV74007@%%@4@%To enable breakpoints using a dialog command, enter a command line with the%@EH@%
  5952. following syntax:%@NL@%
  5953. %@NL@%
  5954.      %@AB@%BE%@AE@% %@AI@%list%@AE@%%@NL@%
  5955.      %@AB@%BE *%@NL@%
  5956. %@NL@%
  5957. %@CR:MCV74008@%%@4@%If %@AI@%list%@AE@% is specified, the command enables the breakpoints named in the list.%@EH@%
  5958. The %@AI@%list%@AE@% can be any combination of integer values from 0 to 19. Use the
  5959. Breakpoint List command (%@AB@%BL%@AE@%) if you need to see the numbers for each
  5960. existing breakpoint. If an asterisk (%@AB@%*%@AE@%) is given as the argument, all
  5961. breakpoints are enabled. The CodeView debugger ignores all or part of the
  5962. command if you try to enable a breakpoint that is not disabled.%@NL@%
  5963. %@NL@%
  5964. %@CR:MCV74009@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  5965. %@NL@%
  5966.      >BE 0 4 8%@NL@%
  5967.      >%@NL@%
  5968. %@NL@%
  5969. %@CR:MCV7400A@%%@4@%The example above enables breakpoints 0, 4, and 8.%@EH@%%@NL@%
  5970. %@NL@%
  5971.      >BE*%@NL@%
  5972.      >%@NL@%
  5973. %@NL@%
  5974. %@CR:MCV7400B@%%@4@%The example above enables all disabled breakpoints.%@EH@%%@NL@%
  5975. %@NL@%
  5976. %@NL@%
  5977. %@CR:MCV75000@%%@2@%%@AB@%7.5  Breakpoint List Command%@AE@%%@EH@%%@NL@%
  5978. %@NL@%
  5979. %@CR:MCV75001@%%@4@%The Breakpoint List command (%@AB@%BL%@AE@%) lists current information about all%@EH@%
  5980. breakpoints.%@NL@%
  5981. %@NL@%
  5982. %@CR:MCV75002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  5983. %@NL@%
  5984. %@CR:MCV75003@%%@4@%The Breakpoint List command cannot be executed with the mouse.%@EH@%%@NL@%
  5985. %@NL@%
  5986. %@CR:MCV75004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  5987. %@NL@%
  5988. %@CR:MCV75005@%%@4@%The Breakpoint List command cannot be executed with a keyboard command.%@EH@%%@NL@%
  5989. %@NL@%
  5990. %@CR:MCV75006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  5991. %@NL@%
  5992. %@CR:MCV75007@%%@4@%To list breakpoints with a dialog command, enter a command line with the%@EH@%
  5993. following syntax:%@NL@%
  5994. %@NL@%
  5995.      %@AB@%BL%@AE@%%@NL@%
  5996. %@NL@%
  5997. %@CR:MCV75008@%%@4@%The command displays the breakpoint number, the enabled status (%@AS@%e%@AE@% for%@EH@%
  5998. "enabled," %@AS@%d%@AE@% for "disabled"), the address, the routine, and the line number.%@NL@%
  5999. %@NL@%
  6000. %@CR:MCV75009@%%@4@%If the breakpoint does not fall on a line number, an offset is shown from%@EH@%
  6001. the nearest previous line number. The pass count and break commands are
  6002. shown if they have been set. If no breakpoints are currently defined,
  6003. nothing is displayed.%@NL@%
  6004. %@NL@%
  6005. %@CR:MCV7500A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  6006. %@NL@%
  6007.      >BL%@NL@%
  6008.      0 e 56C4:0105  _ARCTAN:10%@NL@%
  6009.      1 d 56C4:011E  _ARCTAN:19             (pass = 10) "T;T"%@NL@%
  6010.      2 e 56C4:00FD  _ARCTAN:9+6%@NL@%
  6011.      >%@NL@%
  6012. %@NL@%
  6013. %@CR:MCV7500B@%%@4@%In the example above, breakpoint 0 is enabled at address %@AS@%56C4:0105%@AE@%. This%@EH@%
  6014. address is in routine %@AS@%ARCTAN%@AE@% and is at line %@AS@%10%@AE@% of the current source file.
  6015. No pass count or break commands have been set.%@NL@%
  6016. %@NL@%
  6017. %@CR:MCV7500C@%%@4@%Breakpoint 1 is currently disabled, as indicated by the %@AS@%d%@AE@% after the%@EH@%
  6018. breakpoint number. It also has a pass count of 10, meaning that the
  6019. breakpoint will not be taken until the 10th time it is encountered. The
  6020. command string at the end of the line indicates that each time the
  6021. breakpoint is taken, the Trace command will automatically be executed twice.%@NL@%
  6022. %@NL@%
  6023. %@CR:MCV7500D@%%@4@%The line number for breakpoint 2 has an offset. The address is six bytes%@EH@%
  6024. beyond the address for line 9 in the current source file. Therefore, the
  6025. breakpoint was probably set in assembly mode, since it would be difficult to
  6026. set a breakpoint anywhere except on a source line in source mode.%@NL@%
  6027. %@NL@%
  6028. %@NL@%
  6029. %@CR:MCV80000@%%@1@%%@AB@%Chapter 8  Managing Watch Statements%@AE@%%@EH@%%@NL@%
  6030. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6031. %@NL@%
  6032. %@CR:MCV80001@%%@4@%Watch Statement commands are among the Microsoft CodeView debugger's most%@EH@%
  6033. powerful features. They enable you to set, delete, and list watch
  6034. statements. Watch statements describe expressions or areas of memory to
  6035. watch. Some watch statements specify conditional breakpoints, which depend
  6036. upon the value of the expression or memory area.%@NL@%
  6037. %@NL@%
  6038. %@CR:MCV80002@%%@4@%Syntax for each CodeView command is always the same, regardless of the%@EH@%
  6039. expression evaluator; however, the method for specifying an %@AI@%argument%@AE@% may
  6040. vary with the language. Therefore, each example in this chapter is repeated
  6041. with C, FORTRAN, and BASIC arguments. The sample screens throughout the text
  6042. that present these examples feature BASIC. At the end of this chapter are C
  6043. and FORTRAN sample screens that incorporate all the previous examples
  6044. (except for Watch Delete and Watch List).%@NL@%
  6045. %@NL@%
  6046. %@NL@%
  6047. %@CR:MCV81000@%%@2@%%@AB@%8.1  Watch Statement Commands%@AE@%%@EH@%%@NL@%
  6048. %@NL@%
  6049. %@CR:MCV81001@%%@4@%The Watch Statement commands are summarized below:%@EH@%%@NL@%
  6050. %@NL@%
  6051. %@CR:MCV81002@%%@AB@%Command                     Action%@AE@%%@NL@%
  6052. %@NL@%
  6053. Watch (%@AB@%W%@AE@%)                   Sets an expression or range of memory to be%@NL@%
  6054.                             watched%@NL@%
  6055. %@NL@%
  6056. Watchpoint (%@AB@%WP%@AE@%)             Sets a conditional breakpoint that will be taken%@NL@%
  6057.                             when the expression becomes nonzero (true)%@NL@%
  6058. %@NL@%
  6059. Tracepoint (%@AB@%TP%@AE@%)             Sets a conditional breakpoint that will be taken%@NL@%
  6060.                             when a given expression or range of memory%@NL@%
  6061.                             changes%@NL@%
  6062. %@NL@%
  6063. Watch Delete (%@AB@%Y%@AE@%)            Deletes one or more watch statements%@NL@%
  6064. %@NL@%
  6065. Watch List (%@AB@%W%@AE@%)              Lists current watch statements%@NL@%
  6066. %@NL@%
  6067. %@CR:MCV81003@%%@4@%Watch statements, like breakpoints, remain in memory until you specifically%@EH@%
  6068. remove them or quit the CodeView debugger. They are not canceled when you
  6069. restart the program being debugged. Therefore, you can set a complicated
  6070. series of watch statements once and then execute through the program several
  6071. times without resetting.%@NL@%
  6072. %@NL@%
  6073. %@CR:MCV81004@%%@4@%In window mode, Watch Statement commands can be entered either in the dialog%@EH@%
  6074. window or with menu selections. Current watch statements are shown in a
  6075. watch window that appears between the menu bar and the source window.%@NL@%
  6076. %@NL@%
  6077. %@CR:MCV81005@%%@4@%In sequential mode, the Watch, Tracepoint, and Watchpoint commands can be%@EH@%
  6078. used, but since there is no watch window, you cannot see the watch
  6079. statements and their values. You must use the Watch List command to examine
  6080. the current watch statements.%@NL@%
  6081. %@NL@%
  6082. %@CR:MCV81006@%%@4@%To set a watch statement containing a local variable, you must be in the%@EH@%
  6083. function where the variable is defined. If the current line is not in the
  6084. function, the CodeView debugger displays the message %@AS@%UNKNOWN SYMBOL%@AE@%. When
  6085. you exit from a function containing a local variable referenced in a watch
  6086. statement, the value of the statement is displayed as %@AS@%UNKNOWN%@AE@% %@AS@%SYMBOL%@AE@%. When
  6087. you reenter the function, the local variable will again have a value. With
  6088. the C and FORTRAN expression evaluators, you can avoid this limitation by
  6089. using the period operator to specify both the function and the variable. For
  6090. example, enter %@AS@%main.x%@AE@% instead of just %@AS@%x%@AE@%.%@NL@%
  6091. %@NL@%
  6092. %@NL@%
  6093. %@CR:MCV82000@%%@2@%%@AB@%8.2  Setting Watch-Expression and Watch-Memory Statements%@AE@%%@EH@%%@NL@%
  6094. %@NL@%
  6095. %@CR:MCV82001@%%@4@%The Watch command is used to set a watch statement that specifies an%@EH@%
  6096. expression (watch-expression statement) or a range of addresses in memory
  6097. (watch-memory statement). The value or values specified by this watch
  6098. statement are shown in the watch window. The watch window is updated to show
  6099. new values each time the value of the watch statement changes during program
  6100. execution. Since the watch window does not exist in sequential mode, you
  6101. must use the Watch List command to examine the values of watch statements.%@NL@%
  6102. %@NL@%
  6103. %@CR:MCV82002@%%@4@%When setting a watch expression, you can specify the format in which the%@EH@%
  6104. value will be displayed. Type the expression followed by a comma and a
  6105. format specifier. If you do not give a format specifier, the CodeView
  6106. debugger displays the value in a default format. See Section 6.1%@BO:   44676@%, "Display
  6107. Expression Command," for more information about type specifiers and the
  6108. default format.%@NL@%
  6109. %@NL@%
  6110. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6111. %@AI@%NOTE%@AE@%%@NL@%
  6112.    If your program directly accesses absolute addresses used by IBM or%@NL@%
  6113.    IBM-compatible computers, you may sometimes get unexpected results with%@NL@%
  6114.    the Display Expression and Dump commands. However, the Watch command will%@NL@%
  6115.    usually show the correct values. This problem can arise if the CodeView%@NL@%
  6116.    debugger and your program begin to use the same memory location.%@NL@%
  6117.    The problem often occurs when a program reads data directly from the%@NL@%
  6118.    screen buffer of the display adapter. If you have an array called %@AS@%screen%@AE@%%@NL@%
  6119.    that is initialized to the starting address of the screen buffer, the%@NL@%
  6120.    command %@AS@%DB screen L 16%@AE@% will display data from the CodeView display rather%@NL@%
  6121.    than from the display of the program you are debugging. The command %@AS@%WB%@AE@%%@NL@%
  6122.    %@AS@%screen L 16%@AE@% will display data from the program's display (provided screen%@NL@%
  6123.    swapping or screen flipping was specified at start-up). The Watch command%@NL@%
  6124.    behaves differently from the Dump command because watch-statement values%@NL@%
  6125.    are updated during program execution, and any values read from the screen%@NL@%
  6126.    buffer will be taken from the output screen rather than from the%@NL@%
  6127.    debugging screen.%@NL@%
  6128. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6129. %@NL@%
  6130. %@CR:MCV82003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6131. %@NL@%
  6132. %@CR:MCV82004@%%@4@%To set a watch-expression statement using the mouse, point to Watch on the%@EH@%
  6133. menu bar, press a mouse button and drag the highlight down to the Add Watch
  6134. selection, and then release the button. A dialog box appears, asking for the
  6135. expression to be watched. Type the expression and press the ENTER key or a
  6136. mouse button.%@NL@%
  6137. %@NL@%
  6138. %@CR:MCV82005@%%@4@%You cannot use the mouse version of the command to specify a range of memory%@EH@%
  6139. to be watched, as you can with the dialog version.%@NL@%
  6140. %@NL@%
  6141. %@CR:MCV82006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6142. %@NL@%
  6143. %@CR:MCV82007@%%@4@%To set a watch-expression statement with a keyboard command, press ALT+W to%@EH@%
  6144. open the Watch menu, and then type %@AB@%A%@AE@% (uppercase or lowercase) to select Add
  6145. Watch. You can also select the Add Watch command directly by pressing
  6146. CONTROL+W. A dialog box appears, asking for the expression to be watched.
  6147. Type the expression and press the ENTER key.%@NL@%
  6148. %@NL@%
  6149. %@CR:MCV82008@%%@4@%You cannot use the keyboard version of the command to specify a range of%@EH@%
  6150. memory to be watched, as you can with the dialog version.%@NL@%
  6151. %@NL@%
  6152. %@CR:MCV82009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6153. %@NL@%
  6154. %@CR:MCV8200A@%%@4@%To set a watch-expression statement with a dialog command, enter a command%@EH@%
  6155. line with the following syntax:%@NL@%
  6156. %@NL@%
  6157.      %@AB@%W?%@AE@% %@AI@%expression%@AE@%«%@AB@%,%@AE@%%@AI@%format%@AE@%»%@NL@%
  6158. %@NL@%
  6159. %@CR:MCV8200B@%%@4@%To set a watch-memory command with a dialog command, enter a command line%@EH@%
  6160. with the following syntax:%@NL@%
  6161. %@NL@%
  6162.      %@AB@%W%@AE@%«%@AI@%type%@AE@%» %@AI@%range%@AE@%%@NL@%
  6163. %@NL@%
  6164. %@CR:MCV8200C@%%@4@%An %@AI@%expression%@AE@% used with the Watch command can be either a simple variable or%@EH@%
  6165. a complex expression using several variables and operators. The expression
  6166. should be no longer than the width of the watch window. The characters
  6167. permitted for %@AI@%format%@AE@% correspond to format arguments used in a C %@AB@%printf%@AE@%
  6168. function call. See Section 6.1%@BO:   44676@%, "Display Expression Command," for more
  6169. information on format arguments.%@NL@%
  6170. %@NL@%
  6171. %@CR:MCV8200D@%%@4@%When watching a memory location, %@AI@%type%@AE@% is a one-letter size specifier from%@EH@%
  6172. the following list:%@NL@%
  6173. %@NL@%
  6174. %@CR:MCV8200E@%%@AB@%Specifier                   Size%@AE@%     %@NL@%
  6175. %@NL@%
  6176. None                        Default type%@NL@%
  6177. %@NL@%
  6178. %@AB@%B%@AE@%                           Byte%@NL@%
  6179. %@NL@%
  6180. %@AB@%A%@AE@%                           ASCII%@NL@%
  6181. %@NL@%
  6182. %@AB@%I%@AE@%                           Integer (signed decimal word)%@NL@%
  6183. %@NL@%
  6184. %@AB@%U%@AE@%                           Unsigned (unsigned decimal word)%@NL@%
  6185. %@NL@%
  6186. %@AB@%WP%@AE@%                          Word%@NL@%
  6187. %@NL@%
  6188. %@AB@%D%@AE@%                           Double word%@NL@%
  6189. %@NL@%
  6190. %@AB@%S%@AE@%                           Short real%@NL@%
  6191. %@NL@%
  6192. %@AB@%L%@AE@%                           Long real%@NL@%
  6193. %@NL@%
  6194. %@AB@%T%@AE@%                           10-byte real%@NL@%
  6195. %@NL@%
  6196. %@CR:MCV8200F@%%@4@%If no type size is specified, the default type used is the last type used by%@EH@%
  6197. a Dump, Enter, Watch Memory, or Tracepoint Memory command. If none of these
  6198. commands has been used during the session, the default type is byte.%@NL@%
  6199. %@NL@%
  6200. %@CR:MCV8200G@%%@4@%The data will be displayed in a format similar to that used by the Dump%@EH@%
  6201. commands (see Section 6.1%@BO:   44676@%, "Display Expression Command," for more
  6202. information on format arguments). The %@AI@%range%@AE@% can be any length, but only one
  6203. line of data will be displayed in the watch window. If you do not specify an
  6204. ending address for the range, the default range is one object.%@NL@%
  6205. %@NL@%
  6206. %@CR:MCV8200H@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6207. %@NL@%
  6208. %@CR:MCV8200I@%%@4@%The following three examples display watch statements in the watch window.%@EH@%%@NL@%
  6209. %@NL@%
  6210.      W? n%@NL@%
  6211. %@NL@%
  6212. %@CR:MCV8200J@%%@4@%The example above displays the current value of the variable %@AS@%n%@AE@%.%@EH@%%@NL@%
  6213. %@NL@%
  6214.      W? higher * 100%@NL@%
  6215. %@NL@%
  6216. %@CR:MCV8200K@%%@4@%The example above displays the value of the expression %@AS@%higher%@AE@%%@AS@%* 100%@AE@%.%@EH@%%@NL@%
  6217. %@NL@%
  6218.      WL chance%@NL@%
  6219. %@NL@%
  6220. %@CR:MCV8200L@%%@4@%The example above displays the value of %@AS@%chance%@AE@%,  a double-precision%@EH@%
  6221. floating-point variable. Exactly how %@AS@%chance%@AE@% is stored in memory is shown
  6222. first. (The command %@AS@%W? chance%@AE@% would display the value of %@AS@%chance%@AE@% but not any
  6223. actual bytes of memory.)%@NL@%
  6224. %@NL@%
  6225. %@CR:MCV8200M@%%@4@%These commands, entered while debugging a BASIC program, produce the watch%@EH@%
  6226. window in Figure 8.1%@FN@%
  6227. Figure 8.1 is found on page 145 of the printed version.%@EF@%. Corresponding C and FORTRAN examples are included with
  6228. other commands in language-specific sections at the end of the chapter.%@AB@%%@NL@%
  6229. %@NL@%
  6230. %@NL@%
  6231. %@CR:MCV83000@%%@2@%%@AB@%8.3  Setting Watchpoints%@AE@%%@EH@%%@NL@%
  6232. %@NL@%
  6233. %@CR:MCV83001@%%@4@%The Watchpoint command is used to set a conditional breakpoint called a%@EH@%
  6234. watchpoint. A watchpoint breaks program execution when the expression
  6235. described by its watch statement becomes true. You can think of watchpoints
  6236. as "break when" points, since the break occurs when the specified expression
  6237. becomes true (nonzero).%@NL@%
  6238. %@NL@%
  6239. %@CR:MCV83002@%%@4@%A watch statement created by the Watchpoint command describes the expression%@EH@%
  6240. that will be watched and compared to 0. The statement remains in memory
  6241. until you delete it or quit the CodeView debugger. Any valid CodeView
  6242. expression can be used as the watchpoint expression as long as the
  6243. expression is not wider than the watch window.%@NL@%
  6244. %@NL@%
  6245. %@CR:MCV83003@%%@4@%In window mode, watchpoint statements and their values are displayed in%@EH@%
  6246. high-intensity text in the watch window. In sequential mode, there is no
  6247. watch window, so the values of watchpoint statements can only be displayed
  6248. with the Watch List command (see Section 8.6%@BO:   63917@% "Listing Watchpoints and
  6249. Tracepoints," for more information).%@NL@%
  6250. %@NL@%
  6251. %@CR:MCV83004@%%@4@%Although watchpoints can be any valid CodeView expression, the command works%@EH@%
  6252. best with expressions that use the relational operators (such as %@AB@%<%@AE@% and %@AB@%>%@AE@% for
  6253. C and BASIC, or %@AB@%.LT.%@AE@% and %@AB@%.GT.%@AE@% for FORTRAN). Relational expressions always
  6254. evaluate to false (zero) or true (nonzero). Care must be taken with other
  6255. kinds of expressions when they are used as watchpoints, because the
  6256. watchpoints will break execution whenever they do not equal precisely zero.
  6257. For example, your program might use a loop variable  I, which ranges from 1
  6258. to 100. If you entered %@AS@%I%@AE@% as a watchpoint, then it would always suspend
  6259. program execution, since %@AS@%I%@AE@% is never equal to 0. However, the relational
  6260. expression %@AS@%I>90%@AE@% (or %@AS@%I.GT.90%@AE@%) would not suspend program execution until %@AS@%I%@AE@%
  6261. exceeded 90.%@NL@%
  6262. %@NL@%
  6263. %@CR:MCV83005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6264. %@NL@%
  6265. %@CR:MCV83006@%%@4@%To set a watchpoint statement with the mouse, point to Watch on the menu%@EH@%
  6266. bar, press a mouse button and drag the highlight down to the Watchpoint
  6267. selection, and then release the button. A dialog box appears, asking for the
  6268. expression to be watched. Type the expression and press the ENTER key or a
  6269. mouse button.%@NL@%
  6270. %@NL@%
  6271. %@CR:MCV83007@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6272. %@NL@%
  6273. %@CR:MCV83008@%%@4@%To execute the Watchpoint command with a keyboard command, press ALT+W to%@EH@%
  6274. open the Watch menu, and then press ALT+W to select Watchpoint. A dialog box
  6275. appears, asking for the expression to be watched. Type the expression and
  6276. press the ENTER key.%@NL@%
  6277. %@NL@%
  6278. %@CR:MCV83009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6279. %@NL@%
  6280. %@CR:MCV8300A@%%@4@%To set a watchpoint using a dialog command, enter a command line with the%@EH@%
  6281. following syntax:%@NL@%
  6282. %@NL@%
  6283.      %@AB@%WP?%@AE@% %@AI@%expression%@AE@%«%@AB@%,%@AE@%%@AI@%format%@AE@%»%@NL@%
  6284. %@NL@%
  6285. %@CR:MCV8300B@%%@4@%The %@AI@%expression%@AE@% can be any valid CodeView expression (usually a relational%@EH@%
  6286. expression). You can enter a format specifier, but there is little reason to
  6287. do so, since the expression value is normally either 1 or 0.%@NL@%
  6288. %@NL@%
  6289. %@CR:MCV8300C@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6290. %@NL@%
  6291. %@CR:MCV8300D@%%@4@%The following dialog commands display two watch statements (watchpoints) in%@EH@%
  6292. the watch window:%@NL@%
  6293. %@NL@%
  6294.      WP? higher > chance      %@AI@%;* BASIC/C%@AE@%%@NL@%
  6295.      WP? higher .gt. chance   %@AI@%;* FORTRAN example%@AE@%%@NL@%
  6296. %@NL@%
  6297. %@CR:MCV8300E@%%@4@%The examples above instruct the CodeView debugger to break execution when%@EH@%
  6298. the variable %@AS@%higher%@AE@% is greater than the variable %@AS@%chance%@AE@%. (Note that BASIC
  6299. and C happen to use the same syntax in this case, but FORTRAN uses its own.)
  6300. After setting this watchpoint, you could use the Go command to execute until
  6301. the condition becomes true.%@NL@%
  6302. %@NL@%
  6303.      WP? n=7 or n=11           %@AI@%;* BASIC example%@AE@%%@NL@%
  6304.      WP? n==7 || n==11         %@AI@%;* C example%@AE@%%@NL@%
  6305.      WP? n.eq.7 .or. n.eq.11   %@AI@%;* FORTRAN example%@AE@%%@NL@%
  6306. %@NL@%
  6307. %@CR:MCV8300F@%%@4@%The examples above instruct the CodeView debugger to break execution when%@EH@%
  6308. the variable %@AS@%n%@AE@% is equal to 7 or 11.%@NL@%
  6309. %@NL@%
  6310. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6311. %@AI@%NOTE%@AE@%%@NL@%
  6312.    BASIC and C will each display a numerical result in response to a Boolean%@NL@%
  6313.    expression (0 being equivalent to false, nonzero to true). However, the%@NL@%
  6314.    corresponding FORTRAN condition will be displayed with either .TRUE. or%@NL@%
  6315.    .FALSE. in the watch window.%@NL@%
  6316. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6317. %@NL@%
  6318. %@CR:MCV8300G@%%@4@%These commands, entered while debugging a BASIC program, produce the watch%@EH@%
  6319. window shown in Figure 8.2%@FN@%
  6320. Figure 8.2 is found on page 148 of the printed version.%@EF@%. Corresponding C and FORTRAN examples are
  6321. included with other commands, at the end of the chapter.%@NL@%
  6322. %@NL@%
  6323. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6324. %@AI@%NOTE%@AE@%%@NL@%
  6325.    Setting watchpoints significantly slows execution of the program being%@NL@%
  6326.    debugged. The CodeView debugger checks if the expression is true each%@NL@%
  6327.    time a source line is executed in source mode, or each time an%@NL@%
  6328.    instruction is executed in assembly mode. Be careful when setting%@NL@%
  6329.    watchpoints near large or nested loops. A loop that executes almost%@NL@%
  6330.    instantly when run from MS-DOS can take many minutes if executed from%@NL@%
  6331.    within the debugger with several watchpoints set.%@NL@%
  6332. %@NL@%
  6333.    Tracepoints do not slow CodeView execution as much as watchpoints, so you%@NL@%
  6334.    should use tracepoints when possible. For example, although you can set a%@NL@%
  6335.    watchpoint on a Boolean variable (%@AS@%WP? moving%@AE@%), a trace-point on the same%@NL@%
  6336.    variable (%@AS@%TP?moving%@AE@%) has essentially the same effect and does not slow%@NL@%
  6337.    execution as much.%@NL@%
  6338. %@NL@%
  6339.    If you enter a seemingly endless loop, press CONTROL+BREAK or CONTROL+C%@NL@%
  6340.    to exit. You will soon learn the size of loop you can safely execute when%@NL@%
  6341.    watchpoints are set.%@NL@%
  6342. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6343. %@NL@%
  6344. %@NL@%
  6345. %@CR:MCV84000@%%@2@%%@AB@%8.4  Setting Tracepoints%@AE@%%@EH@%%@NL@%
  6346. %@NL@%
  6347. %@CR:MCV84001@%%@4@%The Tracepoint command is used to set a conditional breakpoint called a%@EH@%
  6348. tracepoint. A tracepoint breaks program execution when the value of a
  6349. specified expression or range of memory changes.%@NL@%
  6350. %@NL@%
  6351. %@CR:MCV84002@%%@4@%The watch statement created by the Tracepoint command describes the%@EH@%
  6352. expression or memory range to be watched and tested for change. The
  6353. statement remains in memory until you delete it or quit the CodeView
  6354. debugger.%@NL@%
  6355. %@NL@%
  6356. %@CR:MCV84003@%%@4@%In window mode, tracepoint statements and their values are shown in%@EH@%
  6357. high-intensity text in the watch window. In sequential mode, there is no
  6358. watch window, so the values of tracepoint statements can only be displayed
  6359. with the Watch List command (see Section 8.5%@BO:   62b98@%, "Listing Watchpoints and
  6360. Tracepoints," for more information).%@NL@%
  6361. %@NL@%
  6362. %@CR:MCV84004@%%@4@%An expression used with the Tracepoint command must evaluate to an "lvalue."%@EH@%
  6363. In other words, the expression must refer to an area of memory rather than a
  6364. constant. Furthermore, the area of memory must be not more than 128 bytes in
  6365. size. For example, %@AS@%i==10%@AE@% (which is similar to %@AS@%I.EQ.10%@AE@% in FORTRAN and %@AS@%I=10%@AE@%
  6366. in BASIC) would be invalid because it is either 1 (true) or 0 (false) rather
  6367. than a value stored in memory. The expression %@AS@%sym1+sym2%@AE@% is invalid because
  6368. it is the calculated sum of the value of two memory locations. The
  6369. expression %@AS@%buffer%@AE@% would be invalid if %@AS@%buffer%@AE@% is an array of 130 bytes, but
  6370. valid if the array is 120 bytes. (However, using array names this way is not
  6371. valid with BASIC modules because BASIC uses array descriptors.) Note that if
  6372. %@AS@%buffer%@AE@% is declared as an array of 64 bytes, then the Tracepoint command
  6373. given with the expression %@AS@%buffer%@AE@% checks all 64 bytes of the array. The same
  6374. command given with the C expression %@AS@%buffer[32]%@AE@%, or %@AS@%BUFFER(33)%@AE@% in FORTRAN or
  6375. BASIC, means that only one byte (the 33rd) will be checked. (Note that C and
  6376. FORTRAN index the same element differently.)%@NL@%
  6377. %@NL@%
  6378. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6379. %@AI@%NOTE%@AE@%%@NL@%
  6380.    The following is relevant only to C programs.%@NL@%
  6381. %@NL@%
  6382.    Register variables are not considered values. Therefore, if %@AS@%i%@AE@% is declared%@NL@%
  6383.    as %@AS@%register int i%@AE@%, the command %@AS@%TP?%@AE@%%@AS@%i%@AE@% is invalid. However, you can still%@NL@%
  6384.    check for changes in the value of %@AS@%i%@AE@%. Use the Examine Symbols command to%@NL@%
  6385.    learn which register contains the value of %@AS@%i%@AE@% .%@NL@%
  6386. %@NL@%
  6387.    Then learn the value of %@AS@%i%@AE@%. Finally, set up a watchpoint to test the%@NL@%
  6388.    value. For example, use the following sequence of commands:%@NL@%
  6389. %@NL@%
  6390.      >X? i%@NL@%
  6391.      3A79:0264 int              div()%@NL@%
  6392.                  SI        int              i%@NL@%
  6393.      >?i%@NL@%
  6394.      10%@NL@%
  6395.      >WP? @SI%@AI@%!=10%@AE@%%@NL@%
  6396.      >%@NL@%
  6397. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6398. %@NL@%
  6399. %@CR:MCV84005@%%@4@%When setting a tracepoint expression, you can specify the format in which%@EH@%
  6400. the value will be displayed. Type the expression followed by a comma and a
  6401. type specifier. If you do not give a type specifier, the CodeView debugger
  6402. displays the value in a default format. See Section 6.1%@BO:   44676@%,"Display Expression
  6403. Command," for more information about type specifiers and the default format.%@NL@%
  6404. %@NL@%
  6405. %@CR:MCV84006@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6406. %@NL@%
  6407. %@CR:MCV84007@%%@4@%To set a tracepoint-expression statement with the mouse, point to Watch on%@EH@%
  6408. the menu bar, press a mouse button and drag the highlight down to the
  6409. Tracepoint selection, and then release the button. A dialog box appears,
  6410. asking for the expression to be watched. Type the expression, and press the
  6411. ENTER key or a mouse button.%@NL@%
  6412. %@NL@%
  6413. %@CR:MCV84008@%%@4@%You cannot specify a range of memory to be watched with the mouse version of%@EH@%
  6414. the command, as you can with the dialog version.%@NL@%
  6415. %@NL@%
  6416. %@CR:MCV84009@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6417. %@NL@%
  6418. %@CR:MCV8400A@%%@4@%To set a tracepoint-expression statement with a keyboard command, press%@EH@%
  6419. ALT+W to open the Watch menu, and then press ALT+T to select Tracepoint. A
  6420. dialog box appears, asking for the expression to be watched. Type the
  6421. expression and press the ENTER key.%@NL@%
  6422. %@NL@%
  6423. %@CR:MCV8400B@%%@4@%You cannot use the keyboard version of the command to specify a range of%@EH@%
  6424. memory to be watched, as you can with the dialog version.%@NL@%
  6425. %@NL@%
  6426. %@CR:MCV8400C@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6427. %@NL@%
  6428. %@CR:MCV8400D@%%@4@%To set a tracepoint with a dialog command, enter a command line with one of%@EH@%
  6429. the following forms of syntax:%@NL@%
  6430. %@NL@%
  6431.      %@AB@%TP?%@AE@% %@AI@%expression%@AE@%,«%@AI@%format%@AE@%»%@NL@%
  6432.      %@AB@%TP%@AE@%«%@AI@%type%@AE@%» %@AI@%range%@AE@%%@NL@%
  6433. %@NL@%
  6434. %@CR:MCV8400E@%%@4@%The first syntax line above sets a tracepoint expression; the second line%@EH@%
  6435. sets a tracepoint memory.%@NL@%
  6436. %@NL@%
  6437. %@CR:MCV8400F@%%@4@%An %@AI@%expression%@AE@% used with the Tracepoint command can be either a simple%@EH@%
  6438. variable or a complex expression using several variables and operators. The
  6439. expression should not be longer than the width of the watch window. You can
  6440. specify %@AI@%format%@AE@% using a C %@AB@%printf%@AE@% type specifier if you do not want the value
  6441. to be displayed in the default format (decimal for integers or floating
  6442. point for real numbers). See Section 6.1%@BO:   44676@%, "Display Expression Command," for
  6443. more information on format arguments.%@NL@%
  6444. %@NL@%
  6445. %@CR:MCV8400G@%%@4@%In the memory-tracepoint form, %@AI@%range%@AE@% must be a valid address range and %@AI@%type%@AE@%%@EH@%
  6446. must be a one-letter memory-size specifier. If you specify only the start of
  6447. the range, the CodeView debugger displays one object as the default.%@NL@%
  6448. %@NL@%
  6449. %@CR:MCV8400H@%%@4@%Although no more than one line of data will be displayed in the watch%@EH@%
  6450. window, the range to be checked for change can be any size up to 128 bytes.%@NL@%
  6451. %@NL@%
  6452. %@CR:MCV8400I@%%@4@%The data will be displayed in the format used by the Dump commands (see%@EH@%
  6453. Section 6.1%@BO:   44676@%, "Display Expression Command," for more information on format
  6454. arguments). The valid memory-size specifiers are listed below:%@NL@%
  6455. %@NL@%
  6456. %@CR:MCV8400J@%%@AB@%Specifier                   Size%@AE@%     %@NL@%
  6457. %@NL@%
  6458. None                        Default type%@NL@%
  6459. %@NL@%
  6460. %@AB@%B%@AE@%                           Byte%@NL@%
  6461. %@NL@%
  6462. %@AB@%A%@AE@%                           ASCII%@NL@%
  6463. %@NL@%
  6464. %@AB@%I%@AE@%                           Integer (signed decimal word)%@NL@%
  6465. %@NL@%
  6466. %@AB@%U%@AE@%                           Unsigned (unsigned decimal word)%@NL@%
  6467. %@NL@%
  6468. %@AB@%WP%@AE@%                          Word%@NL@%
  6469. %@NL@%
  6470. %@AB@%D%@AE@%                           Double word%@NL@%
  6471. %@NL@%
  6472. %@AB@%S%@AE@%                           Short real%@NL@%
  6473. %@NL@%
  6474. %@AB@%L%@AE@%                           Long real%@NL@%
  6475. %@NL@%
  6476. %@AB@%T%@AE@%                           10-byte real%@NL@%
  6477. %@NL@%
  6478. %@CR:MCV8400K@%%@4@%The default type used if no type size is specified is the last type used by%@EH@%
  6479. a Dump, Enter, Watch Memory, or Tracepoint Memory command. If none of these
  6480. commands has been used during the session, the default type is byte.%@NL@%
  6481. %@NL@%
  6482. %@CR:MCV8400L@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6483. %@NL@%
  6484. %@CR:MCV8400M@%%@4@%The two dialog commands below display watch statements (tracepoints) in the%@EH@%
  6485. watch window.%@NL@%
  6486. %@NL@%
  6487.      TP? sum%@NL@%
  6488. %@NL@%
  6489. %@CR:MCV8400N@%%@4@%The example above instructs the CodeView debugger to suspend program%@EH@%
  6490. execution whenever the value of the variable %@AS@%sum%@AE@% changes.%@NL@%
  6491. %@NL@%
  6492.      TPB n%@NL@%
  6493. %@NL@%
  6494. %@CR:MCV8400O@%%@4@%The example above instructs the CodeView debugger to suspend program%@EH@%
  6495. execution whenever the first byte at the address of %@AS@%n%@AE@% changes; the address
  6496. of this byte and its contents are displayed. The value of %@AS@%n%@AE@% may change
  6497. because of a change in the %@AI@%second%@AE@% byte at the address of %@AS@%n%@AE@%; but that change
  6498. (by itself) would have no effect on this tracepoint.%@NL@%
  6499. %@NL@%
  6500. %@CR:MCV8400P@%%@4@%These commands, entered while debugging a BASIC program, produce the watch%@EH@%
  6501. window in Figure 8.3%@FN@%
  6502. Figure 8.3 is found on page 152 of the printed version.%@EF@%. Corresponding C and FORTRAN examples are included,
  6503. with other commands, at the end of the chapter.%@NL@%
  6504. %@NL@%
  6505. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6506. %@AI@%NOTE%@AE@%%@NL@%
  6507.    Setting tracepoints significantly slows execution of the program being%@NL@%
  6508.    debugged. The CodeView debugger has to check to see if the expression or%@NL@%
  6509.    memory range has changed each time a source line is executed in source%@NL@%
  6510.    mode or each time an instruction is executed in assembly mode. However,%@NL@%
  6511.    tracepoints do not slow execution as much as do watchpoints.%@NL@%
  6512. %@NL@%
  6513.    Be careful when setting tracepoints near large or nested loops. A loop%@NL@%
  6514.    that executes almost instantly when run from the MS-DOS operating system%@NL@%
  6515.    can take many minutes if executed from within the debugger with several%@NL@%
  6516.    tracepoints set. If you enter a seemingly endless loop, press%@NL@%
  6517.    CONTROL+BREAK or CONTROL+C to exit. Often you can tell how far you went%@NL@%
  6518.    in the loop by the value of the tracepoint when you exited.%@NL@%
  6519. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6520. %@NL@%
  6521. %@NL@%
  6522. %@CR:MCV85000@%%@2@%%@AB@%8.5  Deleting Watch Statements%@AE@%%@EH@%%@NL@%
  6523. %@NL@%
  6524. %@CR:MCV85001@%%@4@%The Watch Delete command enables you to delete watch statements that were%@EH@%
  6525. set previously with the Watch, Watchpoint, or Tracepoint command.%@NL@%
  6526. %@NL@%
  6527. %@CR:MCV85002@%%@4@%When you delete a watch statement in window mode, the statement disappears%@EH@%
  6528. and the watch window closes around it. For example, if there are three watch
  6529. statements in the window and you delete statement 1, the window is redrawn
  6530. with one less line. Statement 0 remains unchanged, but statement 2 becomes
  6531. statement 1. If there is only one statement, the window disappears.%@NL@%
  6532. %@NL@%
  6533. %@CR:MCV85003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6534. %@NL@%
  6535. %@CR:MCV85004@%%@4@%To delete a watch statement with the mouse, point to Watch on the menu bar,%@EH@%
  6536. press a mouse button and drag the highlight down to the Delete Watch
  6537. selection, and then release the button. A dialog box appears, containing all
  6538. the watch statements. Point to the statement you want to delete and press
  6539. the ENTER key or a mouse button. The dialog box disappears, and the watch
  6540. window is redrawn without the watch statement.%@NL@%
  6541. %@NL@%
  6542. %@CR:MCV85005@%%@4@%You can also delete all the statements in the watch window at once, simply%@EH@%
  6543. by selecting the Delete All selection.%@NL@%
  6544. %@NL@%
  6545. %@CR:MCV85006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6546. %@NL@%
  6547. %@CR:MCV85007@%%@4@%To execute the Delete Watch command with a keyboard command, press ALT+W to%@EH@%
  6548. open the Watch menu, and then type %@AB@%D%@AE@% (uppercase or lowercase) to select
  6549. Delete Watch. You can also select the Delete Watch command directly by
  6550. pressing CONTROL+U. A dialog box appears, containing all the watch
  6551. statements. Use the UP and DOWN keys to move the cursor to the statement
  6552. you want to delete, and then press the ENTER key. The dialog box disappears,
  6553. and the watch window is redrawn without the watch statement.%@NL@%
  6554. %@NL@%
  6555. %@CR:MCV85008@%%@4@%You can also delete all the statements in the watch window at once, simply%@EH@%
  6556. by selecting the Delete All selection. Do this by pressing %@AB@%L%@AE@% (upppercase or
  6557. lowercase) after the Watch menu is open.%@NL@%
  6558. %@NL@%
  6559. %@CR:MCV85009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6560. %@NL@%
  6561. %@CR:MCV8500A@%%@4@%To delete watch statements with a dialog command, enter a command line with%@EH@%
  6562. the following syntax:%@NL@%
  6563. %@NL@%
  6564.      %@AB@%Y%@AE@% %@AI@%number%@AE@%%@NL@%
  6565. %@NL@%
  6566. %@CR:MCV8500B@%%@4@%When you set a watch statement, it is automatically assigned a number%@EH@%
  6567. (starting with 0). In window mode, the number appears to the left of the
  6568. watch statement in the watch window. In sequential mode, you can use the
  6569. Watch List (%@AB@%W%@AE@%) command to view the numbers of current watch statements.%@NL@%
  6570. %@NL@%
  6571. %@CR:MCV8500C@%%@4@%You can delete existing watch statements by specifying the %@AI@%number%@AE@% of the%@EH@%
  6572. statement you want to delete with the Delete Watch command. (The %@AB@%Y%@AE@% is a
  6573. mnemonic for "yank.")%@NL@%
  6574. %@NL@%
  6575. %@CR:MCV8500D@%%@4@%You can use the asterisk (%@AB@%*%@AE@%) to represent all watch statements.%@EH@%%@NL@%
  6576. %@NL@%
  6577. %@CR:MCV8500E@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6578. %@NL@%
  6579.      >Y 2%@NL@%
  6580.      >%@NL@%
  6581. %@NL@%
  6582. %@CR:MCV8500F@%%@4@%The command above deletes watch statement 2.%@EH@%%@NL@%
  6583. %@NL@%
  6584.      >Y *%@NL@%
  6585.      >%@NL@%
  6586. %@NL@%
  6587. %@CR:MCV8500G@%%@4@%The command above deletes all watch statements and closes the watch window.%@EH@%%@NL@%
  6588. %@NL@%
  6589. %@NL@%
  6590. %@CR:MCV86000@%%@2@%%@AB@%8.6  Listing Watchpoints and Tracepoints%@AE@%%@EH@%%@NL@%
  6591. %@NL@%
  6592. %@CR:MCV86001@%%@4@%The Watch List command lists all previously set watchpoints and tracepoints%@EH@%
  6593. with their assigned numbers and their current values.%@NL@%
  6594. %@NL@%
  6595. %@CR:MCV86002@%%@4@%This command is the only way to examine current watch statements in%@EH@%
  6596. sequential mode. The command has little use in window mode, since watch
  6597. statements are already visible in the watch window as shown in Figure 8.4%@FN@%
  6598. Figure 8.4 is found on page 154 of the printed version.%@EF@%.%@NL@%
  6599. %@NL@%
  6600. %@CR:MCV86003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6601. %@NL@%
  6602. %@CR:MCV86004@%%@4@%The Watch List command cannot be executed with the mouse.%@EH@%%@NL@%
  6603. %@NL@%
  6604. %@CR:MCV86005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6605. %@NL@%
  6606. %@CR:MCV86006@%%@4@%The Watch List command cannot be executed with a keyboard command.%@EH@%%@NL@%
  6607. %@NL@%
  6608. %@CR:MCV86007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6609. %@NL@%
  6610. %@CR:MCV86008@%%@4@%To list watch statements with a dialog command, enter a command line with%@EH@%
  6611. the following syntax:%@NL@%
  6612. %@NL@%
  6613.      >W%@NL@%
  6614. %@NL@%
  6615. %@CR:MCV86009@%%@4@%The display is the same as the display that appears in the watch window in%@EH@%
  6616. window mode shown in Figure 8.5%@FN@%
  6617. Figure 8.5 is found on page 155 of the printed version.%@EF@%.%@NL@%
  6618. %@NL@%
  6619. %@CR:MCV8600A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  6620. %@NL@%
  6621.      >W%@NL@%
  6622.      0) code,c  :  I%@NL@%
  6623.      1) (float)letters/words,f  :  4.777778%@NL@%
  6624.      2) 3F65:0B20  20 20 43 4F 55 4E 54 COUNT%@NL@%
  6625.      3) lines==11 :  0%@NL@%
  6626.      >%@NL@%
  6627. %@NL@%
  6628. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6629. %@AI@%NOTE%@AE@%%@NL@%
  6630.    The command letter for the Watch List command is the same as the command%@NL@%
  6631.    letter for the memory version of the Watch command when no memory size is%@NL@%
  6632.    given. The difference between the commands is that the Watch List command%@NL@%
  6633.    never takes an argument. The Watch command always requires at least one%@NL@%
  6634.    argument.%@NL@%
  6635. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6636. %@NL@%
  6637. %@NL@%
  6638. %@CR:MCV87000@%%@2@%%@AB@%8.7  C Examples%@AE@%%@EH@%%@NL@%
  6639. %@NL@%
  6640. %@CR:MCV87001@%%@4@%The seven examples shown previously in a BASIC screen would be entered in a%@EH@%
  6641. C debugging session as follows:%@NL@%
  6642. %@NL@%
  6643. %@CR:MCV87002@%%@4@%The first three items in the watch window are simple watch statements. They%@EH@%
  6644. display values but never cause execution to break.%@AB@%%@NL@%
  6645. %@NL@%
  6646. %@CR:MCV87003@%%@4@%The next two items are watchpoints; they cause execution to break whenever%@EH@%
  6647. they evaluate to true (nonzero). The fourth item will break execution
  6648. whenever %@AS@%higher%@AE@% is greater than %@AS@%chance%@AE@%, and the fifth item will break
  6649. execution whenever %@AS@%n%@AE@% is equal to 7 or 11.%@NL@%
  6650. %@NL@%
  6651. %@CR:MCV87004@%%@4@%The last two items are tracepoints, which cause execution to break whenever%@EH@%
  6652. any bytes change within a specified area of memory. The sixth item breaks
  6653. execution whenever the value of %@AS@%sum%@AE@% changes; the seventh item breaks
  6654. execution whenever there is a change in the first byte at the address of %@AS@%n%@AE@%.%@NL@%
  6655. %@NL@%
  6656. %@NL@%
  6657. %@CR:MCV88000@%%@2@%%@AB@%8.8  FORTRAN Examples%@AE@%%@EH@%%@NL@%
  6658. %@NL@%
  6659. %@CR:MCV88001@%%@4@%The seven examples shown previously in a BASIC screen would be entered in a%@EH@%
  6660. FORTRAN debugging session as follows:%@NL@%
  6661. %@NL@%
  6662. %@CR:MCV88002@%%@4@%The first three items in the watch window are simple watch statements. They%@EH@%
  6663. display values but never cause execution to break. %@AB@%%@NL@%
  6664. %@NL@%
  6665. %@CR:MCV88003@%%@4@%The next two items are watchpoints; they cause execution to break whenever%@EH@%
  6666. they evaluate to true (nonzero). The fourth item will break execution
  6667. whenever %@AS@%higher%@AE@% is greater than %@AS@%chance%@AE@%, and the fifth item will break
  6668. execution whenever %@AS@%n is equal to %@AE@%%@AS@%7 or 11%@AE@%.%@AS@%%@NL@%
  6669. %@NL@%
  6670. %@CR:MCV88004@%%@4@%The last two items are tracepoints, which cause execution to break whenever%@EH@%
  6671. any bytes change within a specified area of memory. The sixth item breaks
  6672. execution whenever the value of %@AS@%sum%@AE@% changes; the seventh item breaks
  6673. execution whenever there is a change in the first byte at the address of %@AS@%n%@AE@% .%@NL@%
  6674. %@NL@%
  6675. %@NL@%
  6676. %@CR:MCV89000@%%@2@%%@AB@%8.9  Assembly Examples%@AE@%%@EH@%%@NL@%
  6677. %@NL@%
  6678. %@CR:MCV89001@%%@4@%By default, assembly source modules are debugged with the C expression%@EH@%
  6679. evaluator. Therefore, refer to the C examples for appropriate syntax for
  6680. entering watch expressions.%@NL@%
  6681. %@NL@%
  6682. %@CR:MCV89002@%%@4@%In addition, certain C expressions tend to be more useful for debugging%@EH@%
  6683. assembly modules. The following examples show some typical cases used with
  6684. watch and tracepoint commands.%@NL@%
  6685. %@NL@%
  6686. %@CR:MCV89003@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6687. %@NL@%
  6688.      >WW sp L 8%@NL@%
  6689.      >WW bp L 8%@NL@%
  6690.      >W? wo bp+4,d%@NL@%
  6691.      >W? by bp-2,d%@NL@%
  6692.      >TPW arr L 5%@NL@%
  6693.      >%@NL@%
  6694. %@NL@%
  6695. %@CR:MCV89004@%%@4@%The first two examples watch a range of memory. The watch command %@AS@%WW sp L 8%@AE@%%@EH@%
  6696. is particularly useful because it will cause the debugger to watch the stack
  6697. dynamically; the debugger will continually display the first eight words on
  6698. the top of the stack as items are pushed and popped. The expression %@AS@%WW bp L%@AE@%
  6699. %@AS@%8%@AE@% is similar; it causes the debugger to watch the first eight words in
  6700. memory pointed to by %@AB@%BP%@AE@% (the framepointer).%@NL@%
  6701. %@NL@%
  6702. %@CR:MCV89005@%%@4@%The third example, %@AS@%W? wo bp+4,d%@AE@%, is useful if you are using the stack to%@EH@%
  6703. pass parameters. In this case, the position on the stack four bytes above %@AB@%BP%@AE@%
  6704. holds one of three integer parameters. The %@AB@%WO%@AE@% operator returns the same value
  6705. as the assembler expression %@AS@%WORD PTR [bp+4]%@AE@%; the result is displayed in
  6706. decimal.%@NL@%
  6707. %@NL@%
  6708. %@CR:MCV89006@%%@4@%You must use the expression %@AS@%bp+4%@AE@% in order to watch this parameter; you%@EH@%
  6709. cannot specify a parameter by name. The assembler does not emit symbolic
  6710. information for parameters. The fourth command, %@AS@%W? by%@AE@%%@AS@%bp-2,d%@AE@%, is similar to
  6711. the third, but watches a local variable instead of watching a parameter. The
  6712. operator %@AB@%BY%@AE@% returns the same value as the assembler expression %@AS@%BYTE PTR%@AE@%
  6713. %@AS@%[bp-2]%@AE@%.%@NL@%
  6714. %@NL@%
  6715. %@CR:MCV89007@%%@4@%The final example sets a tracepoint on a range of memory, which corresponds%@EH@%
  6716. to the first five words of the array %@AS@%arr%@AE@%. Range arguments for tracepoint and
  6717. watch expressions are particularly useful for large data structures, such as
  6718. arrays.%@NL@%
  6719. %@NL@%
  6720. %@CR:MCV89008@%%@4@%The five examples above produce the screen shown in Figure 8.6%@FN@%
  6721. Figure 8.6 is found on page 157 of the printed version.%@EF@% when entered%@EH@%
  6722. in a CodeView debugging session.%@NL@%
  6723. %@NL@%
  6724. %@NL@%
  6725. %@CR:MCV90000@%%@1@%%@AB@%Chapter 9  Examining Code%@AE@%%@EH@%%@NL@%
  6726. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6727. %@NL@%
  6728. %@CR:MCV90001@%%@4@%Several CodeView commands allow you to examine program code or data related%@EH@%
  6729. to code. The following commands are discussed in this chapter:%@NL@%
  6730. %@NL@%
  6731. %@CR:MCV90002@%%@AB@%Command                     Action%@AE@%%@NL@%
  6732. %@NL@%
  6733. Set Mode (%@AB@%S%@AE@%)                Sets format for code displays%@NL@%
  6734. %@NL@%
  6735. Unassemble (%@AB@%U%@AE@%)              Displays assembly instructions%@NL@%
  6736. %@NL@%
  6737. View (%@AB@%V%@AE@%)                    Displays source lines%@NL@%
  6738. %@NL@%
  6739. Current Location (%@AB@%.%@AE@%)        Displays the current location line%@NL@%
  6740. %@NL@%
  6741. Stack Trace (%@AB@%K%@AE@%)             Displays routines or procedures%@NL@%
  6742. %@NL@%
  6743. %@NL@%
  6744. %@CR:MCV91000@%%@2@%%@AB@%9.1  Set Mode Command%@AE@%%@EH@%%@NL@%
  6745. %@NL@%
  6746. %@CR:MCV91001@%%@4@%The Set Mode command sets the mode in which code is displayed. The two basic%@EH@%
  6747. display modes are source mode in which the program is displayed as source
  6748. lines, and assembly mode in which the program is displayed as
  6749. assembly-language instructions. These two modes can be combined in mixed
  6750. mode in which the program is displayed with both source lines and
  6751. assembly-language instructions.%@NL@%
  6752. %@NL@%
  6753. %@CR:MCV91002@%%@4@%In sequential mode, there are three display modes: source, assembly, and%@EH@%
  6754. mixed. These modes affect the output of commands that display code
  6755. (Register, Trace, Program Step, Go, Execute, and Unassemble).%@NL@%
  6756. %@NL@%
  6757. %@CR:MCV91003@%%@4@%In window mode, these same display modes are available, but affect what kind%@EH@%
  6758. of code appears in the display window.%@NL@%
  6759. %@NL@%
  6760. %@CR:MCV91004@%%@4@%Source and mixed modes are only available if the executable file contains%@EH@%
  6761. symbols in the CodeView format. Programs that do not contain symbolic
  6762. information (including all .COM files) are displayed in assembly mode.%@NL@%
  6763. %@NL@%
  6764. %@CR:MCV91005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6765. %@NL@%
  6766. %@CR:MCV91006@%%@4@%To set the display mode with the mouse, point to View on the menu bar, press%@EH@%
  6767. a mouse button and drag the highlight to either the Source selection for
  6768. source mode, the Mixed selection for mixed mode, or the Assembly selection
  6769. for assembly mode. Then release the button.%@NL@%
  6770. %@NL@%
  6771. %@CR:MCV91007@%%@4@%You can further control the display of assembly-language instructions by%@EH@%
  6772. making selections from the Options menu. See Section 2.1.3.6%@BO:   2918d@% for more
  6773. information.%@NL@%
  6774. %@NL@%
  6775. %@CR:MCV91008@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6776. %@NL@%
  6777. %@CR:MCV91009@%%@4@%To change the display mode with a keyboard command, press F3. This will%@EH@%
  6778. rotate the mode to the next setting; you may need to press F3 twice to get
  6779. the desired mode. This command works in either window or sequential mode. In
  6780. sequential mode, the word %@AS@%source%@AE@%, %@AS@%mixed%@AE@%, or %@AS@%assembly%@AE@% is displayed to
  6781. indicate the new mode.%@NL@%
  6782. %@NL@%
  6783. %@CR:MCV9100A@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6784. %@NL@%
  6785. %@CR:MCV9100B@%%@4@%To set the display mode from the dialog window, enter a command line with%@EH@%
  6786. the following syntax:%@NL@%
  6787. %@NL@%
  6788.      %@AB@%S%@AE@%«%@AB@%+ | - | &%@AE@%»%@NL@%
  6789. %@NL@%
  6790. %@CR:MCV9100C@%%@4@%If the plus sign is specified (%@AB@%S+%@AE@%), source mode is selected, and the word%@EH@%
  6791. %@AS@%source%@AE@% is displayed.%@NL@%
  6792. %@NL@%
  6793. %@CR:MCV9100D@%%@4@%If the minus sign is specified (%@AB@%S-%@AE@%), assembly mode is selected, and the word%@EH@%
  6794. %@AS@%assembly%@AE@% is displayed. In window mode, the display will include any
  6795. assembly options, except the Mixed Source option, previously toggled on from
  6796. the Options menu. The Mixed Source option is always turned off by the %@AB@%S-%@AE@%
  6797. command.%@NL@%
  6798. %@NL@%
  6799. %@CR:MCV9100E@%%@4@%If the ampersand is specified (%@AB@%S&%@AE@%), mixed mode is selected, and the word%@EH@%
  6800. %@AS@%mixed%@AE@% is displayed. In window mode, the display will include any assembly
  6801. options previously toggled on from the Options menu. In addition, the Mixed
  6802. Source option will be turned on by the %@AB@%S&%@AE@% command.%@NL@%
  6803. %@NL@%
  6804. %@CR:MCV9100F@%%@4@%If no argument is specified (%@AB@%S%@AE@%), the current mode (%@AS@%source%@AE@%, %@AS@%assembly%@AE@%, or%@EH@%
  6805. %@AS@%mixed%@AE@%) is displayed.%@NL@%
  6806. %@NL@%
  6807. %@CR:MCV9100G@%%@4@%The Unassemble command in sequential mode is an exception in that it%@EH@%
  6808. displays mixed, source, and assembly with both the source (%@AB@%S+%@AE@%) and mixed
  6809. (%@AB@%S&%@AE@%) modes.%@NL@%
  6810. %@NL@%
  6811. %@CR:MCV9100H@%%@4@%When you enter the dialog version of the Set Mode command, the CodeView%@EH@%
  6812. outputs the name of the new display mode: %@AS@%source%@AE@%, %@AS@%assembly%@AE@%, or %@AS@%mixed%@AE@%.%@NL@%
  6813. %@NL@%
  6814. %@CR:MCV9100I@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6815. %@NL@%
  6816.      >S+%@NL@%
  6817.      source%@NL@%
  6818.      >S-%@NL@%
  6819.      assembly%@NL@%
  6820.      >S&%@NL@%
  6821.      mixed%@NL@%
  6822.      >%@NL@%
  6823. %@NL@%
  6824. %@CR:MCV9100J@%%@4@%The examples above show the source mode being changed to %@AS@%source%@AE@%, %@AS@%assembly%@AE@%,%@EH@%
  6825. and %@AS@%mixed%@AE@%. In window mode, the commands change the format of the display
  6826. window. In sequential mode, the commands change the output from the commands
  6827. that display code (Register, Trace, Program Step, Go, Execute, and
  6828. Unassemble). See the sections below on individual commands for examples of
  6829. how they are affected by the display mode.%@NL@%
  6830. %@NL@%
  6831. %@NL@%
  6832. %@CR:MCV92000@%%@2@%%@AB@%9.2  Unassemble Command%@AE@%%@EH@%%@NL@%
  6833. %@NL@%
  6834. %@CR:MCV92001@%%@4@%The Unassemble command displays the assembly-language instructions of the%@EH@%
  6835. program being debugged. It is most useful in sequential mode, where it is
  6836. the only method of examining a sequence of assembly-language instructions.
  6837. In window mode, it can be used to display a specific portion of
  6838. assembly-language code in the display window.%@NL@%
  6839. %@NL@%
  6840. %@CR:MCV92002@%%@4@%Occasionally, code similar to the following will be displayed:%@EH@%%@NL@%
  6841. %@NL@%
  6842.      FE30   ???   Byte Ptr  [BX + SI]%@NL@%
  6843. %@NL@%
  6844. %@CR:MCV92003@%%@4@%If you attempt to unassemble data, the CodeView debugger may display%@EH@%
  6845. meaningless instructions.%@NL@%
  6846. %@NL@%
  6847. %@CR:MCV92004@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6848. %@NL@%
  6849. %@CR:MCV92005@%%@4@%The Unassemble command has no direct mouse equivalent, but you can view%@EH@%
  6850. unassembled code at any time by changing the mode to assembly or mixed (see
  6851. Section 9.1%@BO:   6576d@%, "Set Mode Command," for more information).%@NL@%
  6852. %@NL@%
  6853. %@CR:MCV92006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6854. %@NL@%
  6855. %@CR:MCV92007@%%@4@%The Unassemble command has no direct keyboard equivalent, but you can view%@EH@%
  6856. unassembled code at any time by changing the mode to assembly or mixed (see
  6857. Section 9.1%@BO:   6576d@%, "Set Mode Command," for more information).%@NL@%
  6858. %@NL@%
  6859. %@CR:MCV92008@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6860. %@NL@%
  6861. %@CR:MCV92009@%%@4@%To display unassembled code using a dialog command, enter a command line%@EH@%
  6862. with the following syntax:%@NL@%
  6863. %@NL@%
  6864.      %@AB@%U%@AE@% «%@AI@%address%@AE@% | %@AI@%range%@AE@%»%@NL@%
  6865. %@NL@%
  6866. %@CR:MCV9200A@%%@4@%The effect of the command varies depending on whether you are in sequential%@EH@%
  6867. or window mode.%@NL@%
  6868. %@NL@%
  6869. %@CR:MCV9200B@%%@4@%In sequential mode, if you do not specify %@AI@%address%@AE@% or %@AI@%range%@AE@%, the disassembled%@EH@%
  6870. code begins at the current unassemble address and shows the next eight lines
  6871. of instructions. The unassemble address is the address of the instruction
  6872. after the last instruction displayed by the previous Unassemble command. If
  6873. the Unassemble command has not been used during the session, the unassemble
  6874. address is the current instruction.%@NL@%
  6875. %@NL@%
  6876. %@CR:MCV9200C@%%@4@%If you specify an %@AI@%address%@AE@%, the disassembly starts at that address and shows%@EH@%
  6877. the next eight lines of instructions. If you specify a %@AI@%range%@AE@%, the
  6878. instructions within the range will be displayed.%@NL@%
  6879. %@NL@%
  6880. %@CR:MCV9200D@%%@4@%The sequential mode format of the display depends on the current display%@EH@%
  6881. mode (see Section 9.1%@BO:   6576d@%, "Set Mode Command," for more information). If the
  6882. mode is source (%@AB@%S+%@AE@%) or mixed (%@AB@%S&%@AE@%), the CodeView debugger displays source
  6883. lines mixed with unassembled instructions. One source line is shown for each
  6884. corresponding group of assembly-language instructions. If the display mode
  6885. is assembly, only assembly-language instructions are shown.%@NL@%
  6886. %@NL@%
  6887. %@CR:MCV9200E@%%@4@%In window mode, the Unassemble command changes the mode of the display%@EH@%
  6888. window to assembly. The display format will reflect any options previously
  6889. set from the Options menu. There is no output to the dialog window. If
  6890. %@AI@%address%@AE@% is given, the instructions in the display window will begin at the
  6891. specified address. If %@AI@%range%@AE@% is given, only the starting address will be
  6892. used. If no argument is given, the debugger scrolls down and displays the
  6893. next screen of assembly-language instructions.%@NL@%
  6894. %@NL@%
  6895. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6896. %@AI@%NOTE%@AE@%%@NL@%
  6897.    The 80286 protected-mode mnemonics (also available with the 80386) cannot%@NL@%
  6898.    be displayed with the Unassemble command.%@NL@%
  6899. ───────────────────────────────────────────────────────────────────────────%@NL@%
  6900. %@NL@%
  6901. %@CR:MCV9200F@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  6902. %@NL@%
  6903.      >S&%@NL@%
  6904.      mixed%@NL@%
  6905.      >U 0x11%@NL@%
  6906.      49D0:0011 35068E       XOR   AX,__sqrtjmptab+8cd4 (8E06)%@NL@%
  6907.      49D0:0014 189A2300     SBB   Byte Ptr [BP+SI+0023],BL%@NL@%
  6908.      49D0:0018 FC           CLD%@NL@%
  6909.      49D0:0019 49           DEC   CX%@NL@%
  6910.      49D0:001A CD351ED418   INT   35 ;FSTP    DWord Ptr [__fpinit+ee (18D4)]%@NL@%
  6911.      49D0:001F CD3D         INT   3D ;FWAIT%@NL@%
  6912.      7:           A = 0.0%@NL@%
  6913.      49D0:0021 CD35EE       INT   35 ;FLDZ%@NL@%
  6914. %@NL@%
  6915. %@CR:MCV9200G@%%@4@%The sequential mode example above sets the mode to mixed and unassembles%@EH@%
  6916. eight lines of machine code, plus whatever source lines are encountered
  6917. within those lines. The display would be the same if the mode were source.%@NL@%
  6918. %@NL@%
  6919. %@CR:MCV9200H@%%@4@%The example is taken from a FORTRAN debugging session, but produces results%@EH@%
  6920. similar to what would be produced using the same commands with a C or BASIC
  6921. program.%@NL@%
  6922. %@NL@%
  6923.      >S-%@NL@%
  6924.      assembly%@NL@%
  6925.      >U 0x11%@NL@%
  6926.      49D0:0011 35068E       XOR   AX,__sqrtjmptab+8cd4 (8E06)%@NL@%
  6927.      49D0:0014 189A2300     SBB   Byte Ptr [BP+SI+0023],BL%@NL@%
  6928.      49D0:0018 FC           CLD%@NL@%
  6929.      49D0:0019 49 DEC       CX%@NL@%
  6930.      49D0:001A CD351ED418   INT   35 ;FSTP    DWord Ptr [__fpinit+ee (18D4)]%@AE@%%@NL@%
  6931.      49D0:001F CD3D         INT   3D ;FWAIT%@NL@%
  6932.      49D0:0021 CD35EE       INT   35 ;FLDZ%@NL@%
  6933.      >%@NL@%
  6934. %@NL@%
  6935. %@CR:MCV9200I@%%@4@%The sequential mode example above sets the mode to assembly and repeats the%@EH@%
  6936. same command.%@NL@%
  6937. %@NL@%
  6938. %@NL@%
  6939. %@CR:MCV93000@%%@2@%%@AB@%9.3  View Command%@AE@%%@EH@%%@NL@%
  6940. %@NL@%
  6941. %@CR:MCV93001@%%@4@%The View command displays the lines of a text file (usually a source module%@EH@%
  6942. or include file). It is most useful in sequential mode where it is the only
  6943. method of examining a sequence of source lines. In window mode the View
  6944. command can be used to page through the source file or to load a new source
  6945. file.%@NL@%
  6946. %@NL@%
  6947. %@CR:MCV93002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  6948. %@NL@%
  6949. %@CR:MCV93003@%%@4@%To load a new source file with the button, point to File on the menu bar,%@EH@%
  6950. press a mouse button and drag the highlight to the Load selection, then
  6951. release the button. A dialog box appears, asking for the name of the file
  6952. you wish to load. Type the name of the file, and press ENTER or a mouse
  6953. button. The new file appears in the display window.%@NL@%
  6954. %@NL@%
  6955. %@CR:MCV93004@%%@4@%The paging capabilities of the View command have no direct mouse equivalent,%@EH@%
  6956. but you can move about in the source file by pointing to the up or down
  6957. arrows on the scroll bars and then clicking different mouse buttons. See
  6958. Section 2.1.2.2%@BO:   21bc1@%, "Controlling Program Execution with the Mouse," for more
  6959. information.%@NL@%
  6960. %@NL@%
  6961. %@CR:MCV93005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  6962. %@NL@%
  6963. %@CR:MCV93006@%%@4@%To load a new source file with a keyboard command, press ALT+F to open the%@EH@%
  6964. File menu, then press L to select Load. A dialog box appears, asking for the
  6965. name of the file you wish to load. Type the name of the file, and press
  6966. ENTER. The new file appears in the display window.%@NL@%
  6967. %@NL@%
  6968. %@CR:MCV93007@%%@4@%The paging capabilities of the View command have no direct keyboard%@EH@%
  6969. equivalent, but you can move about in the source file by first putting the
  6970. cursor in the display window with the F6 key, then pressing the PGUP, PGDN,
  6971. HOME, END,%@NL@%
  6972. %@NL@%
  6973. %@CR:MCV93008@%%@4@%UP ARROW, and DOWN ARROW keys. See Section 2.1.1.3%@BO:   1e85f@%, "Controlling Program%@EH@%
  6974. Execution with Keyboard Commands," for more information.%@NL@%
  6975. %@NL@%
  6976. %@CR:MCV93009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  6977. %@NL@%
  6978. %@CR:MCV9300A@%%@4@%To display source lines using a dialog command, enter a command line with%@EH@%
  6979. the following syntax:%@NL@%
  6980. %@NL@%
  6981.      %@AB@%V%@AE@% «%@AI@%expression%@AE@%»%@NL@%
  6982. %@NL@%
  6983. %@CR:MCV9300B@%%@4@%Since addresses for the View command are often specified as a line number%@EH@%
  6984. (with an optional source file), a more specific syntax for the command would
  6985. be as follows:%@NL@%
  6986. %@NL@%
  6987.      %@AB@%V%@AE@% «%@AB@%.%@AE@%«%@AI@%filename%@AE@%:»%@AI@%linenumber%@AE@%»%@NL@%
  6988. %@NL@%
  6989. %@CR:MCV9300C@%%@4@%The effect of the command varies, depending on whether you are in sequential%@EH@%
  6990. or window mode.%@NL@%
  6991. %@NL@%
  6992. %@CR:MCV9300D@%%@4@%In sequential mode, the View command displays eight source lines. The%@EH@%
  6993. starting source line is one of the following:%@NL@%
  6994. %@NL@%
  6995. %@CR:MCV9300E@%  ■  The current source line if no argument is given.%@NL@%
  6996. %@NL@%
  6997.   ■  The specified %@AI@%linenumber%@AE@%. If %@AI@%filename%@AE@% is given, the specified file is%@NL@%
  6998.      loaded, and the %@AI@%linenumber%@AE@% refers to lines in it.%@NL@%
  6999. %@NL@%
  7000.   ■  The address that %@AI@%expression%@AE@% evaluates to. For example, %@AI@%expression%@AE@% could%@NL@%
  7001.      be a procedure name or an address in the %@AI@%segment%@AE@%%@AB@%:%@AE@%%@AI@%offset%@AE@% format. The%@NL@%
  7002.      code segment is assumed if no segment is given.%@NL@%
  7003. %@NL@%
  7004. %@CR:MCV9300F@%%@4@%In sequential mode, the View command is not affected by the current display%@EH@%
  7005. mode (source, assembly, or mixed); source lines are displayed without regard
  7006. to mode.%@NL@%
  7007. %@NL@%
  7008. %@CR:MCV9300G@%%@4@%In window mode, if you enter the View command while the display mode is%@EH@%
  7009. assembly, the CodeView debugger will automatically switch back to source
  7010. mode. If you give %@AI@%linenumber%@AE@% or %@AI@%expression%@AE@%, the display window will be
  7011. redrawn so that the source line corresponding to the given %@AI@%address%@AE@% will
  7012. appear at the top of the source window. If you specify a %@AI@%filename%@AE@% with a
  7013. %@AI@%linenumber%@AE@%, the specified file will be loaded.%@NL@%
  7014. %@NL@%
  7015. %@CR:MCV9300H@%%@4@%If you enter the View command with no arguments, the display will scroll%@EH@%
  7016. down one line short of a page; that is, the source line that was at the
  7017. bottom of the window will be at the top.%@NL@%
  7018. %@NL@%
  7019. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7020. %@AI@%NOTE%@AE@%%@NL@%
  7021.    The View command with no argument is similar to pressing the PGDN key or%@NL@%
  7022.    clicking Right on the down arrow with the mouse. The difference is that%@NL@%
  7023.    pressing the PGDN key enables you to scroll down one more line.%@NL@%
  7024. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7025. %@NL@%
  7026. %@CR:MCV9300I@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7027. %@NL@%
  7028.      >V BUBBLE       %@AI@%;* Example 1, FORTRAN source code%@AE@%%@NL@%
  7029.      51:        IF (N .LE. 1) GOTO 101%@NL@%
  7030.      52:        DO 201 I = 1,N-1%@NL@%
  7031.      53:        DO 301 J = I + 1,N%@NL@%
  7032.      54:        IF (X(I) .LE. X(J)) GOTO 301%@NL@%
  7033.      55:        TEMP = X(I)%@NL@%
  7034.      56:        X(I) = X(J)%@NL@%
  7035.      57:        X(J) = TEMP%@NL@%
  7036.      58:    301 CONTINUE%@NL@%
  7037. %@NL@%
  7038. %@CR:MCV9300J@%%@4@%Example 1 (shown in sequential mode) displays eight source lines, beginning%@EH@%
  7039. at routine %@AS@%BUBBLE%@AE@%.%@NL@%
  7040. %@NL@%
  7041.      >V .math.c:30   %@AI@%;* Example 2, C source code%@AE@%%@NL@%
  7042.      30:                register int j;%@NL@%
  7043.      31:%@NL@%
  7044.      32:                for (j = q; j >= 0; j--)%@NL@%
  7045.      33:                        if (t[j] + p[j] > 9) {%@NL@%
  7046.      34:                                p[j] += t[j] - 10;%@NL@%
  7047.      35:                                p[j-1] += 1;%@NL@%
  7048.      36:                        } else%@NL@%
  7049.      37:                                p[j] += t[j];%@NL@%
  7050.      >%@NL@%
  7051. %@NL@%
  7052. %@CR:MCV9300K@%%@4@%Example 2 loads the source file %@AS@%math.c%@AE@% and displays eight source lines%@EH@%
  7053. starting at line %@AS@%30%@AE@%.%@NL@%
  7054. %@NL@%
  7055. %@CR:MCV9300L@%%@4@%All forms of the View command are supported with all languages that work%@EH@%
  7056. with the CodeView debugger.%@NL@%
  7057. %@NL@%
  7058. %@NL@%
  7059. %@CR:MCV94000@%%@2@%%@AB@%9.4  Current Location Command%@AE@%%@EH@%%@NL@%
  7060. %@NL@%
  7061. %@CR:MCV94001@%%@4@%The Current Location command displays the source line or assembly-language%@EH@%
  7062. instruction corresponding to the current program location.%@NL@%
  7063. %@NL@%
  7064. %@CR:MCV94002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7065. %@NL@%
  7066. %@CR:MCV94003@%%@4@%The Current Location command cannot be executed with the mouse.%@EH@%%@NL@%
  7067. %@NL@%
  7068. %@CR:MCV94004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7069. %@NL@%
  7070. %@CR:MCV94005@%%@4@%The Current Location command cannot be executed with a keyboard command.%@EH@%%@NL@%
  7071. %@NL@%
  7072. %@CR:MCV94006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7073. %@NL@%
  7074. %@CR:MCV94007@%%@4@%To display the current location line using a dialog command, enter a command%@EH@%
  7075. line with the following syntax (a period only):%@NL@%
  7076. %@NL@%
  7077.      %@AB@%.%@AE@%%@NL@%
  7078. %@NL@%
  7079. %@CR:MCV94008@%%@4@%In sequential mode, the command displays the current source line. The line%@EH@%
  7080. is displayed regardless of whether the current debugging mode is source or
  7081. assembly. If the program being debugged has no symbolic information, the
  7082. command will be ignored.%@NL@%
  7083. %@NL@%
  7084. %@CR:MCV94009@%%@4@%In window mode, the command puts the current program location (marked with%@EH@%
  7085. reverse video or a contrasting color) in the center of the display window.
  7086. The display mode (source or assembly) will not be affected. This command is
  7087. useful if you have scrolled through the source code or assembly-language
  7088. instructions so that the current location line is no longer visible.%@NL@%
  7089. %@NL@%
  7090. %@CR:MCV9400A@%%@4@%For example, if you are in window mode and have executed the program being%@EH@%
  7091. debugged to somewhere near the start of the program, but you have scrolled
  7092. the display to a point near the end, the Current Location command returns
  7093. the display to the current program location.%@NL@%
  7094. %@NL@%
  7095. %@CR:MCV9400B@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  7096. %@NL@%
  7097.      >.%@NL@%
  7098.      MINDAT = 1.0E6%@NL@%
  7099.      >%@NL@%
  7100. %@NL@%
  7101. %@CR:MCV9400C@%%@4@%The example above illustrates how to display the current source line in%@EH@%
  7102. sequential mode. The same command in window mode would not produce any
  7103. output, but it could change the text that is shown in the display window.%@NL@%
  7104. %@NL@%
  7105. %@NL@%
  7106. %@CR:MCV95000@%%@2@%%@AB@%9.5  Stack Trace Command%@AE@%%@EH@%%@NL@%
  7107. %@NL@%
  7108. %@CR:MCV95001@%%@4@%The Stack Trace command allows you to display routines that have been called%@EH@%
  7109. during program execution (see note below). The first line of the display
  7110. shows the name of the current routine. The succeeding lines (if any) list
  7111. any other routines that were called to reach the current address. The dialog
  7112. version of the Stack Trace command also displays the source lines where each
  7113. routine was called.%@NL@%
  7114. %@NL@%
  7115. %@CR:MCV95002@%%@4@%For each routine, the values of any arguments are shown in parentheses after%@EH@%
  7116. the routine name. Values are shown in the current radix (the default is
  7117. decimal).%@NL@%
  7118. %@NL@%
  7119. %@CR:MCV95003@%%@4@%The term "stack trace" is used because as each routine is called, its%@EH@%
  7120. address and arguments are stored on (pushed onto) the program stack.
  7121. Therefore, tracing through the stack shows the currently active routines.
  7122. With C and FORTRAN programs, the %@AB@%main%@AE@% routine will always be at the bottom
  7123. of the stack. With BASIC programs, the main program is not listed on the
  7124. stack because BASIC programs have no standard label (such as %@AB@%main%@AE@%)
  7125. corresponding to the first line of a program. Only routines called by the
  7126. main program will be displayed. In assembly-language programs, the bottom
  7127. routine displayed in the stack trace is %@AB@%astart%@AE@% instead of %@AB@%main%@AE@%.%@NL@%
  7128. %@NL@%
  7129. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7130. %@AI@%NOTE%@AE@%%@NL@%
  7131.    This discussion uses the term "routines," which is a general term for%@NL@%
  7132.    functions (C, FORTRAN, Pascal), subroutines (FORTRAN), procedures%@NL@%
  7133.    (Pascal), and subprograms and function procedures (BASIC)──each of which%@NL@%
  7134.    uses the stack to transfer control to an independent program unit. In%@NL@%
  7135.    assembly mode, the term "procedure" may be more accurate. %@AB@%GOSUB%@AE@% and %@AB@%DEF%@AE@%%@NL@%
  7136.    %@AB@%FN%@AE@% routines in BASIC will not work with the Stack Trace command, since%@NL@%
  7137.    they do not follow the same convention for setting up the stack.%@NL@%
  7138.    If you are using the CodeView debugger to debug assembly-language%@NL@%
  7139.    programs, the Stack Trace command will work only if procedures were%@NL@%
  7140.    called with the calling convention used by Microsoft languages. This%@NL@%
  7141.    calling convention is explained in the Microsoft Mixed-Language%@NL@%
  7142.    Programming Guide.%@NL@%
  7143. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7144. %@NL@%
  7145. %@CR:MCV95004@%%@4@%The Stack Trace command does not work reliably until you execute at least to%@EH@%
  7146. the beginning of the main procedure. The main procedure sets up the frame
  7147. pointer (%@AB@%BP%@AE@%), which CodeView uses to locate parameters, local variables, and
  7148. return addresses. If your main module is written in assembly, you must
  7149. execute at least to the beginning of the first procedure called.
  7150. Furthermore, your procedures must follow the standard Microsoft calling
  7151. conventions.%@NL@%
  7152. %@NL@%
  7153. %@CR:MCV95005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7154. %@NL@%
  7155. %@CR:MCV95006@%%@4@%To view a stack trace with the mouse, point to Calls on the menu bar and%@EH@%
  7156. press a mouse button. The Calls menu will appear, showing the current
  7157. routine at the top and other routines below it in the reverse order in which
  7158. they were called; for example, the first routine called (which is always
  7159. %@AB@%main%@AE@% in a C or FORTRAN program) will be at the bottom. The values of any
  7160. routine arguments will be shown in parentheses following the routines.%@NL@%
  7161. %@NL@%
  7162. %@CR:MCV95007@%%@4@%If you want to view one of the routines that was previously called, select%@EH@%
  7163. the routine by dragging down the highlight to the routine you wish to see,
  7164. then releasing the mouse button. (You can also select a routine by clicking
  7165. a selection once the menu is open.) The effect of selecting a routine in the
  7166. Calls menu is to cause the debugger to display that routine. The cursor will
  7167. be on the last statement executed in the routine.%@NL@%
  7168. %@NL@%
  7169. %@CR:MCV95008@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7170. %@NL@%
  7171. %@CR:MCV95009@%%@4@%To view a stack trace with a keyboard command, press ALT+C to open the Calls%@EH@%
  7172. menu. The menu will show the current routine at the top and other routines
  7173. below it in the reverse order in which they were called; for example, the
  7174. first routine called will be at the bottom. The values of any routine
  7175. arguments will be shown in parentheses following the routine.%@NL@%
  7176. %@NL@%
  7177. %@CR:MCV9500A@%%@4@%If you want to view one of the routines that was previously called, select%@EH@%
  7178. the routine by moving the cursor with the arrow keys and then pressing
  7179. ENTER, or by typing the number or letter to the left of the routine. The
  7180. effect of selecting a routine in the Calls menu is to cause the debugger to
  7181. display that routine. The cursor will be on the last statement that was
  7182. executed in the routine.%@NL@%
  7183. %@NL@%
  7184. %@CR:MCV9500B@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7185. %@NL@%
  7186. %@CR:MCV9500C@%%@4@%To display a stack trace with a dialog command, enter a command line with%@EH@%
  7187. the following syntax:%@NL@%
  7188. %@NL@%
  7189.      %@AB@%K%@AE@%%@NL@%
  7190. %@NL@%
  7191. %@CR:MCV9500D@%%@4@%The output from the Stack Trace dialog command lists the routines in the%@EH@%
  7192. reverse order in which they were called. The arguments to each routine are
  7193. shown in parentheses. Finally, the line number from which the routine was
  7194. called is shown.%@NL@%
  7195. %@NL@%
  7196. %@CR:MCV9500E@%%@4@%You can enter the line number as an argument to the View or Unassemble%@EH@%
  7197. command if you want to view code at the point where the routine was called.%@NL@%
  7198. %@NL@%
  7199. %@CR:MCV9500F@%%@4@%In window mode, the output from the Stack Trace dialog command appears in%@EH@%
  7200. the dialog window.%@NL@%
  7201. %@NL@%
  7202. %@CR:MCV9500G@%%@4@%%@AB@%FORTRAN Example%@AE@%%@EH@%%@NL@%
  7203. %@NL@%
  7204.      >K%@NL@%
  7205.      ANALYZE(67,0), line 94%@NL@%
  7206.      COUNTWORDS(0,512), line 73%@NL@%
  7207.      MAIN(2,5098), line 42%@NL@%
  7208.      >%@NL@%
  7209. %@NL@%
  7210. %@CR:MCV9500H@%%@4@%In the example above, the first line of output indicates that the current%@EH@%
  7211. routine is %@AS@%ANALYZE%@AE@%. Its first argument currently has a decimal value of %@AS@%67%@AE@%,
  7212. and its second argument, a value of %@AS@%0%@AE@%. The current location in this routine
  7213. is %@AS@%line 94%@AE@%.%@NL@%
  7214. %@NL@%
  7215. %@CR:MCV9500I@%%@4@%The second line indicates that %@AS@%ANALYZE%@AE@% was called by %@AS@%COUNTWORDS%@AE@%, and that%@EH@%
  7216. its arguments have the values %@AS@%0%@AE@% and %@AS@%512%@AE@%. Routine %@AS@%ANALYZE%@AE@% was called from
  7217. %@AS@%line 73%@AE@% of routine %@AS@%COUNTWORDS%@AE@%.%@NL@%
  7218. %@NL@%
  7219. %@CR:MCV9500J@%%@4@%Likewise, %@AS@%COUNTWORDS%@AE@% was called from %@AS@%line 42%@AE@% of %@AS@%MAIN%@AE@%, and its arguments%@EH@%
  7220. have the values %@AS@%2%@AE@% and %@AS@%5098%@AE@%.%@NL@%
  7221. %@NL@%
  7222. %@CR:MCV9500K@%%@4@%If the radix had been set to 16 or 8 using the Radix (%@AB@%N%@AE@%) command, the%@EH@%
  7223. arguments would be shown in that radix. For example, the last line would be
  7224. shown as %@AS@%MAIN( 2%@AE@%,%@AS@%13ea )%@AE@% in hexadecimal or %@AS@%MAIN( 2%@AE@%,%@AS@%11752 )%@AE@% in octal.%@NL@%
  7225. %@NL@%
  7226. %@CR:MCV9500L@%%@4@%%@AB@%C Example%@AE@%%@EH@%%@NL@%
  7227. %@NL@%
  7228.      >K%@NL@%
  7229.      analyze(67,0), line 94%@NL@%
  7230.      countwords(0,512), line 73%@NL@%
  7231.      main(2,5098)%@NL@%
  7232.      >%@NL@%
  7233. %@NL@%
  7234. %@CR:MCV9500M@%%@4@%As with the FORTRAN example, the example above shows the routines on the%@EH@%
  7235. stack in the reverse order in which they were called. Since %@AS@%analyze%@AE@% is on
  7236. the top, it has been called most recently; in other words, it is the current
  7237. routine.%@NL@%
  7238. %@NL@%
  7239. %@CR:MCV9500N@%%@4@%Each routine is shown with the arguments it was passed, along with the last%@EH@%
  7240. source line that it had been executing. Note that %@AS@%main%@AE@% is shown with the
  7241. command line arguments %@AS@%argc%@AE@% (which is equal to 2) and %@AS@%argv%@AE@% (which is a
  7242. pointer equal to 5,098 decimal). Since the language is C, %@AS@%main%@AE@% will always
  7243. be on the bottom of the stack.%@NL@%
  7244. %@NL@%
  7245. %@CR:MCV9500O@%%@4@%%@AB@%BASIC Example%@AE@%%@EH@%%@NL@%
  7246. %@NL@%
  7247.      >K%@NL@%
  7248.      ROLL#(19122:6040)%@NL@%
  7249.      MAKE#(19122:6040)%@NL@%
  7250.      CALC(19122:5982, 19122:5990)%@NL@%
  7251.      >%@NL@%
  7252. %@NL@%
  7253. %@CR:MCV9500P@%%@4@%As with the FORTRAN example, the example above shows the routines on the%@EH@%
  7254. stack in the reverse order in which they were called. Since %@AS@%ROLL#%@AE@% is on the
  7255. top, it has been called most recently; in other words, it is the current
  7256. routine.%@NL@%
  7257. %@NL@%
  7258. %@CR:MCV9500Q@%%@4@%Each routine is displayed along with the arguments by which it was passed.%@EH@%
  7259. In BASIC, arguments passed to routines are always addresses.%@NL@%
  7260. %@NL@%
  7261. %@CR:MCV9500R@%%@4@%This example shows some features peculiar to BASIC. First of all, there is%@EH@%
  7262. no %@AS@%MAIN%@AE@% displayed because the BASIC compiler does not produce any such
  7263. symbol. Furthermore, each routine will have a type tag if it is a function;
  7264. the tag indicates what the function returns. %@AS@%ROLL#%@AE@% and %@AS@%MAKE#%@AE@% are both
  7265. functions returning a double-precision floating point. A function that
  7266. returned a short integer would have a %@AB@%%%@AE@% type tag. %@AS@%CALC%@AE@% has no type tag since
  7267. it is a sub-program, and therefore does not return a value of any type.%@NL@%
  7268. %@NL@%
  7269. %@NL@%
  7270. %@CR:MCVA0000@%%@1@%%@AB@%Chapter 10  Modifying Code or Data%@AE@%%@EH@%%@NL@%
  7271. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7272. %@NL@%
  7273. %@CR:MCVA0001@%%@4@%The CodeView debugger provides the following commands for modifying code or%@EH@%
  7274. data in memory:%@NL@%
  7275. %@NL@%
  7276. %@CR:MCVA0002@%%@AB@%Command                     Action%@AE@%%@NL@%
  7277. %@NL@%
  7278. Assemble (%@AB@%A%@AE@%)                Modifies code%@NL@%
  7279. %@NL@%
  7280. Enter (%@AB@%E%@AE@%)                   Modifies memory, usually data%@NL@%
  7281. %@NL@%
  7282. Register (%@AB@%R%@AE@%)                Modifies registers and flags%@NL@%
  7283. %@NL@%
  7284. Fill Memory (%@AB@%F%@AE@%)             Fills a block of memory%@NL@%
  7285. %@NL@%
  7286. Move Memory (%@AB@%M%@AE@%)             Copies one block of memory to another%@NL@%
  7287. %@NL@%
  7288. Port Output (%@AB@%O%@AE@%)             Outputs a byte to a hardware port%@NL@%
  7289. %@NL@%
  7290. %@CR:MCVA0003@%%@4@%These commands change code temporarily. You can use the alterations for%@EH@%
  7291. testing in the CodeView debugger, but you cannot save them or permanently
  7292. change the program. To make permanent changes, you must modify the source
  7293. code and recompile.%@NL@%
  7294. %@NL@%
  7295. %@NL@%
  7296. %@CR:MCVA1000@%%@2@%%@AB@%10.1  Assemble Command%@AE@%%@EH@%%@NL@%
  7297. %@NL@%
  7298. %@CR:MCVA1001@%%@4@%The Assemble command assembles 8086-family (8086, 8087, 8088, 80186, 80286,%@EH@%
  7299. 80287, and 80286 and 80386 unprotected) instruction mnemonics and places the
  7300. resulting instruction code into memory at a specified address. The only
  7301. 8086-family mnemonics that cannot be assembled are 80286 protected-mode
  7302. mnemonics. In addition, the debugger will also assemble 80286 instructions
  7303. that utilize the expanded 386 registers.%@NL@%
  7304. %@NL@%
  7305. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7306. %@AI@%NOTE%@AE@%%@NL@%
  7307.    The effects of the Assemble command are temporary. Any instructions that%@NL@%
  7308.    you assemble are lost as soon as you exit the program.%@NL@%
  7309. %@NL@%
  7310.    The instructions you assemble are also lost when you restart the program%@NL@%
  7311.    with the Start or Restart command because the original code is reloaded%@NL@%
  7312.    on top of memory you may have altered.%@NL@%
  7313. %@NL@%
  7314.    To test the results of an Assemble command, you may need to manipulate%@NL@%
  7315.    the %@AB@%IP%@AE@% register (and possibly the %@AB@%CS%@AE@% register) to the starting address%@NL@%
  7316.    of the instructions you have assembled. If you do this, you must use the%@NL@%
  7317.    Current Line command (%@AB@%.%@AE@%) to reset the debugger's internal variables so%@NL@%
  7318.    that it will trace properly.%@NL@%
  7319. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7320. %@NL@%
  7321. %@CR:MCVA1002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7322. %@NL@%
  7323. %@CR:MCVA1003@%%@4@%The Assemble command cannot be executed with the mouse.%@EH@%%@NL@%
  7324. %@NL@%
  7325. %@CR:MCVA1004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7326. %@NL@%
  7327. %@CR:MCVA1005@%%@4@%The Assemble command cannot be executed with a keyboard command.%@EH@%%@NL@%
  7328. %@NL@%
  7329. %@CR:MCVA1006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7330. %@NL@%
  7331. %@CR:MCVA1007@%%@4@%To assemble code using a dialog command, enter a command line with the%@EH@%
  7332. following syntax:%@NL@%
  7333. %@NL@%
  7334.      %@AB@%A%@AE@% «%@AI@%address%@AE@%»%@NL@%
  7335. %@NL@%
  7336. %@CR:MCVA1008@%%@4@%If %@AI@%address%@AE@% is specified, the assembly starts at that address; otherwise the%@EH@%
  7337. current assembly address is assumed.%@NL@%
  7338. %@NL@%
  7339. %@CR:MCVA1009@%%@4@%The assembly address is normally the current address (the address pointed to%@EH@%
  7340. by the CS and IP registers). However, when you use the Assemble command, the
  7341. assembly address is set to the address immediately following the last
  7342. assembled instruction. When you enter any command that executes code (Trace,
  7343. Program Step, Go, or Execute), the assembly address is reset to the current
  7344. address.%@NL@%
  7345. %@NL@%
  7346. %@CR:MCVA100A@%%@4@%When you type the Assemble command, the assembly address is displayed. The%@EH@%
  7347. CodeView debugger then waits for you to enter a new instruction in the
  7348. standard 8086-family instruction-mnemonic form. You can enter instructions
  7349. in uppercase, lowercase, or both.%@NL@%
  7350. %@NL@%
  7351. %@CR:MCVA100B@%%@4@%To assemble a new instruction, type the desired mnemonic and press ENTER.%@EH@%
  7352. The CodeView debugger assembles the instruction into memory and displays the
  7353. next available address. Continue entering new instructions until you have
  7354. assembled all the instructions you want. To conclude assembly and return to
  7355. the CodeView prompt, press ENTER only.%@NL@%
  7356. %@NL@%
  7357. %@CR:MCVA100C@%%@4@%If an instruction you enter contains a syntax error, the debugger displays%@EH@%
  7358. the message %@AS@%^ Syntax error%@AE@%, redisplays the current assembly address, and
  7359. waits for you to enter a correct instruction. The caret symbol in the
  7360. message will point to the first character the CodeView debugger could not
  7361. interpret.%@NL@%
  7362. %@NL@%
  7363. %@CR:MCVA100D@%%@4@%The following eight principles govern entry of instruction mnemonics:%@EH@%%@NL@%
  7364. %@NL@%
  7365. %@CR:MCVA100E@%  1. The far-return mnemonic is %@AB@%RETF%@AE@%.%@NL@%
  7366. %@NL@%
  7367.   2. String mnemonics must explicitly state the string size. For example,%@NL@%
  7368.      %@AB@%MOVSW%@AE@% must be used to move word strings, and %@AB@%MOVSB%@AE@% must be used to move%@NL@%
  7369.      byte strings.%@NL@%
  7370. %@NL@%
  7371.   3. The CodeView debugger automatically assembles short, near, or far jumps%@NL@%
  7372.      and calls, depending on byte displacement to the destination address.%@NL@%
  7373.      These may be overridden with the %@AB@%NEAR%@AE@% or %@AB@%FAR%@AE@% prefix, as shown in the%@NL@%
  7374.      following examples:%@NL@%
  7375. %@NL@%
  7376.         %@AS@%JMP     0x502%@AE@%%@NL@%
  7377.         %@AS@%JMP     NEAR 0x505%@AE@%%@NL@%
  7378.         %@AS@%JMP     FAR  0x50A%@AE@%%@NL@%
  7379. %@NL@%
  7380.      The %@AB@%NEAR%@AE@% prefix can be abbreviated to %@AB@%NE%@AE@%, but the %@AB@%FAR%@AE@% prefix cannot be%@NL@%
  7381.      abbreviated. The examples above use the C notation for hexadecimal%@NL@%
  7382.      numbers. If the FORTRAN option were selected, you would enter the%@NL@%
  7383.      operands as %@AS@%#502%@AE@%, %@AS@%#505%@AE@%, and %@AS@%#50A%@AE@%; if the BASIC option were selected,%@NL@%
  7384.      you would enter them as %@AS@%&H502%@AE@% , %@AS@%&H505%@AE@%, and %@AS@%&H50A%@AE@%.%@NL@%
  7385. %@NL@%
  7386.   4. The CodeView debugger cannot determine whether some operands refer to a%@NL@%
  7387.      word memory location or to a byte memory location. In these cases, the%@NL@%
  7388.      data type must be explicitly stated with the prefix %@AB@%WORD%@AE@%%@AB@%PTR%@AE@% or %@AB@%BYTE%@AE@%%@NL@%
  7389.      %@AB@%PTR%@AE@%. Acceptable abbreviations are %@AB@%WO%@AE@% and %@AB@%BY%@AE@%. Examples are shown below:%@NL@%
  7390. %@NL@%
  7391.         %@AS@%MOV     WORD PTR [BP],1%@AE@%%@NL@%
  7392.         %@AS@%MOV     BYTE PTR [SI-1],symbol%@AE@%%@NL@%
  7393.         %@AS@%MOV     WO PTR [BP],1%@AE@%%@NL@%
  7394.         %@AS@%MOV     BY PTR [SI-1],symbol%@AE@%%@NL@%
  7395. %@NL@%
  7396.   5. The CodeView debugger cannot determine whether an operand refers to a%@NL@%
  7397.      memory location or to an immediate operand. The debugger uses the%@NL@%
  7398.      convention that operands enclosed in square brackets refer to memory.%@NL@%
  7399.      Two examples are shown below:%@NL@%
  7400. %@NL@%
  7401.         %@AS@%MOV     AX,#21%@AE@%%@NL@%
  7402.         %@AS@%MOV     AX,[#21]%@AE@%%@NL@%
  7403. %@NL@%
  7404.      The first statement moves %@AS@%21%@AE@% hexadecimal into %@AS@%AX%@AE@%. The second statement%@NL@%
  7405.      moves the data at offset %@AS@%21%@AE@% hexadecimal into %@AS@%AX%@AE@%. Both statements use%@NL@%
  7406.      the FORTRAN notation for the hexadecimal number 21. If the C option%@NL@%
  7407.      were selected, this number would be represented as %@AS@%0x21%@AE@%, and if the%@NL@%
  7408.      BASIC option were selected, the number would be represented as %@AS@%&H21%@AE@%.%@NL@%
  7409. %@NL@%
  7410.   6. The CodeView debugger  supports all forms of indirect register%@NL@%
  7411.      instructions, as shown in the following examples:%@NL@%
  7412. %@NL@%
  7413.         %@AS@%ADD     BX,[BP+2].[SI-1]%@AE@%%@NL@%
  7414.         %@AS@%POP     [BP+DI]%@AE@%%@NL@%
  7415.         %@AS@%PUSH    [SI]%@AE@%%@NL@%
  7416. %@NL@%
  7417.   7. All instruction-name synonyms are supported. If you assemble%@NL@%
  7418.      instructions and then examine them with the Unassemble command (%@AB@%U%@AE@%), the%@NL@%
  7419.      CodeView debugger may show synonymous instructions, rather than the%@NL@%
  7420.      ones you assembled, as shown in the following examples:%@NL@%
  7421. %@NL@%
  7422.         %@AS@%LOOPZ   &H100%@AE@%%@NL@%
  7423.         %@AS@%LOOPE   &H100%@AE@%%@NL@%
  7424.         %@AS@%JA      &H200%@AE@%%@NL@%
  7425.         %@AS@%JNBE    &H200%@AE@%%@NL@%
  7426. %@NL@%
  7427.      The examples above use the BASIC hexadecimal notation. Instead of using%@NL@%
  7428.      the %@AS@%&H%@AE@% prefix, you would use %@AS@%0x%@AE@% with the C option selected, and %@AS@%#%@AE@% with%@NL@%
  7429.      the FORTRAN option selected.%@NL@%
  7430. %@NL@%
  7431.   8. Do not assemble and execute 8087 or 80287 instructions if your system%@NL@%
  7432.      is not equipped with one of these math coprocessor chips. If you try to%@NL@%
  7433.      execute the %@AB@%WAIT%@AE@% instruction without the appropriate chip, for example,%@NL@%
  7434.      your system will crash.%@NL@%
  7435. %@NL@%
  7436. %@CR:MCVA100F@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  7437. %@NL@%
  7438.      >U #40 L 1%@NL@%
  7439.      39B0:0040 89C3           MOV        BX,AX%@NL@%
  7440.      >A #40%@NL@%
  7441.      39B?0:0040 MOV     CX,AX%@NL@%
  7442.      39B0:0042%@NL@%
  7443.      >U #40 L 1%@NL@%
  7444.      39B0:0040 89C1           MOV        CX,AX%@NL@%
  7445.      >%@AS@%%@NL@%
  7446. %@NL@%
  7447. %@CR:MCVA100G@%%@4@%The example above (in FORTRAN notation) modifies the instruction at address%@EH@%
  7448. %@AS@%40%@AE@% hexadecimal so that it moves data into the %@AS@%CX%@AE@% register instead of the %@AS@%BX%@AE@%
  7449. register (%@AS@%40%@AE@% hexadecimal is notated as %@AS@%0x40%@AE@% in C, and as %@AS@%&H40%@AE@% in BASIC). The
  7450. Unassemble command (%@AB@%U%@AE@%) is used to show the instruction before and after the
  7451. assembly.%@NL@%
  7452. %@NL@%
  7453. %@CR:MCVA100H@%%@4@%You can modify a portion of code for testing, as in the example, but you%@EH@%
  7454. cannot save the modified program. You must modify your source code and
  7455. recompile.%@NL@%
  7456. %@NL@%
  7457. %@NL@%
  7458. %@CR:MCVA2000@%%@2@%%@AB@%10.2  Enter Commands%@AE@%%@EH@%%@NL@%
  7459. %@NL@%
  7460. %@CR:MCVA2001@%%@4@%The CodeView debugger has several commands for entering data to memory. You%@EH@%
  7461. can use these commands to modify either code or data, though code can
  7462. usually be modified more easily with the Assemble command (%@AB@%A%@AE@%). The Enter
  7463. commands are listed below:%@NL@%
  7464. %@NL@%
  7465. %@CR:MCVA2002@%%@AB@%Command                     Command Name%@AE@%%@EH@%%@NL@%
  7466. %@NL@%
  7467. %@AB@%E%@AE@%                           Enter (size is the default type)%@NL@%
  7468. %@NL@%
  7469. %@AB@%EB%@AE@%                          Enter Bytes%@NL@%
  7470. %@NL@%
  7471. %@AB@%EA%@AE@%                          Enter ASCII%@NL@%
  7472. %@NL@%
  7473. %@AB@%EI%@AE@%                          Enter Integers%@NL@%
  7474. %@NL@%
  7475. %@AB@%EU%@AE@%                          Enter Unsigned Integers%@NL@%
  7476. %@NL@%
  7477. %@AB@%EW%@AE@%                          Enter Words%@NL@%
  7478. %@NL@%
  7479. %@AB@%ED%@AE@%                          Enter Double Words%@NL@%
  7480. %@NL@%
  7481. %@AB@%ES%@AE@%                          Enter Short Reals%@NL@%
  7482. %@NL@%
  7483. %@AB@%EL%@AE@%                          Enter Long Reals%@NL@%
  7484. %@NL@%
  7485. %@AB@%ET%@AE@%                          Enter 10-Byte Reals%@NL@%
  7486. %@NL@%
  7487. %@CR:MCVA2003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7488. %@NL@%
  7489. %@CR:MCVA2004@%%@4@%The Enter commands cannot be executed with the mouse.%@EH@%%@NL@%
  7490. %@NL@%
  7491. %@CR:MCVA2005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7492. %@NL@%
  7493. %@CR:MCVA2006@%%@4@%The Enter commands cannot be executed with keyboard commands.%@EH@%%@NL@%
  7494. %@NL@%
  7495. %@CR:MCVA2007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7496. %@NL@%
  7497. %@CR:MCVA2008@%%@4@%To enter data (or code) to memory with a dialog command, enter a command%@EH@%
  7498. line with the following syntax:%@NL@%
  7499. %@NL@%
  7500.      %@AB@%E%@AE@%«%@AI@%type%@AE@%» %@AI@%address%@AE@% «%@AI@%list%@AE@%»%@NL@%
  7501. %@NL@%
  7502. %@CR:MCVA2009@%%@4@%The %@AI@%type%@AE@% is a one-letter specifier that indicates the type of the data to be%@EH@%
  7503. entered. The %@AI@%address%@AE@% indicates where the data will be entered. If no segment
  7504. is given in the address, the data segment (DS) is assumed.%@NL@%
  7505. %@NL@%
  7506. %@CR:MCVA200A@%%@4@%The %@AI@%list%@AE@% can consist of one or more expressions that evaluate to data of the%@EH@%
  7507. size specified by %@AI@%type%@AE@% (the expressions in the list are separated by
  7508. spaces). This data will be entered to memory at %@AI@%address%@AE@%. If one of the
  7509. values in the list is invalid, an error message will be displayed. The
  7510. values preceding the error are entered; values at and following the error
  7511. are not entered.%@NL@%
  7512. %@NL@%
  7513. %@CR:MCVA200B@%%@4@%The expressions in the list are evaluated in the current radix, regardless%@EH@%
  7514. of the size and type of data being entered. For example, if the radix is 10
  7515. and you give the value 10 in a list with the Enter Words command, the
  7516. decimal value 10 will be entered even though word values are normally
  7517. entered in hexadecimal. This means that the Enter Words, Enter Integers, and
  7518. Enter Unsigned Integers commands are identical when used with the list
  7519. method since two-byte data are being entered for each command.%@NL@%
  7520. %@NL@%
  7521. %@CR:MCVA200C@%%@4@%If %@AI@%list%@AE@% is not given, the CodeView debugger will prompt for values to be%@EH@%
  7522. entered to memory. Values entered in response to prompts are accepted in
  7523. hexadecimal for the Enter Bytes, Enter ASCII, Enter Words, and Enter Double
  7524. Words commands. The Enter Integers command accepts signed decimal integers,
  7525. while the Enter Unsigned Integers command accepts unsigned decimal integers.
  7526. The Enter Short Reals, Enter Long Reals, and Enter 10-Byte Reals commands
  7527. accept decimal floating-point values.%@NL@%
  7528. %@NL@%
  7529. %@CR:MCVA200D@%%@4@%With the prompting method of data entry, the CodeView debugger prompts for a%@EH@%
  7530. new value at %@AI@%address%@AE@% by displaying the address and its current value. As
  7531. explained below, you can then replace the value, skip to the next value,
  7532. return to a previous value, or exit the command.%@NL@%
  7533. %@NL@%
  7534. %@CR:MCVA200E@%  1. To replace the value, type the new value after the current value.%@NL@%
  7535. %@NL@%
  7536.   2. To skip to the next value, press the SPACEBAR. Once you have skipped to%@NL@%
  7537.      the next value, you can change its value or skip to the following%@NL@%
  7538.      value. If you pass the end of the display, the CodeView debugger%@NL@%
  7539.      displays a new address to start a new display line.%@NL@%
  7540. %@NL@%
  7541.   3. To return to the preceding value, type a backslash (%@AB@%\%@AE@%). When you return%@NL@%
  7542.      to the preceding value, the debugger starts a new display line with the%@NL@%
  7543.      address and value.%@NL@%
  7544. %@NL@%
  7545.   4. To stop entering values and return to the CodeView prompt, press ENTER.%@NL@%
  7546.      You can exit the command at any time.%@NL@%
  7547. %@NL@%
  7548. %@CR:MCVA200F@%%@4@%Sections 10.2.1%@BO:   707ab@%-10.2.10 discuss the Enter commands in order of the size of%@EH@%
  7549.  
  7550. data they accept.%@NL@%
  7551. %@NL@%
  7552. %@CR:MCVA200G@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7553. %@NL@%
  7554.      >EW PLACE 16 32%@NL@%
  7555. %@NL@%
  7556. %@CR:MCVA200H@%%@4@%The example above shows how to enter two word-sized values at the %@AS@%PLACE%@AE@%%@EH@%
  7557. address.%@NL@%
  7558. %@NL@%
  7559.      >EW PLACE%@NL@%
  7560. %@NL@%
  7561.      3DA5:0B20 00F3.%@AH@% %@AE@%%@NL@%
  7562. %@NL@%
  7563. %@CR:MCVA200I@%%@4@%The example above illustrates the prompting method of entering data. When%@EH@%
  7564. you supply the address where you want to enter data but supply no data, the
  7565. CodeView debugger displays the current value of the address and waits for
  7566. you to enter a new value. The reverse-video space (%@AH@% %@AE@%) in this example and
  7567. the examples below represents the CodeView cursor. You change the value %@AS@%F3%@AE@%
  7568. to the new value 16 (10 hexadecimal) by typing %@AS@%10%@AE@% (without pressing ENTER
  7569. yet). The value must be typed in hexadecimal for the Enter Words command,
  7570. as shown below:%@NL@%
  7571. %@NL@%
  7572.      >EW PLACE%@NL@%
  7573. %@NL@%
  7574.      3DA5:0B20  00F3.10%@AH@% %@AE@%%@NL@%
  7575. %@NL@%
  7576. %@CR:MCVA200J@%%@4@%You can then skip to the next value by pressing the SPACEBAR. The CodeView%@EH@%
  7577. debugger responds by displaying the next value, as shown below:%@NL@%
  7578. %@NL@%
  7579.      >EW PLACE%@NL@%
  7580. %@NL@%
  7581.      3DA5:0B20  00F3.10  4F20.%@AH@% %@AE@%%@AS@%%@NL@%
  7582. %@NL@%
  7583. %@CR:MCVA200K@%%@4@%You can then type another hexadecimal value, such as %@AS@%30%@AE@%:%@EH@%%@NL@%
  7584. %@NL@%
  7585.      >EW PLACE%@NL@%
  7586. %@NL@%
  7587.      3DA5:0B20  00F3.10  4F20.30%@AH@% %@AE@%%@AS@%%@NL@%
  7588. %@NL@%
  7589. %@CR:MCVA200L@%%@4@%To move to the next value, press the SPACEBAR.%@EH@%%@NL@%
  7590. %@NL@%
  7591.      >EW PLACE%@NL@%
  7592. %@NL@%
  7593.      3DA5:0B20  00F3.10  4F20.30  3DC1.%@AH@% %@AE@%%@AS@%%@NL@%
  7594. %@NL@%
  7595. %@CR:MCVA200M@%%@4@%Assume you realize that the last value entered, %@AS@%30%@AE@%, is incorrect. You really%@EH@%
  7596. wanted to enter %@AS@%20%@AE@%. You could return to the previous value by typing a
  7597. backslash. The CodeView debugger starts a new line, starting with the
  7598. previous value. Note that the backslash is not echoed on the screen:%@NL@%
  7599. %@NL@%
  7600.      >EW PLACE%@NL@%
  7601. %@NL@%
  7602.      3DA5:0B20  00F3.10  4F20.30  3DC1.%@NL@%
  7603.      3DA5:0B22  0030.%@AH@% %@AE@%%@AS@%%@NL@%
  7604. %@NL@%
  7605. %@CR:MCVA200N@%%@4@%Type the correct value, %@AS@%20%@AE@%:%@EH@%%@NL@%
  7606. %@NL@%
  7607.      >EW PLACE%@NL@%
  7608. %@NL@%
  7609.      3DA5:0B20  00F3.10  4F20.30  3DC1.%@NL@%
  7610.      3DA5:0B22  0030.20%@AH@% %@AE@%%@AS@%%@NL@%
  7611. %@NL@%
  7612. %@CR:MCVA200O@%%@4@%If this is the last value you want to enter, press ENTER to stop. The%@EH@%
  7613. CodeView prompt reappears, as shown below:%@NL@%
  7614. %@NL@%
  7615.      >EW PLACE%@NL@%
  7616. %@NL@%
  7617.      3DA5:0B20  00F3.10  4F20.30  3DC1.%@NL@%
  7618.      3DA5:0B22  0030.20%@NL@%
  7619.      >%@AH@% %@AE@%%@AS@%%@NL@%
  7620. %@NL@%
  7621. %@NL@%
  7622. %@CR:MCVA2100@%%@3@%%@AB@%10.2.1  Enter Command%@AE@%%@EH@%%@NL@%
  7623. %@NL@%
  7624. %@CR:MCVA2101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  7625. %@NL@%
  7626.      %@AB@%E%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  7627. %@NL@%
  7628. %@CR:MCVA2102@%%@4@%The Enter command enters one or more values into memory at the specified%@EH@%
  7629. %@AI@%address%@AE@%. The data are entered in the format of the default type, which is
  7630. the last type specified with a Dump, Enter, Watch Memory, or Tracepoint
  7631. Memory command. If none of these commands has been entered during the
  7632. session, the default type is bytes.%@NL@%
  7633. %@NL@%
  7634. %@CR:MCVA2103@%%@4@%Use this command with caution when entering values in the list format;%@EH@%
  7635. values will be truncated if you enter a word-sized value when the default
  7636. type is actually bytes. If you are not sure of the current default type,
  7637. specify the size in the command.%@NL@%
  7638. %@NL@%
  7639. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7640. %@AI@%NOTE%@AE@%%@NL@%
  7641.    The Execute command and the Enter command have the same command letter%@NL@%
  7642.    (%@AB@%E%@AE@%). The difference is that the Execute command never takes an argument;%@NL@%
  7643.    the Enter command always requires at least one argument.%@NL@%
  7644. ───────────────────────────────────────────────────────────────────────────%@NL@%
  7645. %@NL@%
  7646. %@NL@%
  7647. %@CR:MCVA2200@%%@3@%%@AB@%10.2.2  Enter Bytes Command%@AE@%%@EH@%%@NL@%
  7648. %@NL@%
  7649. %@CR:MCVA2201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  7650. %@NL@%
  7651.      %@AB@%EB%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  7652. %@NL@%
  7653. %@CR:MCVA2202@%%@4@%The Enter Bytes command enters one or more byte values into memory at%@EH@%
  7654. %@AI@%address%@AE@%. The optional %@AI@%list%@AE@% can be entered as a list of expressions separated
  7655. by spaces. The expressions are evaluated and entered in the current radix.
  7656. If %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values that must
  7657. be entered in hexadecimal.%@NL@%
  7658. %@NL@%
  7659. %@CR:MCVA2203@%%@4@%The Enter Bytes command can also be used to enter strings, as described in%@EH@%
  7660. Section 10.2.3%@BO:   7124c@%, "Enter ASCII Command."%@NL@%
  7661. %@NL@%
  7662. %@CR:MCVA2204@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7663. %@NL@%
  7664.      >EB 256 10 20 30%@NL@%
  7665.      >%@NL@%
  7666. %@NL@%
  7667. %@CR:MCVA2205@%%@4@%If the current radix is 10, the above example replaces the three bytes at%@EH@%
  7668. DS:256, DS:257, and DS:258 with the decimal values %@AS@%10%@AE@%, %@AS@%20%@AE@%, and %@AS@%30%@AE@%. (These
  7669. three bytes correspond to the hexadecimal addresses DS:0100, DS:0101, and
  7670. DS:0102.)%@NL@%
  7671. %@NL@%
  7672.      >EB 256%@NL@%
  7673. %@NL@%
  7674.      3DA5:0100  130F.A%@NL@%
  7675.      >%@AS@%%@NL@%
  7676. %@NL@%
  7677. %@CR:MCVA2206@%%@4@%The example above replaces the byte at DS:256 (DS:0100 hexadecimal) with 10%@EH@%
  7678. (0A hexadecimal).%@NL@%
  7679. %@NL@%
  7680. %@NL@%
  7681. %@CR:MCVA2300@%%@3@%%@AB@%10.2.3  Enter ASCII Command%@AE@%%@EH@%%@NL@%
  7682. %@NL@%
  7683. %@CR:MCVA2301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  7684. %@NL@%
  7685.      %@AB@%EA%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  7686. %@NL@%
  7687. %@CR:MCVA2302@%%@4@%The Enter ASCII command works in the same way as the Enter Bytes command%@EH@%
  7688. (%@AB@%EB%@AE@%) described in Section 10.2.2%@BO:   70cc7@% above. The %@AI@%list%@AE@% version of this command can
  7689. be used to enter a string expression.%@NL@%
  7690. %@NL@%
  7691. %@CR:MCVA2303@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  7692. %@NL@%
  7693.      >EA message "File cannot be found"%@NL@%
  7694.      >%@NL@%
  7695. %@NL@%
  7696. %@CR:MCVA2304@%%@4@%In the example above, the string %@AS@%File cannot be found%@AE@% is entered starting at%@EH@%
  7697. the symbolic address %@AS@%message%@AE@%. (Note that the double quotation marks are
  7698. CodeView string delimiters.)%@NL@%
  7699. %@NL@%
  7700. %@CR:MCVA2305@%%@4@%You can also use the Enter Bytes command to enter a string expression, or%@EH@%
  7701. you can enter nonstring values using the Enter ASCII command.%@NL@%
  7702. %@NL@%
  7703. %@NL@%
  7704. %@CR:MCVA2400@%%@3@%%@AB@%10.2.4  Enter Integers Command%@AE@%%@EH@%%@NL@%
  7705. %@NL@%
  7706. %@CR:MCVA2401@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  7707. %@NL@%
  7708.      %@AB@%EI%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  7709. %@NL@%
  7710. %@CR:MCVA2402@%%@4@%The Enter Integers command enters one or more word values into memory at%@EH@%
  7711. %@AI@%address%@AE@% using the signed-integers format. With the CodeView debugger, a
  7712. signed integer can be any decimal integer between -32,768 and 32,767.%@NL@%
  7713. %@NL@%
  7714. %@CR:MCVA2403@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of expressions separated by%@EH@%
  7715. spaces. The expressions are entered and evaluated in the current radix. If
  7716. %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values that must be
  7717. entered in decimal.%@NL@%
  7718. %@NL@%
  7719. %@CR:MCVA2404@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7720. %@NL@%
  7721.      >EI 256 -10 10 -20%@NL@%
  7722.      >%@NL@%
  7723. %@NL@%
  7724. %@CR:MCVA2405@%%@4@%If the current radix is 10, the example above replaces the three integers at%@EH@%
  7725. DS:256, DS:258, and DS:260 with the decimal values %@AS@%-10%@AE@%, 10, and %@AS@%-20%@AE@%. (The
  7726. three addresses correspond to the three hexadecimal addresses DS:0100,
  7727. DS:0102, and DS:0104.)%@NL@%
  7728. %@NL@%
  7729.      >EI 256%@NL@%
  7730. %@NL@%
  7731.      3DA5:0100  130F.-10%@NL@%
  7732.      >%@NL@%
  7733. %@NL@%
  7734. %@CR:MCVA2406@%%@4@%The example above replaces the integer at DS:256 (hexadecimal address%@EH@%
  7735. DS:0100) with %@AS@%-10%@AE@%.%@AS@%%@NL@%
  7736. %@NL@%
  7737. %@NL@%
  7738. %@CR:MCVA2500@%%@3@%%@AB@%10.2.5  Enter Unsigned Integers Command%@AE@%%@EH@%%@NL@%
  7739. %@NL@%
  7740. %@CR:MCVA2501@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  7741. %@NL@%
  7742.      %@AB@%EU%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  7743. %@NL@%
  7744. %@CR:MCVA2502@%%@4@%The Enter Unsigned Integers command enters one or more word values into%@EH@%
  7745. memory at %@AI@%address%@AE@% using the unsigned-integers format. With the CodeView
  7746. debugger, an unsigned integer can be any decimal integer between 0 and
  7747. 65,535. The optional %@AI@%list%@AE@% can be entered as a list of expressions separated
  7748. by spaces. The expressions are entered and evaluated in the current radix.
  7749. If %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values that must
  7750. be entered in decimal.%@NL@%
  7751. %@NL@%
  7752. %@CR:MCVA2503@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7753. %@NL@%
  7754.      >EU 256 10 20 30%@NL@%
  7755.      >%@NL@%
  7756. %@NL@%
  7757. %@CR:MCVA2504@%%@4@%If the current radix is 10, the example above replaces the three unsigned%@EH@%
  7758. integers at DS:256, DS:258, and DS:260 with the decimal values %@AS@%10%@AE@%, %@AS@%20%@AE@%, and
  7759. %@AS@%30%@AE@%. (These addresses correspond to the hexadecimal addresses DS:0100,
  7760. DS:0102, and DS:0104.)%@NL@%
  7761. %@NL@%
  7762.      >EU 256%@NL@%
  7763. %@NL@%
  7764.      3DA5:0100  130F.10%@NL@%
  7765.      >%@NL@%
  7766. %@NL@%
  7767. %@CR:MCVA2505@%%@4@%The example above replaces the integer at DS:256 (DS:0100 hexadecimal) with%@EH@%
  7768. %@AS@%10%@AE@%.%@NL@%
  7769. %@NL@%
  7770. %@NL@%
  7771. %@CR:MCVA2600@%%@3@%%@AB@%10.2.6  Enter Words Command%@AE@%%@EH@%%@NL@%
  7772. %@NL@%
  7773. %@CR:MCVA2601@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  7774. %@NL@%
  7775.      %@AB@%EW%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  7776. %@NL@%
  7777. %@CR:MCVA2602@%%@4@%The Enter Words command enters one or more word values into memory at%@EH@%
  7778. %@AI@%address%@AE@%.%@NL@%
  7779. %@NL@%
  7780. %@CR:MCVA2603@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of expressions separated by%@EH@%
  7781. spaces. The expressions are entered and evaluated in the current radix. If
  7782. %@AI@%list%@AE@% is not given, CodeView prompts for new values that must be entered in
  7783. hexadecimal.%@NL@%
  7784. %@NL@%
  7785. %@CR:MCVA2604@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7786. %@NL@%
  7787.      >EW 256 10 20 30%@NL@%
  7788.      >%@NL@%
  7789. %@NL@%
  7790. %@CR:MCVA2605@%%@4@%If the current radix is 10, the example above replaces the three words at%@EH@%
  7791. DS:256, DS:258, and DS:260 with the decimal values %@AS@%10%@AE@%, %@AS@%20%@AE@%, and %@AS@%30%@AE@%. (These
  7792. addresses correspond to the hexadecimal addresses DS:0100, DS:0102, and
  7793. DS:0104.)%@NL@%
  7794. %@NL@%
  7795.      >EW 256%@NL@%
  7796. %@NL@%
  7797.      3DA5:0100  130F.A%@NL@%
  7798.      >%@NL@%
  7799. %@NL@%
  7800. %@CR:MCVA2606@%%@4@%The example above replaces the integer at DS:256 (DS:0100 hexadecimal) with%@EH@%
  7801. 10 (0A hexadecimal).%@NL@%
  7802. %@NL@%
  7803. %@NL@%
  7804. %@CR:MCVA2700@%%@3@%%@AB@%10.2.7  Enter Double Words Command%@AE@%%@EH@%%@NL@%
  7805. %@NL@%
  7806. %@CR:MCVA2701@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  7807. %@NL@%
  7808.      %@AB@%ED%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  7809. %@NL@%
  7810. %@CR:MCVA2702@%%@4@%The Enter Double Words command enters one or more double-word values into%@EH@%
  7811. memory at %@AI@%address%@AE@%. Double words are displayed and entered in the address%@NL@%
  7812. %@NL@%
  7813. %@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@%
  7814. colon is omitted and only one word entered, only the offset portion of the
  7815. address will be changed.%@NL@%
  7816. %@NL@%
  7817. %@CR:MCVA2704@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of expressions separated by%@EH@%
  7818. spaces. The expressions are entered and evaluated in the current radix. If
  7819. %@AI@%list%@AE@% is not given, CodeView prompts for new values that must be entered in
  7820. hexadecimal.%@NL@%
  7821. %@NL@%
  7822. %@CR:MCVA2705@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7823. %@NL@%
  7824.      >ED 256 8700:12008%@NL@%
  7825.      >%@NL@%
  7826. %@NL@%
  7827. %@CR:MCVA2706@%%@4@%If the current radix is 10, the example above replaces the double words at%@EH@%
  7828. DS:256 (DS:0100 hexadecimal) with the decimal address %@AS@%8700:12008%@AE@%
  7829. (hexadecimal address 21FC:2EE8).%@NL@%
  7830. %@NL@%
  7831.      >ED 256%@NL@%
  7832. %@NL@%
  7833.      3DA5:0100  21FC:2EE8.2EE9%@NL@%
  7834.      >%@NL@%
  7835. %@NL@%
  7836. %@CR:MCVA2707@%%@4@%The example above replaces the offset portion of the double word at DS:256%@EH@%
  7837. (DS:0100 hexadecimal) with %@AS@%2EE9%@AE@% hexadecimal. Since the segment portion of
  7838. the address is not provided, the existing segment (%@AS@%21FC%@AE@% hexadecimal) is
  7839. unchanged.%@NL@%
  7840. %@NL@%
  7841. %@NL@%
  7842. %@CR:MCVA2800@%%@3@%%@AB@%10.2.8  Enter Short Reals Command%@AE@%%@EH@%%@NL@%
  7843. %@NL@%
  7844. %@CR:MCVA2801@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  7845. %@NL@%
  7846.      %@AB@%ES%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  7847. %@NL@%
  7848. %@CR:MCVA2802@%%@4@%The Enter Short Reals command enters one or more short-real values into%@EH@%
  7849. memory at %@AI@%address%@AE@%.%@NL@%
  7850. %@NL@%
  7851. %@CR:MCVA2803@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of real numbers separated by%@EH@%
  7852. spaces. The numbers must be entered in decimal, regardless of the current
  7853. radix. If %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values
  7854. that must be entered in decimal. Short-real numbers can be entered either in
  7855. floating-point format or in scientific-notation format.%@NL@%
  7856. %@NL@%
  7857. %@CR:MCVA2804@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7858. %@NL@%
  7859.      >ES 256 23.479 1/4 -1.65E+4 235%@NL@%
  7860.      >%@NL@%
  7861. %@NL@%
  7862. %@CR:MCVA2805@%%@4@%The example above replaces the four numbers at DS:256, DS:260, DS:264, and%@EH@%
  7863. DS:268 with the real numbers %@AS@%23.479%@AE@%, %@AS@%0.25%@AE@%, %@AS@%-1650.0%@AE@%, and %@AS@%235.0%@AE@%. (These
  7864. addresses correspond to the hexadecimal addresses DS:0100, DS:0104, DS:0108,
  7865. and DS:0112.)%@NL@%
  7866. %@NL@%
  7867.      >ES PI%@NL@%
  7868.      3DA5:0064  42 79 74 65   7.215589E+022  3.141593%@NL@%
  7869.      >%@NL@%
  7870. %@NL@%
  7871. %@CR:MCVA2806@%%@4@%The example above replaces the number at the symbolic address %@AS@%PI%@AE@% with%@EH@%
  7872. %@AS@%3.141593%@AE@%.%@NL@%
  7873. %@NL@%
  7874. %@NL@%
  7875. %@CR:MCVA2900@%%@3@%%@AB@%10.2.9  Enter Long Reals Command%@AE@%%@EH@%%@NL@%
  7876. %@NL@%
  7877. %@CR:MCVA2901@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  7878. %@NL@%
  7879.      %@AB@%EL%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  7880. %@NL@%
  7881. %@CR:MCVA2902@%%@4@%The Enter Long Reals command enters one or more long-real values into memory%@EH@%
  7882. at %@AI@%address%@AE@%.%@NL@%
  7883. %@NL@%
  7884. %@CR:MCVA2903@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of real numbers separated by%@EH@%
  7885. spaces. The numbers must be entered in decimal, regardless of the current
  7886. radix. If %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values
  7887. that must be entered in decimal. Long-real numbers can be entered either in
  7888. floating-point format or in scientific-notation format.%@NL@%
  7889. %@NL@%
  7890. %@CR:MCVA2904@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7891. %@NL@%
  7892.      >EL 256 23.479 1/4 -1.65E+4 235%@NL@%
  7893.      >%@NL@%
  7894. %@NL@%
  7895. %@CR:MCVA2905@%%@4@%The example above replaces the four numbers at DS:256, DS:264, DS:272, and%@EH@%
  7896. DS:280 with the real numbers %@AS@%23.479%@AE@%, %@AS@%0.25%@AE@%, %@AS@%-1650.0%@AE@%, and %@AS@%235.0%@AE@% . (These
  7897. addresses correspond to the hexadecimal addresses DS:0100, DS:0108, DS:0110,
  7898. and DS:0118.)%@NL@%
  7899. %@NL@%
  7900.      >EL PI%@NL@%
  7901.      3DA5:0064  42 79 74 65 DC OF 49 40   5.012391E+001  3.141593%@NL@%
  7902.      >%@AS@%%@NL@%
  7903. %@NL@%
  7904. %@CR:MCVA2906@%%@4@%The example above replaces the number at the symbolic address %@AS@%PI%@AE@% with%@EH@%
  7905. %@AS@%3.141593%@AE@%.%@NL@%
  7906. %@NL@%
  7907. %@NL@%
  7908. %@CR:MCVA2A00@%%@3@%%@AB@%10.2.10  Enter 10-Byte Reals Command%@AE@%%@EH@%%@NL@%
  7909. %@NL@%
  7910. %@CR:MCVA2A01@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  7911. %@NL@%
  7912.      %@AB@%ET%@AE@% %@AI@%address%@AE@%«%@AI@%list%@AE@%»%@NL@%
  7913. %@NL@%
  7914. %@CR:MCVA2A02@%%@4@%The Enter 10-Byte Reals command enters one or more 10-byte-real values into%@EH@%
  7915. memory at %@AI@%address%@AE@%.%@NL@%
  7916. %@NL@%
  7917. %@CR:MCVA2A03@%%@4@%The optional %@AI@%list%@AE@% can be entered as a list of real numbers separated by%@EH@%
  7918. spaces. The numbers must be entered in decimal, regardless of the current
  7919. radix. If %@AI@%list%@AE@% is not given, the CodeView debugger prompts for new values
  7920. that must be entered in decimal. The numbers can be entered either in
  7921. floating-point format or in scientific-notation format.%@NL@%
  7922. %@NL@%
  7923. %@CR:MCVA2A04@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7924. %@NL@%
  7925.      >ET 256 23.479 1/4 -1.65E+4 235%@NL@%
  7926.      >%@NL@%
  7927. %@NL@%
  7928. %@CR:MCVA2A05@%%@4@%The example above replaces the four numbers at DS:256, DS:266, DS:276, and%@EH@%
  7929. DS:286 with the real numbers %@AS@%23.479%@AE@%, %@AS@%0.25%@AE@%, %@AS@%-1650.0%@AE@%, and %@AS@%235.0%@AE@%. (These
  7930. addresses correspond to the hexadecimal addresses DS:0100, DS:010A, DS:0114,
  7931. and DS:011E.)%@NL@%
  7932. %@NL@%
  7933. %@NL@%
  7934.      >ET PI%@NL@%
  7935.      3DA5:0064  42 79 74 65 DC 0F 49 40 7F BD  -3.292601E-193  3.141593%@NL@%
  7936.      >%@NL@%
  7937. %@NL@%
  7938. %@CR:MCVA2A06@%%@4@%The example above replaces the number at the symbolic address %@AS@%PI%@AE@% with%@EH@%
  7939. %@AS@%3.141593%@AE@%.%@NL@%
  7940. %@NL@%
  7941. %@NL@%
  7942. %@CR:MCVA3000@%%@2@%%@AB@%10.3  Fill Memory Command%@AE@%%@EH@%%@NL@%
  7943. %@NL@%
  7944. %@CR:MCVA3001@%%@4@%The Fill Memory command provides an efficient way of filling up a large or%@EH@%
  7945. small block of memory with any values you specify. It is primarily of
  7946. interest to assembly programmers because the command enters values directly
  7947. into memory. However, you may find it useful for initializing large data
  7948. areas such as an array or structure.%@NL@%
  7949. %@NL@%
  7950. %@CR:MCVA3002@%%@4@%You can enter arguments to the Fill Memory command using any radix.%@EH@%%@NL@%
  7951. %@NL@%
  7952. %@CR:MCVA3003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7953. %@NL@%
  7954. %@CR:MCVA3004@%%@4@%The Fill Memory command cannot be executed with a mouse.%@EH@%%@NL@%
  7955. %@NL@%
  7956. %@CR:MCVA3005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  7957. %@NL@%
  7958. %@CR:MCVA3006@%%@4@%The Fill Memory command cannot be executed with a keyboard command.%@EH@%%@NL@%
  7959. %@NL@%
  7960. %@CR:MCVA3007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  7961. %@NL@%
  7962. %@CR:MCVA3008@%%@4@%To fill an area of memory with values you specify, enter the Fill Memory%@EH@%
  7963. command as follow:%@NL@%
  7964. %@NL@%
  7965.      %@AB@%F%@AE@% %@AI@%range%@AE@% %@AI@%list%@AE@%%@NL@%
  7966. %@NL@%
  7967. %@CR:MCVA3009@%%@4@%The Fill Memory command fills the addresses in the specified %@AI@%range%@AE@% with the%@EH@%
  7968. byte values specified in %@AI@%list%@AE@%. The values in the list are repeated until the
  7969. whole range is filled. (Thus, if you specify only one value, the entire
  7970. range is filled with that same value.) If the %@AI@%list%@AE@% has more values than the
  7971. number of bytes in the %@AI@%range%@AE@%, the command ignores any extra values.%@NL@%
  7972. %@NL@%
  7973. %@CR:MCVA300A@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  7974. %@NL@%
  7975.      >F 100 L 100 0   ;* hexadecimal radix assumed%@NL@%
  7976.      >%@NL@%
  7977. %@NL@%
  7978. %@CR:MCVA300B@%%@4@%The first example fills 255 (100 hexadecimal) bytes of memory starting at%@EH@%
  7979. DS:0100 with the value 0. This command could be used to reinitialize the
  7980. program's data without having to restart the program.%@NL@%
  7981. %@NL@%
  7982.      >F table L 64 42 79 74 ;* hexadecimal radix assumed%@NL@%
  7983.      >%@NL@%
  7984. %@NL@%
  7985. %@CR:MCVA300C@%%@4@%The second example fills the 100 (64 hexadecimal) bytes starting at %@AS@%table%@AE@%%@EH@%
  7986. with the following hexadecimal byte values: 42, 79, 74. These three values
  7987. are repeated until all 100 bytes are filled.%@NL@%
  7988. %@NL@%
  7989. %@NL@%
  7990. %@CR:MCVA4000@%%@2@%%@AB@%10.4  Move Memory Command%@AE@%%@EH@%%@NL@%
  7991. %@NL@%
  7992. %@CR:MCVA4001@%%@4@%The Move Memory command enables you to copy all the values in one block of%@EH@%
  7993. memory directly to another block of memory of the same size. This command is
  7994. of most interest to assembly programmers, but it can be used by anyone who
  7995. wants to do large data transfers. For example, you can use this command to
  7996. copy all the values in one array to the elements of another.%@NL@%
  7997. %@NL@%
  7998. %@CR:MCVA4002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  7999. %@NL@%
  8000. %@CR:MCVA4003@%%@4@%The Move Memory command cannot be executed with the mouse.%@EH@%%@NL@%
  8001. %@NL@%
  8002. %@CR:MCVA4004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8003. %@NL@%
  8004. %@CR:MCVA4005@%%@4@%The Move Memory command cannot be executed with a keyboard command.%@EH@%%@NL@%
  8005. %@NL@%
  8006. %@CR:MCVA4006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8007. %@NL@%
  8008. %@CR:MCVA4007@%%@4@%To copy the values in one block of memory to another, enter the Move Memory%@EH@%
  8009. command with the following syntax:%@NL@%
  8010. %@NL@%
  8011.      %@AB@%M%@AE@% %@AI@%range%@AE@% %@AI@%address%@AE@%%@NL@%
  8012. %@NL@%
  8013. %@CR:MCVA4008@%%@4@%The values in the block of memory specified by %@AI@%range%@AE@% are copied to a block%@EH@%
  8014. of the same size beginning at %@AI@%address%@AE@%. All data in %@AI@%range%@AE@% are guaranteed to
  8015. be copied completely over to the destination block, even if the two blocks
  8016. overlap. However, if they do overlap, some of the original data in %@AI@%range%@AE@%
  8017. will be altered.%@NL@%
  8018. %@NL@%
  8019. %@CR:MCVA4009@%%@4@%To prevent loss of data, the Move Memory command copies data starting at the%@EH@%
  8020. source block's lowest address whenever the source is at a higher address
  8021. than the destination. If the source is at a lower address, the Move Memory
  8022. command copies data beginning at the source block's highest address.%@NL@%
  8023. %@NL@%
  8024. %@CR:MCVA400A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  8025. %@NL@%
  8026.      >M arr1(1) L arsize arr2(1)  ;* FORTRAN example%@NL@%
  8027.      >%@NL@%
  8028. %@NL@%
  8029. %@CR:MCVA400B@%%@4@%In the example above, the block of memory beginning with the first element%@EH@%
  8030. of %@AS@%arr1%@AE@% and %@AS@%arsize%@AE@% bytes long is copied directly to a block of the same size
  8031. beginning at the address of the first element of %@AS@%arr2%@AE@%. In C, this command
  8032. would be entered as %@AS@%M arr1[0] L arsize arr2[0]%@AE@%.%@NL@%
  8033. %@NL@%
  8034. %@NL@%
  8035. %@CR:MCVA5000@%%@2@%%@AB@%10.5  Port Output Command%@AE@%%@EH@%%@NL@%
  8036. %@NL@%
  8037. %@CR:MCVA5001@%%@4@%The Port Output command sends specific byte values to hardware ports. It is%@EH@%
  8038. primarily of use to assembly programmers writing code that interacts
  8039. directly with hardware.%@NL@%
  8040. %@NL@%
  8041. %@CR:MCVA5002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8042. %@NL@%
  8043. %@CR:MCVA5003@%%@4@%The Port Output command cannot be executed with a mouse.%@EH@%%@NL@%
  8044. %@NL@%
  8045. %@CR:MCVA5004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8046. %@NL@%
  8047. %@CR:MCVA5005@%%@4@%The Port Output command cannot be executed with a keyboard command.%@EH@%%@NL@%
  8048. %@NL@%
  8049. %@CR:MCVA5006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8050. %@NL@%
  8051. %@CR:MCVA5007@%%@4@%To output to a hardware port, enter the Port Output command with the%@EH@%
  8052. following syntax:%@NL@%
  8053. %@NL@%
  8054.      %@AB@%O%@AE@% %@AI@%port byte%@AE@%%@NL@%
  8055. %@NL@%
  8056. %@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@%
  8057. port address.%@NL@%
  8058. %@NL@%
  8059. %@CR:MCVA5009@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  8060. %@NL@%
  8061.      >O 2F8 4F      %@AI@%;* hexadecimal system radix assumed%@AE@%%@NL@%
  8062.      >%@NL@%
  8063. %@NL@%
  8064. %@CR:MCVA500A@%%@4@%The byte value %@AS@%4F%@AE@% hexadecimal is sent to output port %@AS@%2F8%@AE@%.%@EH@%%@NL@%
  8065. %@NL@%
  8066. %@CR:MCVA500B@%%@4@%The example above assumes that the system radix is hexadecimal. However (as%@EH@%
  8067. with all other CodeView commands), you can enter the Port Output command
  8068. using any radix you prefer. Both the %@AI@%port%@AE@% and %@AI@%byte%@AE@% arguments assume system
  8069. radix unless you specify a radix override.%@NL@%
  8070. %@NL@%
  8071. %@CR:MCVA500C@%%@4@%The Port Output command is often used in conjunction with the Port Input%@EH@%
  8072. command discussed in Section 6.7%@BO:   546bf@%.%@NL@%
  8073. %@NL@%
  8074. %@NL@%
  8075. %@CR:MCVA6000@%%@2@%%@AB@%10.6  Register Command%@AE@%%@EH@%%@NL@%
  8076. %@NL@%
  8077. %@CR:MCVA6001@%%@4@%The Register command has two functions: it displays the contents of the%@EH@%
  8078. central processing unit registers and it changes the values of those
  8079. registers. The modification features of the command are explained in this
  8080. section. The display features of the Register command are explained in
  8081. Section 6.8.%@BO:   54cca@%%@NL@%
  8082. %@NL@%
  8083. %@CR:MCVA6002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8084. %@NL@%
  8085. %@CR:MCVA6003@%%@4@%The only register that can be changed with the mouse is the flags register.%@EH@%
  8086. The register's individual bits (called flags) can be set or cleared. To
  8087. change a flag, first make sure the register window is open. The window can
  8088. be opened by selecting Registers from the Options menu or by pressing F2.%@NL@%
  8089. %@NL@%
  8090. %@CR:MCVA6004@%%@4@%The flag values are shown as mnemonics in the bottom of the window. Point to%@EH@%
  8091. the flag you want to change and click either button. The mnemonic word
  8092. representing the flag value will change. The mnemonics for each flag are
  8093. shown in the second and third columns of Table 10.1 below. The color or
  8094. highlighting of the flag will also be reversed when you change a flag. Set
  8095. flags are shown in red on color monitors and in high-intensity text on
  8096. two-color monitors. Cleared flags are shown in light blue on color monitors
  8097. or normal text on two-color monitors.%@NL@%
  8098. %@NL@%
  8099. %@CR:MCVA6005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8100. %@NL@%
  8101. %@CR:MCVA6006@%%@4@%The registers cannot be changed with keyboard commands.%@EH@%%@NL@%
  8102. %@NL@%
  8103. %@CR:MCVA6007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8104. %@NL@%
  8105. %@CR:MCVA6008@%%@4@%To change the value of a register with a dialog command, enter a command%@EH@%
  8106. line with the following syntax:%@NL@%
  8107. %@NL@%
  8108.      %@AB@%R%@AE@% «%@AI@%registername%@AE@%««=»%@AI@%expression%@AE@%»»%@NL@%
  8109. %@NL@%
  8110. %@CR:MCVA6009@%%@4@%To modify the value in a register, type the command letter %@AS@%R%@AE@% followed by%@EH@%
  8111. %@AI@%registername%@AE@%. The CodeView debugger displays the current value of the
  8112. register and prompts for a new value. Press ENTER if you only want to
  8113. examine the value. If you want to change it, type an expression for the new
  8114. value and press ENTER.%@NL@%
  8115. %@NL@%
  8116. %@CR:MCVA600A@%%@4@%As an alternative, you can type both %@AI@%registername%@AE@% and %@AI@%expression%@AE@% in the same%@EH@%
  8117. command. You can use the equal sign (=) between %@AI@%registername%@AE@% and %@AI@%expression%@AE@%,
  8118. but a space has the same effect.%@NL@%
  8119. %@NL@%
  8120. %@CR:MCVA600B@%%@4@%The register name can be any of the following: AX, BX, CX, DX, CS, DS, SS,%@EH@%
  8121. ES, SP, BP, SI, DI, IP, or F (for flags). If you have a 386-based machine
  8122. and have turned the 386 option on, the register name can be one of the
  8123. 32-bit register names shown in table 4.9.%@NL@%
  8124. %@NL@%
  8125. %@CR:MCVA600C@%%@4@%To change a flag value, supply the register name F when you enter the%@EH@%
  8126. Register command. The command displays the value of each flag as a
  8127. two-letter name.%@NL@%
  8128. %@NL@%
  8129. %@CR:MCVA600D@%%@4@%At the end of the list of values, the command displays a dash (-). Enter new%@EH@%
  8130. values after the dash for the flags you wish to change, then press ENTER.
  8131. You can enter flag values in any order. Flags for which new values are not
  8132. entered remain unchanged. If you do not want to change any flags, press
  8133. ENTER.%@NL@%
  8134. %@NL@%
  8135. %@CR:MCVA600E@%%@4@%If you enter an illegal flag name, an error message is displayed. The flags%@EH@%
  8136. preceding the error are changed; flags at and following the error are not
  8137. changed.%@NL@%
  8138. %@NL@%
  8139. %@CR:MCVA600F@%%@4@%The flag values are shown in Table 10.1.%@EH@%%@NL@%
  8140. %@NL@%
  8141. %@CR:MCVAT100@%%@4@%%@AB@%Table 10.1  Flag-Value Mnemonics%@AE@%%@EH@%%@NL@%
  8142. %@NL@%
  8143. %@AB@%Flag Name                Set    Clear%@AE@%
  8144.  
  8145. Overflow                 %@AB@%OV     NV%@AE@%
  8146. Direction                %@AB@%DN     UP%@AE@%
  8147. Interrupt                %@AB@%EI     DI%@AE@%
  8148. Sign                     %@AB@%NG     PL%@AE@%
  8149. Zero                     %@AB@%ZR     NZ%@AE@%
  8150. Auxiliary carry          %@AB@%AC     NA%@AE@%
  8151. Parity                   %@AB@%PE     PO%@AE@%
  8152. Carry                    %@AB@%CY     NC%@AE@%
  8153. %@NL@%
  8154. %@NL@%
  8155. %@CR:MCVA600G@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8156. %@NL@%
  8157.      >R IP 256%@NL@%
  8158.      >%@NL@%
  8159. %@NL@%
  8160. %@CR:MCVA600H@%%@4@%The example above changes the %@AS@%IP%@AE@% register to the value %@AS@%256%@AE@% (0100%@EH@%
  8161. hexadecimal).%@NL@%
  8162. %@NL@%
  8163.      >R AX%@NL@%
  8164.      AX OEOO%@NL@%
  8165.      :%@AH@% %@AE@%%@AS@%%@NL@%
  8166. %@NL@%
  8167. %@CR:MCVA600I@%%@4@%The example above displays the current value of the %@AS@%AX%@AE@% register and prompts%@EH@%
  8168. for a new value (the reverse-video space (%@AH@% %@AE@%) represents the CodeView
  8169. cursor). You can now type any 16-bit value after the colon.%@NL@%
  8170. %@NL@%
  8171.      >R AX%@NL@%
  8172.      AX 0E00%@NL@%
  8173.      :256%@NL@%
  8174.      >%@AH@% %@AE@%%@AS@%%@NL@%
  8175. %@NL@%
  8176. %@CR:MCVA600J@%%@4@%The example above changes the value of %@AS@%AX%@AE@% to 256 (in the current radix).%@EH@%%@NL@%
  8177. %@NL@%
  8178.      >R F UP EI PL%@AS@%%@NL@%
  8179. %@NL@%
  8180. %@CR:MCVA600K@%%@4@%The example above shows the command-line method of changing flag values.%@EH@%%@NL@%
  8181. %@NL@%
  8182.      >R F%@NL@%
  8183.      NV(OV) UP(DN) EI(DI) PL(NG) NZ(ZR) AC(NA) PE(PO) NC(CY) -OV DI ZR%@NL@%
  8184.      >R F%@NL@%
  8185.      OV(NV) UP(DN) DI(EI) PL(NG) ZR(NZ) AC(NA) PE(PO) NC(CY) -%@NL@%
  8186.      >%@NL@%
  8187. %@NL@%
  8188. %@CR:MCVA600L@%%@4@%With the prompting method of changing flag values (shown above), the first%@EH@%
  8189. mnemonic for each flag is the current value, and the second mnemonic (in
  8190. parentheses) is the alternate value. You can enter one or more mnemonics at
  8191. the dash prompt. In the example, the command is given a second time to show
  8192. the results of the first command.%@NL@%
  8193. %@NL@%
  8194. %@NL@%
  8195. %@CR:MCVB0000@%%@1@%%@AB@%Chapter 11  CodeView Control Commands%@AE@%%@EH@%%@NL@%
  8196. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8197. %@NL@%
  8198. %@CR:MCVB0001@%%@4@%This chapter discusses commands that control the operation of the CodeView%@EH@%
  8199. debugger. The commands in this category are listed below:%@NL@%
  8200. %@NL@%
  8201. %@CR:MCVB0002@%%@AB@%Command                     Action%@AE@%%@NL@%
  8202. %@NL@%
  8203. Help (%@AB@%H%@AE@%)                    Displays help%@NL@%
  8204. %@NL@%
  8205. Quit (%@AB@%Q%@AE@%)                    Returns to DOS%@NL@%
  8206. %@NL@%
  8207. Radix (%@AB@%N%@AE@%)                   Changes radix%@NL@%
  8208. %@NL@%
  8209. Redraw (%@AB@%@%@AE@%)                  Redraws screen%@NL@%
  8210. %@NL@%
  8211. Screen Exchange (%@AB@%\%@AE@%)         Switches to output screen%@NL@%
  8212. %@NL@%
  8213. Search (%@AB@%/%@AE@%)                  Searches for regular expression%@NL@%
  8214. %@NL@%
  8215. Shell Escape (%@AB@%!%@AE@%)            Starts new DOS shell%@NL@%
  8216. %@NL@%
  8217. Tab Set (%@AB@%#%@AE@%)                 Sets tab size%@NL@%
  8218. %@NL@%
  8219. Option (%@AB@%O%@AE@%)                  Views or sets CodeView options%@NL@%
  8220. %@NL@%
  8221. Redirection and related     Control redirection of CodeView output or input%@NL@%
  8222. commands
  8223. %@NL@%
  8224. %@NL@%
  8225. %@CR:MCVB1000@%%@2@%%@AB@%11.1  Help Command%@AE@%%@EH@%%@NL@%
  8226. %@NL@%
  8227. %@CR:MCVB1001@%%@4@%CodeView has two help systems: a complete on-line Help system available only%@EH@%
  8228. in window mode and a syntax summary available with sequential mode.%@NL@%
  8229. %@NL@%
  8230. %@CR:MCVB1002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8231. %@NL@%
  8232. %@CR:MCVB1003@%%@4@%To enter the complete on-line Help system with the mouse, point to View on%@EH@%
  8233. the menu bar, press a mouse button and drag the highlight down to a Help
  8234. selection, then release the button. The appropriate help screen will appear.%@NL@%
  8235. %@NL@%
  8236. %@CR:MCVB1004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8237. %@NL@%
  8238. %@CR:MCVB1005@%%@4@%If you are in window mode, press F1 to enter the complete on-line Help%@EH@%
  8239. system. If you are in sequential mode, a syntax-summary screen appears when
  8240. you press F1.%@NL@%
  8241. %@NL@%
  8242. %@CR:MCVB1006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8243. %@NL@%
  8244. %@CR:MCVB1007@%%@4@%If you are in window mode, you can view the complete on-line Help system%@EH@%
  8245. with the following command:%@NL@%
  8246. %@NL@%
  8247.      %@AB@%H%@AE@%%@NL@%
  8248. %@NL@%
  8249. %@CR:MCVB1008@%%@4@%If you are in sequential mode, this command displays a screen containing all%@EH@%
  8250. CodeView dialog commands with the syntax for each. This screen is the only
  8251. help available in sequential mode.%@NL@%
  8252. %@NL@%
  8253. %@NL@%
  8254. %@CR:MCVB2000@%%@2@%%@AB@%11.2  Quit Command%@AE@%%@EH@%%@NL@%
  8255. %@NL@%
  8256. %@CR:MCVB2001@%%@4@%The Quit command terminates CodeView and returns control to DOS.%@EH@%%@NL@%
  8257. %@NL@%
  8258. %@CR:MCVB2002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8259. %@NL@%
  8260. %@CR:MCVB2003@%%@4@%To quit the CodeView debugger with the mouse, point to File on the menu,%@EH@%
  8261. press a mouse button and drag the highlight down to the Exit selection, then
  8262. release the button. The CodeView screen is replaced by the DOS screen with
  8263. the cursor at the DOS prompt.%@NL@%
  8264. %@NL@%
  8265. %@CR:MCVB2004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8266. %@NL@%
  8267. %@CR:MCVB2005@%%@4@%To quit the CodeView debugger with a keyboard command, press ALT+F to open%@EH@%
  8268. the File menu, then press X to select Exit. The CodeView screen is replaced
  8269. by the DOS screen with the cursor at the DOS prompt.%@NL@%
  8270. %@NL@%
  8271. %@CR:MCVB2006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8272. %@NL@%
  8273. %@CR:MCVB2007@%%@4@%To quit the CodeView debugger with a dialog command, enter a command line%@EH@%
  8274. with the following syntax:%@NL@%
  8275. %@NL@%
  8276.      %@AB@%Q%@AE@%%@NL@%
  8277. %@NL@%
  8278. %@CR:MCVB2008@%%@4@%When the command is entered, the CodeView screen is replaced by the DOS%@EH@%
  8279. screen with the cursor at the DOS prompt.%@NL@%
  8280. %@NL@%
  8281. %@NL@%
  8282. %@CR:MCVB3000@%%@2@%%@AB@%11.3  Radix Command%@AE@%%@EH@%%@NL@%
  8283. %@NL@%
  8284. %@CR:MCVB3001@%%@4@%The Radix command changes the current radix for entering arguments and%@EH@%
  8285. displaying the value of expressions. The default radix when you start the
  8286. CodeView debugger is 10 (decimal). Radixes 8 (octal) and 16 (hexadecimal)
  8287. can also be set. Binary and other radixes are not allowed.%@NL@%
  8288. %@NL@%
  8289. %@CR:MCVB3002@%%@4@%The following seven conditions are exceptions; they are not affected by the%@EH@%
  8290. Radix command:%@NL@%
  8291. %@NL@%
  8292. %@CR:MCVB3003@%  1. The radix for entering a new radix is always decimal.%@NL@%
  8293. %@NL@%
  8294.   2. Format specifiers given with the Display Expression command or any of%@NL@%
  8295.      the Watch Statement commands override the current radix.%@NL@%
  8296. %@NL@%
  8297.   3. Addresses output by the Assemble, Dump, Enter, Examine Symbol, and%@NL@%
  8298.      Unassemble commands are always shown in hexadecimal.%@NL@%
  8299. %@NL@%
  8300.   4. In assembly mode, all values are shown in hexadecimal.%@NL@%
  8301. %@NL@%
  8302.   5. The display radix for Dump, Watch Memory, and Tracepoint Memory%@NL@%
  8303.      commands is always hexadecimal if the size is bytes, words, or double%@NL@%
  8304.      words and always decimal if the size is integers, unsigned integers,%@NL@%
  8305.      short reals, long reals, or 10-byte reals.%@NL@%
  8306. %@NL@%
  8307.   6. The input radix for the Enter commands with the prompting method is%@NL@%
  8308.      always hexadecimal if the size is bytes, words, or double words and%@NL@%
  8309.      always decimal if the size is integers, unsigned integers, short reals,%@NL@%
  8310.      long reals, or 10-byte reals. The current radix is used for all values%@NL@%
  8311.      given as part of a list, except real numbers, which must be entered in%@NL@%
  8312.      decimal.%@NL@%
  8313. %@NL@%
  8314.   7. The register display is always in hexadecimal.%@NL@%
  8315. %@NL@%
  8316. %@CR:MCVB3004@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8317. %@NL@%
  8318. %@CR:MCVB3005@%%@4@%You cannot change the input radix with the mouse.%@EH@%%@NL@%
  8319. %@NL@%
  8320. %@CR:MCVB3006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8321. %@NL@%
  8322. %@CR:MCVB3007@%%@4@%You cannot change the input radix with a keyboard command.%@EH@%%@NL@%
  8323. %@NL@%
  8324. %@CR:MCVB3008@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8325. %@NL@%
  8326. %@CR:MCVB3009@%%@4@%To change the input radix with a dialog command, enter a command line with%@EH@%
  8327. the following syntax:%@NL@%
  8328. %@NL@%
  8329.      %@AB@%N%@AE@%«%@AI@%radixnumber%@AE@%»%@NL@%
  8330. %@NL@%
  8331. %@CR:MCVB300A@%%@4@%The %@AI@%radixnumber%@AE@% can be 8 (octal), 10 (decimal), or 16 (hexadecimal). The%@EH@%
  8332. default radix when you start the CodeView debugger is 10 (decimal), unless
  8333. your%@NL@%
  8334. %@NL@%
  8335. %@CR:MCVB300B@%%@4@%main program is written with the Microsoft Macro Assembler, in which case%@EH@%
  8336. the default radix is 16 (hexadecimal). If you give the Radix command with no
  8337. argument, the debugger displays the current radix.%@NL@%
  8338. %@NL@%
  8339. %@CR:MCVB300C@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8340. %@NL@%
  8341.      >N10%@NL@%
  8342.      >N%@NL@%
  8343.      10%@NL@%
  8344.      >? prime%@NL@%
  8345.      107%@NL@%
  8346.      >%@NL@%
  8347. %@NL@%
  8348.      >N8  %@AI@%;* C example%@AE@%%@NL@%
  8349.      >? prime%@NL@%
  8350.      0153%@NL@%
  8351.      >%@NL@%
  8352. %@NL@%
  8353.      >N16 %@AI@%;* FORTRAN example%@AE@%%@NL@%
  8354.      >? prime%@NL@%
  8355.      #006b%@NL@%
  8356.      >%@NL@%
  8357. %@NL@%
  8358.      >N8  %@AI@%;* BASIC example%@AE@%%@NL@%
  8359.      >? prime%@NL@%
  8360.      &O153%@NL@%
  8361.      >%@AS@%%@NL@%
  8362. %@NL@%
  8363. %@CR:MCVB300D@%%@4@%The example above shows how %@AS@%107%@AE@% decimal, stored in the variable %@AS@%prime%@AE@%, would%@EH@%
  8364. be displayed with different radixes. Examples are taken from different
  8365. languages; there is no logical connection between the radix and the language
  8366. used in each example.%@NL@%
  8367. %@NL@%
  8368.      >N8%@NL@%
  8369.      >? 34,i%@NL@%
  8370.      28%@NL@%
  8371.      >N10%@NL@%
  8372.      >? 28,i%@NL@%
  8373.      28%@NL@%
  8374.      >N16%@NL@%
  8375.      >? 1C,i%@NL@%
  8376.      28%@NL@%
  8377.      >%@AS@%%@NL@%
  8378. %@NL@%
  8379. %@CR:MCVB300E@%%@4@%In the example above, the same number is entered in different radixes, but%@EH@%
  8380. the %@AS@%i%@AE@% format specifier is used to display the result as a decimal integer in
  8381. all three cases. See Chapter 6%@BO:   43f5c@%, "Examining Data and Expressions," for more
  8382. information on format specifiers.%@NL@%
  8383. %@NL@%
  8384. %@NL@%
  8385. %@CR:MCVB4000@%%@2@%%@AB@%11.4  Redraw Comm and%@AE@%%@EH@%%@NL@%
  8386. %@NL@%
  8387. %@CR:MCVB4001@%%@4@%The Redraw command can be used only in window mode; it redraws the CodeView%@EH@%
  8388. screen. This command is seldom necessary, but you might need it if the
  8389. output of the program being debugged disturbs the CodeView display
  8390. temporarily.%@NL@%
  8391. %@NL@%
  8392. %@CR:MCVB4002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8393. %@NL@%
  8394. %@CR:MCVB4003@%%@4@%You cannot redraw the screen using the mouse.%@EH@%%@NL@%
  8395. %@NL@%
  8396. %@CR:MCVB4004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8397. %@NL@%
  8398. %@CR:MCVB4005@%%@4@%You cannot redraw the screen using a keyboard command.%@EH@%%@NL@%
  8399. %@NL@%
  8400. %@CR:MCVB4006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8401. %@NL@%
  8402. %@CR:MCVB4007@%%@4@%To redraw the screen with a dialog command, enter a command line with the%@EH@%
  8403. following syntax:%@NL@%
  8404. %@NL@%
  8405.      %@AB@%@%@AE@%%@NL@%
  8406. %@NL@%
  8407. %@NL@%
  8408. %@CR:MCVB5000@%%@2@%%@AB@%11.5  Screen Exchange Command%@AE@%%@EH@%%@NL@%
  8409. %@NL@%
  8410. %@CR:MCVB5001@%%@4@%The Screen Exchange command allows you to switch temporarily from the%@EH@%
  8411. debugging screen to the output screen.%@NL@%
  8412. %@NL@%
  8413. %@CR:MCVB5002@%%@4@%The CodeView debugger will use either screen flipping or screen swapping to%@EH@%
  8414. store the output and debugging screens. See Chapter 1%@BO:    9668@%, "Getting Started,"
  8415. for an explanation of flipping and swapping.%@NL@%
  8416. %@NL@%
  8417. %@CR:MCVB5003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8418. %@NL@%
  8419. %@CR:MCVB5004@%%@4@%To execute the Screen Exchange command with the mouse, open the View menu,%@EH@%
  8420. then select Output. Press any key when you are ready to return to the
  8421. debugging screen.%@NL@%
  8422. %@NL@%
  8423. %@CR:MCVB5005@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8424. %@NL@%
  8425. %@CR:MCVB5006@%%@4@%To execute the Screen Exchange command with a keyboard command, press F4.%@EH@%
  8426. Press any key when you are ready to return to the debugging screen.%@NL@%
  8427. %@NL@%
  8428. %@CR:MCVB5007@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8429. %@NL@%
  8430. %@CR:MCVB5008@%%@4@%To execute the Screen Exchange command from the dialog window, enter a%@EH@%
  8431. command line with the following syntax:%@NL@%
  8432. %@NL@%
  8433.      %@AB@%\%@AE@%%@NL@%
  8434. %@NL@%
  8435. %@CR:MCVB5009@%%@4@%The output screen will then appear. Press any key when you are ready to%@EH@%
  8436. return to the CodeView debugging screen.%@NL@%
  8437. %@NL@%
  8438. %@NL@%
  8439. %@CR:MCVB6000@%%@2@%%@AB@%11.6  Search Command%@AE@%%@EH@%%@NL@%
  8440. %@NL@%
  8441. %@CR:MCVB6001@%%@4@%The Search command allows you to search for a regular expression in a source%@EH@%
  8442. file. The expression being sought is specified either in a dialog box or as
  8443. an argument to a dialog command. Once you have found an expression, you can
  8444. search for the next or previous occurrence of the expression.%@NL@%
  8445. %@NL@%
  8446. %@CR:MCVB6002@%%@4@%Regular expressions are patterns of characters that may match one or many%@EH@%
  8447. different strings. The use of patterns to match more than one string is
  8448. similar to the DOS method of using wild-card characters in file names.
  8449. Regular expressions are explained in detail in Appendix A%@BO:   d21a7@%.%@NL@%
  8450. %@NL@%
  8451. %@CR:MCVB6003@%%@4@%You can use the Search command without understanding regular expressions.%@EH@%
  8452. Since text strings are the simplest form of regular expressions, you can
  8453. enter a string of characters as the expression you want to find. For
  8454. example, you could enter %@AS@%COUNT%@AE@% if you wanted to search for the word "COUNT"
  8455. in the source file.%@NL@%
  8456. %@NL@%
  8457. %@CR:MCVB6004@%%@4@%The following characters have special meanings in regular expressions:%@EH@%
  8458. backslash (%@AB@%\%@AE@%), asterisk (%@AB@%*%@AE@%), left bracket (%@AB@%[%@AE@%), period (%@AB@%.%@AE@%), dollar sign (%@AB@%$%@AE@%),
  8459. and caret (%@AB@%^%@AE@%). To find strings containing these characters, you must precede
  8460. the characters with a backslash; this cancels their special meanings.%@NL@%
  8461. %@NL@%
  8462. %@CR:MCVB6005@%%@4@%For example, you would use %@AS@%\*%@AE@% to find %@AS@%x*y%@AE@%. The periods in the relational%@EH@%
  8463. operators must also be preceded by a backslash.%@NL@%
  8464. %@NL@%
  8465. %@CR:MCVB6006@%%@4@%The Case Sense selection from the Options menu has no effect on searches for%@EH@%
  8466. regular expressions.%@NL@%
  8467. %@NL@%
  8468. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8469. %@AI@%NOTE%@AE@%%@NL@%
  8470.    When you search for the next occurrence of a regular expression, the%@NL@%
  8471.    CodeView debugger searches to the end of the file, then wraps around and%@NL@%
  8472.    begins again at the start of the file. This can have unexpected results%@NL@%
  8473.    if the expression occurs only once. When you give the command repeatedly,%@NL@%
  8474.    nothing seems to happen. Actually, the debugger is repeatedly wrapping%@NL@%
  8475.    around and finding the same expression each time.%@NL@%
  8476. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8477. %@NL@%
  8478. %@CR:MCVB6007@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8479. %@NL@%
  8480. %@CR:MCVB6008@%%@4@%To find a regular expr with the mouse, point to Search on the menu bar,%@EH@%
  8481. press a mouse button and drag the highlight down to the Find selection, then
  8482. release the button. A dialog box appears, asking for the regular expression
  8483. to be found. Type the expression and press either the ENTER key or a mouse
  8484. button. The CodeView debugger starts searching at the current cursor
  8485. position and puts the cursor at the next line containing the regular
  8486. expression. An error message appears if the expression is not found. If you
  8487. are in assembly mode, the debugger automatically switches to source mode
  8488. when the expression is found.%@NL@%
  8489. %@NL@%
  8490. %@CR:MCVB6009@%%@4@%After you have found a regular expression, you can search for the next or%@EH@%
  8491. previous occurrence of the expression. Point to Search on the menu bar,
  8492. press a mouse button and drag the highlight down to the Next or Previous
  8493. selection, then release the button. The cursor moves to the next or previous
  8494. match of the expression.%@NL@%
  8495. %@NL@%
  8496. %@CR:MCVB600A@%%@4@%You can also search the executable code for a label (such as a routine name%@EH@%
  8497. or an assembly-language label). Point to Search on the menu bar, press a
  8498. mouse button and drag the highlight down to the Label selection, then
  8499. release the button. A dialog box appears, asking for the label to be found.
  8500. Type the label name, and press either ENTER or a mouse button. The cursor
  8501. will move to the line containing the label. This selection differs from
  8502. other search selections because it searches executable code rather than
  8503. source code. The CodeView debugger switches to assembly mode, if necessary,
  8504. to display a label in a library routine or assembly-language module.%@NL@%
  8505. %@NL@%
  8506. %@CR:MCVB600B@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8507. %@NL@%
  8508. %@CR:MCVB600C@%%@4@%To find a regular expression with a keyboard command, press ALT+S to open%@EH@%
  8509. the Search menu, and then press F to select Find. A dialog box appears,
  8510. asking for the regular expression to be found. Type the expression and press
  8511. ENTER. The CodeView debugger starts searching at the current cursor position
  8512. and puts the cursor at the next line containing the regular expression. An
  8513. error message appears if the expression is not found. If you are in assembly
  8514. mode, the debugger automatically switches to source mode when the expression
  8515. is found.%@NL@%
  8516. %@NL@%
  8517. %@CR:MCVB600D@%%@4@%After you have found a regular expression, you can search for the next or%@EH@%
  8518. previous occurrence of the expression. Press ALT+S to open the Search menu
  8519. and then press N to select Next or P to select Previous. The cursor will
  8520. move to the next or previous match of the expression.%@NL@%
  8521. %@NL@%
  8522. %@CR:MCVB600E@%%@4@%You can also search the executable code for a label (such as a routine name%@EH@%
  8523. or an assembly-language label). Press ALT+S to open the Search menu and then
  8524. press L to select Label. A dialog box appears, asking for the label to be
  8525. found. Type the label name and press ENTER. The cursor moves to the line
  8526. containing the label. This selection differs from other search selections
  8527. because it searches executable code rather than source code. The CodeView
  8528. debugger switches to assembly mode, if necessary, to display a label in a
  8529. library routine or assembly-language module.%@NL@%
  8530. %@NL@%
  8531. %@CR:MCVB600F@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8532. %@NL@%
  8533. %@CR:MCVB600G@%%@4@%To find a regular expression using a dialog command, enter a command line%@EH@%
  8534. with the following syntax:%@NL@%
  8535. %@NL@%
  8536.      %@AB@%/%@AE@%«%@AI@%regularexpression%@AE@%»%@NL@%
  8537. %@NL@%
  8538. %@CR:MCVB600H@%%@4@%If %@AI@%regularexpression%@AE@% is given, the CodeView debugger searches the source%@EH@%
  8539. file for the first line containing the expression. If no argument is given,
  8540. the debugger searches for the next occurrence of the last regular expression
  8541. specified.%@NL@%
  8542. %@NL@%
  8543. %@CR:MCVB600I@%%@4@%In window mode, the CodeView debugger starts searching at the current cursor%@EH@%
  8544. position and puts the cursor at the next line containing the regular
  8545. expression. In sequential mode, the debugger starts searching at the last
  8546. source line displayed. It displays the source line in which the expression
  8547. is found. An error message appears if the expression is not found. If you
  8548. are in assembly mode, the CodeView debugger automatically switches to source
  8549. mode when the expression is found.%@NL@%
  8550. %@NL@%
  8551. %@CR:MCVB600J@%%@4@%You cannot search for a label with the dialog version of the Search command,%@EH@%
  8552. but you can use the View command with the label as an argument for the same
  8553. effect.%@NL@%
  8554. %@NL@%
  8555. %@NL@%
  8556. %@CR:MCVB7000@%%@2@%%@AB@%11.7  Shell Escape Command%@AE@%%@EH@%%@NL@%
  8557. %@NL@%
  8558. %@CR:MCVB7001@%%@4@%The Shell Escape command allows you to exit from the CodeView debugger to a%@EH@%
  8559. DOS shell. You can execute DOS commands or programs from within the
  8560. debugger, or you can exit from the debugger to DOS while retaining your
  8561. current debugging context.%@NL@%
  8562. %@NL@%
  8563. %@CR:MCVB7002@%%@4@%The Shell Escape command works by saving the current processes in memory and%@EH@%
  8564. then executing a second copy of COMMAND.COM. The COMSPEC environment
  8565. variable is used to locate a copy of COMMAND.COM.%@NL@%
  8566. %@NL@%
  8567. %@CR:MCVB7003@%%@4@%Opening a shell requires a significant amount of free memory (usually more%@EH@%
  8568. than 200K) because the CodeView debugger, the symbol table, COMMAND.COM, and
  8569. the program being debugged must all be saved in memory. If you do not have
  8570. enough memory, an error message appears. Even if you have enough memory to
  8571. start a new shell, you may not have enough memory left to execute large
  8572. programs from the shell.%@NL@%
  8573. %@NL@%
  8574. %@CR:MCVB7004@%%@4@%If you change directories while working in the shell, make sure you return%@EH@%
  8575. to the original directory before returning to the CodeView debugger. If you
  8576. don't, the debugger may not be able to find and load source files when it
  8577. needs them.%@NL@%
  8578. %@NL@%
  8579. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8580. %@AI@%NOTE%@AE@%%@NL@%
  8581.    In order to use the Shell Escape command, the executable file being%@NL@%
  8582.    debugged must release unneeded memory. Programs created with Microsoft%@NL@%
  8583.    compilers release memory during start-up.%@NL@%
  8584. %@NL@%
  8585.    You cannot use the Shell Escape command with assembler programs unless%@NL@%
  8586.    the program specifically releases memory by using the DOS function call%@NL@%
  8587.    4A hexadecimal (Set Block) or is linked with the /CPARMAXALLOC link%@NL@%
  8588.    option.%@NL@%
  8589. ───────────────────────────────────────────────────────────────────────────%@NL@%
  8590. %@NL@%
  8591. %@CR:MCVB7005@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8592. %@NL@%
  8593. %@CR:MCVB7006@%%@4@%To open a DOS shell with the mouse, point to File on the menu bar, press a%@EH@%
  8594. mouse button and drag the highlight down to the DOS Shell selection, then
  8595. release the button. If there is enough memory to open the shell, the DOS
  8596. screen appears. You can execute any DOS command or any program. When you are
  8597. ready to return to the debugging session, type the command %@AS@%exit%@AE@% (in any
  8598. combination of uppercase and lowercase letters). The debugging screen will
  8599. appear with the same status it had when you left it.%@NL@%
  8600. %@NL@%
  8601. %@CR:MCVB7007@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8602. %@NL@%
  8603. %@CR:MCVB7008@%%@4@%To open a DOS shell with a keyboard command, press ALT+F to open the File%@EH@%
  8604. menu, then press D to select DOS Shell. If there is enough memory to open
  8605. the shell, the DOS screen appears. You can execute any DOS internal command
  8606. or any program. When you are ready to return to the debugging session, type
  8607. the command %@AS@%exit%@AE@% (in any combination of uppercase and lowercase letters).
  8608. The debugging screen will appear with the same status it had when you left
  8609. it.%@NL@%
  8610. %@NL@%
  8611. %@CR:MCVB7009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8612. %@NL@%
  8613. %@CR:MCVB700A@%%@4@%To open a DOS shell using a dialog command, enter a command line with the%@EH@%
  8614. following syntax:%@NL@%
  8615. %@NL@%
  8616.      %@AB@%!%@AE@%«%@AI@%command%@AE@%»%@NL@%
  8617. %@NL@%
  8618. %@CR:MCVB700B@%%@4@%If you want to exit to DOS and execute several programs or commands, enter%@EH@%
  8619. the command with no arguments. The CodeView debugger executes a new copy of
  8620. COMMAND.COM, and the DOS screen appears. You can run programs or DOS
  8621. internal commands. When you are ready to return to the debugger, type the
  8622. command %@AS@%exit%@AE@% (in any combination of uppercase and lowercase letters). The
  8623. debugging screen appears with the same status it had when you left it.%@NL@%
  8624. %@NL@%
  8625. %@CR:MCVB700C@%%@4@%If you want to execute a program or DOS internal command from within%@EH@%
  8626. CodeView, enter the Shell Escape command (%@AB@%!%@AE@%) followed by the name of the
  8627. command or the program you want to execute. The output screen appears, and
  8628. the debugger executes the command or program. When the output from the
  8629. command or program is completed, the message %@AS@%Press any key to %@AE@%%@AS@%continue...%@AE@%
  8630. appears at the bottom of the screen. Press a key to make the debugging
  8631. screen reappear with the same status it had when you left it.%@NL@%
  8632. %@NL@%
  8633. %@CR:MCVB700D@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8634. %@NL@%
  8635.      >!%@NL@%
  8636. %@NL@%
  8637. %@CR:MCVB700E@%%@4@%In the above example, the CodeView debugger saves the current debugging%@EH@%
  8638. context and executes a copy of COMMAND.COM. The DOS screen appears, and you
  8639. can enter any number of commands. To return to the debugger, enter %@AS@%exit%@AE@%.%@NL@%
  8640. %@NL@%
  8641.      >!DIR a:*.for%@NL@%
  8642. %@NL@%
  8643. %@CR:MCVB700F@%%@4@%In the example above, the DOS command %@AS@%DIR%@AE@% is executed with the argument%@EH@%
  8644. %@AS@%a:*.for%@AE@%. The directory listing will be followed by a prompt telling you to
  8645. press any key to return to the CodeView debugging screen.%@NL@%
  8646. %@NL@%
  8647.      >!CHKDSK a:%@NL@%
  8648. %@NL@%
  8649. %@CR:MCVB700G@%%@4@%In the example above, the DOS command %@AS@%CHKDSK%@AE@% is executed, and the status of%@EH@%
  8650. the disk in Drive A is displayed in the dialog window. The program name
  8651. specified could be for any executable file, not just that for a DOS program.%@NL@%
  8652. %@NL@%
  8653. %@NL@%
  8654. %@CR:MCVB8000@%%@2@%%@AB@%11.8  Tab Set Command%@AE@%%@EH@%%@NL@%
  8655. %@NL@%
  8656. %@CR:MCVB8001@%%@4@%The Tab Set command sets the width in spaces that the CodeView debugger%@EH@%
  8657. fills for each tab character. The default tab is eight spaces. You might
  8658. want to set a smaller tab size if your source code has so many levels of
  8659. indentation that source lines extend beyond the edge of the screen. This
  8660. command has no effect if your source code was written with an editor that
  8661. indents with spaces rather than tab characters.%@NL@%
  8662. %@NL@%
  8663. %@CR:MCVB8002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8664. %@NL@%
  8665. %@CR:MCVB8003@%%@4@%You cannot set the tab size by using the mouse.%@EH@%%@NL@%
  8666. %@NL@%
  8667. %@CR:MCVB8004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8668. %@NL@%
  8669. %@CR:MCVB8005@%%@4@%You cannot set the tab size by using a keyboard command.%@EH@%%@NL@%
  8670. %@NL@%
  8671. %@CR:MCVB8006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8672. %@NL@%
  8673. %@CR:MCVB8007@%%@4@%To set the tab size with a dialog command, enter a command line with the%@EH@%
  8674. following syntax:%@NL@%
  8675. %@NL@%
  8676.      %@AB@%#%@AE@%%@AI@%number%@AE@%%@NL@%
  8677. %@NL@%
  8678. %@CR:MCVB8008@%%@4@%The %@AI@%number%@AE@% is the new number of characters for each tab character. In window%@EH@%
  8679. mode, the screen is redrawn with the new tab width when you enter the
  8680. command. In sequential mode, any output of source lines reflects the new tab
  8681. size.%@NL@%
  8682. %@NL@%
  8683. %@CR:MCVB8009@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  8684. %@NL@%
  8685.      >.%@NL@%
  8686.      32:                IF (X(I)) .LE. X(J)) GOTO 301%@NL@%
  8687.      >#4%@NL@%
  8688.      >.%@NL@%
  8689.      32:        IF (X(I)) .LE. X(J)) GOTO 301%@NL@%
  8690.      >%@NL@%
  8691. %@NL@%
  8692. %@CR:MCVB800A@%%@4@%In the example above, the Source Line command (%@AB@%.%@AE@%) is used to show the source%@EH@%
  8693. line with the default tab width of eight spaces. Next, the Tab Set command
  8694. is used to set the tab width to four spaces. The Source Line command then
  8695. shows the same line.%@NL@%
  8696. %@NL@%
  8697. %@NL@%
  8698. %@CR:MCVB9000@%%@2@%%@AB@%11.9  Option Command%@AE@%%@EH@%%@NL@%
  8699. %@NL@%
  8700. %@CR:MCVB9001@%%@4@%The Option command allows you to view the state of options in the Option%@EH@%
  8701. menu (Flip/Swap, Bytes Coded, Case Sense, and 386) and to turn any of the
  8702. these options on or off.%@NL@%
  8703. %@NL@%
  8704. %@CR:MCVB9002@%%@4@%For each different kind of source module that you debug, there is a%@EH@%
  8705. different set of default settings. However, the use of the Option command
  8706. overrides any of these settings.%@NL@%
  8707. %@NL@%
  8708. %@CR:MCVB9003@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8709. %@NL@%
  8710. %@CR:MCVB9004@%%@4@%To view the state of the options with a mouse, simply point to Options on%@EH@%
  8711. the menu bar and click either button. Each option is displayed. Those
  8712. options that are turned on have a double arrow immediately to the left.
  8713. Options that are turned off have no double arrow.%@NL@%
  8714. %@NL@%
  8715. %@CR:MCVB9005@%%@4@%To change one of the Option settings, drag the highlight down to the option%@EH@%
  8716. you wish to change and release the button. This reverses the state of the
  8717. option. (An option that was on will be turned off and vice versa.)%@NL@%
  8718. %@NL@%
  8719. %@CR:MCVB9006@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8720. %@NL@%
  8721. %@CR:MCVB9007@%%@4@%To view the state of the Options menu with a keyboard command, press ALT+O%@EH@%
  8722. to open the Options menu. Each option is displayed. Those options that are
  8723. turned on have a double arrow immediately to the left. Options that are
  8724. turned off have no double arrow.%@NL@%
  8725. %@NL@%
  8726. %@CR:MCVB9008@%%@4@%To change one of the Option settings, press the letter key corresponding to%@EH@%
  8727. the option's mnemonic. This reverses the state of the option. (An option
  8728. that was on will be turned off and vice versa.) You can also reverse an
  8729. option by moving the highlight down with the arrow key and pressing ENTER.%@NL@%
  8730. %@NL@%
  8731. %@CR:MCVB9009@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8732. %@NL@%
  8733. %@CR:MCVB900A@%%@4@%To view or change options with a dialog command, enter a command line with%@EH@%
  8734. the following syntax:%@NL@%
  8735. %@NL@%
  8736.      %@AB@%O%@AE@%«%@AI@%option%@AE@% «%@AB@%+%@AE@% | %@AB@%-%@AE@%»»%@NL@%
  8737. %@NL@%
  8738. %@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@%
  8739. or %@AB@%3%@AE@%. If used, there must be no spaces between the character and the %@AB@%O%@AE@%.
  8740. These characters correspond to the options as shown below:%@NL@%
  8741. %@NL@%
  8742. %@CR:MCVB900C@%%@AB@%Command                     Correspondence%@AE@%%@NL@%
  8743. %@NL@%
  8744. %@AB@%OF%@AE@%                          Flip/Swap option%@NL@%
  8745. %@NL@%
  8746. %@AB@%OB%@AE@%                          Bytes-Coded option%@NL@%
  8747. %@NL@%
  8748. %@AB@%OC%@AE@%                          Case-Sense option%@NL@%
  8749. %@NL@%
  8750. %@AB@%O3%@AE@%                          386 option%@NL@%
  8751. %@NL@%
  8752. %@AB@%O%@AE@%                           All options%@NL@%
  8753. %@NL@%
  8754. %@CR:MCVB900D@%%@4@%The %@AB@%O%@AE@% form of the command (all options) takes no arguments; it displays the%@EH@%
  8755. state of all four options. The other forms of the command (%@AB@%OF%@AE@%, %@AB@%OB%@AE@%, %@AB@%OC%@AE@%, and
  8756. %@AB@%O3%@AE@%) can be used either with no arguments (in which case they display the
  8757. state of the option) or they can take the argument %@AB@%+%@AE@% or %@AB@%-%@AE@%.%@NL@%
  8758. %@NL@%
  8759. %@CR:MCVB900E@%%@4@%The %@AB@%+%@AE@% argument turns the option on. The %@AB@%-%@AE@% argument turns the option off.%@EH@%%@NL@%
  8760. %@NL@%
  8761. %@CR:MCVB900F@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8762. %@NL@%
  8763.      >O%@NL@%
  8764.      Flip/Swap on%@NL@%
  8765.      Bytes Coded on%@NL@%
  8766.      Case Sense off%@NL@%
  8767.      386 off%@NL@%
  8768.      >O3%@NL@%
  8769.      386 off%@NL@%
  8770.      >O3+%@NL@%
  8771.      386 on%@NL@%
  8772.      >OF%@NL@%
  8773.      Flip/Swap on%@NL@%
  8774.      >OF-%@NL@%
  8775.      Flip/Swap off%@NL@%
  8776. %@NL@%
  8777. %@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@%
  8778. current state of an option. Each of the %@AB@%O3+%@AE@% and %@AB@%OF-%@AE@% commands modifies an
  8779. option and then reports the results of the modification.%@NL@%
  8780. %@NL@%
  8781. %@CR:MCVB900H@%%@4@%The dialog version of the Option command is particularly useful for%@EH@%
  8782. redirected CodeView commands (which cannot access menus) and for making the
  8783. debugger start up with certain options. For example, the following DOS-level
  8784. command line brings up CodeView with the 386 option on and Bytes Coded off:%@NL@%
  8785. %@NL@%
  8786.      CV /c"O3+;OB-" test%@NL@%
  8787. %@NL@%
  8788. %@CR:MCVB900I@%%@4@%This command line could then be placed into a batch file for convenient%@EH@%
  8789. execution.%@NL@%
  8790. %@NL@%
  8791. %@NL@%
  8792. %@CR:MCVBA000@%%@2@%%@AB@%11.10  Redirection Commands%@AE@%%@EH@%%@NL@%
  8793. %@NL@%
  8794. %@CR:MCVBA001@%%@4@%The CodeView debugger provides several options for redirecting commands from%@EH@%
  8795. or to devices or files. Furthermore, the debugger provides several other
  8796. commands, which are relevant only when used with redirected files.%@NL@%
  8797. %@NL@%
  8798. %@CR:MCVBA002@%%@4@%%@AB@%Mouse%@AE@%%@EH@%%@NL@%
  8799. %@NL@%
  8800. %@CR:MCVBA003@%%@4@%None of the redirection or related commands can be executed with the mouse.%@EH@%%@NL@%
  8801. %@NL@%
  8802. %@CR:MCVBA004@%%@4@%%@AB@%Keyboard%@AE@%%@EH@%%@NL@%
  8803. %@NL@%
  8804. %@CR:MCVBA005@%%@4@%None of the redirection or related commands can be executed with keyboard%@EH@%
  8805. commands.%@NL@%
  8806. %@NL@%
  8807. %@CR:MCVBA006@%%@4@%%@AB@%Dialog%@AE@%%@EH@%%@NL@%
  8808. %@NL@%
  8809. %@CR:MCVBA007@%%@4@%The redirection commands are entered with dialog commands, as shown in%@EH@%
  8810. Sections 11.10.1%@BO:   7e1b9@%-11.10.4.3 below.%@NL@%
  8811. %@NL@%
  8812. %@NL@%
  8813. %@CR:MCVBA100@%%@3@%%@AB@%11.10.1  Redirecting CodeView Input%@AE@%%@EH@%%@NL@%
  8814. %@NL@%
  8815. %@CR:MCVBA101@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8816. %@NL@%
  8817.      %@AB@%<%@AE@% %@AI@%devicename%@AE@%%@NL@%
  8818. %@NL@%
  8819. %@CR:MCVBA102@%%@4@%The Redirected Input command causes the CodeView debugger to read all%@EH@%
  8820. subsequent command input from a device, such as another terminal or a file.
  8821. The sample session supplied with most versions of the debugger is an example
  8822. of commands being redirected from a file.%@NL@%
  8823. %@NL@%
  8824. %@CR:MCVBA103@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8825. %@NL@%
  8826.      ><COM1%@NL@%
  8827. %@NL@%
  8828. %@CR:MCVBA104@%%@4@%The example above redirects commands from the device (probably a remote%@EH@%
  8829. terminal) designated as %@AS@%COM1%@AE@% to the CodeView terminal.%@NL@%
  8830. %@NL@%
  8831.      ><INFILE.TXT%@NL@%
  8832. %@NL@%
  8833. %@CR:MCVBA105@%%@4@%The example above redirects command input from file %@AS@%INFILE.TXT%@AE@% to the%@EH@%
  8834. CodeView debugger. You might use this command to prepare a CodeView session
  8835. for someone else to run. You create a text file containing a series of
  8836. commands separated by carriage-return and line-feed combinations or
  8837. semicolons. When you redirect the file, the debugger executes the commands
  8838. to the end of the file. One way to create such a file is to redirect
  8839. commands from the CodeView debugger to a file (see Section 11.10.3%@BO:   7f0f6@% below)
  8840. and then edit the file to eliminate the output and add comments.%@NL@%
  8841. %@NL@%
  8842. %@NL@%
  8843. %@CR:MCVBA200@%%@3@%%@AB@%11.10.2  Redirecting CodeView Output%@AE@%%@EH@%%@NL@%
  8844. %@NL@%
  8845. %@CR:MCVBA201@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8846. %@NL@%
  8847.      «%@AB@%T%@AE@%»%@AB@%>%@AE@%«%@AB@%>%@AE@%»%@AI@%devicename%@AE@%%@NL@%
  8848. %@NL@%
  8849. %@CR:MCVBA202@%%@4@%The Redirected Output command causes the CodeView debugger to write all%@EH@%
  8850. subsequent command output to a device, such as another terminal, a printer,
  8851. or a file. The term "output" includes not only the output from commands but
  8852. also the command characters that are echoed as you type them.%@NL@%
  8853. %@NL@%
  8854. %@CR:MCVBA203@%%@4@%The optional %@AB@%T%@AE@% indicates that the output should be echoed to the CodeView%@EH@%
  8855. screen. Normally, you will want to use the %@AB@%T%@AE@% if you are redirecting output
  8856. to a file so you can see what you are typing. However, if you are
  8857. redirecting output to another terminal, you may not want to see the output
  8858. on the CodeView terminal.%@NL@%
  8859. %@NL@%
  8860. %@CR:MCVBA204@%%@4@%The second greater-than symbol (optional) appends the output to an existing%@EH@%
  8861. file. If you redirect output to an existing file without this symbol, the
  8862. existing file is replaced.%@NL@%
  8863. %@NL@%
  8864. %@CR:MCVBA205@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8865. %@NL@%
  8866.      >>COM1%@AS@%%@NL@%
  8867. %@NL@%
  8868. %@CR:MCVBA206@%%@4@%In the example above, output is redirected to the device designated as %@AS@%COM1%@AE@%%@EH@%
  8869. (probably a remote terminal). You might want to enter this command, for
  8870. example, when you are debugging a graphics program and want CodeView
  8871. commands to be displayed on a remote terminal while the program display
  8872. appears on the originating terminal.%@NL@%
  8873. %@NL@%
  8874.      >T>OUTFILE.TXT%@NL@%
  8875.      .%@NL@%
  8876.      .%@NL@%
  8877.      .%@NL@%
  8878.      >>CON%@NL@%
  8879.      .%@NL@%
  8880.      .%@NL@%
  8881.      .%@NL@%
  8882. %@NL@%
  8883. %@CR:MCVBA207@%%@4@%In the example above, output is redirected to the file %@AS@%OUTFILE.TXT%@AE@%. This%@EH@%
  8884. command is helpful in keeping a permanent record of a CodeView session. Note
  8885. that the optional %@AB@%T%@AE@% is used so that the session is echoed to the CodeView
  8886. screen as well as to the file. After redirecting some commands to a file,
  8887. output is returned to the console (terminal) with the command %@AS@%>CON%@AE@%.%@AS@%%@NL@%
  8888. %@NL@%
  8889.      >T>>OUTFILE.TXT%@AS@%%@NL@%
  8890. %@NL@%
  8891. %@CR:MCVBA208@%%@4@%If, later in the session, you want to redirect more commands to the same%@EH@%
  8892. file, use the double greater-than symbol, as in the example above, to append
  8893. the output to the existing file.%@NL@%
  8894. %@NL@%
  8895. %@NL@%
  8896. %@CR:MCVBA300@%%@3@%%@AB@%11.10.3  Redirecting CodeView Input and Output%@AE@%%@EH@%%@NL@%
  8897. %@NL@%
  8898. %@CR:MCVBA301@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8899. %@NL@%
  8900.      %@AB@%=%@AE@% %@AI@%devicename%@AE@%%@NL@%
  8901. %@NL@%
  8902. %@CR:MCVBA302@%%@4@%The Redirected Input and Output command causes the CodeView debugger to%@EH@%
  8903. write all subsequent command output to a device and simultaneously to
  8904. receive input from the same device. This command is practical only if the
  8905. device is a remote terminal.%@NL@%
  8906. %@NL@%
  8907. %@CR:MCVBA303@%%@4@%Redirecting input and output works best if you start in sequential mode%@EH@%
  8908. (using the /T option). The CodeView debugger's window interface has little
  8909. purpose in this situation since the remote terminal can act only as a
  8910. sequential (nonwindow) device.%@NL@%
  8911. %@NL@%
  8912. %@CR:MCVBA304@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  8913. %@NL@%
  8914.      >=COM1%@NL@%
  8915. %@NL@%
  8916. %@CR:MCVBA305@%%@4@%In the example above, output and input are redirected to the device%@EH@%
  8917. designated as %@AS@%COM1%@AE@%. This command would be useful if you wanted to enter
  8918. debugging commands and see the debugger output on a remote terminal while
  8919. entering program commands and viewing program output on the terminal where
  8920. the debugger is running.%@NL@%
  8921. %@NL@%
  8922. %@NL@%
  8923. %@CR:MCVBA400@%%@3@%%@AB@%11.10.4  Commands Used with Redirection%@AE@%%@EH@%%@NL@%
  8924. %@NL@%
  8925. %@CR:MCVBA401@%%@4@%The following commands are intended for use when redirecting commands to or%@EH@%
  8926. from a file. Although they are always available, these commands have little
  8927. practical use during a normal debugging session.%@NL@%
  8928. %@NL@%
  8929. %@CR:MCVBA402@%%@AB@%Command                     Action%@AE@%%@NL@%
  8930. %@NL@%
  8931. Comment (%@AB@%*%@AE@%)                 Displays comment%@NL@%
  8932. %@NL@%
  8933. Delay (%@AB@%:%@AE@%)                   Delays execution of commands from a redirected%@NL@%
  8934.                             file%@NL@%
  8935. %@NL@%
  8936. Pause (%@AB@%"%@AE@%)                   Interrupts execution of commands from a%@NL@%
  8937.                             redirected file until a key is pressed%@NL@%
  8938. %@NL@%
  8939. %@NL@%
  8940. %@CR:MCVBA410@%%@4@%%@AB@%11.10.4.1  Comment Command%@AE@%%@EH@%%@NL@%
  8941. %@NL@%
  8942. %@CR:MCVBA411@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8943. %@NL@%
  8944.      %@AB@%*%@AE@%%@AI@%comment%@AE@%%@NL@%
  8945. %@NL@%
  8946. %@CR:MCVBA412@%%@4@%The Comment command is an asterisk (%@AB@%*%@AE@%) followed by text. The CodeView%@EH@%
  8947. debugger echoes the text of the comment to the screen (or other output
  8948. device). This command is useful in combination with the redirection commands
  8949. when you are saving a commented session or when writing a commented session
  8950. that will be redirected to the debugger.%@NL@%
  8951. %@NL@%
  8952. %@CR:MCVBA413@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  8953. %@NL@%
  8954.      >T>OUTPUT.TXT%@NL@%
  8955.      >* Dump first 20 bytes of screen buffer%@NL@%
  8956.      >D #B800:0 L 20%@NL@%
  8957.      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@%
  8958.      B800:0010 6E 17 20 17                                     n. .%@NL@%
  8959.      >%@NL@%
  8960. %@NL@%
  8961. %@CR:MCVBA414@%%@4@%In the example above, the user is sending a copy of a CodeView session to%@EH@%
  8962. file %@AS@%OUTPUT.TXT%@AE@%. Comments are added to explain the purpose of the command.
  8963. The text file will contain commands, comments, and command output.%@NL@%
  8964. %@NL@%
  8965.      * Dump first 20 bytes of screen buffer%@NL@%
  8966.      D #B800:0 L 20%@NL@%
  8967.      .%@NL@%
  8968.      .%@NL@%
  8969.      .%@NL@%
  8970.      < CON%@NL@%
  8971. %@NL@%
  8972. %@CR:MCVBA415@%%@4@%The example above illustrates another way to use the Comment command. You%@EH@%
  8973. can put comments into a text file of commands that are executed
  8974. automatically when you redirect the file into the CodeView debugger. In this
  8975. example, an editing program was used to create the text file called
  8976. %@AS@%INPUT.TXT%@AE@%.%@NL@%
  8977. %@NL@%
  8978.      ><INPUT.TXT%@NL@%
  8979.      >* Dump first 20 bytes of screen buffer%@NL@%
  8980.      >D #B800:0 L 20%@NL@%
  8981.      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@%
  8982.      B800:0010 6E 17 20 17n. .%@AE@%%@NL@%
  8983.      .%@NL@%
  8984.      .%@NL@%
  8985.      .%@NL@%
  8986.      >< CON%@NL@%
  8987.      >%@NL@%
  8988. %@NL@%
  8989. %@CR:MCVBA416@%%@4@%When you read the file into the debugger by using the Redirected Input%@EH@%
  8990. command, you see the comment, the command, and the output from the command,
  8991. as in the example above.%@NL@%
  8992. %@NL@%
  8993. %@CR:MCVBA420@%%@4@%%@AB@%11.10.4.2  Delay Command%@AE@%%@EH@%%@NL@%
  8994. %@NL@%
  8995. %@CR:MCVBA421@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  8996. %@NL@%
  8997.      %@AB@%:%@AE@%%@NL@%
  8998. %@NL@%
  8999. %@CR:MCVBA422@%%@4@%The Delay command interrupts execution of commands from a redirected file%@EH@%
  9000. and waits about half a second before continuing. You can put multiple Delay
  9001. commands on a single line to increase the length of delay. The delay is the
  9002. same length regardless of the processing speed of the computer.%@NL@%
  9003. %@NL@%
  9004. %@CR:MCVBA423@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  9005. %@NL@%
  9006.      : ;* That was a short delay...%@NL@%
  9007.      ::::: ;* That was a longer delay...%@NL@%
  9008. %@NL@%
  9009. %@CR:MCVBA424@%%@4@%In the example above, the Delay command is used to slow execution of the%@EH@%
  9010. redirected file into the CodeView debugger.%@NL@%
  9011. %@NL@%
  9012. %@CR:MCVBA430@%%@4@%%@AB@%11.10.4.3  Pause Command%@AE@%%@EH@%%@NL@%
  9013. %@NL@%
  9014. %@CR:MCVBA431@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  9015. %@NL@%
  9016.      %@AB@%"%@AE@%%@NL@%
  9017. %@NL@%
  9018. %@CR:MCVBA432@%%@4@%The Pause command interrupts execution of commands from a redirected file%@EH@%
  9019. and waits for the user to press a key. Execution of the redirected commands
  9020. begins as soon as a key is pressed.%@NL@%
  9021. %@NL@%
  9022. %@CR:MCVBA433@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  9023. %@NL@%
  9024.      * Press any key to continue%@NL@%
  9025.      "%@NL@%
  9026. %@NL@%
  9027. %@CR:MCVBA434@%%@4@%In the example above from a text file that might be redirected into the%@EH@%
  9028. CodeView debugger, a Comment command is used to prompt the user to press a
  9029. key. The Pause command is then used to halt execution until the user
  9030. responds.%@NL@%
  9031. %@NL@%
  9032.      >* Press any key to continue%@NL@%
  9033.      >"%@NL@%
  9034. %@NL@%
  9035. %@CR:MCVBA435@%%@4@%The example above shows the output when the text is redirected into the%@EH@%
  9036. debugger. The next CodeView prompt does not appear until the user presses a
  9037. key.%@NL@%
  9038. %@NL@%
  9039. %@NL@%
  9040. %@CR:MCVC0000@%%@1@%%@AB@%Chapter 12  Debugging in Protected Mode%@AE@%%@EH@%%@NL@%
  9041. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9042. %@NL@%
  9043. %@CR:MCVC0001@%%@4@%The protected-mode CodeView debugger (CVP.EXE) supports all the special%@EH@%
  9044. programming features of OS/2 protected mode: dynamic-link libraries,
  9045. multiple processes, and multiple threads within a process. CodeView lets you
  9046. stop execution, then switch between individual processes and threads.%@NL@%
  9047. %@NL@%
  9048. %@CR:MCVC0002@%%@4@%The support for thread debugging is especially powerful because it lets you%@EH@%
  9049. block (or "freeze") selected threads while letting others run. You can set
  9050. breakpoints applicable to all threads or only to a specific thread.%@NL@%
  9051. %@NL@%
  9052. %@CR:MCVC0003@%%@4@%Note that you must use the protected-mode CodeView debugger (CVP.EXE) in%@EH@%
  9053. order to run CodeView in protected mode or debug protected-mode programs.
  9054. Furthermore, before you run CVP you must set IOPL=YES in your CONFIG.SYS
  9055. file.%@NL@%
  9056. %@NL@%
  9057. %@CR:MCVC0004@%%@4@%This chapter deals with the following topics:%@EH@%%@NL@%
  9058. %@NL@%
  9059. %@CR:MCVC0005@%  ■  Using CodeView in real and protected mode%@NL@%
  9060. %@NL@%
  9061.   ■  Debugging dynamic-link libraries%@NL@%
  9062. %@NL@%
  9063.   ■  Debugging multiple processes%@NL@%
  9064. %@NL@%
  9065.   ■  Debugging multiple threads%@NL@%
  9066. %@NL@%
  9067. %@CR:MCVC0006@%%@4@%All the techniques presented in this chapter can be used together. You can%@EH@%
  9068. debug multiple processes, and within each process debug multiple threads.%@NL@%
  9069. %@NL@%
  9070. %@NL@%
  9071. %@CR:MCVC1000@%%@2@%%@AB@%12.1  Using CodeView in Different Modes%@AE@%%@EH@%%@NL@%
  9072. %@NL@%
  9073. %@CR:MCVC1001@%%@4@%Chapters 1-11 assume that the real-mode CodeView debugger (CV.EXE) is%@EH@%
  9074. running in real mode, debugging a real-mode program. This section summarizes
  9075. the major considerations and limitations of other situations.%@NL@%
  9076. %@NL@%
  9077. %@CR:MCVC1002@%%@4@%As noted above, to debug a protected-mode program, you must run CVP.EXE in%@EH@%
  9078. protected mode. You must first set IOPL=YES. This setting enables
  9079. applications to run at Ring 3, giving programs low-level access. CodeView
  9080. needs to run at this level because it does direct-hardware access.%@NL@%
  9081. %@NL@%
  9082. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9083. %@AI@%WARNING%@AE@%%@NL@%
  9084.    If you do not set IOPL=YES before running CVP, CVP fails to run and the%@NL@%
  9085.    system does not give you a clear message explaining why CodeView failed.%@NL@%
  9086.    The system may  become unstable and fail at any time.%@NL@%
  9087. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9088. %@NL@%
  9089. %@CR:MCVC1003@%%@4@%You must also use CVP in order to debug a bound program. The restrictions%@EH@%
  9090. mentioned above apply. Real-mode CodeView cannot debug a bound program.%@NL@%
  9091. %@NL@%
  9092. %@CR:MCVC1004@%%@4@%The real-mode debugger can run in the 3.x compatibility box. However, when%@EH@%
  9093. you run CodeView in the compatibility box, include /S on the command line.
  9094. Otherwise, the mouse pointer does not appear.%@NL@%
  9095. %@NL@%
  9096. %@NL@%
  9097. %@CR:MCVC2000@%%@2@%%@AB@%12.2  Debugging Dynamic-Link Libraries%@AE@%%@EH@%%@NL@%
  9098. %@NL@%
  9099. %@CR:MCVC2001@%%@4@%The protected-mode CodeView debugger (CVP) can debug dynamic-link modules%@EH@%
  9100. but only if it is told what libraries to search at run time. For more
  9101. information on dynamic-link libraries, refer to the %@AI@%Microsoft Operating%@AE@%
  9102. %@AI@%System/2 Programmer's Guide%@AE@%.%@NL@%
  9103. %@NL@%
  9104. %@CR:MCVC2002@%%@4@%When you place a module in a dynamic-link library, neither code nor symbolic%@EH@%
  9105. information for that module is stored in the executable (.EXE) file;
  9106. instead, the code and symbols are stored in the library and are not brought
  9107. together with the main program until run time.%@NL@%
  9108. %@NL@%
  9109. %@CR:MCVC2003@%%@4@%Thus, the protected-mode debugger needs to search the dynamic-link library%@EH@%
  9110. for symbolic information. Because the debugger does not automatically know
  9111. what libraries to look for, CVP has an additional command-line option that
  9112. enables you to specify dynamic-link libraries:%@NL@%
  9113. %@NL@%
  9114. %@CR:MCVC2004@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  9115. %@NL@%
  9116.      %@AB@%/L%@AE@%%@AI@% file%@AE@%%@AB@%%@NL@%
  9117. %@NL@%
  9118. %@CR:MCVC2005@%%@4@%The /L option directs the CodeView debugger to search %@AI@%file%@AE@% for symbolic%@EH@%
  9119. information. When you use this option, at least one space must separate /L
  9120. from %@AI@%file%@AE@%.%@NL@%
  9121. %@NL@%
  9122. %@CR:MCVC2006@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  9123. %@NL@%
  9124.      CVP /L DLIB1.DLL /L GRAFLIB.DLL PROG%@NL@%
  9125. %@NL@%
  9126. %@CR:MCVC2007@%%@4@%In the example above, CVP is invoked to debug the program PROG.EXE. To find%@EH@%
  9127. symbolic information needed for debugging each module, CVP searches the
  9128. libraries %@AS@%DLIB1.DLL%@AE@% and %@AS@%GRAFLIB.DLL%@AE@%, as well as the executable file
  9129. %@AS@%PROG.EXE%@AE@%.%@NL@%
  9130. %@NL@%
  9131. %@NL@%
  9132. %@CR:MCVC3000@%%@2@%%@AB@%12.3  Debugging Multiple Processes%@AE@%%@EH@%%@NL@%
  9133. %@NL@%
  9134. %@CR:MCVC3001@%%@4@%To enable debugging of multiple processes, you must first start up CodeView%@EH@%
  9135. with the /O (offspring) option. The syntax of this option is simple, as it
  9136. takes no arguments.%@NL@%
  9137. %@NL@%
  9138. %@CR:MCVC3002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  9139. %@NL@%
  9140.      %@AB@%/O%@AE@%%@NL@%
  9141. %@NL@%
  9142. %@CR:MCVC3003@%%@4@%If you do not use the /O option (or the option cannot be used), CodeView%@EH@%
  9143. lets your program spawn new processes, but you will not be able to view or
  9144. trace through these processes. They run in the background as far as CodeView
  9145. is concerned.%@NL@%
  9146. %@NL@%
  9147. %@CR:MCVC3004@%%@4@%For example, to debug multiple processes of the program SPACEMAN.EXE you%@EH@%
  9148. would use the following command:%@NL@%
  9149. %@NL@%
  9150.      CVP /O SPACEMAN%@NL@%
  9151. %@NL@%
  9152. %@CR:MCVC3005@%%@4@%The /O option has two limitations:%@EH@%%@NL@%
  9153. %@NL@%
  9154. %@CR:MCVC3006@%  1. You must have OS/2 Version 1.1 or later to use it.%@NL@%
  9155. %@NL@%
  9156.   2. This option is incompatible with the /2 option.%@NL@%
  9157. %@NL@%
  9158. %@CR:MCVC3007@%%@4@%The rest of this section assumes that you have successfully started CodeView%@EH@%
  9159. with the /O option.%@NL@%
  9160. %@NL@%
  9161. %@CR:MCVC3008@%%@4@%Every time your program executes a line of code that spawns a child process,%@EH@%
  9162. CodeView responds by displaying the process ID number (Pid) and asking if
  9163. you wish to debug the child process. The message displayed is similar to the
  9164. following:%@NL@%
  9165. %@NL@%
  9166.      %@AS@%Pid 24 started. Do you wish to debug (y/n)?%@AE@%%@NL@%
  9167. %@NL@%
  9168. %@CR:MCVC3009@%%@4@%To debug the child process, type Y and then press ENTER. Type any other%@EH@%
  9169. letter for no. CodeView takes a different course of action depending on your
  9170. response.%@NL@%
  9171. %@NL@%
  9172. %@CR:MCVC300A@%  ■  If you respond yes, CodeView spawns a new CodeView process. This%@NL@%
  9173.      process controls execution of your program's child process. Each%@NL@%
  9174.      instance of CodeView spawned in this way becomes a separate debugging%@NL@%
  9175.      session.%@NL@%
  9176. %@NL@%
  9177.      A new process runs in the same screen group as its parent process%@NL@%
  9178.      (unless you call the DosStartSession system function). Using CodeView%@NL@%
  9179.      does not change this. However, each new instance of CodeView always%@NL@%
  9180.      runs in its own screen group. Since OS/2 supports a maximum of 16%@NL@%
  9181.      screen groups, the number of child processes that you can debug at one%@NL@%
  9182.      time is limited.%@NL@%
  9183. %@NL@%
  9184.   ■  If you respond no, CodeView lets the program spawn the child process.%@NL@%
  9185.      However, you will not be able to control or trace the child process%@NL@%
  9186.      with CodeView. The child process is active but not accessible to%@NL@%
  9187.      CodeView commands.%@NL@%
  9188. %@NL@%
  9189. %@CR:MCVC300B@%%@4@%You can move between different CodeView processes in the following two ways:%@EH@%
  9190. by using the OS/2 Session Manager or the Process command (%@AB@%|%@AE@%). The Process
  9191. command, in turn, has two forms. You can use this command to view status of
  9192. child processes or to switch directly to the debugging session of the child
  9193. process.%@NL@%
  9194. %@NL@%
  9195. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9196. %@AI@%NOTE%@AE@%%@NL@%
  9197.    You may need to make note of process ID numbers when CodeView spawns a%@NL@%
  9198.    process. CodeView identifies multiple processes only by their ID numbers.%@NL@%
  9199. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9200. %@NL@%
  9201. %@NL@%
  9202. %@CR:MCVC3100@%%@3@%%@AB@%12.3.1  Viewing Status%@AE@%%@EH@%%@NL@%
  9203. %@NL@%
  9204. %@CR:MCVC3101@%%@4@%To view the status of the child processes (of the current process), enter%@EH@%
  9205. the Process command followed by no arguments:%@NL@%
  9206. %@NL@%
  9207.      %@AB@%|%@AE@%%@NL@%
  9208. %@NL@%
  9209. %@CR:MCVC3102@%%@4@%CodeView responds by displaying three fields: process ID number, session%@EH@%
  9210. (screen group) ID number, and yes or no, depending on whether or not each
  9211. process has its own instance of CodeView. The following example shows a
  9212. sample process status for a process with three children:%@NL@%
  9213. %@NL@%
  9214.      001|%@NL@%
  9215.      ProcessID   SessionID    Debugging%@NL@%
  9216.      00024         00006 Yes%@NL@%
  9217.      00026         00006 Yes%@NL@%
  9218.      00028         00006 No%@NL@%
  9219. %@NL@%
  9220. %@CR:MCVC3103@%%@4@%In the example above, only processes 24 and 26 can be debugged. Each of%@EH@%
  9221. these processes corresponds to a different instance of CodeView, and each
  9222. instance runs in a separate screen group. Process 28 is active but cannot be
  9223. debugged.%@NL@%
  9224. %@NL@%
  9225. %@NL@%
  9226. %@CR:MCVC3200@%%@3@%%@AB@%12.3.2  Switching to a Child Process%@AE@%%@EH@%%@NL@%
  9227. %@NL@%
  9228. %@CR:MCVC3201@%%@4@%If a child process can be debugged, you can switch to that process directly%@EH@%
  9229. by using the Process command. Use of this command accomplishes the same end
  9230. as using the Session Manager but is more direct.%@NL@%
  9231. %@NL@%
  9232. %@CR:MCVC3202@%%@4@%To switch to the debugging session for a child process, enter the Process%@EH@%
  9233. command with the following syntax:%@NL@%
  9234. %@NL@%
  9235.      %@AB@%|%@AE@% %@AI@%processID%@AE@%%@AB@%%@NL@%
  9236. %@NL@%
  9237. %@CR:MCVC3203@%%@4@%in which %@AI@%processID%@AE@% is the process ID (Pid) of the process you wish to debug.%@EH@%%@NL@%
  9238. %@NL@%
  9239. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9240. %@AI@%NOTE%@AE@%%@NL@%
  9241.    The Process command only works with direct children. In other words, you%@NL@%
  9242.    can spawn a child which in turns spawns another child. The Process%@NL@%
  9243.    command does not give you direct access to the "grandchild." Instead, you%@NL@%
  9244.    must switch to the intermediate parent.%@NL@%
  9245. %@NL@%
  9246.    To return to debugging a parent or grandparent, you must use the OS/2%@NL@%
  9247.    Session Manager.%@NL@%
  9248. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9249. %@NL@%
  9250. %@NL@%
  9251. %@CR:MCVC4000@%%@2@%%@AB@%12.4  Debugging Multiple Threads%@AE@%%@EH@%%@NL@%
  9252. %@NL@%
  9253. %@CR:MCVC4001@%%@4@%A program running in OS/2 protected mode has one or more threads. Threads%@EH@%
  9254. are the fundamental units of execution; OS/2 can execute a number of
  9255. different threads concurrently. A thread is similar to a process, yet it can
  9256. be created or terminated much faster. Threads begin at a function-definition
  9257. heading in the same program in which they are invoked.%@NL@%
  9258. %@NL@%
  9259. %@CR:MCVC4002@%%@4@%The existence of multiple threads within a program presents a dilemma for%@EH@%
  9260. debugging. For example, thread 1 may be executing source line 23 while
  9261. thread 2 is executing source line 78. Which line of code does the CodeView
  9262. debugger consider to be the current line?%@NL@%
  9263. %@NL@%
  9264. %@CR:MCVC4003@%%@4@%Conversely, you cannot always tell which thread is executing even if you%@EH@%
  9265. know what the current source line is. In OS/2 protected mode, you can write
  9266. a program in which two threads enter the same function.%@NL@%
  9267. %@NL@%
  9268. %@CR:MCVC4004@%%@4@%In Figure 12.1%@FN@%
  9269. 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@%
  9270. begin execution of thread 2. The function %@AS@%f2%@AE@% is the entry point of the new
  9271. thread. Thread 2 begins and terminates inside the function %@AS@%f2%@AE@%. Before it
  9272. terminates, however, thread 2 can enter other functions by means of ordinary
  9273. function calls.%@AS@%%@NL@%
  9274. %@NL@%
  9275. %@CR:MCVC4005@%%@4@%Thread 1 begins execution in the function %@AS@%main%@AE@%, and thread 2 begins%@EH@%
  9276. execution in the function %@AS@%f2%@AE@%. Later, both thread 1 and thread 2 enter the
  9277. function %@AS@%f3%@AE@%. (Note that each thread returns to the proper place because each
  9278. thread has its own stack.) When you use the debugger to examine the behavior
  9279. of code within the function %@AS@%f3%@AE@%, how can you tell which thread you are
  9280. tracking?%@AS@%%@NL@%
  9281. %@NL@%
  9282. %@CR:MCVC4006@%%@4@%The protected-mode CodeView debugger solves this dilemma by using a modified%@EH@%
  9283. CodeView prompt and by providing the Thread command, which is only available
  9284. with CVP.%@NL@%
  9285. %@NL@%
  9286. %@CR:MCVC4007@%%@4@%The command prompt for the protected-mode CodeView debugger is preceded by a%@EH@%
  9287. three-digit number indicating the current thread.%@NL@%
  9288. %@NL@%
  9289. %@CR:MCVC4008@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  9290. %@NL@%
  9291.      001>%@NL@%
  9292. %@NL@%
  9293. %@CR:MCVC4009@%%@4@%The example above displays the protected-mode CodeView prompt, indicating%@EH@%
  9294. that thread 1 is the current thread. Thread 1 is always the current thread
  9295. when you begin a program. If the program never calls the DOSCREATETHREAD
  9296. function, thread 1 will remain the only thread. Note that certain C library
  9297. functions (such as BeginThread) call DOSCREATETHREAD for you.%@NL@%
  9298. %@NL@%
  9299. %@CR:MCVC400A@%%@4@%Each thread has its own stack and its own register values. When you change%@EH@%
  9300. the current thread, you see several changes to the CodeView debugger
  9301. display:%@NL@%
  9302. %@NL@%
  9303. %@CR:MCVC400B@%  ■  The CodeView prompt displays a different three-digit number.%@NL@%
  9304. %@NL@%
  9305.   ■  The register contents change.%@NL@%
  9306. %@NL@%
  9307.   ■  The current source line and current instruction both change to reflect%@NL@%
  9308.      the new value of CS:IP. If you are running the debugger in window mode,%@NL@%
  9309.      you are likely to see different code in the display window.%@NL@%
  9310. %@NL@%
  9311.   ■  The Calls menu and the Stack Trace command displays a different group%@NL@%
  9312.      of functions.%@NL@%
  9313. %@NL@%
  9314. %@NL@%
  9315. %@CR:MCVC5000@%%@2@%%@AB@%12.5  The Thread Command%@AE@%%@EH@%%@NL@%
  9316. %@NL@%
  9317. %@CR:MCVC5001@%%@4@%This section discusses the Thread command and lists other CodeView commands%@EH@%
  9318. that may work differently because of multiple threads.%@NL@%
  9319. %@NL@%
  9320. %@CR:MCVC5002@%%@4@%The syntax of the Thread command is displayed below:%@EH@%%@NL@%
  9321. %@NL@%
  9322. %@CR:MCVC5003@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  9323. %@NL@%
  9324.      %@AB@%~%@AE@%«%@AI@%specifier%@AE@%«%@AI@%command%@AE@%» »%@NL@%
  9325. %@NL@%
  9326. %@CR:MCVC5004@%%@4@%In the syntax display above, the %@AI@%specifier%@AE@% determines to which thread or%@EH@%
  9327. threads the command applies. You can specify all threads or just a
  9328. particular thread. The %@AI@%command%@AE@% determines which activity the debugger
  9329. carries out with regard to the specified thread. For example, you can
  9330. execute the thread, freeze its execution, or select it as the current
  9331. thread. If you omit %@AI@%command%@AE@%, the debugger displays the status of the
  9332. specified thread. If you omit both %@AI@%command%@AE@% and %@AI@%specifier%@AE@%, the debugger
  9333. displays the status of all threads.%@NL@%
  9334. %@NL@%
  9335. %@CR:MCVC5005@%%@4@%The status display for threads consists of the two fields%@EH@%%@NL@%
  9336. %@NL@%
  9337.      %@CR:MCVC5006@%%@AI@%thread-id    thread-state%@AE@%%@NL@%
  9338. %@NL@%
  9339. %@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@%
  9340. %@AS@%frozen%@AE@%. All threads not frozen by the debugger are displayed as %@AS@%runnable%@AE@%;
  9341. this includes threads that may be blocked for reasons that have nothing to
  9342. do with the debugger, such as a critical section.%@NL@%
  9343. %@NL@%
  9344. %@NL@%
  9345. %@CR:MCVC5100@%%@3@%%@AB@%12.5.1  Legal Values for Specifier%@AE@%%@EH@%%@NL@%
  9346. %@NL@%
  9347. %@CR:MCVC5101@%%@4@%The legal values for %@AI@%specifier%@AE@% are listed below along with their effects.%@EH@%%@NL@%
  9348. %@NL@%
  9349. %@CR:MCVC5102@%%@AB@%Symbol                      Function%@AE@%%@NL@%
  9350. %@NL@%
  9351. (blank)                     Displays the status of all threads.%@NL@%
  9352. %@NL@%
  9353.                             If you omit the %@AI@%specifier%@AE@% field you cannot enter%@NL@%
  9354.                             a %@AI@%command%@AE@%. Instead, you enter the tilde (%@AB@%~%@AE@%) by%@NL@%
  9355.                             itself.%@NL@%
  9356. %@NL@%
  9357. %@AB@%#%@AE@%                           Specifies the last thread that was executed.%@NL@%
  9358. %@NL@%
  9359.                             This thread is not necessarily the current%@NL@%
  9360.                             thread. For example, suppose you are tracing%@NL@%
  9361.                             execution of thread 1, and then switch the%@NL@%
  9362.                             current thread to thread 2. Until you execute%@NL@%
  9363.                             some code in thread 2, the debugger still%@NL@%
  9364.                             considers thread 1 to be the last thread%@NL@%
  9365.                             executed.%@NL@%
  9366. %@NL@%
  9367. %@AB@%*%@AE@%                           Specifies all threads.%@NL@%
  9368. %@NL@%
  9369. %@AI@%n%@AE@%                           Specifies the indicated thread. The value of %@AI@%n%@AE@%%@NL@%
  9370.                             must be a number corresponding to an existing%@NL@%
  9371.                             thread. You can determine corresponding numbers%@NL@%
  9372.                             for all threads by entering the command %@AB@%~*%@AE@%,%@NL@%
  9373.                             which gives status of all threads.%@NL@%
  9374. %@NL@%
  9375. %@AB@%.%@AE@%                           Specifies the current thread.%@NL@%
  9376. %@NL@%
  9377. %@NL@%
  9378. %@CR:MCVC5200@%%@3@%%@AB@%12.5.2  Legal Values fo rCommand%@AE@%%@EH@%%@NL@%
  9379. %@NL@%
  9380. %@CR:MCVC5201@%%@4@%The legal values for %@AI@%command%@AE@% are listed below, along with their effects.%@EH@%%@NL@%
  9381. %@CR:MCVC5202@%%@NL@%
  9382. %@TH:   90   5206  2 28 49 @%%@AB@%Command                     Function%@AE@%(blank)                     The status of the selected thread (or threads)                            is displayed.%@AB@%BP%@AE@%                          A breakpoint is set for the specified thread or                            threads.                            As explained earlier, it is possible to write                            your program so that the same function is                            executed by more than one thread. By using this                            version of the Thread command, you can specify a                            breakpoint that applies only to a particular                            thread.                            The letters %@AB@%BP%@AE@% are followed by normal syntax for                            the Breakpoint Set command, as described in                            Chapter 7%@BO:   579f3@%, "Managing Breakpoints." Therefore you                            can include the optional pass count and command                            fields.%@AB@%E%@AE@%                           The specified thread is executed in slow motion.                            When you specify a single thread with %@AB@%E%@AE@%, the                            specified thread becomes the current thread and                            is executed without any other threads running in                            the background. The command %@AB@%~*E%@AE@%%@AS@%%@AE@%  is a special                            case.                            It is legal only in source mode and executes the                            current thread in slow motion, but lets all                            other threads run (except those that are                            frozen). You see only the current thread                            executing in the debugger display.%@AB@%F%@AE@%                           The specified thread (or threads) is frozen.                            A frozen thread will not run in the background                            or in response to the debugger Go command.                            However, if you use the %@AB@%E%@AE@%, %@AB@%G%@AE@%, %@AB@%P%@AE@%, or %@AB@%T%@AE@% variation                            of the Thread command, the specified thread is                            temporarily unfrozen while the debugger executes                            the command.%@AB@%G%@AE@%                           Control is passed to the specified thread until                            it terminates or until a breakpoint is reached.                            If you give the command %@AB@%~*G%@AE@%, all threads execute                            concurrently (except for those that are frozen).                            If you specify a particular thread, the debugger                            temporarily freezes all other threads and                            executes the specified thread.%@AB@%P%@AE@%                           The debugger executes a program step for the                            specified thread.                            If you specify a particular thread, the debugger                            executes one source line or instruction of the                            thread. All other threads are temporarily                            frozen. This version of the Thread command does                            not change the current thread. Therefore if you                            specify a thread other than the current thread,                            you will not see immediate results. However, the                            subsequent behavior of the current thread may be                            affected.                            The command %@AB@%~*P%@AE@% is a special case. It is legal                            only in source mode, and causes the debugger to                            step to the next source line while letting all                            other threads run (except for those that are                            frozen). You  see only the current thread                            execute in the debugger display.%@AB@%S%@AE@%                           The specified thread is selected as the current                            thread.                            This version of the Thread command can apply to                            only one thread at a time. Thus, the command %@AB@%~*S%@AE@%                            results in an error message. Note that the                            command %@AB@%~.S%@AE@% is legal, but has no effect.%@AB@%T%@AE@%                           The specified thread is traced.                            This version of the Thread command works in a                            manner identical to %@AB@%P%@AE@%, described above, except                            that %@AB@%T%@AE@% traces through function calls and                            interrupts, whereas %@AB@%P%@AE@% does not.%@AB@%U%@AE@%                           The specified thread or threads are unfrozen.                            This command reverses the effect of a freeze.%@TE:   90   5206  2 28 49 @%
  9383. %@NL@%
  9384. %@CR:MCVC5203@%%@4@%With the Thread command, only the %@AB@%S%@AE@% (select) and %@AB@%E%@AE@% (execute) variations cause%@EH@%
  9385. the debugger to switch the current thread. However, when a thread causes
  9386. program execution to stop by hitting a breakpoint, the debugger selects that
  9387. thread as the current thread.%@NL@%
  9388. %@NL@%
  9389. %@CR:MCVC5204@%%@4@%You can prevent the debugger from changing the current thread by including%@EH@%
  9390. the breakpoint command %@AB@%"~.S"%@AE@%. This command directs the debugger to switch
  9391. to the current thread rather than the thread that hit the breakpoint. For
  9392. example, the following command sets a breakpoint at line %@AS@%120%@AE@% and prevents
  9393. the current thread from changing:%@NL@%
  9394. %@NL@%
  9395.      BP .120 "~.S"%@NL@%
  9396. %@NL@%
  9397. %@NL@%
  9398. %@CR:MCVC5300@%%@3@%%@AB@%12.5.3  Entries to the Thread Command%@AE@%%@EH@%%@NL@%
  9399. %@NL@%
  9400. %@CR:MCVC5301@%%@4@%The Thread command can have several possible entries. They are summarized in%@EH@%
  9401. the syntax display below.%@NL@%
  9402. %@NL@%
  9403. %@CR:MCVC5302@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  9404. %@NL@%
  9405.      %@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@%
  9406. %@NL@%
  9407. %@CR:MCVC5303@%%@4@%Note that you must include one of the symbols from the first set (which%@EH@%
  9408. gives possible values for the specifier), but you do not have to include a
  9409. symbol from the second set (which gives possible values for the command).%@NL@%
  9410. %@NL@%
  9411. %@CR:MCVC5304@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9412. %@NL@%
  9413.      004>~%@NL@%
  9414. %@NL@%
  9415. %@CR:MCVC5305@%%@4@%The example above displays the status of all threads, including their%@EH@%
  9416. corresponding numbers.%@NL@%
  9417. %@NL@%
  9418.      004>~2%@NL@%
  9419. %@NL@%
  9420. %@CR:MCVC5306@%%@4@%The example above displays the status of thread 2.%@EH@%%@NL@%
  9421. %@NL@%
  9422.      004>~5S%@NL@%
  9423. %@NL@%
  9424. %@CR:MCVC5307@%%@4@%The example above selects thread 5 as the current thread. Since the current%@EH@%
  9425. thread was 4 (a fact apparent from the CodeView prompt), the current thread
  9426. is changing and therefore the registers and the code displayed can be
  9427. expected to all change.%@NL@%
  9428. %@NL@%
  9429.      005>~3BP .64%@NL@%
  9430. %@NL@%
  9431. %@CR:MCVC5308@%%@4@%The example above sets a breakpoint at source line 64, an action that stops%@EH@%
  9432. program execution only when thread 3 executes to this line.%@NL@%
  9433. %@NL@%
  9434.      005>~1F%@NL@%
  9435. %@NL@%
  9436. %@CR:MCVC5309@%%@4@%The example above freezes thread 1.%@EH@%%@NL@%
  9437. %@NL@%
  9438.      005>~*U%@NL@%
  9439. %@NL@%
  9440. %@CR:MCVC530A@%%@4@%The example above thaws (unfreezes) all threads; any threads that were%@EH@%
  9441. frozen before will now be free to execute whenever the Go command is given.
  9442. If no threads are frozen, this command has no effect.%@NL@%
  9443. %@NL@%
  9444.      005>~2E%@NL@%
  9445. %@NL@%
  9446. %@CR:MCVC530B@%%@4@%The example above selects thread 2 as the current thread, then proceeds to%@EH@%
  9447. execute thread 2 in slow motion.%@NL@%
  9448. %@NL@%
  9449.      002>~3S%@NL@%
  9450.      003>~.F%@NL@%
  9451.      003>~#S%@NL@%
  9452.      002>%@NL@%
  9453. %@NL@%
  9454. %@CR:MCVC530C@%%@4@%The example above selects thread 3 as the current thread, freezes the%@EH@%
  9455. current thread (thread 3), and switches back to thread 2. After switching to
  9456. thread 3, no code was executed; therefore, the debugger considers the
  9457. last-thread-executed symbol (%@AB@%#%@AE@%) to refer to thread 2.%@NL@%
  9458. %@NL@%
  9459. %@NL@%
  9460. %@CR:MCVC5400@%%@3@%%@AB@%12.5.4  Effect of Threads on CodeView Commands%@AE@%%@EH@%%@NL@%
  9461. %@NL@%
  9462. %@CR:MCVC5401@%%@4@%Whether or not you use the Thread Command, the existence of threads affects%@EH@%
  9463. your CodeView debugging session at all times. Particular debugger commands
  9464. are strongly affected. Each of these commands is discussed below.%@NL@%
  9465. %@CR:MCVC5402@%%@NL@%
  9466. %@TH:   41   2613  2 28 48 @%%@AB@%Command                     Behavior in Multiple-Thread Programs%@AE@%%@AB@%.%@AE@%                           The Current Line command always uses the current                            value of CS:IP to determine what the current                            instruction is. Thus, the Current Line command                            applies to the current thread.%@AB@%E%@AE@%                           When the debugger is in source mode, the Execute                            command is equivalent to the %@AB@%~*E%@AE@% command; the                            current thread is executed in slow motion while                            all other threads are also running. When the                            debugger is in mixed or assembly mode, the                            Execute command is equivalent to the command                            %@AB@%~.P%@AE@%, which does not let other threads run                            concurrently.%@AB@%BP%@AE@%                          The Set Breakpoint command is equivalent to the                            %@AB@%~*BP%@AE@% command; the breakpoint applies to all                            threads.%@AB@%G%@AE@%                           The Go command is equivalent to the %@AB@%~*G%@AE@%%@AS@%%@AE@%                            command; control is passed to the operating                            system, which executes all threads in the                            program except for those that are frozen.%@AB@%P%@AE@%                           When the debugger is in source mode, the Program                            Step command is equivalent to the command %@AB@%~*P%@AE@%,                            which lets other threads run concurrently. When                            the debugger is in mixed or assembly mode, the                            Program Step command is equivalent to the                            command %@AB@%~.P%@AE@%, which lets no other threads run.%@AB@%K%@AE@%                           The Stack Trace command displays the stack of                            the current thread.%@AB@%T%@AE@%                           When the debugger is in source mode, the Trace                            command is equivalent to the command %@AB@%~*T%@AE@%, which                            lets other threads run concurrently. When the                            debugger is in mixed or assembly mode, the Trace                            command is equivalent to the command %@AB@%~.T%@AE@%, which                            lets no other threads run.%@TE:   41   2613  2 28 48 @%
  9467. %@NL@%
  9468. %@CR:MCVC5403@%%@4@%In general, CodeView commands apply to all threads unless the nature of the%@EH@%
  9469. command makes it appropriate to deal with only one thread at a time. In this
  9470. case, the command applies only to the current thread. (For example, since
  9471. each thread has its own stack, the Stack Trace command does not apply to all
  9472. threads.)%@NL@%
  9473. %@NL@%
  9474. %@NL@%
  9475. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9476. %@CR:MCVP2000@%%@1@%%@AB@%Part 2  Utilities%@AE@%%@EH@%%@NL@%
  9477. %@NL@%
  9478. %@CR:MCVP2004@%%@4@%Part 2 describes the use of each of the DOS and OS/2 programming utilities%@EH@%
  9479. (exit codes and messages for these utilities are presented in the
  9480. appendixes).%@NL@%
  9481. %@NL@%
  9482. %@CR:MCVP2005@%%@4@%Some of the material is this part, most notably the information on LINK, is%@EH@%
  9483. presented in partial form in the user's guides for Microsoft compilers.
  9484. However, you will find here the only complete, authoritative reference on
  9485. utility operation and available options.%@NL@%
  9486. %@NL@%
  9487. %@CR:MCVP2006@%%@4@%Chapters 13-17 document utilities you can use to produce either OS/2 or DOS%@EH@%
  9488. programs. Chapters 18-22 document utilities and special concepts-such as
  9489. module-definition files-developed specifically for the creation of OS/2
  9490. programs.%@NL@%
  9491. %@NL@%
  9492. %@NL@%
  9493. %@CR:MCVD0000@%%@1@%%@AB@%Chapter 13  Linking Object Files with LINK%@AE@%%@EH@%%@NL@%
  9494. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9495. %@NL@%
  9496. %@CR:MCVD0001@%%@4@%The Microsoft Segmented-Executable Linker (LINK) is used to combine object%@EH@%
  9497. files into a single executable file. It can be used with object files
  9498. compiled or assembled for 8086/8088, 80286, or 80386 machines. The format of
  9499. input to the linker is the Microsoft Relocatable Object-Module Format (OMF),
  9500. which is based on the Intel 8086 OMF.%@NL@%
  9501. %@NL@%
  9502. %@CR:MCVD0002@%%@4@%The output file from LINK (that is, the executable file) is not bound to%@EH@%
  9503. specific memory addresses. Thus, the operating system can load and execute
  9504. this file at any convenient address. LINK can produce executable files
  9505. containing up to 1 megabyte of code and data.%@NL@%
  9506. %@NL@%
  9507. %@CR:MCVD0003@%%@4@%The following sections explain how to run the linker and specify options%@EH@%
  9508. that control its operation.%@NL@%
  9509. %@NL@%
  9510. %@NL@%
  9511. %@CR:MCVD1000@%%@2@%%@AB@%13.1  Determining Linker Output%@AE@%%@EH@%%@NL@%
  9512. %@NL@%
  9513. %@CR:MCVD1001@%%@4@%The linker can produce either an application that runs under real mode (DOS%@EH@%
  9514. 2.x, 3.x, or 3.x compatibility box), an application that runs under OS/2
  9515. protected mode (or Microsoft Windows), or an OS/2 dynamic-link library. If
  9516. you are developing programs for real mode only, leave the %@AI@%deffile%@AE@% field on
  9517. the LINK command line empty and ignore the following discussion. If you are
  9518. developing programs for OS/2, read this section to understand what kind of
  9519. executable file the linker produces. Chapters 18 and 19 explain in detail
  9520. the terms and concepts mentioned below.%@NL@%
  9521. %@NL@%
  9522. %@CR:MCVD1002@%%@4@%The following rules determine what output the linker produces:%@EH@%%@NL@%
  9523. %@NL@%
  9524. %@CR:MCVD1003@%  1. If no module-definition file or import library resolves any external%@NL@%
  9525.      references, the linker produces a real-mode application. (In other%@NL@%
  9526.      words, the linker creates a real-mode application unless you specify a%@NL@%
  9527.      module-definition file or import library, and that file or library%@NL@%
  9528.      resolves at least one external reference.)%@NL@%
  9529. %@NL@%
  9530.   2. If a module-definition file with a LIBRARY statement is given, the%@NL@%
  9531.      linker produces a dynamic-link library for OS/2 protected mode or%@NL@%
  9532.      Windows.%@NL@%
  9533. %@NL@%
  9534.   3. Otherwise, the linker produces an application for OS/2 protected mode%@NL@%
  9535.      or Windows.%@NL@%
  9536. %@NL@%
  9537. %@CR:MCVD1004@%%@4@%You can therefore produce an OS/2 protected-mode application by linking with%@EH@%
  9538. an import library or a module-definition file, as long as you do not use a
  9539. %@AB@%LIBRARY%@AE@% statement. (The LIBRARY statement is described in Chapter 19%@BO:   c14f2@%,
  9540. "Using Module-Definition Files.") The file DOSCALLS.LIB is an import
  9541. library. Therefore, if you link with DOSCALLS.LIB, you produce either an
  9542. OS/2 application or a dynamic-link library.%@NL@%
  9543. %@NL@%
  9544. %@CR:MCVD1005@%%@4@%When you use a Microsoft high-level language to compile for protected mode,%@EH@%
  9545. it automatically specifies DOSCALLS.LIB as a default library.%@NL@%
  9546. %@NL@%
  9547. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9548. %@AI@%NOTE%@AE@%%@NL@%
  9549.    Throughout this chapter, all references to OS/2 protected mode also apply%@NL@%
  9550.    to Microsoft Windows. Other chapters may make a distinction between%@NL@%
  9551.    protected mode and Windows. Each reference to "library," unless otherwise%@NL@%
  9552.    noted, refers to a standard (object-code) library, not a dynamic-link%@NL@%
  9553.    library.%@NL@%
  9554. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9555. %@NL@%
  9556. %@CR:MCVD1006@%%@4@%The linker produces files that run in protected mode only or in real mode%@EH@%
  9557. only. However, OS/2 applications that make dynamic-link calls only to the
  9558. Family API (a subset of the functions defined in DOSCALLS.LIB) can be made
  9559. to run under DOS 3.x with the BIND utility. (BIND is discussed in Chapter
  9560. 20%@BO:   ccaeb@%).%@NL@%
  9561.  
  9562. %@NL@%
  9563. %@NL@%
  9564. %@CR:MCVD2000@%%@2@%%@AB@%13.2  Specifying Files for Linking%@AE@%%@EH@%%@NL@%
  9565. %@NL@%
  9566. %@CR:MCVD2001@%%@4@%Instead of using high-level-language commands to invoke the linker, you can%@EH@%
  9567. use the LINK command to invoke LINK directly.You can specify the input
  9568. required for this command in one of three ways:%@NL@%
  9569. %@NL@%
  9570. %@CR:MCVD2002@%  1. By placing it on the command line.%@NL@%
  9571. %@NL@%
  9572.   2. By responding to prompts.%@NL@%
  9573. %@NL@%
  9574.   3. By specifying a file containing responses to prompts. This type of file%@NL@%
  9575.      is known as a "response file."%@NL@%
  9576. %@NL@%
  9577. %@CR:MCVD2003@%%@4@%Regardless of the way in which LINK was invoked, press CTRL+C at any time to%@EH@%
  9578. terminate LINK operation and exit back to DOS.%@NL@%
  9579. %@NL@%
  9580. %@NL@%
  9581. %@CR:MCVD2100@%%@3@%%@AB@%13.2.1  Specifying File Names%@AE@%%@EH@%%@NL@%
  9582. %@NL@%
  9583. %@CR:MCVD2101@%%@4@%You can use any combination of uppercase and lowercase letters for the file%@EH@%
  9584. names you specify on the LINK command line or give in response to the LINK
  9585. command prompts. For example, LINK considers the following three file names
  9586. to be equivalent:%@NL@%
  9587. %@NL@%
  9588.      %@CR:MCVD2102@%%@AS@%abcde.fgh%@AE@%%@NL@%
  9589.      %@AS@%AbCdE.FgH%@AE@%%@NL@%
  9590.      %@AS@%ABCDE.fgh%@AE@%%@NL@%
  9591. %@NL@%
  9592. %@CR:MCVD2103@%%@4@%If you specify file names without extensions, LINK uses the following%@EH@%
  9593. default file-name extensions:%@NL@%
  9594. %@NL@%
  9595. %@CR:MCVD2104@%%@AB@%File Type                   Default Extension%@AE@%%@NL@%
  9596. %@NL@%
  9597. Object                      .OBJ%@NL@%
  9598. %@NL@%
  9599. Executable                  .EXE%@NL@%
  9600. %@NL@%
  9601. Map                         .MAP%@NL@%
  9602. %@NL@%
  9603. Library                     .LIB%@NL@%
  9604. %@NL@%
  9605. Module definition           .DEF%@NL@%
  9606. (protected-mode use
  9607. only)
  9608. %@NL@%
  9609. %@CR:MCVD2105@%%@4@%You can override the default extension for a particular command-line field%@EH@%
  9610. or prompt by specifying a different extension. To enter a file name that has
  9611. no extension, type the name followed by a period.%@NL@%
  9612. %@NL@%
  9613. %@CR:MCVD2106@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9614. %@NL@%
  9615. %@CR:MCVD2107@%%@4@%Consider the following two file specifications:%@EH@%%@NL@%
  9616. %@NL@%
  9617.      %@CR:MCVD2108@%%@AS@%ABC.%@AE@%
  9618.      %@AS@%ABC%@AE@%%@NL@%
  9619. %@NL@%
  9620. %@CR:MCVD2109@%%@4@%If you use the first file specification, LINK assumes that the file has no%@EH@%
  9621. extension. If you use the second file specification, LINK uses the default
  9622. extension for that prompt.%@NL@%
  9623. %@NL@%
  9624. %@NL@%
  9625. %@CR:MCVD2200@%%@3@%%@AB@%13.2.2  Linking with the LINK Command Line%@AE@%%@EH@%%@NL@%
  9626. %@NL@%
  9627. %@CR:MCVD2201@%%@4@%Use the following form of the LINK command to specify input on the command%@EH@%
  9628. line:%@NL@%
  9629. %@NL@%
  9630.      %@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@%
  9631. %@NL@%
  9632. %@CR:MCVD2202@%%@4@%Each of the command-line fields is explained below. In these explanations,%@EH@%
  9633. reference is made to libraries. Unless qualified by the term "dynamic-link,"
  9634. the word "libraries" refers to import libraries and standard (object-code)
  9635. libraries, both of which have the default extension .LIB. (Note that
  9636. dynamic-link libraries have the default extension .DLL, and therefore are
  9637. usually easy to distinguish from other libraries.) You can specify import
  9638. libraries anywhere you can specify standard libraries.You can also combine
  9639. import libraries and standard libraries by using the Library Manager; these
  9640. combined libraries can then be specified in place of standard libraries.%@NL@%
  9641. %@NL@%
  9642. %@CR:MCVD2210@%%@4@%%@AB@%The objfiles field%@AE@%%@EH@%%@NL@%
  9643. %@NL@%
  9644. %@CR:MCVD2211@%%@4@%The %@AI@%objfiles%@AE@% field allows you to specify the names of the object files you%@EH@%
  9645. are linking. At least one object-file name is required. A space or plus sign
  9646. (+) must separate each pair of object-file names. LINK automatically
  9647. supplies the .OBJ extension when you give a filename without an extension.
  9648. If your object file has a different extension, or if it appears in another
  9649. directory or on another disk, you must give the full name──including the
  9650. extension and path name──for the file to be found. If LINK cannot find a
  9651. given object file, and the drive associated with the object file is a
  9652. removable (floppy) drive, LINK displays a message and waits for you to
  9653. change disks.%@NL@%
  9654. %@NL@%
  9655. %@CR:MCVD2212@%%@4@%You may also specify one or more libraries in the %@AI@%objfiles%@AE@% field. To enter a%@EH@%
  9656. library in this field, make sure that you include the .LIB extension;
  9657. otherwise LINK assumes an .OBJ extension. Libraries entered in this field
  9658. are called "load libraries" as opposed to "regular libraries." LINK
  9659. automatically links in every object module in a load library; it does not
  9660. search for unresolved external references first. The effect of entering a
  9661. load library is exactly the same as if you had entered all the names of the
  9662. library's object modules into the %@AI@%objfiles%@AE@% field. This feature is useful if
  9663. you are developing software using many modules and wish to avoid having to
  9664. retype each module on the LINK command line.%@NL@%
  9665. %@NL@%
  9666. %@CR:MCVD2220@%%@4@%%@AB@%The exefile field%@AE@%%@EH@%%@NL@%
  9667. %@NL@%
  9668. %@CR:MCVD2221@%%@4@%The %@AI@%exefile%@AE@% field allows you to specify the name of the executable file. If%@EH@%
  9669. the file name you give does not have an extension, LINK automatically adds
  9670. .EXE as the extension. You can give any file name you like; however, if you
  9671. are specifying an extension, you should always use .EXE because DOS expects
  9672. executable files to have either this extension or the .COM extension.%@NL@%
  9673. %@NL@%
  9674. %@CR:MCVD2230@%%@4@%%@AB@%The mapfile field%@AE@%%@EH@%%@NL@%
  9675. %@NL@%
  9676. %@CR:MCVD2231@%%@4@%The %@AI@%mapfile%@AE@% field allows you to specify the name of the map file if you are%@EH@%
  9677. creating one. To include public symbols and their addresses in the map file,
  9678. specify the /MAP option on the LINK command line. (See Section 13.3.15%@BO:   94a90@%,
  9679. "Listing Public Symbols.") If  you specify a map-filename without an
  9680. extension, LINK automatically adds an extension of .MAP. LINK creates the
  9681. map file in the current working directory unless you specify a path name for
  9682. the map file.%@NL@%
  9683. %@NL@%
  9684. %@CR:MCVD2240@%%@4@%%@AB@%The libraries field%@AE@%%@EH@%%@NL@%
  9685. %@NL@%
  9686. %@CR:MCVD2241@%%@4@%The %@AI@%libraries%@AE@% field allows you to specify the name of a library that you%@EH@%
  9687. want linked to the object file(s). (When LINK finds the name of a library in
  9688. this field, the library is a "regular library," and LINK will link in only
  9689. those object modules needed to resolve external references.) Each time you
  9690. compile a source file for a high-level language, the compiler places the
  9691. name of one or more libraries in the object file that it creates; the linker
  9692. automatically searches for a library with this name. Because of this, you do
  9693. not need to give library names on the LINK command line unless you want to
  9694. add the names of other libraries, search for libraries in different
  9695. locations, or override the use of the library named in the object file.%@NL@%
  9696. %@NL@%
  9697. %@CR:MCVD2250@%%@4@%%@AB@%The deffile field%@AE@%%@EH@%%@NL@%
  9698. %@NL@%
  9699. %@CR:MCVD2251@%%@4@%The %@AI@%deffile%@AE@% field allows you to specify the file name of a module-definition%@EH@%
  9700. file. Leave this field blank if you are linking for real mode. The use of a
  9701. module-definition file is optional for applications, but required for
  9702. dynamic-link libraries. See Chapters 18%@BO:   be41d@% and 19%@BO:   c14f2@% for more information on
  9703. module-definition files.%@NL@%
  9704. %@NL@%
  9705. %@CR:MCVD2252@%%@4@%You may specify command-line options after any field──but before the comma%@EH@%
  9706. that terminates the field. The options are described in sections
  9707. 13.3.1%@BO:   900cf@%-13.3.32. You do not have to give any options when you run the
  9708. linker.%@NL@%
  9709. %@NL@%
  9710. %@CR:MCVD2253@%%@4@%If you include a comma (to indicate where a field would be) but do not put a%@EH@%
  9711. file name before the comma, LINK will select the default for that field.
  9712. However, if you use a comma to include the %@AI@%mapfile%@AE@% field (but do not include
  9713. a name), LINK creates a map file. This file has the same base name as the
  9714. executable file. Use NUL for the map-filename if you do not want to produce
  9715. a map file.%@NL@%
  9716. %@NL@%
  9717. %@CR:MCVD2254@%%@4@%You can also select default responses by using a semicolon (%@AB@%;%@AE@%). The%@EH@%
  9718. semicolon tells LINK to use the defaults for all remaining fields. If you do
  9719. not give all file names on the command line, or if you do not end the
  9720. command line with a semicolon, the linker prompts you for the files you
  9721. omitted, using the prompts described in Section 13.2.3%@BO:   8baf9@%, "Linking with the
  9722. LINK Prompts."%@NL@%
  9723. %@NL@%
  9724. %@CR:MCVD2255@%%@4@%If you do not specify a drive or directory for a file, the linker assumes%@EH@%
  9725. that the file is on the current drive and directory. If you want the linker
  9726. to create files in a location other than the current drive and directory,
  9727. you must specify the new drive and directory for each such file on the
  9728. command line.%@NL@%
  9729. %@NL@%
  9730. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9731. %@AI@%NOTE%@AE@%%@NL@%
  9732.    The OS/2 linker supports overlays only when producing a real-mode%@NL@%
  9733.    application.%@NL@%
  9734. ───────────────────────────────────────────────────────────────────────────%@NL@%
  9735. %@NL@%
  9736. %@CR:MCVD2256@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  9737. %@NL@%
  9738.      LINK FUN+TEXT+TABLE+CARE, ,FUNLIST, XLIB.LIB%@NL@%
  9739. %@NL@%
  9740. %@CR:MCVD2257@%%@4@%The command line above causes LINK to load and link the object modules %@EH@%
  9741. %@AS@%FUN.OBJ%@AE@%, %@AS@%TEXT.OBJ%@AE@%, %@AS@%TABLE.OBJ%@AE@%, and %@AS@%CARE.OBJ%@AE@%, and to search for unresolved
  9742. references in the library file %@AS@%XLIB.LIB%@AE@% and the default libraries. By
  9743. default, the executable file produced by%@AS@%LINK%@AE@% is named %@AS@%FUN.EXE%@AE@%. LINK also
  9744. produces a map file, %@AS@%FUNLIST.MAP%@AE@%.%@NL@%
  9745. %@NL@%
  9746.      LINK FUN,,;%@NL@%
  9747. %@NL@%
  9748. %@CR:MCVD2258@%%@4@%This command line produces a map file named %@AS@%FUN.MAP%@AE@% since a comma appears as%@EH@%
  9749. a placeholder for the %@AI@%mapfile%@AE@% specification on the command line.%@NL@%
  9750. %@NL@%
  9751.      LINK FUN,;%@NL@%
  9752.      LINK FUN;%@NL@%
  9753. %@NL@%
  9754. %@CR:MCVD2259@%%@4@%These command lines do not produce a map file, since commas do not appear as%@EH@%
  9755. placeholders for the %@AI@%mapfile%@AE@% specification.%@NL@%
  9756. %@NL@%
  9757.      LINK MAIN+GETDATA+PRINTIT, , MAIN;%@NL@%
  9758. %@NL@%
  9759. %@CR:MCVD225A@%%@4@%The command in the line above causes LINK to link the files %@AS@%MAIN.OBJ%@AE@%,%@EH@%
  9760. %@AS@%GETDATA.OBJ%@AE@%, and %@AS@%PRINTIT.OBJ%@AE@% into a real-mode executable file since there is
  9761. no module-definition file. A map file named  %@AS@%MAIN.MAP%@AE@% is also produced.%@NL@%
  9762. %@NL@%
  9763.      LINK GETDATA+PRINTIT, , , MODDEF%@NL@%
  9764. %@NL@%
  9765. %@CR:MCVD225B@%%@4@%This command causes LINK to link %@AS@%GETDATA.OBJ%@AE@% and%@AS@%PRINTIT.OBJ%@AE@% into an OS/2%@EH@%
  9766. dynamic-link library if %@AS@%MODDEF.DEF%@AE@% contains a %@AB@%LIBRARY%@AE@% statement. Otherwise,
  9767. an OS/2 protected-mode application is produced.%@NL@%
  9768. %@NL@%
  9769. %@NL@%
  9770. %@CR:MCVD2300@%%@3@%%@AB@%13.2.3  Linking with the LINK Prompts%@AE@%%@EH@%%@NL@%
  9771. %@NL@%
  9772. %@CR:MCVD2301@%%@4@%If you want to use the LINK prompts to specify input to the linker, start%@EH@%
  9773. the linker by typing LINK at the DOS command level. LINK prompts you for the
  9774. input it needs by displaying the following lines, one at a time:%@NL@%
  9775. %@NL@%
  9776.      Object Modules [.OBJ]:%@NL@%
  9777.      Run File [%@AI@%basename%@AE@%.EXE]:%@NL@%
  9778.      List File [NUL.MAP]:%@NL@%
  9779.      Libraries [.LIB]:%@NL@%
  9780.      Definitions File [NUL.DEF]:%@NL@%
  9781. %@NL@%
  9782. %@CR:MCVD2302@%%@4@%LINK waits for you to respond to each prompt before printing the next one.%@EH@%
  9783. Section 13.2.1%@BO:   892c3@% gives the rules for specifying file names in response to
  9784. these prompts.%@NL@%
  9785. %@NL@%
  9786. %@CR:MCVD2303@%%@4@%The responses you give to the LINK command prompts correspond to the fields%@EH@%
  9787. on the LINK command line. (See Section 13.2.2%@BO:   89934@% for a discussion of the LINK
  9788. command line.) The following list shows these correspondences:%@NL@%
  9789. %@NL@%
  9790. %@CR:MCVD2304@%%@AB@%Prompt                      Command-Line Fields%@AE@%%@NL@%
  9791. %@NL@%
  9792. %@AS@%Object Module%@AE@%               %@AI@%objfiles%@AE@%%@NL@%
  9793. %@NL@%
  9794. %@AS@%Run File%@AE@%                    %@AI@%exefile%@AE@%%@NL@%
  9795. %@NL@%
  9796. %@AS@%List File%@AE@%                   %@AI@%mapfile%@AE@%%@NL@%
  9797. %@NL@%
  9798. %@AS@%Libraries%@AE@%                   %@AI@%libraries%@AE@%%@NL@%
  9799. %@NL@%
  9800. %@AS@%Definitions File%@AE@%            %@AI@%deffile%@AE@%%@NL@%
  9801. %@NL@%
  9802. %@CR:MCVD2305@%%@4@%If a plus sign (%@AB@%+%@AE@%) is the last character you type on a response line, the%@EH@%
  9803. prompt appears on the next line, and you can continue typing responses. In
  9804. this case, the plus sign must appear at the end of a complete file or
  9805. library name, path name, or drive name.%@NL@%
  9806. %@NL@%
  9807. %@CR:MCVD2306@%%@4@%To select the default response to the current prompt, type a carriage return%@EH@%
  9808. without giving a file name. The next prompt will appear.%@NL@%
  9809. %@NL@%
  9810. %@CR:MCVD2307@%%@4@%To select default responses to the current prompt and all remaining prompts,%@EH@%
  9811. type a semicolon (%@AB@%;%@AE@%) followed immediately by a carriage return. After you
  9812. enter a semicolon, you cannot respond to any of the remaining prompts for
  9813. that link session. Use this option to save time when you want to use the
  9814. default responses. However, you cannot enter a semicolon in response to the
  9815. %@AS@%Object Modules%@AE@% prompt, because there is no default response for that prompt.%@NL@%
  9816. %@NL@%
  9817. %@CR:MCVD2308@%%@4@%The following list shows the defaults for the other linker prompts:%@EH@%%@NL@%
  9818. %@NL@%
  9819. %@CR:MCVD2309@%%@AB@%Prompt                      Default%@AE@%%@NL@%
  9820. %@NL@%
  9821. %@AS@%Run File%@AE@%                    The name of the first object file submitted for%@NL@%
  9822.                             the %@AS@%Object%@AE@% %@AS@%modules%@AE@% prompt, with the .EXE%@NL@%
  9823.                             extension replacing the .OBJ extension%@NL@%
  9824. %@NL@%
  9825. %@AS@%List File%@AE@%                   The special file name NUL.MAP, which tells LINK%@AI@%%@AE@%%@NL@%
  9826.                             not to create a map file%@NL@%
  9827. %@NL@%
  9828. %@AS@%Libraries%@AE@%                   The default libraries encoded in the object%@NL@%
  9829.                             module (see Section 13.2.5%@BO:   8d60c@%, "How LINK Searches%@NL@%
  9830.                             for Libraries")%@NL@%
  9831. %@NL@%
  9832. %@AS@%Definitions File%@AE@%            The special file name NUL.DEF, which tells LINK%@NL@%
  9833.                             not to use a definitions file%@NL@%
  9834. %@NL@%
  9835. %@NL@%
  9836. %@CR:MCVD2400@%%@3@%%@AB@%13.2.4  Linking with a Response File%@AE@%%@EH@%%@NL@%
  9837. %@NL@%
  9838. %@CR:MCVD2401@%%@4@%To operate the linker with a response file, you must set up the response%@EH@%
  9839. file and type the following:%@NL@%
  9840. %@NL@%
  9841.      %@AB@%LINK @%@AE@%%@AI@%responsefile%@AE@%%@NL@%
  9842. %@NL@%
  9843. %@CR:MCVD2402@%%@4@%Here %@AI@%responsefile%@AE@% specifies the name or pathname of the response file that%@EH@%
  9844. starts the linker. You can also enter the name of a response file after any
  9845. LINK command prompt or at any position in the LINK command line.%@NL@%
  9846. %@NL@%
  9847. %@CR:MCVD2403@%%@4@%A response file contains responses to the LINK prompts. The responses must%@EH@%
  9848. be in the same order as the LINK prompts discussed in Section 13.2.3%@BO:   8baf9@%. Each
  9849. new response must appear on a new line or begin with a comma; however, you
  9850. can extend long responses across more than one line by typing a plus sign
  9851. (+) as the last character of each incomplete line. You may give options at
  9852. the end of any response or place them on one or more separate lines.%@NL@%
  9853. %@NL@%
  9854. %@CR:MCVD2404@%%@4@%LINK treats the input from the response file just as if you had entered it%@EH@%
  9855. in response to prompts or in a command line. It treats any carriage-return
  9856. and line-feed combination in the response file the same as if you had
  9857. pressed ENTER in response to a prompt or included a comma in a command line.%@NL@%
  9858. %@NL@%
  9859. %@CR:MCVD2405@%%@4@%You can use options and command characters in the response file in the same%@EH@%
  9860. way as you would in responses you type at the keyboard. For example, if you
  9861. type a semicolon on the line of the response file corresponding to the %@AS@%Run%@AE@%
  9862. %@AS@%File%@AE@% prompt, LINK uses the default responses for the executable file and for
  9863. the remaining prompts.%@NL@%
  9864. %@NL@%
  9865. %@CR:MCVD2406@%%@4@%When you enter the LINK command with a response file, each LINK prompt is%@EH@%
  9866. displayed on your screen with the corresponding response from your response
  9867. file. If the response file does not include a line with a file name,
  9868. semicolon, or carriage return for each prompt, LINK displays the appropriate
  9869. prompt and waits for you to enter a response. When you type an acceptable
  9870. response, LINK continues.%@NL@%
  9871. %@NL@%
  9872. %@CR:MCVD2407@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  9873. %@NL@%
  9874. %@CR:MCVD2408@%%@4@%Assume that the following response file is named %@AS@%FUN.LNK%@AE@%:%@EH@%%@NL@%
  9875. %@NL@%
  9876.      FUN TEXT TABLE CARE%@NL@%
  9877.      /PAUSE /MAP%@NL@%
  9878.      FUNLIST%@NL@%
  9879.      GRAF.LIB%@NL@%
  9880. %@NL@%
  9881. %@CR:MCVD2409@%%@4@%You can type the following command to run LINK and tell it to use the%@EH@%
  9882. responses in %@AS@%FUN.LNK%@AE@%:%@NL@%
  9883. %@NL@%
  9884.      LINK @FUN.LNK%@NL@%
  9885. %@NL@%
  9886. %@CR:MCVD240A@%%@4@%The response file tells LINK to load the four object modules %@AS@%FUN%@AE@%, %@AS@%TEXT%@AE@%,%@EH@%
  9887. %@AS@%TABLE%@AE@%, and %@AS@%CARE%@AE@%. LINK produces an executable file named %@AS@%FUN.EXE%@AE@% and a map
  9888. file named %@AS@%FUNLIST.MAP%@AE@%. The %@AS@%/PAUSE%@AE@% option tells LINK to pause before it
  9889. produces the executable file so you can swap disks, if necessary. The %@AS@%/MAP%@AE@%
  9890. option tells LINK to include public symbols and addresses in the map file.
  9891. LINK also links any needed routines from the library file %@AS@%GRAF.LIB%@AE@%. See the
  9892. discussions of the /PAUSE and /MAP options in Sections 13.3.28%@BO:   98338@% and
  9893. 13.3.15%@BO:   94620@%, respectively, for more information about these options.%@NL@%
  9894. %@NL@%
  9895. %@NL@%
  9896. %@CR:MCVD2500@%%@3@%%@AB@%13.2.5  How LINK Searches for Libraries%@AE@%%@EH@%%@NL@%
  9897. %@NL@%
  9898. %@CR:MCVD2501@%%@4@%The material in this section does not apply to libraries that LINK finds in%@EH@%
  9899. the %@AI@%objectfiles%@AE@% field, either on the command line or in response to the
  9900. %@AS@%Object Modules%@AE@% prompt. Those libraries are treated simply as a series of
  9901. object files, and LINK does not conduct extensive searches in such cases.%@NL@%
  9902. %@NL@%
  9903. %@CR:MCVD2502@%%@4@%LINK may be directed to find a particular library by the user (who specifies%@EH@%
  9904. a library in the %@AI@%libraries%@AE@% field) or by an object module. (When a compiler
  9905. creates an object module from a higher-level-language program, that object
  9906. module will contain the names of one or more "default" libraries.) However
  9907. the linker is directed to a library, LINK uses the same method for finding
  9908. that library.%@NL@%
  9909. %@NL@%
  9910. %@CR:MCVD2503@%%@4@%If the library name includes a path specification, LINK searches only that%@EH@%
  9911. directory for the library. Libraries specified by object modules (that is,
  9912. default libraries) will normally not include a path specification.%@NL@%
  9913. %@NL@%
  9914. %@CR:MCVD2504@%%@4@%If a library name is given without a path specification, LINK searches in%@EH@%
  9915. the following three locations to find the given library file:%@NL@%
  9916. %@NL@%
  9917. %@CR:MCVD2505@%  1. The current working directory%@NL@%
  9918. %@NL@%
  9919.   2. Any path specifications or drive names that you give on the command%@NL@%
  9920.      line or type in response to the %@AS@%Libraries%@AE@% prompt, in the order in which%@NL@%
  9921.      they appear (see Section 13.2.3%@BO:   8baf9@%)%@NL@%
  9922. %@NL@%
  9923.   3. The locations given by the LIB environment variable%@NL@%
  9924. %@NL@%
  9925. %@CR:MCVD2506@%%@4@%Because object files created by compilers and assemblers usually contain the%@EH@%
  9926. names of all the standard libraries you need, you are not required to
  9927. specify a library on the LINK command line or in response to the LINK
  9928. %@AS@%Libraries%@AE@% prompt unless you want to do one of the following:%@NL@%
  9929. %@NL@%
  9930. %@CR:MCVD2507@%  ■  Add the names of additional libraries to be searched%@NL@%
  9931. %@NL@%
  9932.   ■  Search for libraries in different locations%@NL@%
  9933. %@NL@%
  9934.   ■  Override the use of one or more default libraries%@NL@%
  9935. %@NL@%
  9936. %@CR:MCVD2508@%%@4@%For example, if you have developed your own customized libraries, you might%@EH@%
  9937. want to include one or more of them as additional libraries at linking time.%@NL@%
  9938. %@NL@%
  9939. %@CR:MCVD2510@%%@4@%%@AB@%Searching Additional Libraries%@AE@%%@EH@%%@NL@%
  9940. %@NL@%
  9941. %@CR:MCVD2511@%%@4@%You can tell LINK to search additional libraries by specifying one or more%@EH@%
  9942. library files on the command line or in response to the %@AS@%Libraries%@AE@% prompt.
  9943. LINK searches these libraries before it searches default libraries. It
  9944. searches these libraries in the order you specify.%@NL@%
  9945. %@NL@%
  9946. %@CR:MCVD2512@%%@4@%LINK automatically supplies the .LIB extension if you omit it from a%@EH@%
  9947. library-file name. If you want to link a library file that has a different
  9948. extension, be sure to specify the extension.%@NL@%
  9949. %@NL@%
  9950. %@CR:MCVD2520@%%@4@%%@AB@%Searching Different Locations for Libraries%@AE@%%@EH@%%@NL@%
  9951. %@NL@%
  9952. %@CR:MCVD2521@%%@4@%You can tell LINK to search additional locations for libraries by giving a%@EH@%
  9953. drive name or path specification in the %@AI@%libraries%@AE@% field on the command line
  9954. or in response to the %@AS@%Libraries%@AE@% prompt. You can specify up to 32 additional
  9955. paths. If you give more than 32 paths, LINK ignores the additional paths
  9956. without displaying an error message.%@NL@%
  9957. %@NL@%
  9958. %@CR:MCVD2530@%%@4@%%@AB@%Overriding Libraries Named in Object Files%@AE@%%@EH@%%@NL@%
  9959. %@NL@%
  9960. %@CR:MCVD2531@%%@4@%If you do not want to link with the library whose name is included in the%@EH@%
  9961. object file, you can give the name of a different library instead. You might
  9962. want to specify a different library name in the following cases:%@NL@%
  9963. %@NL@%
  9964. %@CR:MCVD2532@%  ■  If you assigned a "custom" name to a standard library when you set up%@NL@%
  9965.      your libraries%@NL@%
  9966. %@NL@%
  9967.   ■  If you want to link with a library that supports a different math%@NL@%
  9968.      package other than the math package you gave on the compiler command%@NL@%
  9969.      line (or the default)%@NL@%
  9970. %@NL@%
  9971. %@CR:MCVD2533@%%@4@%If you specify a new library name on the LINK command line, the linker%@EH@%
  9972. searches the new library to resolve external references before it searches
  9973. the library specified in the object file.%@NL@%
  9974. %@NL@%
  9975. %@CR:MCVD2534@%%@4@%If you want the linker to ignore the library whose name is included in the%@EH@%
  9976. object file, use the /NOD option. This option tells LINK to information that
  9977. is encoded in the object files created by high-level-language compilers. Use
  9978. this option with caution; see the discussion of the /NOD option in Section
  9979. 13.3.16%@BO:   94e75@% for more information.%@NL@%
  9980. %@NL@%
  9981. %@CR:MCVD2535@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  9982. %@NL@%
  9983.      LINK%@NL@%
  9984. %@NL@%
  9985.      Object Modules [.OBJ]: FUN TEXT TABLE CARE%@NL@%
  9986.      Run File [FUN.EXE]:%@NL@%
  9987.      List File [NUL.MAP]:%@NL@%
  9988.      Libraries [.LIB]: C:\TESTLIB\ NEWLIBV3%@AB@%%@NL@%
  9989. %@NL@%
  9990. %@CR:MCVD2536@%%@4@%This example links four object modules to create an executable file named%@EH@%
  9991. %@AS@%FUN.EXE%@AE@%. LINK searches %@AS@%NEWLIBV3.LIB%@AE@% before searching the default libraries
  9992. to resolve references. To locate %@AS@%NEWLIBV3.LIB%@AE@% and the default libraries,
  9993. the linker searches the current working directory, then the %@AS@%C:\TESTLIB\%@AE@%
  9994. directory, and finally the locations given by the LIB environment variable. %@AS@%%@NL@%
  9995. %@NL@%
  9996. %@NL@%
  9997. %@CR:MCVD2600@%%@3@%%@AB@%13.2.6  LINK Memory Requirements%@AE@%%@EH@%%@NL@%
  9998. %@NL@%
  9999. %@CR:MCVD2601@%%@4@%LINK uses available memory for the link session. If the files to be linked%@EH@%
  10000. create an output file that exceeds available memory, LINK creates a
  10001. temporary disk file to serve as memory. This temporary file is handled in
  10002. one of the following ways, depending on the DOS version:%@NL@%
  10003. %@NL@%
  10004. %@CR:MCVD2602@%  ■  The linker will use the directory specified by the TMP environment%@NL@%
  10005.      variable, for the purpose of creating a temporary file. For example, if%@NL@%
  10006.      the TMP variable were set to %@AS@%C:\TEMPDIR%@AE@%, LINK would put the temporary%@NL@%
  10007.      file in %@AS@%C:\TEMPDIR%@AE@%.%@NL@%
  10008. %@NL@%
  10009.      If there is no TMP environment variable, or if the directory specified%@NL@%
  10010.      by TMP does not exist, then LINK will put the temporary file in the%@NL@%
  10011.      current working directory.%@NL@%
  10012. %@NL@%
  10013.   ■  If the linker is running on DOS Version 3.0 or later, it uses a DOS%@NL@%
  10014.      system call to create a temporary file with a unique name in the%@NL@%
  10015.      temporary-file directory.%@NL@%
  10016. %@NL@%
  10017.   ■  If the linker is running on a version of DOS prior to 3.0, it creates a%@NL@%
  10018.      temporary file named VM.TMP.%@NL@%
  10019. %@NL@%
  10020. %@CR:MCVD2603@%%@4@%When the linker creates a temporary disk file, you see the message%@EH@%%@NL@%
  10021. %@NL@%
  10022.      %@AS@%Temporary file%@AE@% %@AI@%tempfile%@AE@% %@AS@%has been created.%@AE@%%@NL@%
  10023.      %@AS@%Do not change diskette in drive,%@AE@% %@AI@%letter%@AE@%.%@NL@%
  10024. %@NL@%
  10025. %@CR:MCVD2604@%%@4@%In the message displayed above, %@AI@%tempfile%@AE@% is "%@AB@%.\%@AE@%" followed by either VM.TMP%@EH@%
  10026. or a name generated by DOS, and %@AI@%letter%@AE@% is the drive containing the
  10027. temporary file.%@NL@%
  10028. %@NL@%
  10029. %@CR:MCVD2605@%%@4@%The message %@AS@%Do not change diskette in drive%@AE@% will not appear unless the drive%@EH@%
  10030. is a removable disk. After this message appears, do not remove the disk from
  10031. the drive specified by %@AI@%letter%@AE@% until the link session ends. If the disk is
  10032. removed, the operation of LINK is unpredictable, and you may see the
  10033. following message:%@NL@%
  10034. %@NL@%
  10035.      %@AS@%Unexpected end-of-file on scratch file%@AE@%%@NL@%
  10036. %@NL@%
  10037. %@CR:MCVD2606@%%@4@%When this happens, rerun the link session. The temporary file created by%@EH@%
  10038. LINK is a working file only. LINK deletes it at the end of the link session.%@NL@%
  10039. %@NL@%
  10040. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10041. %@AI@%NOTE%@AE@%%@NL@%
  10042.    Do not give any of your own files the name VM.TMP. The linker displays an%@NL@%
  10043.    error message if it encounters an existing file with this name.%@NL@%
  10044. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10045. %@NL@%
  10046. %@NL@%
  10047. %@CR:MCVD3000@%%@2@%%@AB@%13.3  Specifying Linker Options%@AE@%%@EH@%%@NL@%
  10048. %@NL@%
  10049. %@CR:MCVD3001@%%@4@%This section explains how to use linker options to specify and control the%@EH@%
  10050. tasks performed by LINK. All options begin with the linker's option
  10051. character, the forward slash (%@AB@%/%@AE@%).%@NL@%
  10052. %@NL@%
  10053. %@CR:MCVD3002@%%@4@%When you use the LINK command line to invoke LINK, options can appear at the%@EH@%
  10054. end of the line or after individual fields on the line. However, they must
  10055. precede the comma that separates each field from the next.%@NL@%
  10056. %@NL@%
  10057. %@CR:MCVD3003@%%@4@%If you respond to the individual prompts for the LINK command, you can%@EH@%
  10058. specify linker options at the end of any response. When you specify more
  10059. than one option, you can either group the options at the end of a single
  10060. response or distribute the options among several responses. Every option
  10061. must begin with the slash character (%@AB@%/%@AE@%), even if other options precede it on
  10062. the same line. Similarly, in a response file, options can appear on a line
  10063. by themselves or after individual response lines.%@NL@%
  10064. %@NL@%
  10065. %@CR:MCVD3010@%%@4@%%@AB@%Abbreviations%@AE@%%@EH@%%@NL@%
  10066. %@NL@%
  10067. %@CR:MCVD3011@%%@4@%Since linker options are named according to their functions, some of these%@EH@%
  10068. names are quite long. You can abbreviate the options to save space and
  10069. effort. Be sure that your abbreviation is unique so the linker can determine
  10070. which option you want. (The minimum legal abbreviation for each option is
  10071. indicated in the syntax description of the option.)%@NL@%
  10072. %@NL@%
  10073. %@CR:MCVD3012@%%@4@%Abbreviations must begin with the first letter of the option and must be%@EH@%
  10074. continuous through the last letter typed. No gaps or transpositions are
  10075. allowed. Options may be entered as uppercase or lowercase.%@NL@%
  10076. %@NL@%
  10077. %@CR:MCVD3020@%%@4@%%@AB@%Numerical Arguments%@AE@%%@EH@%%@NL@%
  10078. %@NL@%
  10079. %@CR:MCVD3021@%%@4@%Some linker options take numeric arguments. A numeric argument can be any of%@EH@%
  10080. the following:%@NL@%
  10081. %@NL@%
  10082. %@CR:MCVD3022@%  ■  A decimal number from 0 to 65,535.%@NL@%
  10083. %@NL@%
  10084.   ■  An octal number from 0 to 177,777. A number is interpreted as octal if%@NL@%
  10085.      it starts with 0. For example, the number %@AS@%10%@AE@% is interpreted as a%@NL@%
  10086.      decimal number, but the number %@AS@%010%@AE@% is interpreted as an octal number,%@NL@%
  10087.      equivalent to 8 in decimal.%@NL@%
  10088. %@NL@%
  10089.   ■  A hexadecimal number from 0 to FFFF. A number is interpreted as%@NL@%
  10090.      hexa-decimal if it starts with 0X. For example, %@AS@%0X10%@AE@% is a hexadecimal%@NL@%
  10091.      number, equivalent to 16 in decimal.%@NL@%
  10092. %@NL@%
  10093. %@NL@%
  10094. %@CR:MCVD3100@%%@3@%%@AB@%13.3.1  Aligning Segment Data (/A)%@AE@%%@EH@%%@NL@%
  10095. %@NL@%
  10096. %@CR:MCVD3101@%%@AB@%Option%@AE@%%@NL@%
  10097. %@NL@%
  10098.      %@AB@%/A%@AE@%«%@AB@%LIGNMENT%@AE@%»%@AB@%:%@AE@%%@AI@%size%@AE@%%@NL@%
  10099. %@NL@%
  10100. %@CR:MCVD3102@%%@4@%The ALIGNMENT option directs LINK to align segment data in the executable%@EH@%
  10101. file along the boundaries specified by %@AI@%size%@AE@%. The %@AI@%size%@AE@% argument must be a
  10102. power of two. For example,%@NL@%
  10103. %@NL@%
  10104.      /ALIGNMENT:16%@NL@%
  10105. %@NL@%
  10106. %@CR:MCVD3103@%%@4@%indicates an alignment boundary of 16 bytes. The default alignment for%@EH@%
  10107. OS/2-application and dynamic-link segments is 512. This option is used for
  10108. linking Windows applications or protected-mode programs.%@NL@%
  10109. %@NL@%
  10110. %@NL@%
  10111. %@CR:MCVD3200@%%@3@%%@AB@%13.3.2  Running in Batch Mode (/BA)%@AE@%%@EH@%%@NL@%
  10112. %@NL@%
  10113. %@CR:MCVD3201@%%@AB@%Option%@AE@%%@NL@%
  10114. %@NL@%
  10115.      %@AB@%/BA%@AE@%«%@AB@%TCH%@AE@%»%@NL@%
  10116. %@NL@%
  10117. %@CR:MCVD3202@%%@4@%By default, the linker prompts you for a new path name whenever it cannot%@EH@%
  10118. find a library it has been directed to use. It also prompts you if it cannot
  10119. find an object file, and it expects that file to be on a removable disk. If
  10120. the /BA option is used, however, the linker will not prompt you for any
  10121. libraries or object files it cannot find. Instead, the linker will generate
  10122. an error or warning message, if appropriate. The /BA option also prevents
  10123. LINK from printing the sign-on banner and echoing input from response files.%@NL@%
  10124. %@NL@%
  10125. %@CR:MCVD3203@%%@4@%Using this option can cause unresolved external references. It is intended%@EH@%
  10126. primarily for users who use batch or MAKE files for linking many executable
  10127. files with a single command, and who wish to prevent linker operation from
  10128. halting.%@NL@%
  10129. %@NL@%
  10130. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10131. %@AI@%NOTE%@AE@%%@NL@%
  10132.    This option does %@AI@%not%@AE@% prevent the linker from prompting for command-line%@NL@%
  10133.    arguments. You can prevent such prompting only by using a semicolon on%@NL@%
  10134.    the command line.%@NL@%
  10135. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10136. %@NL@%
  10137. %@NL@%
  10138. %@CR:MCVD3300@%%@3@%%@AB@%13.3.3  Producing a .COM File (/BI)%@AE@%%@EH@%%@NL@%
  10139. %@NL@%
  10140.      %@AB@%/BI%@AE@%«%@AB@%NARY%@AE@%»%@NL@%
  10141. %@NL@%
  10142. %@CR:MCVD3301@%%@4@%The /BI option directs the linker to produce a .COM file instead of an .EXE%@EH@%
  10143. file. Not every program can be produced in the .COM format. The following
  10144. restrictions apply:%@NL@%
  10145. %@NL@%
  10146. %@CR:MCVD3302@%  1. The program must consist of only one physical segment. If you have%@NL@%
  10147.      written an assembly-language program, you can declare more than one%@NL@%
  10148.      segment; however, the segments must be in the same group.%@NL@%
  10149. %@NL@%
  10150.   2. The code must have no far-segment references.%@NL@%
  10151. %@NL@%
  10152.      Specifically, segment addresses cannot be used as immediate data for%@NL@%
  10153.      instructions. You could not, for example, use the following%@NL@%
  10154.      instruction:%@NL@%
  10155. %@NL@%
  10156.          %@AS@%mov     ax,CODESEG%@AE@%%@NL@%
  10157. %@NL@%
  10158.   3. Programs for the Windows and OS/2 protected-mode environments cannot be%@NL@%
  10159.      converted to .COM file.%@NL@%
  10160. %@NL@%
  10161. %@CR:MCVD3303@%%@4@%When you use the /BI option, the default file extension of the output file%@EH@%
  10162. is .COM rather than .EXE.%@NL@%
  10163. %@NL@%
  10164. %@NL@%
  10165. %@CR:MCVD3400@%%@3@%%@AB@%13.3.4  Preparing for Debugging (/CO)%@AE@%%@EH@%%@NL@%
  10166. %@NL@%
  10167. %@CR:MCVD3401@%%@AB@%Option%@AE@%%@NL@%
  10168. %@NL@%
  10169.      %@AB@%/CO%@AE@%«%@AB@%DEVIEW%@AE@%»%@NL@%
  10170. %@NL@%
  10171. %@CR:MCVD3402@%%@4@%The /CO option is used to prepare for debugging with the CodeView%@EH@%
  10172. window-oriented debugger. This option tells the linker to prepare a special
  10173. executable file containing symbolic data and line-number information.%@NL@%
  10174. %@NL@%
  10175. %@CR:MCVD3403@%%@4@%You can run this executable file outside the CodeView debugger; the extra%@EH@%
  10176. data in the file will be ignored. However, to keep file size to a minimum,
  10177. use the special-format executable file only for debugging. You can then link
  10178. a separate version without the /CO option after the program is debugged.%@NL@%
  10179. %@NL@%
  10180. %@NL@%
  10181. %@CR:MCVD3500@%%@3@%%@AB@%13.3.5  Setting the Maximum Allocation Space (/CP)%@AE@%%@EH@%%@NL@%
  10182. %@NL@%
  10183. %@CR:MCVD3501@%%@AB@%Option%@AE@%%@NL@%
  10184. %@NL@%
  10185.      %@AB@%/CP%@AE@%«%@AB@%ARMAXALLOC%@AE@%»%@AB@%:%@AE@%%@AI@%number%@AE@%%@NL@%
  10186. %@NL@%
  10187. %@CR:MCVD3502@%%@4@%The /CP option sets the maximum number of 16-byte paragraphs needed by the%@EH@%
  10188. program when it is loaded into memory. The operating system uses this value
  10189. when allocating space for the program before loading it. The option is
  10190. useful when you want to execute another program from within your program and
  10191. you need to reserve space for the executed program. This option is valid
  10192. only when linking real-mode programs.%@NL@%
  10193. %@NL@%
  10194. %@CR:MCVD3503@%%@4@%LINK normally requests the operating system to set the maximum number of%@EH@%
  10195. paragraphs to 65,535. Since this represents more memory than could be
  10196. available under DOS, the operating system always denies the request and
  10197. allocates the largest contiguous block of memory it can find. If the /CP
  10198. option is used, the operating system allocates no more space than the option
  10199. specified. This means any additional space in memory is free for other
  10200. programs.%@NL@%
  10201. %@NL@%
  10202. %@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@%
  10203. less than the minimum number of paragraphs needed by the program, LINK
  10204. ignores your request and sets the maximum value equal to whatever the
  10205. minimum value happens to be. The minimum number of paragraphs needed by a
  10206. program is never less than the number of paragraphs of code and data in the
  10207. program. To free more memory for programs compiled in the medium- and
  10208. large-memory models, link with /CP:1; this leaves no space for the near
  10209. heap.%@NL@%
  10210. %@NL@%
  10211. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10212. %@AI@%NOTE%@AE@%%@NL@%
  10213.    You can change the maximum allocation after linking by using the %@AI@%EXEMOD%@AE@%%@NL@%
  10214.    utility, which modifies the executable-file header, as described in%@NL@%
  10215.    Section 17.1.%@BO:   ba961@% The format of the executable-file header is also discussed%@NL@%
  10216.    in that section, as well as in the %@AI@%Microsoft MS-DOS Programmer's%@AE@%%@NL@%
  10217.    %@AI@%Reference%@AE@% and in other reference books on DOS.%@NL@%
  10218. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10219. %@NL@%
  10220. %@NL@%
  10221. %@CR:MCVD3600@%%@3@%%@AB@%13.3.6  Ordering Segments (/DO)%@AE@%%@EH@%%@NL@%
  10222. %@NL@%
  10223. %@CR:MCVD3601@%%@AB@%Option%@AE@%%@NL@%
  10224. %@NL@%
  10225.      %@AB@%/DO%@AE@%«%@AB@%SSEG%@AE@%»%@NL@%
  10226. %@NL@%
  10227. %@CR:MCVD3602@%%@4@%The /DO option is automatically enabled by a special object-module record in%@EH@%
  10228. Microsoft language libraries. If you are linking to one of these libraries,
  10229. you do not need to specify this option.%@NL@%
  10230. %@NL@%
  10231. %@CR:MCVD3603@%%@4@%This option is also enabled by assembly modules that use the Microsoft Macro%@EH@%
  10232. Assembler directive %@AB@%.DOSSEG%@AE@%.%@NL@%
  10233. %@NL@%
  10234. %@CR:MCVD3604@%%@4@%The /DO option forces segments to be ordered as follows:%@EH@%%@NL@%
  10235. %@NL@%
  10236. %@CR:MCVD3605@%  1. All segments with a class name ending in CODE%@NL@%
  10237. %@NL@%
  10238.   2. All other segments outside DGROUP%@NL@%
  10239. %@NL@%
  10240.   3. DGROUP segments, in the following order:%@NL@%
  10241. %@NL@%
  10242.      a.   Any segments of class BEGDATA (this class name reserved for
  10243.           Microsoft use)%@NL@%
  10244. %@NL@%
  10245.      b.   Any segments not of class BEGDATA, BSS, or STACK%@NL@%
  10246. %@NL@%
  10247.      c.   Segments of class BSS%@NL@%
  10248. %@NL@%
  10249.      d.   Segments of class STACK%@NL@%
  10250. %@NL@%
  10251. %@CR:MCVD3606@%%@4@%Note that when the /DO option is in effect the linker initializes two%@EH@%
  10252. special variables as follows:%@NL@%
  10253. %@NL@%
  10254.      _edata = DGROUP : BSS%@NL@%
  10255.      _end   = DGROUP : STACK%@NL@%
  10256. %@NL@%
  10257. %@CR:MCVD3607@%%@4@%The variables %@AS@%_edata%@AE@% and %@AS@%_end%@AE@% have special meanings for the Microsoft C and%@EH@%
  10258. FORTRAN compilers, so it is not wise to give these names to your own program
  10259. variables. Assembly modules can reference these variables but should not
  10260. change them.%@NL@%
  10261. %@NL@%
  10262. %@NL@%
  10263. %@CR:MCVD3700@%%@3@%%@AB@%13.3.7  Controlling Data Loading (/DS)%@AE@%%@EH@%%@NL@%
  10264. %@NL@%
  10265. %@CR:MCVD3701@%%@AB@%Option%@AE@%%@NL@%
  10266. %@NL@%
  10267.      %@AB@%/DS%@AE@%«%@AB@%ALLOCATE%@AE@%»%@NL@%
  10268. %@NL@%
  10269. %@CR:MCVD3702@%%@4@%By default, LINK loads all data starting at the low end of the data segment.%@EH@%
  10270. At run time, the data segment (DS) register is set to the lowest possible
  10271. address to allow the entire data segment to be used. This option is valid
  10272. only when linking real-mode programs.%@NL@%
  10273. %@NL@%
  10274. %@CR:MCVD3703@%%@4@%Use the /DS option to tell LINK to load all data starting at the high end of%@EH@%
  10275. the data segment instead. In this case, the DS register is set at run time
  10276. to the lowest data-segment address that contains program data.%@NL@%
  10277. %@NL@%
  10278. %@CR:MCVD3704@%%@4@%The /DS option is typically used with the /HI option, discussed in Section%@EH@%
  10279. 13.3.11%@BO:   93a86@%, to take advantage of unused memory within the data segment.%@NL@%
  10280. %@NL@%
  10281. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10282. %@AI@%WARNING%@AE@%%@NL@%
  10283.    This option should be used only with assembly-language programs.%@NL@%
  10284. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10285. %@NL@%
  10286. %@NL@%
  10287. %@CR:MCVD3800@%%@3@%%@AB@%13.3.8  Packing Executable Files (/E)%@AE@%%@EH@%%@NL@%
  10288. %@NL@%
  10289. %@CR:MCVD3801@%%@AB@%Option%@AE@%%@NL@%
  10290. %@NL@%
  10291.      %@AB@%/E%@AE@%«%@AB@%XEPACK%@AE@%»%@NL@%
  10292. %@NL@%
  10293. %@CR:MCVD3802@%%@4@%The /E option directs LINK to remove sequences of repeated bytes (typically%@EH@%
  10294. null characters) and to optimize the load-time-relocation table before
  10295. creating the executable file. (The load-time-relocation table is a table of
  10296. references relative to the start of the program, each of which changes when
  10297. the executable image is loaded into memory and an actual address for the
  10298. entry point is assigned.)%@NL@%
  10299. %@NL@%
  10300. %@CR:MCVD3803@%%@4@%Executable files linked with this option may be smaller, and thus load%@EH@%
  10301. faster, than files linked without this option. However, you cannot use the
  10302. Symbolic Debug Utility (SYMDEB) or the CodeView window-oriented debugger to
  10303. debug packed files. The /EXEPACK option strips symbolic information from the
  10304. input file and notifies you of this with a warning message.%@NL@%
  10305. %@NL@%
  10306. %@CR:MCVD3804@%%@4@%The /E option does not always give a significant saving in disk space and%@EH@%
  10307. may sometimes actually increase file size. Programs that have a large number
  10308. of load-time relocations (about 500 or more) and long streams of repeated
  10309. characters are usually shorter if packed. LINK notifies you if the packed
  10310. file is larger than the unpacked file.%@NL@%
  10311. %@NL@%
  10312. %@NL@%
  10313. %@CR:MCVD3900@%%@3@%%@AB@%13.3.9  Optimizing Far Calls (/F)%@AE@%%@EH@%%@NL@%
  10314. %@NL@%
  10315. %@CR:MCVD3901@%%@AB@%Option%@AE@%%@NL@%
  10316. %@NL@%
  10317.      %@AB@%/F%@AE@%«%@AB@%ARCALLTRANSLATION%@AE@%»%@NL@%
  10318. %@NL@%
  10319. %@CR:MCVD3902@%%@4@%Using the /F option may result in slightly faster code and smaller%@EH@%
  10320. executable-file size. It should be used with the /PACKD option, described in
  10321. Section 13.3.25%@BO:   97257@%, in order to achieve significant results. The gain in speed
  10322. is most apparent for 286- and 386-based machines. Though some assembly
  10323. programs should not be linked with this option, it is generally safe for use
  10324. with high-level-language programs. This option is off by default;
  10325. furthermore, it can always be turned off with the /NOF option described in
  10326. Section 13.3.18.%@BO:   95405@%%@NL@%
  10327. %@NL@%
  10328. %@CR:MCVD3903@%%@4@%The rest of this section describes the low-level details of /F. It is not%@EH@%
  10329. necessary that you understand these details in order to use the option.%@NL@%
  10330. %@NL@%
  10331. %@CR:MCVD3904@%%@4@%The /F option directs the linker to optimize far calls to procedures that%@EH@%
  10332. lie in the same segment as the caller. For example, a medium- or large-model
  10333. program may have a machine instruction that makes a far call to a procedure
  10334. in the same segment. Since the segment address is the same (for both the
  10335. instruction and the procedure it calls), only a near call should be
  10336. necessary.%@NL@%
  10337. %@NL@%
  10338. %@CR:MCVD3905@%%@4@%A near-call instruction does not require an entry in the relocation table,%@EH@%
  10339. whereas a far-call instruction does. Therefore, use of /F (together with
  10340. /PACKD) often results in smaller executable files because the relocation
  10341. table is smaller. Such files will load faster.%@NL@%
  10342. %@NL@%
  10343. %@CR:MCVD3906@%%@4@%When /F has been specified, the linker will optimize code by removing the%@EH@%
  10344. instruction %@AS@%call FAR label%@AE@% and substituting the following sequence:%@NL@%
  10345. %@NL@%
  10346.           push    cs%@NL@%
  10347.           call    NEAR %@AI@%label%@AE@%%@NL@%
  10348.           nop%@NL@%
  10349. %@NL@%
  10350. %@CR:MCVD3907@%%@4@%Upon execution, the called procedure will still return with a far-return%@EH@%
  10351. instruction. However, because both the code segment and the near address are
  10352. on the stack, the far return will be executed correctly. The %@AS@%nop%@AE@% (no-op)
  10353. instruction appears so that exactly five bytes replace the five-byte
  10354. far-call instruction; the linker may in some cases place the %@AS@%nop%@AE@% at the
  10355. beginning of the sequence.%@NL@%
  10356. %@NL@%
  10357. %@CR:MCVD3908@%%@4@%The /F option has no effect on programs that only make near calls. Of the%@EH@%
  10358. high-level Microsoft languages, only small- and compact-model C programs use
  10359. near calls.%@NL@%
  10360. %@NL@%
  10361. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10362. %@AI@%NOTE%@AE@%%@NL@%
  10363.    There is a small risk involved with the /F option: the linker may%@NL@%
  10364.    mistakenly translate a byte in a code segment that happens to have the%@NL@%
  10365.    far-call opcode (9A hexadecimal). If a program linked with /F%@NL@%
  10366.    inexplicably fails, you may want to try linking with this option off.%@NL@%
  10367.    However, object modules produced by Microsoft high-level languages should%@NL@%
  10368.    be safe from this problem because little immediate data is stored in code%@NL@%
  10369.    segments.%@NL@%
  10370. %@NL@%
  10371.    In general, assembly-language programs are safe for use with the /F%@NL@%
  10372.    option if they do not involve advanced system-level code, such as might%@NL@%
  10373.    be found in operating systems or interrupt handlers.%@NL@%
  10374. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10375. %@NL@%
  10376. %@NL@%
  10377. %@CR:MCVD3A00@%%@3@%%@AB@%13.3.10  Viewing the Options List (/HE)%@AE@%%@EH@%%@NL@%
  10378. %@NL@%
  10379. %@CR:MCVD3A01@%%@AB@%Option%@AE@%%@NL@%
  10380. %@NL@%
  10381.      %@AB@%/HE%@AE@%«%@AB@%LP%@AE@%»%@NL@%
  10382. %@NL@%
  10383. %@CR:MCVD3A02@%%@4@%The /HELP option causes LINK to display a list of the available options on%@EH@%
  10384. the screen. This gives you a convenient reminder of the available options.
  10385. Do not give a file name when using the /HELP option.%@NL@%
  10386. %@NL@%
  10387. %@NL@%
  10388. %@CR:MCVD3B00@%%@3@%%@AB@%13.3.11  Controlling Executable-File Loading (/HI)%@AE@%%@EH@%%@NL@%
  10389. %@NL@%
  10390. %@CR:MCVD3B01@%%@AB@%Option%@AE@%%@NL@%
  10391. %@NL@%
  10392.      %@AB@%/HI%@AE@%«%@AB@%GH%@AE@%»%@NL@%
  10393. %@NL@%
  10394. %@CR:MCVD3B02@%%@4@%At load time, the executable file can be placed either as low or as high in%@EH@%
  10395. memory as possible. Use of the /HI option causes DOS to place the executable
  10396. file as high as possible in memory. Without the /HI option, DOS places the
  10397. executable file as low as possible. This option is valid only when linking
  10398. real-mode programs.%@NL@%
  10399. %@NL@%
  10400. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10401. %@AI@%NOTE%@AE@%%@NL@%
  10402.    This option should be used only with assembly-language programs.%@NL@%
  10403. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10404. %@NL@%
  10405. %@NL@%
  10406. %@CR:MCVD3C00@%%@3@%%@AB@%13.3.12  Preparing for Incremental Linking (/INC)%@AE@%%@EH@%%@NL@%
  10407. %@NL@%
  10408. %@CR:MCVD3C01@%%@AB@%Option%@AE@%%@NL@%
  10409. %@NL@%
  10410.      %@AB@%/INC%@AE@%«%@AB@%REMENTAL%@AE@%»%@NL@%
  10411. %@NL@%
  10412. %@CR:MCVD3C02@%%@4@%The /INC option must be used in order to prepare for subsequent linking with%@EH@%
  10413. ILINK. The use of this option produces a .SYM file and an .ILK file, each
  10414. containing extra information needed by ILINK. Note that this option is not
  10415. compatible with the /EXEPACK option. (See Chapter 14%@BO:   9eada@%, "Incremental Linking
  10416. with ILINK," for more information on this option.)%@NL@%
  10417. %@NL@%
  10418. %@NL@%
  10419. %@CR:MCVD3D00@%%@3@%%@AB@%13.3.13  Displaying Linker Process Information (/INF)%@AE@%%@EH@%%@NL@%
  10420. %@NL@%
  10421. %@CR:MCVD3D01@%%@AB@%Option%@AE@%%@NL@%
  10422. %@NL@%
  10423.      %@AB@%/INF%@AE@%«%@AB@%ORMATION%@AE@%»%@NL@%
  10424. %@NL@%
  10425. %@CR:MCVD3D02@%%@4@%The /INF option tells the linker to display information about the linking%@EH@%
  10426. process, including the phase of linking and the names of the object files
  10427. being linked. This option is useful if you want to determine the locations
  10428. of the object files being linked and the order in which they are linked.%@NL@%
  10429. %@NL@%
  10430. %@CR:MCVD3D03@%%@4@%Output from this option is sent to standard output.%@EH@%%@NL@%
  10431. %@NL@%
  10432. %@CR:MCVD3D04@%%@4@%The following is a sample of the linker output when the /INF and /MAP%@EH@%
  10433. options are specified on the LINK command line:%@NL@%
  10434. %@NL@%
  10435.      **** PASS ONE ****%@NL@%
  10436.      TEST.OBJ(test.for)%@NL@%
  10437.      **** LIBRARY SEARCH ****%@NL@%
  10438.      LLIBFOR7.LIB(wr)%@NL@%
  10439.      LLIBFOR7.LIB(fmtout)%@NL@%
  10440.      LLIBFOR7.LIB(ldout)%@NL@%
  10441.         .%@NL@%
  10442.         .%@NL@%
  10443.         .%@NL@%
  10444.      **** ASSIGN ADDRESSES ****%@NL@%
  10445.        1 segment "TEST_TEXT" length 122H bytes%@NL@%
  10446.        2 segment "_DATA" length 912H bytes%@NL@%
  10447.        3 segment "CONST" length 12H bytes%@NL@%
  10448.         .%@NL@%
  10449.         .%@NL@%
  10450.         .%@NL@%
  10451.      **** PASS TWO ****%@NL@%
  10452.      TEST.OBJ(test.for)%@NL@%
  10453.      LLIBFOR7.LIB(wr)%@NL@%
  10454.      LLIBFOR7.LIB(fmtout)%@NL@%
  10455.      LLIBFOR7.LIB(ldout)%@NL@%
  10456.         .%@NL@%
  10457.         .%@NL@%
  10458.         .%@NL@%
  10459.      **** WRITING EXECUTABLE ****%@NL@%
  10460. %@NL@%
  10461. %@NL@%
  10462. %@CR:MCVD3E00@%%@3@%%@AB@%13.3.14  Including Line Numbers in the Map File (/LI)%@AE@%%@EH@%%@NL@%
  10463. %@NL@%
  10464. %@CR:MCVD3E01@%%@AB@%Option%@AE@%%@NL@%
  10465. %@NL@%
  10466.      %@AB@%/LI%@AE@%«%@AB@%NENUMBERS%@AE@%»%@NL@%
  10467. %@NL@%
  10468. %@CR:MCVD3E02@%%@4@%You can include the line numbers and associated addresses of your source%@EH@%
  10469. program in the map file by using the /LI option. Ordinarily the map file
  10470. does not contain line numbers. To produce a map file with line numbers, you
  10471. must give LINK an object file (or files) with line-number information. You
  10472. can use the /Zd option with any Microsoft compiler to include line numbers
  10473. in the object file. If you give LINK an object file without line-number
  10474. information, the /LI option has no effect.%@NL@%
  10475. %@NL@%
  10476. %@CR:MCVD3E03@%%@4@%The /LI option forces LINK to create a map file even if you did not%@EH@%
  10477. explicitly tell the linker to create a map file. By default, the file is
  10478. given the same base name as the executable file, plus the extension .MAP.
  10479. You can override the default name by specifying a new map file on the LINK
  10480. command line or in response to the %@AS@%List File%@AE@% prompt.%@NL@%
  10481. %@NL@%
  10482. %@NL@%
  10483. %@CR:MCVD3F00@%%@3@%%@AB@%13.3.15  Listing Public Symbols (/M)%@AE@%%@EH@%%@NL@%
  10484. %@NL@%
  10485. %@CR:MCVD3F01@%%@AB@%Option%@AE@%%@NL@%
  10486. %@NL@%
  10487.      %@AB@%/M%@AE@%«%@AB@%AP%@AE@%»%@NL@%
  10488. %@NL@%
  10489. %@CR:MCVD3F02@%%@4@%You can list all public (global) symbols defined in the object file(s) by%@EH@%
  10490. using the /M option. When you invoke LINK with the /M option, the map file
  10491. will contain a list of all the symbols sorted by name and a list of all the
  10492. symbols sorted by address. If you do not use this option, the map file
  10493. contains only a list of segments.%@NL@%
  10494. %@NL@%
  10495. %@CR:MCVD3F03@%%@4@%When you use this option, the default for the %@AI@%mapfile%@AE@% field or prompts%@EH@%
  10496. response is no longer NUL. Instead, the default is a name that combines the
  10497. base name of the executable file with a .MAP extension. It is still possible
  10498. for you to specify NUL in the %@AI@%mapfile%@AE@% field (which indicates that no map
  10499. file is to be generated); if you do, then the /M option will have no effect.%@NL@%
  10500. %@NL@%
  10501. %@NL@%
  10502. %@CR:MCVD3G00@%%@3@%%@AB@%13.3.16  Ignoring Default Libraries (/NOD)%@AE@%%@EH@%%@NL@%
  10503. %@NL@%
  10504. %@CR:MCVD3G01@%%@AB@%Option%@AE@%%@NL@%
  10505. %@NL@%
  10506.      %@AB@%/NOD%@AE@%«%@AB@%EFAULTLIBRARYSEARCH%@AE@%»«%@AB@%:%@AE@%%@AI@%filename%@AE@%»%@NL@%
  10507. %@NL@%
  10508. %@CR:MCVD3G02@%%@4@%The /NOD option tells LINK not to search any library specified in the object%@EH@%
  10509. file to resolve external references. If you specify %@AI@%filename%@AE@%, LINK searches
  10510. all libraries specified in the object file except for %@AI@%filename%@AE@%.%@NL@%
  10511. %@NL@%
  10512. %@CR:MCVD3G03@%%@4@%In general, higher-level-language programs do not work correctly without a%@EH@%
  10513. standard library. Thus, if you use the /NOD option, you should explicitly
  10514. specify the name of a standard library.%@NL@%
  10515. %@NL@%
  10516. %@NL@%
  10517. %@CR:MCVD3H00@%%@3@%%@AB@%13.3.17  Ignoring Extended Dictionary (/NOE)%@AE@%%@EH@%%@NL@%
  10518. %@NL@%
  10519. %@CR:MCVD3H01@%%@AB@%Option%@AE@%%@NL@%
  10520. %@NL@%
  10521.      %@AB@%/NOE%@AE@%«%@AB@%XTDICTIONARY%@AE@%»%@NL@%
  10522. %@NL@%
  10523. %@CR:MCVD3H02@%%@4@%The /NOE option prevents the linker from searching the extended dictionary,%@EH@%
  10524. which is an internal list of symbol locations that the linker maintains.
  10525. Normally, the linker consults this list to speed up library searches.The
  10526. effect of the /NOE option is to slow the linker. You often need to use this
  10527. option when a library symbol is redefined. The linker issues error %@AS@%L2044%@AE@% if
  10528. you need to use this option.%@NL@%
  10529. %@NL@%
  10530. %@NL@%
  10531. %@CR:MCVD3I00@%%@3@%%@AB@%13.3.18  Disabling Far-Call Optimization (/NOF)%@AE@%%@EH@%%@NL@%
  10532. %@NL@%
  10533. %@CR:MCVD3I01@%%@AB@%Option%@AE@%%@NL@%
  10534. %@NL@%
  10535.      %@AB@%/NOF%@AE@%«%@AB@%ARCALLTRANSLATION%@AE@%»%@NL@%
  10536. %@NL@%
  10537. %@CR:MCVD3I02@%%@4@%This option normally is not necessary because far-call optimization%@EH@%
  10538. (translation) is turned off by default. However, if an environment variable
  10539. such as LINK (or CL) turns on far-call translation automatically, you can
  10540. use /NOF to turn far-call translation back off again.%@NL@%
  10541. %@NL@%
  10542. %@NL@%
  10543. %@CR:MCVD3J00@%%@3@%%@AB@%13.3.19  Preserving Compatibility (/NOG)%@AE@%%@EH@%%@NL@%
  10544. %@NL@%
  10545. %@CR:MCVD3J01@%%@AB@%Option%@AE@%%@NL@%
  10546. %@NL@%
  10547.      %@AB@%/NOG%@AE@%«%@AB@%ROUPASSOCIATION%@AE@%»%@NL@%
  10548. %@NL@%
  10549. %@CR:MCVD3J02@%%@4@%The /NOG option causes the linker to ignore group associations when%@EH@%
  10550. assigning addresses to data and code items. It is provided primarily for
  10551. compatibility with previous versions of the linker (Versions 2.02 and
  10552. earlier) and early versions of Microsoft language compilers. This option is
  10553. valid only when linking real-mode programs.%@NL@%
  10554. %@NL@%
  10555. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10556. %@AI@%NOTE%@AE@%%@NL@%
  10557.    This option should be used only with assembly-language programs.%@NL@%
  10558. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10559. %@NL@%
  10560. %@NL@%
  10561. %@CR:MCVD3K00@%%@3@%%@AB@%13.3.20  Preserving Case Sensitivity (/NOI)%@AE@%%@EH@%%@NL@%
  10562. %@NL@%
  10563. %@CR:MCVD3K01@%%@AB@%Option%@AE@%%@NL@%
  10564. %@NL@%
  10565.      %@AB@%/NOI%@AE@%«%@AB@%GNORECASE%@AE@%»%@NL@%
  10566. %@NL@%
  10567. %@CR:MCVD3K02@%%@4@%By default, LINK treats uppercase letters and lowercase letters as%@EH@%
  10568. equivalent. Thus %@AS@%ABC%@AE@%, %@AS@%abc%@AE@%, and %@AS@%Abc%@AE@% are considered the same name. When you
  10569. use the /NOI option, the linker distinguishes between uppercase letters and
  10570. lowercase letters, and considers %@AS@%ABC%@AE@%, %@AS@%abc%@AE@%, and %@AS@%Abc%@AE@% to be three separate
  10571. names. Since names in some high-level languages are not case sensitive, this
  10572. option can have minimal importance. However, in some languages──such as
  10573. C──case is significant. If you plan to link your files from other high-level
  10574. languages with C routines, you may want to use this option.%@NL@%
  10575. %@NL@%
  10576. %@NL@%
  10577. %@CR:MCVD3L00@%%@3@%%@AB@%13.3.21  Ordering Segments without Inserting NULL Bytes (/NON)%@AE@%%@EH@%%@NL@%
  10578. %@NL@%
  10579. %@CR:MCVD3L01@%%@4@%%@AB@%Options%@AE@%%@EH@%%@NL@%
  10580. %@NL@%
  10581.      %@AB@%/NON%@AE@%«%@AB@%ULLSDOSSEG»%@AE@%%@NL@%
  10582. %@NL@%
  10583. %@CR:MCVD3L02@%%@4@%The /NON option directs the linker to arrange segments in the same order as%@EH@%
  10584. they are arranged by the /DOSSEG option. The only difference is that the
  10585. /DOSSEG option inserts 16 null bytes at the beginning of the _TEXT segment
  10586. (if it is defined), whereas /NON does not insert these extra bytes.%@NL@%
  10587. %@NL@%
  10588. %@CR:MCVD3L03@%%@4@%If the linker is given both the /DOSSEG and /NON options, the /NON option%@EH@%
  10589. will always take precedence. Therefore, you can use /NON to override the
  10590. /DOSSEG comment record commonly found in run-time libraries. This option is
  10591. for linking protected-mode programs or Windows applications.%@NL@%
  10592. %@NL@%
  10593. %@NL@%
  10594. %@CR:MCVD3M00@%%@3@%%@AB@%13.3.22  Disabling Segment Packing (/NOP)%@AE@%%@EH@%%@NL@%
  10595. %@NL@%
  10596. %@CR:MCVD3M01@%%@AB@%Option%@AE@%%@NL@%
  10597. %@NL@%
  10598.      %@AB@%/NOP%@AE@%«%@AB@%ACKCODE%@AE@%»%@NL@%
  10599. %@NL@%
  10600. %@CR:MCVD3M02@%%@4@%This option is normally not necessary because code-segment packing is turned%@EH@%
  10601. off by default. However, if an environment variable such as LINK (or CL)
  10602. turns on code-segment packing automatically, you can use /NOP to turn
  10603. segment packing back off again.%@NL@%
  10604. %@NL@%
  10605. %@NL@%
  10606. %@CR:MCVD3N00@%%@3@%%@AB@%13.3.23  Setting the Overlay Interrupt (/O)%@AE@%%@EH@%%@NL@%
  10607. %@NL@%
  10608. %@CR:MCVD3N01@%%@AB@%Option%@AE@%%@NL@%
  10609. %@NL@%
  10610.       %@AB@%/O%@AE@%«%@AB@%VERLAYINTERRUPT%@AE@%»%@AB@%:%@AI@%number%@AE@%%@NL@%
  10611. %@NL@%
  10612. %@CR:MCVD3N02@%%@4@%By default, the interrupt number used for passing control to overlays is 63%@EH@%
  10613. (3F hexadecimal). The /O option allows the user to select a different
  10614. interrupt number. This option is valid only when linking real-mode programs.%@NL@%
  10615. %@NL@%
  10616. %@CR:MCVD3N03@%%@4@%The %@AI@%number%@AE@% can be a decimal number from 0 to 255, an octal number from octal%@EH@%
  10617. 0 to octal 0377, or a hexadecimal number from hexadecimal 0 to hexadecimal
  10618. FF. Numbers that conflict with DOS interrupts can be used; however, their
  10619. use is not advised.%@NL@%
  10620. %@NL@%
  10621. %@CR:MCVD3N04@%%@4@%You should use this option only when you want to uses overlays with a%@EH@%
  10622. program that already reserves interrupt 63 for some other purpose.%@NL@%
  10623. %@NL@%
  10624. %@NL@%
  10625. %@CR:MCVD3O00@%%@3@%%@AB@%13.3.24  Packing Contiguous Data Segments (/PACKC)%@AE@%%@EH@%%@NL@%
  10626. %@NL@%
  10627. %@CR:MCVD3O01@%%@AB@%Option%@AE@%%@NL@%
  10628. %@NL@%
  10629.      %@AB@%/PACKC%@AE@%«%@AB@%ODE%@AE@%»«%@AB@%:%@AE@%%@AI@%number%@AE@%»%@NL@%
  10630. %@NL@%
  10631. %@CR:MCVD3O02@%%@4@%This option only affects code segments in medium- and large-model programs.%@EH@%
  10632. It is intended to be used with the /F option, which is described in Section
  10633. 13.3.9.%@BO:   92ae0@% It is not necessary to understand the details of the /PACKC option
  10634. in order to use it. You only need to know that this option, used in
  10635. conjunction with /F, produces slightly faster and more compact code. The
  10636. /PACKC option is off by default, and can always be turned off with the /NOP
  10637. option described in Section 13.3.22.%@BO:   96061@%%@NL@%
  10638. %@NL@%
  10639. %@CR:MCVD3O03@%%@4@%The /PACKC option directs the linker to group together neighboring code%@EH@%
  10640. segments. Segments in the same group are assigned the same segment address;
  10641. offset addresses are adjusted upward accordingly. In other words, all items
  10642. will have the correct physical address whether the /PACKC option is used or
  10643. not. However, /PACKC changes segment and offset addresses so that all items
  10644. in a group share the same segment address.%@NL@%
  10645. %@NL@%
  10646. %@CR:MCVD3O04@%%@4@%The %@AI@%number%@AE@% field specifies the maximum size of groups formed by /PACKC. The%@EH@%
  10647. linker will stop adding segments to a group as soon as it cannot add another
  10648. segment without exceeding %@AI@%number%@AE@%. At that point, the linker starts forming a
  10649. new group. The default for %@AI@%number%@AE@% is 65,530.%@NL@%
  10650. %@NL@%
  10651. %@CR:MCVD3O05@%%@4@%The packaging of code segments provides more opportunities for far-call%@EH@%
  10652. optimization, which is enabled with /F. Generally speaking, /F and /PACKC
  10653. are designed to be used together.%@NL@%
  10654. %@NL@%
  10655. %@CR:MCVD3O06@%%@4@%Programs developed with Microsoft high-level languages can safely use%@EH@%
  10656. /PACKC. The /PACKC option is unsafe only when used with assembly programs
  10657. that make assumptions about the relative order of code segments. For
  10658. example, the following assembly code attempts to calculate the distance
  10659. between %@AS@%CSEG1%@AE@% and %@AS@%CSEG2%@AE@%. This code would produce incorrect results when used
  10660. with /PACKC, because /PACKC causes the two segments to share segment
  10661. address. Therefore the procedure would always return zero.%@NL@%
  10662. %@NL@%
  10663.      CSEG1      SEGMENT PUBLIC 'CODE'%@NL@%
  10664.      .%@NL@%
  10665.      .%@NL@%
  10666.      .%@NL@%
  10667.      CSEG1      ENDS%@NL@%
  10668. %@NL@%
  10669.      CSEG2      SEGMENT PARA PUBLIC 'CODE'%@NL@%
  10670.                 ASSUME  cs:CSEG2%@NL@%
  10671. %@NL@%
  10672.      %@AI@%; Return the length of CSEG1 in AX.;%@AE@%%@NL@%
  10673. %@NL@%
  10674.      codesize   PROC  NEAR%@NL@%
  10675.                 mov   ax,CSEG2   %@AI@%; Load para address of CSEG1;%@AE@%%@NL@%
  10676.                 sub   ax,CSEG1   %@AI@%; Load para address of CSEG2;%@AE@%%@NL@%
  10677.                 mov   cx,4       %@AI@%; Load count, and%@AE@%%@NL@%
  10678.                 shl   ax,c l     %@AI@%; convert distance from paragraphs%@AE@%%@NL@%
  10679.                                  %@AI@%; to bytes;%@AE@%%@NL@%
  10680.      codesize  ENDP%@NL@%
  10681. %@NL@%
  10682.      CSEG2      ENDS%@NL@%
  10683. %@NL@%
  10684. %@NL@%
  10685. %@CR:MCVD3P00@%%@3@%%@AB@%13.3.25  Packing Contiguous Data Segments (/PACKD)%@AE@%%@EH@%%@NL@%
  10686. %@NL@%
  10687. %@CR:MCVD3P01@%%@AB@%Option%@AE@%%@NL@%
  10688. %@NL@%
  10689.      %@AB@%/PACKD%@AE@%«%@AB@%ATA%@AE@%»«%@AB@%:%@AE@%%@AI@%number%@AE@%»%@NL@%
  10690. %@NL@%
  10691. %@CR:MCVD3P02@%%@4@%This option only affects code segments in medium- and large-model programs.%@EH@%
  10692. This option is also safe with all Microsoft high-level language compilers.
  10693. It behaves exactly like /PACKCODE except it applies to data segments, not
  10694. code segments. The linker recognizes data segments as any segment definition
  10695. with a class name which does not end in %@AS@%CODE%@AE@%. The adjacent data segment
  10696. definitions are combined into the same physical segment up to the given
  10697. limit. The default limit is 65,536.%@NL@%
  10698. %@NL@%
  10699. %@CR:MCVD3P03@%%@4@%With large and compact-model programs containing many modules, it may be%@EH@%
  10700. necessary to use this option to get around the limit of 255 physical data
  10701. segments per executable file imposed by OS/2 and Windows. If you get error
  10702. %@AS@%L1073%@AE@% from the liner, try using this option.%@NL@%
  10703. %@NL@%
  10704. %@CR:MCVD3P04@%%@4@%The %@AI@%number%@AE@% field specifies the maximum size of groups formed by /PACKD. The%@EH@%
  10705. linker will stop adding segments to a group as soon as it cannot add another
  10706. segment without exceeding %@AI@%number%@AE@%. At that point, the linker starts forming a
  10707. new group. The default for %@AI@%number%@AE@% is 65,530.%@NL@%
  10708. %@NL@%
  10709. %@CR:MCVD3P05@%%@4@%This option may not be safe with other compilers that do not generate fixup%@EH@%
  10710. records for all far data references. This option is valid for OS/2 and
  10711. Windows programs only.%@NL@%
  10712. %@NL@%
  10713. %@NL@%
  10714. %@CR:MCVD3Q00@%%@3@%%@AB@%13.3.26  Padding Code Segments (/PADC)%@AE@%%@EH@%%@NL@%
  10715. %@NL@%
  10716. %@CR:MCVD3Q01@%%@AB@%Option%@AE@%%@NL@%
  10717. %@NL@%
  10718.      %@AB@%/PADC%@AE@%«%@AB@%ODE%@AE@%»%@AB@%:%@AE@%%@AI@%padsize%@AE@%%@NL@%
  10719. %@NL@%
  10720. %@CR:MCVD3Q02@%%@4@%The /PADC option causes LINK to add filler bytes to the end of each code%@EH@%
  10721. module for subsequent linking with ILINK. The option is followed by a colon
  10722. and the number of bytes to add. (A decimal radix is assumed, but you can
  10723. specify octal or hexadecimal numbers by using a C-language prefix.) Thus%@NL@%
  10724. %@NL@%
  10725.      /PADCODE:256%@NL@%
  10726. %@NL@%
  10727. %@CR:MCVD3Q03@%%@4@%adds an additional 256 bytes to each module. The default size for%@EH@%
  10728. code-module padding is 0 bytes. If you are going to use this option, you
  10729. must also specify the /INC option.%@NL@%
  10730. %@NL@%
  10731. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10732. %@AI@%NOTE%@AE@%%@NL@%
  10733.    Code padding is usually not necessary for large-and medium-memory-model%@NL@%
  10734.    programs, but is recommended for small-compact and mixed-memory-model%@NL@%
  10735.    programs, and for Microsoft Macro Assembler (%@AB@%MASM%@AE@%) programs in which%@NL@%
  10736.    code segments are grouped.%@NL@%
  10737. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10738. %@NL@%
  10739. %@CR:MCVD3Q04@%%@4@%To be recognized as a code segment, a segment must be declared with class%@EH@%
  10740. name 'CODE'. The class name need only end with 'CODE' (Microsoft high-level
  10741. languages automatically use this declaration for code segments.)%@NL@%
  10742. %@NL@%
  10743. %@NL@%
  10744. %@CR:MCVD3R00@%%@3@%%@AB@%13.3.27  Padding Data Segments (/PADD)%@AE@%%@EH@%%@NL@%
  10745. %@NL@%
  10746. %@CR:MCVD3R01@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  10747. %@NL@%
  10748.      %@AB@%/PADD%@AE@%«%@AB@%ATA%@AE@%»%@AB@%:%@AE@%%@AI@%padsize%@AE@%%@NL@%
  10749. %@NL@%
  10750. %@CR:MCVD3R02@%%@4@%The /PADD option performs a function similar to the /PADCODE option, except%@EH@%
  10751. it specifies padding for data segments (or data modules, if the program uses
  10752. small- or medium-memory model). This option is supplied for subsequent
  10753. linking with ILINK. Thus%@NL@%
  10754. %@NL@%
  10755.      /PADDATA:32%@NL@%
  10756. %@NL@%
  10757. %@CR:MCVD3R03@%%@4@%adds an additional 32 bytes to each data module. The default size for%@EH@%
  10758. data-segment padding is 16 bytes. If you are going to use the /PADD option,
  10759. you must also specify the /INC option.%@NL@%
  10760. %@NL@%
  10761. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10762. %@AI@%NOTE%@AE@%%@NL@%
  10763.    If you specify too large a value for %@AI@%padsize%@AE@%, you may exceed the 64K%@NL@%
  10764.    limitation on the size of the default data segment.%@NL@%
  10765. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10766. %@NL@%
  10767. %@NL@%
  10768. %@CR:MCVD3S00@%%@3@%%@AB@%13.3.28  Pausing during Linking (/PAU)%@AE@%%@EH@%%@NL@%
  10769. %@NL@%
  10770. %@CR:MCVD3S01@%%@AB@%Option%@AE@%%@NL@%
  10771. %@NL@%
  10772.      %@AB@%/PAU%@AE@%«%@AB@%SE%@AE@%»%@NL@%
  10773. %@NL@%
  10774. %@CR:MCVD3S02@%%@4@%Unless you instruct it otherwise, LINK performs the linking session from%@EH@%
  10775. beginning to end without stopping. The /PAU option tells LINK to pause in
  10776. the session before it writes the executable (.EXE) file to disk. This option
  10777. allows you to swap disks before LINK writes the executable file.%@NL@%
  10778. %@NL@%
  10779. %@CR:MCVD3S03@%%@4@%If you specify the /PAU option, LINK displays the following message before%@EH@%
  10780. it creates the run file:%@NL@%
  10781. %@NL@%
  10782.      %@AS@%About to generate .EXE file%@AE@%%@NL@%
  10783.      %@AS@%Change diskette in drive%@AE@% %@AI@%letter%@AE@%%@AS@% and press <ENTER>%@AE@%%@NL@%
  10784. %@NL@%
  10785. %@CR:MCVD3S04@%%@4@%The %@AI@%letter%@AE@% corresponds to the current drive. LINK resumes processing when%@EH@%
  10786. you press ENTER .%@NL@%
  10787. %@NL@%
  10788. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10789. %@AI@%NOTE%@AE@%%@NL@%
  10790.    Do not remove the disk that will receive the list file or the disk used%@NL@%
  10791.    for the temporary file.%@NL@%
  10792. %@NL@%
  10793.    If a temporary file is created on the disk you plan to swap, press CTRL+C%@NL@%
  10794.    to terminate the LINK session. Rearrange your files so that the temporary%@NL@%
  10795.    file and the executable file can be written to the same disk. Then try%@NL@%
  10796.    linking again.%@NL@%
  10797. %@NL@%
  10798.    For more information on how LINK determines where to put the temporary%@NL@%
  10799.    file, see Section 13.2.6%@BO:   8ebda@%, "LINK Memory Requirements."%@NL@%
  10800. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10801. %@NL@%
  10802. %@NL@%
  10803. %@CR:MCVD3T00@%%@3@%%@AB@%13.3.29  Specifying User Libraries for Quick Languages (/Q)%@AE@%%@EH@%%@NL@%
  10804. %@NL@%
  10805. %@CR:MCVD3T01@%%@AB@%Option%@AE@%%@NL@%
  10806. %@NL@%
  10807.      %@AB@%/Q%@AE@%«%@AB@%UICKLIB%@AE@%»%@NL@%
  10808. %@NL@%
  10809. %@CR:MCVD3T02@%%@4@%The /Q option directs the linker to produce a "Quick library,"suitable for%@EH@%
  10810. use with Microsoft QuickBASIC or Microsoft QuickC(R) programs, instead of
  10811. producing a stand-alone application. (Stand-alone applications are
  10812. executable files that need only the presence of DOS to run. The linker
  10813. produces these by default.)%@NL@%
  10814. %@NL@%
  10815. %@CR:MCVD3T03@%%@4@%No other option is necessary to enable Quick-library creation. When you use%@EH@%
  10816. /Q, the %@AI@%exefile%@AE@% field refers to a Quick library instead of to an
  10817. application. The default extension for this field is then .QLB instead of
  10818. .EXE. You can use all of the linker features to build a Quick library that
  10819. you would otherwise use to build an application. The principal difference is
  10820. that a Quick library does not require (and should not contain) any
  10821. main-program-level code.%@NL@%
  10822. %@NL@%
  10823. %@CR:MCVD3T04@%%@4@%A Quick library is similar to a standard software library in that both%@EH@%
  10824. contain a collection of routines that may be called upon by a program. The
  10825. two libraries are different, however: a standard library is brought together
  10826. with a program at link time; a Quick library, by contrast, is brought
  10827. together with a program at run time.%@NL@%
  10828. %@NL@%
  10829. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10830. %@AI@%NOTE%@AE@%%@NL@%
  10831.    Two special restrictions apply to use of a Quick library:%@NL@%
  10832. %@NL@%
  10833.    1. Quick libraries can be loaded only by programs created with QuickC or%@NL@%
  10834.    QuickBASIC. These programs have the special code that properly loads a%@NL@%
  10835.    Quick library at run time.%@NL@%
  10836. %@NL@%
  10837.    2. Routines in a Quick library can be called from any module at run time.%@NL@%
  10838.    However, Quick-library routines cannot themselves make calls to routines%@NL@%
  10839.    outside the library. In other words, Quick libraries must be%@NL@%
  10840.    self-contained.%@NL@%
  10841. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10842. %@NL@%
  10843. %@CR:MCVD3T05@%%@4@%The linker creates a Quick library not by linking it to a program, but%@EH@%
  10844. instead by placing into a file all of the object modules to be included and
  10845. by adding a location table of all of the library routines. This table allows
  10846. references to be resolved at run time, after the entire library is loaded
  10847. into memory. For further information on the use of these libraries, consult
  10848. the user's guide for QuickBASIC or QuickC.%@NL@%
  10849. %@NL@%
  10850. %@NL@%
  10851. %@CR:MCVD3U00@%%@3@%%@AB@%13.3.30  Setting Maximum Number of Segments (/SE)%@AE@%%@EH@%%@NL@%
  10852. %@NL@%
  10853. %@CR:MCVD3U01@%%@AB@%Option%@AE@%%@NL@%
  10854. %@NL@%
  10855.      %@AB@%/SE%@AE@%«%@AB@%GMENTS%@AE@%»%@AB@%:%@AE@%%@AI@%number%@AE@%%@NL@%
  10856. %@NL@%
  10857. %@CR:MCVD3U02@%%@4@%The /SE option controls the number of segments the linker allows a program%@EH@%
  10858. to have. The default is 128, but you can set %@AI@%number%@AE@% to any value (decimal,
  10859. octal, or hexadecimal) in the range 1 to 3,072 (decimal). However, the
  10860. number of segment definitions is constrained by memory usage. Therefore, the
  10861. practical limit to the number is around 1,500.%@NL@%
  10862. %@NL@%
  10863. %@CR:MCVD3U03@%%@4@%For each segment, the linker must allocate some space to keep track of%@EH@%
  10864. segment information. By using a relatively low segment limit as a default
  10865. (128), the linker is able to link faster and allocate less storage space.%@NL@%
  10866. %@NL@%
  10867. %@CR:MCVD3U04@%%@4@%When you set the segment limit higher than 128, the linker allocates more%@EH@%
  10868. space for segment information. This option allows you to raise the segment
  10869. limit for programs with a large number of segments. For programs with fewer
  10870. than 128 segments, you can keep the storage requirements of the linker at
  10871. the lowest level possible by setting the segment %@AI@%number%@AE@% field to reflect the
  10872. actual number of segments in the program. If the number of segments
  10873. allocated is too high for the amount of memory LINK has available to it, you
  10874. will see the following error message:%@NL@%
  10875. %@NL@%
  10876.      %@AS@%segment limit too high%@AE@%%@NL@%
  10877. %@NL@%
  10878. %@CR:MCVD3U05@%%@4@%To specify a number of segments that will fit in the amount of memory%@EH@%
  10879. available, set the segment lower and relink the object files.%@NL@%
  10880. %@NL@%
  10881. %@NL@%
  10882. %@CR:MCVD3V00@%%@3@%%@AB@%13.3.31  Controlling Stack Size (/ST)%@AE@%%@EH@%%@NL@%
  10883. %@NL@%
  10884. %@CR:MCVD3V01@%%@AB@%Option%@AE@%%@NL@%
  10885. %@NL@%
  10886.      %@AB@%/ST%@AE@%«%@AB@%ACK%@AE@%»%@AB@%:%@AE@%%@AI@%number%@AE@%%@NL@%
  10887. %@NL@%
  10888. %@CR:MCVD3V02@%%@4@%The /ST option allows you to specify the size of the stack for your program.%@EH@%
  10889. The %@AI@%number%@AE@% is any positive value (decimal, octal,or hexadecimal) up to
  10890. 65,535 (decimal). It represents the size, in bytes, of the stack.%@NL@%
  10891. %@NL@%
  10892. %@CR:MCVD3V03@%%@4@%If you get a stack-overflow message, you may need to increase the size of%@EH@%
  10893. the stack. In contrast, if your program uses the stack very little, you may
  10894. save some space by decreasing the stack size.%@NL@%
  10895. %@NL@%
  10896. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10897. %@AI@%NOTE%@AE@%%@NL@%
  10898.    You can also use the %@AB@%EXEMOD%@AE@% utility, described in Section 17.1%@BO:   ba961@%, to%@NL@%
  10899.    change the default stack size in DOS executable files by modifying the%@NL@%
  10900.    executable-file header. The format of the executable-file header is%@NL@%
  10901.    discussed in that section as well as in the Microsoft MS-DOS programmer's%@NL@%
  10902.    Reference and in other reference books on DOS.%@NL@%
  10903. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10904. %@NL@%
  10905. %@NL@%
  10906. %@CR:MCVD3W00@%%@3@%%@AB@%13.3.32  Issuing Fixup Warnings (/W)%@AE@%%@EH@%%@NL@%
  10907. %@NL@%
  10908. %@CR:MCVD3W01@%%@AB@%Option%@AE@%%@NL@%
  10909. %@NL@%
  10910.      %@AB@%/W%@AE@%«%@AB@%ARNFIXUP%@AE@%»%@NL@%
  10911. %@NL@%
  10912. %@CR:MCVD3W02@%%@4@%The /WARNFIXUP option directs the linker to issue a warning for each segment%@EH@%
  10913. relative fixup of location-type "offset," such that the segment is contained
  10914. within a group but is not at the beginning of the group. The linker will
  10915. include the displacement of the segment from the group in determining the
  10916. final value of the fixup, contrary to what happens with DOS executable
  10917. files. This option is for linking protected-mode programs or Windows
  10918. applications.%@NL@%
  10919. %@NL@%
  10920. %@NL@%
  10921. %@CR:MCVD4000@%%@2@%%@AB@%13.4  Selecting Options with the LINK Environment Variable%@AE@%%@EH@%%@NL@%
  10922. %@NL@%
  10923. %@CR:MCVD4001@%%@4@%You can use the LINK environment variable to cause certain options to be%@EH@%
  10924. used each time you link. The linker checks the environment variable for
  10925. options, if the variable exists.%@NL@%
  10926. %@NL@%
  10927. %@CR:MCVD4002@%%@4@%The linker expects to find options listed in the variable exactly as you%@EH@%
  10928. would type them on the command line. It will not accept other kinds of
  10929. arguments; file names in the environment variable will cause the following
  10930. error message:%@NL@%
  10931. %@NL@%
  10932.      %@AS@%unrecognized option%@AE@%%@NL@%
  10933. %@NL@%
  10934. %@CR:MCVD4003@%%@4@%Each time you link, you can specify other options in addition to the ones%@EH@%
  10935. specified in the LINK environment variable. If you type an option both on
  10936. the command line and in the environment variable, the effect will be the
  10937. same as if the option were given once.%@NL@%
  10938. %@NL@%
  10939. %@CR:MCVD4004@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  10940. %@NL@%
  10941.      %@CR:MCVD4005@%>SET LINK=/NOI /SE:256 /CO
  10942.      >LINK TEST;
  10943.      >LINK /NOD /CO PROG;%@NL@%
  10944. %@NL@%
  10945. %@CR:MCVD4006@%%@4@%In the example above, the file %@AS@%TEST.OBJ%@AE@% is linked with the options %@AS@%/NOI%@AE@%,%@EH@%
  10946. %@AS@%/SE:256%@AE@%, and %@AS@%/CO%@AE@%. The file %@AS@%PROG.OBJ%@AE@% is then linked with the option %@AS@%/NOD%@AE@%,
  10947. in addition to %@AS@%/NOI%@AE@%, %@AS@%/SE:256%@AE@%, and %@AS@%/CO%@AE@%.%@NL@%
  10948. %@NL@%
  10949. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10950. %@AI@%NOTE%@AE@%%@NL@%
  10951.    A command-line option will override the effect of any%@NL@%
  10952.    environment-variable option that it conflicts with. For example, the%@NL@%
  10953.    command-line option%@AS@%/SE:512%@AE@% cancels the effect of the environment-variable%@NL@%
  10954.    option %@AS@%/SE:256%@AE@%.%@NL@%
  10955. %@NL@%
  10956.    The only way to prevent an option in the environment variable from being%@NL@%
  10957.    used is to reset the environment variable itself.%@NL@%
  10958. ───────────────────────────────────────────────────────────────────────────%@NL@%
  10959. %@NL@%
  10960. %@NL@%
  10961. %@CR:MCVD5000@%%@2@%%@AB@%13.5  Linker Operation%@AE@%%@EH@%%@NL@%
  10962. %@NL@%
  10963. %@CR:MCVD5001@%%@4@%LINK performs the following steps to combine object modules and produce an%@EH@%
  10964. executable file:%@NL@%
  10965. %@NL@%
  10966. %@CR:MCVD5002@%  1. Reads the object modules submitted%@NL@%
  10967. %@NL@%
  10968.   2. Searches the given libraries, if necessary, to resolve external%@NL@%
  10969.      references%@NL@%
  10970. %@NL@%
  10971.   3. Assigns addresses to segments%@NL@%
  10972. %@NL@%
  10973.   4. Assigns addresses to public symbols%@NL@%
  10974. %@NL@%
  10975.   5. Reads code and data in the segments%@NL@%
  10976. %@NL@%
  10977.   6. Reads all relocation references in object modules%@NL@%
  10978. %@NL@%
  10979.   7. Performs fixups%@NL@%
  10980. %@NL@%
  10981.   8. Outputs an executable file (executable image and relocation%@NL@%
  10982.      information)%@NL@%
  10983. %@NL@%
  10984. %@CR:MCVD5003@%%@4@%Steps 5, 6, and 7 are performed concurrently──in other words, LINK moves%@EH@%
  10985. back and forth between these steps before it progresses to step 8.%@NL@%
  10986. %@NL@%
  10987. %@CR:MCVD5004@%%@4@%The "executable image" contains the code and data that constitute the%@EH@%
  10988. executable file. The "relocation information" is a list of references
  10989. relative to the start of the program, each of which changes when the
  10990. executable image is loaded into memory and an actual address for the entry
  10991. point is assigned.%@NL@%
  10992. %@NL@%
  10993. %@CR:MCVD5005@%%@4@%The following sections explain the process LINK uses to concatenate segments%@EH@%
  10994. and resolve references to items in memory.%@NL@%
  10995. %@NL@%
  10996. %@NL@%
  10997. %@CR:MCVD5100@%%@3@%%@AB@%13.5.1  Alignment of Segments%@AE@%%@EH@%%@NL@%
  10998. %@NL@%
  10999. %@CR:MCVD5101@%%@4@%LINK uses a segment's alignment type to set the starting address for the%@EH@%
  11000. segment. The alignment types are %@AB@%BYTE, WORD, PARA%@AE@%, and %@AB@%PAGE%@AE@%. These
  11001. correspond to starting addresses at byte, word, paragraph, and page
  11002. boundaries, representing addresses that are multiples of 1, 2, 16, and 256,
  11003. respectively. The default alignment is %@AB@%PARA%@AE@%.%@NL@%
  11004. %@NL@%
  11005. %@CR:MCVD5102@%%@4@%When LINK encounters a segment, it checks the alignment type before copying%@EH@%
  11006. the segment to the executable file. If the alignment is %@AB@%WORD%@AE@%, %@AB@%PARA%@AE@%, or %@AB@%PAGE%@AE@%,
  11007. LINK checks the executable image to see if the last byte copied ends at an
  11008. appropriate boundary. If not, LINK pads the image with extra null bytes.%@NL@%
  11009. %@NL@%
  11010. %@NL@%
  11011. %@CR:MCVD5200@%%@3@%%@AB@%13.5.2  Frame Number%@AE@%%@EH@%%@NL@%
  11012. %@NL@%
  11013. %@CR:MCVD5201@%%@4@%LINK computes a starting address for each segment in a program. The starting%@EH@%
  11014. address is based on a segment's alignment and the sizes of the segments
  11015. already copied to the executable file (as described in Section 13.5.1%@BO:   9b071@%,
  11016. above). The address consists of an offset and a "canonical frame number."
  11017. The canonical frame number specifies the address of the first paragraph in
  11018. memory containing one or more bytes of the segment. (A paragraph is 16 bytes
  11019. of memory; therefore, to compute a physical location in memory, multiply the
  11020. frame number by 16 and add the offset.) The offset is the number of bytes
  11021. from the start of the paragraph to the first byte in the segment. For %@AB@%BYTE%@AE@%
  11022. and %@AB@%WORD%@AE@% alignments, the offset may be nonzero. The offset is always zero
  11023. for %@AB@%PARA%@AE@% and %@AB@%PAGE%@AE@% alignments. (An offset of zero means that the physical
  11024. location is an exact multiple of 16.)%@NL@%
  11025. %@NL@%
  11026. %@CR:MCVD5202@%%@4@%The frame number of a segment can be obtained from the map file created by%@EH@%
  11027. LINK. The first four digits of the start address give the frame number in
  11028. hexadecimal. For example, a start address of %@AS@%0C0A6%@AE@% gives a frame number of
  11029. %@AS@%0C0A%@AE@%.%@NL@%
  11030. %@NL@%
  11031. %@NL@%
  11032. %@CR:MCVD5300@%%@3@%%@AB@%13.5.3  Order of Segments%@AE@%%@EH@%%@NL@%
  11033. %@NL@%
  11034. %@CR:MCVD5301@%%@4@%LINK copies segments to the executable file in the same order that it%@EH@%
  11035. encounters them in the object files. This order is maintained throughout the
  11036. program unless LINK encounters two or more segments having the same class
  11037. name. Segments having identical class names belong to the same class type
  11038. and are copied as a contiguous block to the executable file.%@NL@%
  11039. %@NL@%
  11040. %@CR:MCVD5302@%%@4@%The /DOSSEG option may change the way in which segments are ordered.%@EH@%%@NL@%
  11041. %@NL@%
  11042. %@NL@%
  11043. %@CR:MCVD5400@%%@3@%%@AB@%13.5.4  Combined Segments%@AE@%%@EH@%%@NL@%
  11044. %@NL@%
  11045. %@CR:MCVD5401@%%@4@%LINK uses combine types to determine whether or not two or more segments%@EH@%
  11046. sharing the same segment name should be combined into one large segment. The
  11047. valid combine types are %@AB@%PUBLIC, STACK, COMMON%@AE@%, and %@AB@%PRIVATE.%@AE@%%@NL@%
  11048. %@NL@%
  11049. %@CR:MCVD5402@%%@4@%If a segment has combine type %@AB@%PUBLIC%@AE@%, LINK automatically combines it with%@EH@%
  11050. any other segments having the same name and belonging to the same class.
  11051. When LINK combines segments, it ensures that the segments are contiguous and
  11052. that all addresses in the segments can be accessed using an offset from the
  11053. same frame address. The result is the same as if the segment were defined as
  11054. a whole in the source file.%@NL@%
  11055. %@NL@%
  11056. %@CR:MCVD5403@%%@4@%LINK preserves each individual segment's alignment type. This means that%@EH@%
  11057. even though the segments belong to a single, large segment, the code and
  11058. data in the segments do not lose their original alignment. If the combined
  11059. segments exceed 64K, LINK displays an error message.%@NL@%
  11060. %@NL@%
  11061. %@CR:MCVD5404@%%@4@%If a segment has combine type %@AB@%STACK%@AE@%, then LINK carries out the same combine%@EH@%
  11062. operation as for %@AB@%PUBLIC%@AE@% segments. The only exception is %@AB@%STACK%@AE@% segments cause
  11063. LINK to copy an initial stack-pointer value to the executable file. This
  11064. stack-pointer value is the offset to the end of the first stack segment (or
  11065. combined stack segment) encountered.%@NL@%
  11066. %@NL@%
  11067. %@CR:MCVD5405@%%@4@%If a segment has combine type %@AB@%COMMON%@AE@%, then LINK automatically combines it%@EH@%
  11068. with any other segments having the same name and belonging to the same
  11069. class. When LINK combines %@AB@%COMMON%@AE@% segments, however, it places the start of
  11070. each segment at the same address, creating a series of overlapping segments.
  11071. The result is a single segment no larger than the largest segment combined.%@NL@%
  11072. %@NL@%
  11073. %@CR:MCVD5406@%%@4@%A segment has combine type %@AB@%PRIVATE%@AE@% only if no explicit combine type is%@EH@%
  11074. defined for it in the source file. LINK does not combine private segments.%@NL@%
  11075. %@NL@%
  11076. %@NL@%
  11077. %@CR:MCVD5500@%%@3@%%@AB@%13.5.5  Groups%@AE@%%@EH@%%@NL@%
  11078. %@NL@%
  11079. %@CR:MCVD5501@%%@4@%Groups allow segments to be addressed relative to the same frame address.%@EH@%
  11080. When LINK encounters a group, it adjusts all memory references to items in
  11081. the group so that they are relative to the same frame address.%@NL@%
  11082. %@NL@%
  11083. %@CR:MCVD5502@%%@4@%Segments in a group do not have to be contiguous, belong to the same class,%@EH@%
  11084. or have the same combine type. The only requirement is all segments in the
  11085. group fit within 64K.%@NL@%
  11086. %@NL@%
  11087. %@CR:MCVD5503@%%@4@%Groups do not affect the order in which the segments are loaded. Unless you%@EH@%
  11088. use class names and enter object files in the right order, there is no
  11089. guarantee that the segments will be contiguous. In fact, LINK may place
  11090. segments that do not belong to the group in the same 64K of memory. LINK
  11091. does not explicitly check that all segments in a group fit within 64K of
  11092. memory; however, LINK is likely to encounter a fixup-overflow error if this
  11093. requirement is not met.%@NL@%
  11094. %@NL@%
  11095. %@NL@%
  11096. %@CR:MCVD5600@%%@3@%%@AB@%13.5.6  Fixups%@AE@%%@EH@%%@NL@%
  11097. %@NL@%
  11098. %@CR:MCVD5601@%%@4@%Once the starting address of each segment in a program is known and all%@EH@%
  11099. segment combinations and groups have been established, LINK can "fix up" any
  11100. unresolved references to labels and variables. To fix up unresolved
  11101. references, LINK computes an appropriate offset and segment address and
  11102. replaces the temporary values generated by the assembler with the new
  11103. values.%@NL@%
  11104. %@NL@%
  11105. %@CR:MCVD5602@%%@4@%LINK carries out fixups for the types of references shown in the following%@EH@%
  11106. list:%@NL@%
  11107. %@CR:MCVD5603@%%@NL@%
  11108. %@TH:   43   2426  2 28 48 @%%@AB@%Type of Reference           Description%@AE@%Short                       Occurs in %@AB@%JMP%@AE@% instructions that attempt to pass                            control to labeled instructions in the same                            segment or group.                            The target instruction must be no more than 128                            bytes from the point of reference. LINK computes                            a signed, 8-bit number for this reference. It                            displays an error message if the target                            instruction belongs to a different segment or                            group (has a different frame address), or if the                            target is more than 128 bytes distant in either                            direction.Near self relative          Occurs in instructions that access data relative                            to the same segment or group.                            LINK computes a 16-bit offset for this                            reference. It displays an error if the data are                            not in the same segment or group.Near segment relative       Occurs in instructions that attempt to access                            data in a specified segment or group, or                            relative to a specified segment register.                            LINK computes a 16-bit offset for this                            reference. It displays an error message if the                            offset of the target within the specified frame                            is greater than 64K or less than 0, or if the                            beginning of the canonical frame of the target                            is not addressable.Long                        Occurs in %@AB@%CALL%@AE@% instructions that attempt to                            access an instruction in another segment or                            group.                            LINK computes a 16-bit frame address and 16-bit                            offset for this reference. LINK displays an                            error message if the computed offset is greater                            than 64K or less than 0, or if the beginning of                            the canonical frame of the target is not                            addressable.%@TE:   43   2426  2 28 48 @%
  11109. %@NL@%
  11110. %@CR:MCVD5604@%%@4@%The size of the value to be computed depends on the type of reference. If%@EH@%
  11111. LINK discovers an error in the anticipated size of a reference, it displays
  11112. a fixup-overflow message. This can happen, for example, if a program
  11113. attempts to use a 16-bit offset to reach an instruction which is more than
  11114. 64K away. It can also occur if all segments in a group do not fit within a
  11115. single 64K block of memory.%@NL@%
  11116. %@NL@%
  11117. %@NL@%
  11118. %@CR:MCVD6000@%%@2@%%@AB@%13.6  Using Overlays%@AE@%%@EH@%%@NL@%
  11119. %@NL@%
  11120. %@CR:MCVD6001@%%@4@%You can direct LINK to create an overlaid version of a program. In an%@EH@%
  11121. overlaid version of a program, specified parts of the program (known as
  11122. "overlays") are loaded only if and when they are needed. These parts share
  11123. the same space in memory. Only code is overlaid; data are never overlaid.
  11124. Programs that use overlays usually require less memory, but they run more
  11125. slowly because of the time needed to read and reread the code from disk into
  11126. memory.%@NL@%
  11127. %@NL@%
  11128. %@CR:MCVD6002@%%@4@%When you use overlays, the linker loads in code for the overlay manager.%@EH@%
  11129. This code resides in each of the Microsoft high-level language libraries (so
  11130. you must link with at least one such library), and is between 2K and 3K in
  11131. size.%@NL@%
  11132. %@NL@%
  11133. %@CR:MCVD6003@%%@4@%You specify overlays by enclosing them in parentheses in the list of object%@EH@%
  11134. files that you submit to the linker. Each module in parentheses represents
  11135. one overlay. For example, you could give the following object-file list in
  11136. the %@AI@%objfiles%@AE@% field of the LINK command line:%@NL@%
  11137. %@NL@%
  11138.      a + (b+c) + (e+f) + g + (i)%@NL@%
  11139. %@NL@%
  11140. %@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@%
  11141. modules, and any drawn from the run-time libraries, constitute the resident
  11142. part (or root) of your program. Overlays are loaded into the same region of
  11143. memory, so only one can be resident at a time. Duplicate names in different
  11144. overlays are not supported, so each module can appear only once in a
  11145. program.%@NL@%
  11146. %@NL@%
  11147. %@CR:MCVD6005@%%@4@%The linker replaces calls from the root to an overlay and calls from an%@EH@%
  11148. overlay to another overlay with an interrupt (followed by the module
  11149. identifier and offset). By default, the interrupt number is 63 (3F
  11150. hexadecimal). You can use the /OVERLAYINTERRUPT option of the LINK command
  11151. to change the interrupt number.%@NL@%
  11152. %@NL@%
  11153. %@CR:MCVD6006@%%@4@%The CodeView debugger is now compatible with overlaid modules. In fact, in%@EH@%
  11154. the case of large programs, you may need to use overlays%@NL@%
  11155. %@NL@%
  11156. %@NL@%
  11157. %@CR:MCVD6100@%%@3@%%@AB@%13.6.1  Restrictions on Overlays%@AE@%%@EH@%%@NL@%
  11158. %@NL@%
  11159. %@CR:MCVD6101@%%@4@%You can overlay only modules to which control is transferred and returned by%@EH@%
  11160. a standard 8086 long (32-bit) call/return instruction. Therefore, because
  11161. calls to subroutines modified with the %@AB@%NEAR%@AE@% attribute are short (16-bit)
  11162. calls, you cannot overlay modules containing %@AB@%NEAR%@AE@% subroutines if other
  11163. modules call those subroutines. You cannot use long jumps with the %@AB@%longjmp%@AE@%
  11164. library function. Also, the linker does not produce overlay modules that can
  11165. be called indirectly through function pointers.%@NL@%
  11166. %@NL@%
  11167. %@NL@%
  11168. %@CR:MCVD6200@%%@3@%%@AB@%13.6.2  Overlay-Manager Prompts%@AE@%%@EH@%%@NL@%
  11169. %@NL@%
  11170. %@CR:MCVD6201@%%@4@%The overlay manager is part of the language's run-time library. If you%@EH@%
  11171. specify overlays during linking, the code for the overlay manager is
  11172. automatically linked with the other modules of your program.%@NL@%
  11173. %@NL@%
  11174. %@CR:MCVD6202@%%@4@%When the executable file is run, the overlay manager searches for that file%@EH@%
  11175. whenever another overlay needs to be loaded. The overlay manager first
  11176. searches for the file in the current directory; then, if it does not find
  11177. the file, the manager searches the directories listed in the PATH
  11178. environment variable. When it finds the file, the overlay manager extracts
  11179. the overlay modules specified by the root program. If the overlay manager
  11180. cannot find an overlay file when needed, it prompts the user to enter the
  11181. file name.%@NL@%
  11182. %@NL@%
  11183. %@CR:MCVD6203@%%@4@%Even with overlays, the linker produces only one .EXE file. This file is%@EH@%
  11184. opened again and again as long as the overlay manager needs to extract new
  11185. overlay modules.%@NL@%
  11186. %@NL@%
  11187. %@CR:MCVD6204@%%@4@%For example, assume that an executable program called %@AS@%PAYROLL.EXE%@AE@% uses%@EH@%
  11188. overlays and does not exist in either the current directory or the
  11189. directories specified by PATH. If the user runs %@AS@%PAYROLL.EXE%@AE@% (by entering a
  11190. complete path specification), the overlay manager displays the following
  11191. message when it attempts to load overlay files:%@NL@%
  11192. %@NL@%
  11193.      %@AS@%Cannot find PAYROLL.EXE%@AE@%%@NL@%
  11194.      %@AS@%Please enter new program spec:%@AE@%%@NL@%
  11195. %@NL@%
  11196. %@CR:MCVD6205@%%@4@%The user can then enter the drive or directory, or both, where %@AS@%PAYROLL.EXE%@AE@%%@EH@%
  11197. is located. For example, if the file is located in directory %@AS@%\EMPLOYEE\DATA\%@AE@%
  11198. on drive B, the user could enter %@AS@%B:\EMPLOYEE\DATA\%@AE@% or simply enter
  11199. %@AS@%\EMPLOYEE\DATA\%@AE@% if the current drive is B.%@NL@%
  11200. %@NL@%
  11201. %@CR:MCVD6206@%%@4@%If the user later removes the disk in drive B and the overlay manager needs%@EH@%
  11202. to access the overlay again, it does not find %@AS@%PAYROLL.EXE%@AE@% and displays the
  11203. following message:%@NL@%
  11204. %@NL@%
  11205.      %@AS@%Please insert diskette containing B:\EMPLOYEE\DATA\PAYROLL.EXE%@AE@%%@NL@%
  11206.      %@AS@%in drive B: and strike any key when ready.%@AE@%%@NL@%
  11207. %@NL@%
  11208. %@CR:MCVD6207@%%@4@%After the overlay file has been read from the disk, the overlay manager%@EH@%
  11209. displays the following message:%@NL@%
  11210. %@NL@%
  11211.      %@AS@%Please restore the original diskette.%@AE@%%@NL@%
  11212.      %@AS@%Strike any key when ready.%@AE@%%@NL@%
  11213. %@NL@%
  11214. %@NL@%
  11215. %@CR:MCVE0000@%%@1@%%@AB@%Chapter 14  Incremental Linking with ILINK%@AE@%%@EH@%%@NL@%
  11216. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11217. %@NL@%
  11218. %@CR:MCVE0001@%%@4@%The Microsoft Incremental Linker (ILINK) is a utility that enables you to%@EH@%
  11219. link your application much faster. You can benefit from its use when you
  11220. change a small subset of the modules used to link a program. The program can
  11221. use any memory model, but in the small model LINK is not efficient unless no
  11222. symbolic change address is used. Furthermore, to benefit from ILINK, you
  11223. need to follow certain restrictions that are described in this chapter.
  11224. Should ILINK fail to link your changes into the executable file, it attempts
  11225. to invoke the full linker, LINK, or carry out any other commands you specify
  11226. on the command line. Before you can use ILINK, you must first run the full
  11227. linker with special options.%@NL@%
  11228. %@NL@%
  11229. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11230. %@AI@%NOTE%@AE@%%@NL@%
  11231.    You can use ILINK to develop dynamic-link libraries as well as%@NL@%
  11232.    applications. Everything said in this chapter about applications and%@NL@%
  11233.    executable files applies to dynamic-link libraries as well. This chapter%@NL@%
  11234.    uses the term "library" to refer specifically to an object-code library%@AE@%%@NL@%
  11235.    (a .LIB file).%@NL@%
  11236. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11237. %@NL@%
  11238. %@NL@%
  11239. %@CR:MCVE1000@%%@2@%%@AB@%14.1  Definitions%@AE@%%@EH@%%@NL@%
  11240. %@NL@%
  11241. %@CR:MCVE1001@%%@4@%Incremental linking involves certain specialized concepts. You may need to%@EH@%
  11242. review the following list of terms in order to understand the rest of this
  11243. chapter:%@NL@%
  11244. %@CR:MCVE1002@%%@NL@%
  11245. %@TH:   39   2250  2 28 48 @%%@AB@%Term                                       Meaning%@AE@%Segment                     A contiguous area of memory up to 64K in size.                            See the definitions of "physical segment" and                            "logical segment" below.Module                      A unit of code or data defined by one source                            file. In BASIC, Pascal, and large-memory-model C                            and FORTRAN programs, each module corresponds to                            a different segment. In small-memory-model                            programs, all code modules contribute to one                            code segment, and all data modules contribute to                            one data segment.Memory model                The memory model determines the number of code                            and data segments in a program. BASIC programs                            are always large memory model.Physical segment            A segment listed in the executable file's                            segment table. Each physical segment has a                            distinct segment address, whereas logical                            segments may share a segment address. A physical                            segment usually contains one logical segment,                            but it can contain more.Logical segment             A segment defined in an object module. Each                            physical segment other than DGROUP contains                            exactly one logical segment, except when you use                            the GROUP directive in a MASM module. (Linking                            with the /PACKCODE option can also create more                            than one logical segment per physical segment.)Code symbol                 The address of a function, subroutine, or                            procedure.Data symbol                 The address of a global or static data object.                            The concept of data symbol includes all data                            objects except local (stack-allocated) or                            dynamically allocated data.%@TE:   39   2250  2 28 48 @%
  11246. %@NL@%
  11247. %@CR:MCVE2000@%%@2@%%@AB@%14.2  Guidelines for Using ILINK%@AE@%%@EH@%%@NL@%
  11248. %@NL@%
  11249. %@CR:MCVE2001@%%@4@%Since ILINK can automatically invoke LINK when an incremental link fails,%@EH@%
  11250. you do not have to concern yourself with the following guidelines. However,
  11251. if you are interested in how ILINK works and want to take full advantage of
  11252. ILINK, follow the guidelines presented in this section.%@NL@%
  11253. %@NL@%
  11254. %@CR:MCVE2002@%%@4@%The incremental linker, ILINK, works much faster than the full linker%@EH@%
  11255. because ILINK replaces only those modules that have changed since the last
  11256. linking. It avoids much of the work done by LINK.%@NL@%
  11257. %@NL@%
  11258. %@CR:MCVE2003@%%@4@%To enable incremental linking, follow the major guidelines below. If your%@EH@%
  11259. changes exceed the scope allowed by these guidelines, a full link is
  11260. necessary.%@NL@%
  11261. %@NL@%
  11262. %@CR:MCVE2004@%  1. Do not alter any .LIB files you are using to create the executable%@NL@%
  11263.      file.%@NL@%
  11264. %@NL@%
  11265.   2. Put padding at the end of data and small-memory-model code modules by%@NL@%
  11266.      specifying the /PADCODE and /PADDATA options during full linking with%@NL@%
  11267.      LINK.%@NL@%
  11268. %@NL@%
  11269.      By putting padding at the end of a module, you enable the module to%@NL@%
  11270.      grow without forcing a full relinking. However, if the module is the%@NL@%
  11271.      only module contributing to its physical segment, padding is not%@NL@%
  11272.      necessary.%@NL@%
  11273. %@NL@%
  11274.      You can avoid padding if you have a BASIC, Pascal, FORTRAN, or C%@NL@%
  11275.      program (other than a small-memory-model C program), if you do not call%@NL@%
  11276.      a MASM module that uses the %@AB@%GROUP%@AE@% directive, and if you do not add to%@NL@%
  11277.      the size of the default data segment. (See your language documentation%@NL@%
  11278.      for information about what is placed in the default data segment.)%@NL@%
  11279. %@NL@%
  11280.   3. Do not delete code symbols (functions and procedures) referenced by%@NL@%
  11281.      another module. You can, however, move or add to these symbols.%@NL@%
  11282. %@NL@%
  11283.   4. Do not move or delete data symbols (global data). You can add data%@NL@%
  11284.      symbols at the end of your data definitions, but you cannot add new%@NL@%
  11285.      communal data symbols (for example, C uninitialized variables or BASIC%@NL@%
  11286.      %@AB@%COMMON%@AE@% statements).%@NL@%
  11287. %@NL@%
  11288. %@NL@%
  11289. %@CR:MCVE3000@%%@2@%%@AB@%14.3  The Development Process%@AE@%%@EH@%%@NL@%
  11290. %@NL@%
  11291. %@CR:MCVE3001@%%@4@%To develop a software project with ILINK, follow the steps listed below:%@EH@%%@NL@%
  11292. %@NL@%
  11293. %@CR:MCVE3002@%  1. Use the full linker during early stages of developing your application%@NL@%
  11294.      or dynamic-link library. ILINK produces no significant gain in speed%@NL@%
  11295.      until you have a number of different code and data modules present.%@NL@%
  11296. %@NL@%
  11297.   2. Prepare for incremental linking by using the special liner options%@NL@%
  11298.      mentioned below.%@NL@%
  11299. %@NL@%
  11300.   3. Incrementally link with ILINK after any small changes are made.%@NL@%
  11301. %@NL@%
  11302.   4. Relink with LINK after any major changes are made (for example, if you%@NL@%
  11303.      want to add an entirely new module, greatly expand one of the segments%@NL@%
  11304.      or modules, or redefine symbols that are shared between segments).%@NL@%
  11305. %@NL@%
  11306.   5. Repeat steps 3 and 4 as necessary.%@NL@%
  11307. %@NL@%
  11308. %@CR:MCVE3003@%%@4@%You may find it easiest to use a make file to invoke ILINK and LINK. The%@EH@%
  11309. following sample make file attempts to use ILINK each time, but invokes the
  11310. full linker whenever incremental linking is not possible:%@NL@%
  11311. %@NL@%
  11312.      dog.exe: obj1.obj; obj2.obj; obj3.obj%@NL@%
  11313.          ILINK -e "LINK /incr @dog.lnk" -a dog%@NL@%
  11314. %@NL@%
  11315. %@CR:MCVE3004@%%@4@%Three options──/INCREMENTAL, /PADCODE, and /PADDATA──have been added to LINK%@EH@%
  11316. to allow the use of ILINK. Here is an example of how they might appear on
  11317. the command line:%@NL@%
  11318. %@NL@%
  11319.      LINK /INCREMENTAL /PADDATA:16 /PADCODE:256 @PROJNAME.LNK%@NL@%
  11320. %@NL@%
  11321. %@CR:MCVE3005@%%@4@%These options are described in detail in Sections 13.3.12%@BO:   93dca@%, 13.3.27%@BO:   97ed1@%, and%@EH@%
  11322. 13.3.26%@BO:   978cc@%, respectively.%@NL@%
  11323. %@NL@%
  11324. %@NL@%
  11325. %@CR:MCVE4000@%%@2@%%@AB@%14.4  Running ILINK%@AE@%%@EH@%%@NL@%
  11326. %@NL@%
  11327. %@CR:MCVE4001@%%@4@%You can attempt to link the project with ILINK at any time after the project%@EH@%
  11328. has been linked with the /INCREMENTAL option. The following two sections
  11329. discuss the files needed for linking with ILINK and the command required to
  11330. invoke ILINK.%@NL@%
  11331. %@NL@%
  11332. %@NL@%
  11333. %@CR:MCVE4100@%%@3@%%@AB@%14.4.1  Files Required for Using ILINK%@AE@%%@EH@%%@NL@%
  11334. %@NL@%
  11335. %@CR:MCVE4101@%%@4@%The files that are required for linking using ILINK are ILINK.EXE,%@EH@%
  11336. ILINKSTB.OVL, and your project files that include the following:%@NL@%
  11337. %@NL@%
  11338. %@CR:MCVE4102@%  1. %@AI@%projname%@AE@%.EXE (the file to be incrementally linked)%@NL@%
  11339. %@NL@%
  11340.   2. %@AI@%projname%@AE@%.SYM (the symbol file)%@NL@%
  11341. %@NL@%
  11342.   3. %@AI@%projname%@AE@%.ILK  (the ILINK support file)%@NL@%
  11343. %@NL@%
  11344.   4. *.OBJ  (the changed .OBJ files)%@NL@%
  11345. %@NL@%
  11346. %@CR:MCVE4103@%%@4@%ILINK.EXE and ILINKSTB.OVL should be in a directory listed in the PATH%@EH@%
  11347. environment variable, and the rest of the project files should be in the
  11348. current directory.%@NL@%
  11349. %@NL@%
  11350. %@NL@%
  11351. %@CR:MCVE4200@%%@3@%%@AB@%14.4.2  The ILINK Command Line%@AE@%%@EH@%%@NL@%
  11352. %@NL@%
  11353. %@CR:MCVE4201@%%@4@%The syntax for the ILINK command line is shown below. ILINK options are not%@EH@%
  11354. case sensitive.%@NL@%
  11355. %@NL@%
  11356.      ILINK «/a» «/c» «/v» «/i» «/e "%@AI@%commands%@AE@%"» %@AI@%projname%@AE@%«%@AI@%modulelist%@AE@%»%@NL@%
  11357. %@NL@%
  11358. %@CR:MCVE4202@%%@4@%The /a option specifies that all object files are to be checked to see if%@EH@%
  11359. they have changed since the last linking process. This is done by comparing
  11360. the dates and times of all .OBJ files with those of the executable file. An
  11361. attempt is made to incrementally link all of the files that have changed.%@NL@%
  11362. %@NL@%
  11363. %@CR:MCVE4203@%%@4@%The /c option specifies case sensitivity for all public symbol names.%@EH@%%@NL@%
  11364. %@NL@%
  11365. %@CR:MCVE4204@%%@4@%The /v option specifies verbose mode and directs ILINK to display more%@EH@%
  11366. information. Specifically, when in verbose mode ILINK lists the modules that
  11367. have changed.%@NL@%
  11368. %@NL@%
  11369. %@CR:MCVE4205@%%@4@%The /i option specifies that only an incremental link is to be attempted. If%@EH@%
  11370. the incremental link fails, a full link is not performed.%@NL@%
  11371. %@NL@%
  11372. %@CR:MCVE4206@%%@4@%The /e option specifies a list of commands to be executed if the incremental%@EH@%
  11373. link fails. The commands are enclosed in double quotes, and if more than one
  11374. command is given, they must be separated by spaces and a semicolon.%@NL@%
  11375. %@NL@%
  11376. %@CR:MCVE4207@%%@4@%The %@AI@%projname%@AE@% field contains the name of the executable file that is to be%@EH@%
  11377. incrementally linked.%@NL@%
  11378. %@NL@%
  11379. %@CR:MCVE4208@%%@4@%You can use the optional %@AI@%modulelist%@AE@% field to list all the modules that have%@EH@%
  11380. changed. (No extensions are required.) This field is an alternative to using
  11381. the /a flag.%@NL@%
  11382. %@NL@%
  11383. %@CR:MCVE4209@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  11384. %@NL@%
  11385.      ILINK /i wizard input sort output%@NL@%
  11386. %@NL@%
  11387. %@CR:MCVE420A@%%@4@%In the above example, the altered modules (%@AS@%input%@AE@%, %@AS@%sort%@AE@%, and %@AS@%output%@AE@%) are%@EH@%
  11388. explicitly listed on the command line.%@NL@%
  11389. %@NL@%
  11390.      ILINK /e "link @%s.obj ; rc %s.exe" myproj%@NL@%
  11391. %@NL@%
  11392. %@CR:MCVE420B@%%@4@%In the example above, the characters %@AS@%%s%@AE@% are replaced by %@AI@%projname%@AE@% when the%@EH@%
  11393. command is carried out. If the incremental link fails, ILINK carries out the
  11394. commands %@AS@%link myproj.obj%@AE@% and %@AS@%rc myproj.exe%@AE@%.%@NL@%
  11395. %@NL@%
  11396.      ILINK /a /e "link @%s.lnk ; rc %s.exe" wizard%@NL@%
  11397. %@NL@%
  11398. %@CR:MCVE420C@%%@4@%In the final example above, the /a option directs ILINK to scan all files in%@EH@%
  11399. the project in order to discover which modules have changed. This example
  11400. also lists commands to be executed in case incremental linking fails.%@NL@%
  11401. %@NL@%
  11402. %@NL@%
  11403. %@CR:MCVE5000@%%@2@%%@AB@%14.5  How ILINK Works%@AE@%%@EH@%%@NL@%
  11404. %@NL@%
  11405. %@CR:MCVE5001@%%@4@%Instead of searching for records and resolving external references for the%@EH@%
  11406. entire program, ILINK carries out the following operations:%@NL@%
  11407. %@NL@%
  11408. %@CR:MCVE5002@%  1. ILINK replaces the portion of each module that has changed since the%@NL@%
  11409.      last linking (incremental or full linking).%@NL@%
  11410. %@NL@%
  11411.   2. ILINK alters relocation-table entries for any far (segmented) code%@NL@%
  11412.      symbols that have moved within a segment. For each reference to a far%@NL@%
  11413.      code symbol, such as a far function call, there is an entry in the%@NL@%
  11414.      relocation table in the executable file's header. The relocation table%@NL@%
  11415.      of the application contains full addresses. Therefore, by fixing%@NL@%
  11416.      relocation table entries for a code symbol, ILINK ensures that all%@NL@%
  11417.      references to the symbol will be correct.)%@NL@%
  11418. %@NL@%
  11419. %@CR:MCVE5003@%%@4@%ILINK makes no modification to modules that have not been changed since the%@EH@%
  11420. last linking.%@NL@%
  11421. %@NL@%
  11422. %@NL@%
  11423. %@CR:MCVE6000@%%@2@%%@AB@%14.6  Incremental Violations%@AE@%%@EH@%%@NL@%
  11424. %@NL@%
  11425. %@CR:MCVE6001@%%@4@%There are two kinds of ILINK failures: real errors and incremental%@EH@%
  11426. violations. Real errors are errors that will not be resolved by a full link,
  11427. such as undefined symbols or invalid .OBJ files. If ILINK detects a real
  11428. error, it displays %@AS@%ERROR%@AE@% with an explanation and returns a nonzero error
  11429. code to the operating system. Incremental violations consist of changes that
  11430. are beyond the scope of incremental linking, but can generally be resolved
  11431. by full linking.%@AS@%%@NL@%
  11432. %@NL@%
  11433. %@CR:MCVE6002@%%@4@%Section C.2%@BO:   ddc92@%, "LINK Error Messages," explains real errors in detail. The rest%@EH@%
  11434. of this section describes incremental violations.%@NL@%
  11435. %@NL@%
  11436. %@NL@%
  11437. %@CR:MCVE6100@%%@3@%%@AB@%14.6.1  Changing Libraries%@AE@%%@EH@%%@NL@%
  11438. %@NL@%
  11439. %@CR:MCVE6101@%%@4@%An incremental violation occurs when a library changes. Furthermore, if an%@EH@%
  11440. altered module shares a code segment with a library, ILINK needs access to
  11441. the library as well as to the new module.%@NL@%
  11442. %@NL@%
  11443. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11444. %@AI@%NOTE%@AE@%%@NL@%
  11445.    If you add a function, procedure, or subroutine call to a library that%@NL@%
  11446.    has never been called before, ILINK fails with an undefined-symbol error.%@NL@%
  11447.    Performing a full link should resolve this problem.%@NL@%
  11448. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11449. %@NL@%
  11450. %@NL@%
  11451. %@CR:MCVE6200@%%@3@%%@AB@%14.6.2  Exceeding Code/Data Padding%@AE@%%@EH@%%@NL@%
  11452. %@NL@%
  11453. %@CR:MCVE6201@%%@4@%An incremental violation will occur if two or more modules contribute to the%@EH@%
  11454. same physical segment and either module exceeds its padding. As discussed in
  11455. Section 14.2%@BO:   9fa9a@%, "Guidelines for Using ILINK," padding is the process of
  11456. adding filler bytes to the end of a module. The filler bytes serve as a
  11457. buffer zone whenever the module grows in size──that is, whenever the new
  11458. version of the module is larger than the old.%@NL@%
  11459. %@NL@%
  11460. %@NL@%
  11461. %@CR:MCVE6300@%%@3@%%@AB@%14.6.3  Moving/Deleting Data Symbols%@AE@%%@EH@%%@NL@%
  11462. %@NL@%
  11463. %@CR:MCVE6301@%%@4@%An incremental violation occurs if a data symbol is moved or deleted. To add%@EH@%
  11464. new data symbols without requiring a full link, add the new symbols at the
  11465. end of all other data symbols in the module.%@NL@%
  11466. %@NL@%
  11467. %@NL@%
  11468. %@CR:MCVE6400@%%@3@%%@AB@%14.6.4  Deleting Code Symbols%@AE@%%@EH@%%@NL@%
  11469. %@NL@%
  11470. %@CR:MCVE6401@%%@4@%You can move or add code symbols, but an incremental violation occurs if you%@EH@%
  11471. delete any code symbols from a module. Code symbols can be moved within a
  11472. module but cannot be moved between modules.%@NL@%
  11473. %@NL@%
  11474. %@NL@%
  11475. %@CR:MCVE6500@%%@3@%%@AB@%14.6.5  Changing Segment Definitions%@AE@%%@EH@%%@NL@%
  11476. %@NL@%
  11477. %@CR:MCVE6501@%%@4@%An incremental violation results if you add, delete, or change the order of%@EH@%
  11478. segment definitions. If you are programming in MASM, an incremental
  11479. violation will also result if you alter any %@AB@%GROUP%@AE@% directives.%@NL@%
  11480. %@NL@%
  11481. %@CR:MCVE6502@%%@4@%If you are programming with a high-level language, remember not to add or%@EH@%
  11482. delete modules between incremental links.%@NL@%
  11483. %@NL@%
  11484. %@NL@%
  11485. %@CR:MCVE6600@%%@3@%%@AB@%14.6.6  Adding CodeView Debugger Information%@AE@%%@EH@%%@NL@%
  11486. %@NL@%
  11487. %@CR:MCVE6601@%%@4@%If you included CodeView debugger information for a module the last time you%@EH@%
  11488. ran a full link (by compiling and linking with CodeView debugger support),
  11489. ILINK fully supports CodeView debugger information for the module. ILINK
  11490. maintains symbolic information for current symbols, and it adds information
  11491. for any new symbols. However, if you include CodeView debugger information
  11492. for a module that previously did not have CodeView debugger support, an
  11493. incremental violation results.%@NL@%
  11494. %@NL@%
  11495. %@NL@%
  11496. %@CR:MCVF0000@%%@1@%%@AB@%Chapter 15  Managing Libraries with LIB%@AE@%%@EH@%%@NL@%
  11497. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11498. %@NL@%
  11499. %@CR:MCVF0001@%%@4@%The Microsoft Library Manager (LIB) is a utility designed to help you%@EH@%
  11500. create, organize, and maintain run-time libraries. "Run-time" libraries are
  11501. collections of compiled or assembled functions that provide a common set of
  11502. useful routines. After you have linked a program with a run-time library
  11503. file, that program can call a run-time routine exactly as if the function
  11504. were included in the program. The call to the run-time routine is resolved
  11505. by finding that routine in the library file.%@NL@%
  11506. %@NL@%
  11507. %@CR:MCVF0002@%%@4@%Run-time libraries are created by combining separately compiled object files%@EH@%
  11508. into one library file. Library files are usually identified by their .LIB
  11509. extension, although other extensions are allowed.%@NL@%
  11510. %@NL@%
  11511. %@CR:MCVF0003@%%@4@%In addition to accepting DOS object files and library files, LIB can read%@EH@%
  11512. the contents of 286 XENIX(R) archives and Intel-style libraries and combine
  11513. their contents with DOS libraries. To see how you can add the contents of a
  11514. 286 XENIX archive or an Intel-style library to a DOS library, refer to
  11515. Section 15.2.8%@BO:   ab138@%, "Combining Libraries."%@NL@%
  11516. %@NL@%
  11517. %@CR:MCVF0004@%%@4@%Using LIB, you can create a new library file, add object files to an%@EH@%
  11518. existing library, delete library modules, replace library modules, and
  11519. create object files from library modules. LIB also lets you combine the
  11520. contents of two libraries into one library file.%@NL@%
  11521. %@NL@%
  11522. %@CR:MCVF0005@%%@4@%The command syntax is straightforward: you can give LIB all the input it%@EH@%
  11523. requires directly from the command line. You can also use one of the two
  11524. alternative methods of invoking LIB by responding to prompts or by creating
  11525. a response file, described in Sections 15.1.2%@BO:   a74a1@% and 15.1.3%@BO:   a8274@% below.%@NL@%
  11526. %@NL@%
  11527. %@NL@%
  11528. %@CR:MCVF1000@%%@2@%%@AB@%15.1  Managing Libraries%@AE@%%@EH@%%@NL@%
  11529. %@NL@%
  11530. %@CR:MCVF1001@%%@4@%You run LIB by typing the LIB command on the DOS command line. You can%@EH@%
  11531. specify the input required for this command in one of three ways:%@NL@%
  11532. %@NL@%
  11533. %@CR:MCVF1002@%  1. By placing it on the command line%@NL@%
  11534. %@NL@%
  11535.   2. By responding to prompts%@NL@%
  11536. %@NL@%
  11537.   3. By specifying a file containing responses to prompts (This type of file%@NL@%
  11538.      is known as a "response file.")%@NL@%
  11539. %@NL@%
  11540. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11541. %@AI@%NOTE%@AE@%%@NL@%
  11542.    Once an object file is incorporated into a library, it becomes an object%@NL@%
  11543.    "module." %@AB@%LIB%@AE@% makes a distinction between object files and object%@NL@%
  11544.    modules: an object "file" exists as an independent file, while an object%@NL@%
  11545.    "module" is part of a larger library file. An object file can have a full%@NL@%
  11546.    path name, including a drive designation, directory path name, and%@NL@%
  11547.    file-name extension (usually .OBJ). Object modules have only a name. For%@NL@%
  11548.    example, %@AS@%B:\RUN\SORT.OBJ%@AE@% is an object-file name, while %@AS@%SORT%@AE@% is an%@NL@%
  11549.    object-module name.%@NL@%
  11550. ───────────────────────────────────────────────────────────────────────────%@NL@%
  11551. %@NL@%
  11552. %@NL@%
  11553. %@CR:MCVF1100@%%@3@%%@AB@%15.1.1  Managing Libraries with the LIB Command Line%@AE@%%@EH@%%@NL@%
  11554. %@NL@%
  11555. %@CR:MCVF1101@%%@4@%You can start LIB and specify all the input it needs from the command line.%@EH@%
  11556. In this case, the LIB command line has the following form:%@NL@%
  11557. %@NL@%
  11558.      %@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@%
  11559. %@NL@%
  11560. %@CR:MCVF1102@%%@4@%To tell LIB to use the default responses for the remaining fields, use a%@EH@%
  11561. semicolon (%@AB@%;%@AE@%) after any field except the %@AI@%oldlibrary%@AE@% field. The semicolon
  11562. should be the last character on the command line.%@NL@%
  11563. %@NL@%
  11564. %@CR:MCVF1103@%%@4@%Sections 15.1.1.1%@BO:   a3d1a@%-15.1.1.5 below describe the input you give in each%@EH@%
  11565. command-line field.%@NL@%
  11566. %@NL@%
  11567. %@CR:MCVF1110@%%@4@%%@AB@%15.1.1.1  Specifying the Library File%@AE@%%@EH@%%@NL@%
  11568. %@NL@%
  11569. %@CR:MCVF1111@%%@4@%%@AB@%Field%@AE@%%@EH@%%@NL@%
  11570. %@NL@%
  11571.      %@AI@%oldlibrary%@AE@%«%@AB@%;%@AE@%»%@NL@%
  11572. %@NL@%
  11573. %@CR:MCVF1112@%%@4@%The %@AI@%oldlibrary%@AE@% field allows you to specify the name of the existing library%@EH@%
  11574. to be used. Usually library files are named with the .LIB extension. You can
  11575. omit the .LIB extension when you give the library-file name since LIB
  11576. assumes that the file-name extension is .LIB. If your library file does not
  11577. have the .LIB extension, be sure to include the extension when you give the
  11578. library-file name. Otherwise, LIB cannot find the file.%@NL@%
  11579. %@NL@%
  11580. %@CR:MCVF1113@%%@4@%Path names are allowed with the library-file name. You can give LIB the path%@EH@%
  11581. name of a library file in another directory or on another disk. There is no
  11582. default for this field. LIB produces an error message if you do not give a
  11583. file name.%@NL@%
  11584. %@NL@%
  11585. %@CR:MCVF1114@%%@4@%If you give the name of a library file that does not exist, LIB displays the%@EH@%
  11586. following prompt:%@NL@%
  11587. %@NL@%
  11588.      %@AS@%Library file does not exist. Create?%@AE@%%@NL@%
  11589. %@NL@%
  11590. %@CR:MCVF1115@%%@4@%Type Y to create the library file, or N to terminate LIB. This message is%@EH@%
  11591. suppressed if the nonexistent library name you give is followed immediately
  11592. by commands, a comma, or a semicolon.%@NL@%
  11593. %@NL@%
  11594. %@CR:MCVF1116@%%@4@%If you type a library name and follow it immediately with a semicolon (%@AB@%;%@AE@%),%@EH@%
  11595. LIB performs only a consistency check on the given library. A consistency
  11596. check tells you whether all the modules in the library are in usable form.
  11597. LIB prints a message only if it finds an invalid object module; no message
  11598. appears if all modules are intact.%@NL@%
  11599. %@NL@%
  11600. %@CR:MCVF1120@%%@4@%%@AB@%15.1.1.2  Specifying Options%@AE@%%@EH@%%@NL@%
  11601. %@NL@%
  11602. %@CR:MCVF1121@%%@4@%%@AB@%Field%@AE@%%@EH@%%@NL@%
  11603. %@NL@%
  11604.      «%@AI@%options%@AE@%»%@NL@%
  11605. %@NL@%
  11606. %@CR:MCVF1122@%%@4@%The following list gives the options available and the function of each:%@EH@%%@NL@%
  11607. %@CR:MCVF1123@%%@NL@%
  11608. %@TH:   49   3277  2 28 48 @%%@AB@%Option                      Function%@AE@%%@AB@%/PA%@AE@%«%@AB@%GESIZE%@AE@%»%@AB@%:%@AE@%%@AI@%number%@AE@%          This option allows you to specify the                            library-page size of a new library or change the                            library-page size of an existing library. The                            page size of a library affects the alignment of                            modules stored in the library. Modules in the                            library are always aligned to start at a                            position that is a multiple of the page size (in                            bytes) from the beginning of the file. The                            default page size for a new library is 16 bytes.                            See Section 15.2.11%@BO:   abfb6@%, "Setting the Library Page                            Size," for more information. The abbreviation                            for this option is /PA.%@AB@%/NOI%@AE@%«%@AB@%GNORECASE%@AE@%»             This option tells LIB not to ignore case when                            comparing symbols. By default, LIB ignores case.                            Using this option allows symbols that are the                            same except for case to be put in the same                            library. The abbreviation for this option is                            /NOI.                            Note that if a library is built with /NOI, the                            library is internally "marked" to indicate /NOI                            is%@AB@%%@AE@% in effect. All libraries built with earlier                            versions of LIB are not marked. If you combine                            multiple libraries, and any one of them is                            marked /NOI, then /NOI is assumed to be in                            effect for the output library.%@AB@%/I%@AE@%«%@AB@%GNORECASE%@AE@%»               This option tells LIB to ignore case when                            comparing symbols, as LIB does by default. Use                            this option when you are combining a library                            that is marked /NOI with others that are                            unmarked and want the new library to be                            unmarked. (See the explanation for the /NOI                            option above.) The abbreviation for this option                            is /I.%@AB@%/NOE%@AE@%«%@AB@%XTDICTIONARY%@AE@%»          This option is used to prevent LIB from creating                            an extended dictionary. The extended dictionary                            is used by LINK to speed up a library search.                            Without an extended dictionary, the .LIB                            extension is still a valid library, but LINK                            takes longer to find modules in this file. Use                            it if you get error messages %@AS@%U1172%@AE@% or %@AS@%U4158%@AE@%. The                            option /NOE «XTDICTIONARY» also occurs in                            LINK. In LINK the option means, "do not read an                            extended dictionary."%@TE:   49   3277  2 28 48 @%
  11609. %@NL@%
  11610. %@CR:MCVF1130@%%@4@%%@AB@%15.1.1.3  Giving LIB Commands%@AE@%%@EH@%%@NL@%
  11611. %@NL@%
  11612. %@CR:MCVF1131@%%@4@%%@AB@%Field%@AE@%%@EH@%%@NL@%
  11613. %@NL@%
  11614.      «%@AI@%commands%@AE@%»%@NL@%
  11615. %@NL@%
  11616. %@CR:MCVF1132@%%@4@%The %@AI@%commands%@AE@% field allows you to specify the command symbols for%@EH@%
  11617. manipulating modules. To use this field, type a command symbol (such as%@AB@%+%@AE@%, %@AB@%-%@AE@%,
  11618. %@AB@%-+%@AE@%, %@AB@%*%@AE@%, or %@AB@%-*%@AE@%), followed immediately by a module name or an object-file name.
  11619. You can specify more than one operation in this field in any order. LIB does
  11620. not make any changes to %@AI@%oldlibrary%@AE@% if you leave the %@AI@%commands%@AE@% field blank.%@NL@%
  11621. %@CR:MCVF1133@%%@NL@%
  11622. %@TH:   57   3628  3 28 48 @%%@AB@%Command%@AE@%%@AB@%Symbol                       Meaning%@AE@%%@AB@%+%@AE@%                           The add command symbol. A plus sign makes an                            object file the last module in the library file.                            Immediately following the plus sign, give the                            name of the object file. You may use path names                            for the object file. LIB automatically supplies                            the .OBJ extension so you can omit the extension                            from the object-file name.                            You can also use the plus sign to combine two                            libraries. When you give a library name                            following the plus sign, a copy of the contents                            of the given library is added to the library                            file being modified. You must include the .LIB                            extension when you give a library-file name.                            Otherwise, LIB uses the default .OBJ extension                            when it looks for the file.%@AB@%-%@AE@%                           The delete command symbol. A minus sign deletes                            a module from the library file. Immediately                            following the minus sign, give the name of the                            module to be deleted. A module name has no path                            name and no extension.%@AB@%-+%@AE@%                          The replace command symbol. A minus sign                            followed by a plus sign replaces a module in the                            library. Following the replacement symbol, give                            the name of the module to be replaced. Module                            names have no path names and no extensions.                            To replace a module, LIB deletes the given                            module, then appends the object file having the                            same name as the module. The object file is                            assumed to have an .OBJ extension and to reside                            in the current working directory.%@AB@%*%@AE@%                           The copy command symbol. An asterisk followed by                            a module name copies a module from the library                            file into an object file of the same name. The                            module remains in the library file. When LIB                            copies the module to an object file, it adds to                            the module name the .OBJ extension and the drive                            designation and path name of the current working                            directory, thus forming a complete object-file                            name. You cannot override the .OBJ extension,                            drive designation, or path name given to the                            object file. However, you can later rename the                            file or copy it to any location you like.%@AB@%-*%@AE@%                          The move command symbol. A minus sign followed                            moves an object module from the library file to                            an object file. This operation is equivalent to                            copying the module to an object file, as                            described above, then deleting the module from                            the library.%@TE:   57   3628  3 28 48 @%%@NL@%
  11623. %@CR:MCVF1140@%%@4@%%@AB@%15.1.1.4  Specifying a Cross-Reference-Listing File%@AE@%%@EH@%%@NL@%
  11624. %@NL@%
  11625. %@CR:MCVF1141@%%@4@%%@AB@%Field%@AE@%%@EH@%%@NL@%
  11626. %@NL@%
  11627.      «%@AI@%listfile%@AE@%»%@NL@%
  11628. %@NL@%
  11629. %@CR:MCVF1142@%%@4@%The %@AI@%listfile%@AE@% field allows you to specify a file name for a%@EH@%
  11630. cross-reference-listing file. You can specify a full path name for the
  11631. listing file to cause it to be created outside your current working
  11632. directory. You can give the listing file any name and any extension. LIB
  11633. does not supply a default extension if you omit the extension. The default
  11634. when you omit the response to this prompt is the special file named  NUL,
  11635. which tells LIB not to create a listing file.%@NL@%
  11636. %@NL@%
  11637. %@CR:MCVF1143@%%@4@%A cross-reference-listing file contains the following two lists:%@EH@%%@NL@%
  11638. %@NL@%
  11639. %@CR:MCVF1144@%  1. An alphabetical list of all public symbols in the library.%@NL@%
  11640. %@NL@%
  11641.      Each symbol name is followed by the module name in which it is%@NL@%
  11642.      referenced.%@NL@%
  11643. %@NL@%
  11644.   2. A list of the modules in the library.%@NL@%
  11645. %@NL@%
  11646.      Under each module name is an alphabetical listing of the public symbols%@NL@%
  11647.      defined in that module.%@NL@%
  11648. %@NL@%
  11649. %@CR:MCVF1150@%%@4@%%@AB@%15.1.1.5  Specifying an Output Library%@AE@%%@EH@%%@NL@%
  11650. %@NL@%
  11651. %@CR:MCVF1151@%%@4@%%@AB@%Field%@AE@%%@EH@%%@NL@%
  11652. %@NL@%
  11653.      «%@AI@%newlibrary%@AE@%»%@NL@%
  11654. %@NL@%
  11655. %@CR:MCVF1152@%%@4@%The %@AI@%newlibrary%@AE@% field allows you to specify the name of the new library file%@EH@%
  11656. that contains the specified changes. You need not give this name unless you
  11657. specify changes to the library in the %@AI@%commands%@AE@% field. The default is the
  11658. current library-file name.%@NL@%
  11659. %@NL@%
  11660. %@CR:MCVF1153@%%@4@%If you do not specify a new library-file name, the original, unmodified%@EH@%
  11661. library is saved in a library file with the same name but with a .BAK
  11662. extension replacing the .LIB extension.%@NL@%
  11663. %@NL@%
  11664. %@CR:MCVF1154@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  11665. %@NL@%
  11666.      LIB LANG-+HEAP;%@NL@%
  11667. %@NL@%
  11668. %@CR:MCVF1155@%%@4@%The example above uses the replace command symbol (%@AB@%-+%@AE@%) to instruct LIB to%@EH@%
  11669. replace the %@AS@%HEAP%@AE@% module in the library %@AS@%LANG.LIB%@AE@%. LIB deletes the %@AS@%HEAP%@AE@%
  11670. module from the library, then appends the object file %@AS@%HEAP.OBJ%@AE@% as a new
  11671. module in the library. The semicolon at the end of the command line tells
  11672. LIB to use the default responses for the remaining prompts. This means no
  11673. listing file is created and the changes are written to the original library
  11674. file instead of a new library file.%@NL@%
  11675. %@NL@%
  11676.      LIB LANG-HEAP+HEAP;%@NL@%
  11677. %@NL@%
  11678.      LIB LANG+HEAP-HEAP;%@NL@%
  11679. %@NL@%
  11680. %@CR:MCVF1156@%%@4@%The examples above perform the same function as the first example in this%@EH@%
  11681. section, but in two separate operations, using the add (%@AB@%+%@AE@%) and delete (%@AB@%-%@AE@%)
  11682. command symbols. The effect is the same for these examples because delete
  11683. operations are always carried out before add operations, regardless of the
  11684. order of the operations in the command line. This order of execution
  11685. prevents confusion when a new version of a module replaces an old version in
  11686. the library file.%@NL@%
  11687. %@NL@%
  11688.      LIB FOR;%@NL@%
  11689. %@NL@%
  11690. %@CR:MCVF1157@%%@4@%The example above causes LIB to perform a consistency check of the library%@EH@%
  11691. file %@AS@%FOR.LIB%@AE@%. No other action is performed. LIB displays any consistency
  11692. errors it finds and returns to the operating-system level.%@NL@%
  11693. %@NL@%
  11694.      LIB LANG,LCROSS.PUB%@NL@%
  11695. %@NL@%
  11696. %@CR:MCVF1158@%%@4@%This example tells LIB to perform a consistency check of the library file%@EH@%
  11697. %@AS@%LANG.LIB%@AE@% and then create a cross-reference-listing file named %@AS@%LCROSS.PUB%@AE@%.%@NL@%
  11698. %@NL@%
  11699.      LIB FIRST -*STUFF *MORE, ,SECOND%@NL@%
  11700. %@NL@%
  11701. %@CR:MCVF1159@%%@4@%This last example instructs LIB to move the module %@AS@%STUFF%@AE@% from the library%@EH@%
  11702. %@AS@%FIRST.LIB%@AE@% to an object file called %@AS@%STUFF.OBJ%@AE@%. The module %@AS@%STUFF%@AE@% is removed
  11703. from the library in the process. The module %@AS@%MORE%@AE@% is copied from the library
  11704. to an object file called %@AS@%MORE.OBJ%@AE@%; the module remains in the library. The
  11705. revised library is called %@AS@%SECOND.LIB%@AE@%. It contains all the modules in
  11706. %@AS@%FIRST.LIB%@AE@% except %@AS@%STUFF%@AE@%,  which was removed by using the move command symbol
  11707. (%@AB@%-*%@AE@%). The original library, %@AS@%FIRST.LIB%@AE@%, remains unchanged.%@NL@%
  11708. %@NL@%
  11709. %@NL@%
  11710. %@CR:MCVF1200@%%@3@%%@AB@%15.1.2  Managing Libraries with the LIB Prompts%@AE@%%@EH@%%@NL@%
  11711. %@NL@%
  11712. %@CR:MCVF1201@%%@4@%If you want to respond to individual prompts to give input to LIB, start LIB%@EH@%
  11713. at the DOS command level by typing LIB. The library manager prompts you for
  11714. the input it needs by displaying the following four messages, one at a time:%@NL@%
  11715. %@NL@%
  11716.      Library name:%@NL@%
  11717.      Operations:%@NL@%
  11718.      List file:%@NL@%
  11719.      Output library:%@NL@%
  11720. %@NL@%
  11721. %@CR:MCVF1202@%%@4@%LIB waits for you to respond to each prompt, then prints the next prompt.%@EH@%%@NL@%
  11722. %@NL@%
  11723. %@CR:MCVF1203@%%@4@%The responses you give to the LIB command prompts correspond to the fields%@EH@%
  11724. on the LIB command line. (See Section 15.1.1%@BO:   a39b0@% for a discussion of the LIB
  11725. command line.) The following list shows these correspondences:%@NL@%
  11726. %@NL@%
  11727. %@CR:MCVF1204@%%@AB@%Prompt                      Command-Line Field%@AE@%%@NL@%
  11728. %@NL@%
  11729. %@AS@%Library name%@AE@%                The %@AI@%oldlibrary%@AE@% field and the options (see%@NL@%
  11730.                             Sections 15.1.1.1%@BO:   a3d1a@% and 15.1.1.2%@BO:   a4409@%, respectively).%@NL@%
  11731.                             If you want to perform a consistency check on%@NL@%
  11732.                             the library, type a semicolon (%@AB@%;%@AE@%) immediately%@NL@%
  11733.                             after the library name.%@NL@%
  11734. %@NL@%
  11735. %@AS@%Operations%@AE@%                  Any of the commands allowed in the %@AI@%commands%@AE@%%@NL@%
  11736.                             field (see Section 15.1.1.3%@BO:   a522b@%).%@NL@%
  11737. %@NL@%
  11738. %@AS@%List file%@AE@%                   The %@AI@%listfile%@AE@% field (see Section 15.1.1.4%@BO:   a6337@%).%@NL@%
  11739. %@NL@%
  11740. %@AS@%Output library%@AE@%              The %@AI@%newlibrary%@AE@% field (see Section 15.1.1.5%@BO:   a67e6@%).%@NL@%
  11741. %@NL@%
  11742. %@CR:MCVF1210@%%@4@%%@AB@%15.1.2.1  Extending Lines%@AE@%%@EH@%%@NL@%
  11743. %@NL@%
  11744. %@CR:MCVF1211@%%@4@%If you have many operations to perform during a library session, use the%@EH@%
  11745. ampersand command symbol (%@AB@%&%@AE@%) to extend the operations line. Give the
  11746. ampersand symbol after an object-module or object-file name; do not put the
  11747. ampersand between an operation's symbol and a name.%@NL@%
  11748. %@NL@%
  11749. %@CR:MCVF1212@%%@4@%The ampersand causes LIB to repeat the %@AS@%Operations%@AE@% prompt, allowing you to%@EH@%
  11750. type more operations.%@NL@%
  11751. %@NL@%
  11752. %@CR:MCVF1220@%%@4@%%@AB@%15.1.2.2  Using Default Responses%@AE@%%@EH@%%@NL@%
  11753. %@NL@%
  11754. %@CR:MCVF1221@%%@4@%After any entry but the first, use a single semicolon (%@AB@%;%@AE@%) followed%@EH@%
  11755. immediately by a carriage return to select default responses to the
  11756. remaining prompts. You can use the semicolon command symbol with the
  11757. command-line and response-file methods of invoking LIB, but it is not
  11758. necessary since LIB supplies the default responses wherever you omit
  11759. responses.%@NL@%
  11760. %@NL@%
  11761. %@CR:MCVF1222@%%@4@%The following list shows the defaults for LIB prompts:%@EH@%%@NL@%
  11762. %@NL@%
  11763. %@CR:MCVF1223@%%@AB@%Prompt                      Default%@AE@%%@NL@%
  11764. %@NL@%
  11765. %@AS@%Operations%@AE@%                  No operation; no change to library file.%@NL@%
  11766. %@NL@%
  11767. %@AS@%List file%@AE@%                   The special file name NUL, which tells LIB not%@NL@%
  11768.                             to create a listing file.%@NL@%
  11769. %@NL@%
  11770. %@AS@%Output library%@AE@%              The current library name. Only if you specify at%@NL@%
  11771.                             least one operation at the %@AS@%Operations%@AE@% prompt%@NL@%
  11772.                             will this prompt appear.%@NL@%
  11773. %@NL@%
  11774. %@NL@%
  11775. %@CR:MCVF1300@%%@3@%%@AB@%15.1.3  Managing Libraries with a Response File%@AE@%%@EH@%%@NL@%
  11776. %@NL@%
  11777. %@CR:MCVF1301@%%@4@%To operate LIB with a response file, you must first set up the response file%@EH@%
  11778. and then type the following at the DOS command line:%@NL@%
  11779. %@NL@%
  11780.      %@AB@%LIB @%@AE@%%@AI@%responsefile%@AE@%%@NL@%
  11781. %@NL@%
  11782. %@CR:MCVF1302@%%@4@%The %@AI@%responsefile%@AE@% is the name of a response file. The response-file name can%@EH@%
  11783. be qualified with a drive and directory specification to name a response
  11784. file from a directory other than the current working directory.%@NL@%
  11785. %@NL@%
  11786. %@CR:MCVF1303@%%@4@%You can also enter the name of a response file at any position in a command%@EH@%
  11787. line or after any of the linker prompts. The input from the response file is
  11788. treated exactly as if it had been entered in command lines or after prompts.
  11789. A carriage-return and line-feed combination in the response file is treated
  11790. the same as pressing ENTER in response to a prompt or using a comma in a
  11791. command line.%@NL@%
  11792. %@NL@%
  11793. %@CR:MCVF1304@%%@4@%Before you use this method, you must set up a response file containing%@EH@%
  11794. responses to the LIB prompts. This method lets you conduct the library
  11795. session without typing responses to prompts at the keyboard.%@NL@%
  11796. %@NL@%
  11797. %@CR:MCVF1305@%%@4@%A response file has one text line for each prompt. Responses must appear in%@EH@%
  11798. the same order as the command prompts appear. Use command symbols in the
  11799. response file the same way you would use responses typed on the keyboard.
  11800. You can type an ampersand at the end of the response to the %@AS@%Operations%@AE@%
  11801. prompt and continue typing operations on the next line.%@NL@%
  11802. %@NL@%
  11803. %@CR:MCVF1306@%%@4@%When you run LIB with a response file, the prompts are displayed with the%@EH@%
  11804. responses from the response file. If the response file does not contain
  11805. responses for all the prompts, LIB uses the default responses.%@NL@%
  11806. %@NL@%
  11807. %@CR:MCVF1307@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  11808. %@NL@%
  11809.      LIBFOR%@NL@%
  11810.      +CURSOR+HEAP-HEAP*FOIBLES%@NL@%
  11811.      CROSSLST%@NL@%
  11812. %@NL@%
  11813. %@CR:MCVF1308@%%@4@%The contents of the above response file cause LIB to delete the module %@AS@%HEAP%@AE@%%@EH@%
  11814. from the %@AS@%LIBFOR.LIB%@AE@% library file, copy the module %@AS@%FOIBLES%@AE@%, place it in an
  11815. object file %@AS@%FOIBLES.OBJ%@AE@%, and append the object files %@AS@%CURSOR.OBJ%@AE@% and %@AS@%HEAP.OBJ%@AE@%
  11816. as the last two modules in the library. LIB creates a
  11817. cross-reference-listing file named %@AS@%CROSSLST%@AE@%.%@NL@%
  11818. %@NL@%
  11819. %@NL@%
  11820. %@CR:MCVF1400@%%@3@%%@AB@%15.1.4  Terminating the LIB Session%@AE@%%@EH@%%@NL@%
  11821. %@NL@%
  11822. %@CR:MCVF1401@%%@4@%You can press CTRL+C at any time during a library session to terminate the%@EH@%
  11823. session and return to DOS. If you notice that you have entered an incorrect
  11824. response at a previous prompt, you should press CTRL+C to exit LIB and begin
  11825. again. You can use the normal DOS editing keys to correct errors at the
  11826. current prompt.%@NL@%
  11827. %@NL@%
  11828. %@NL@%
  11829. %@CR:MCVF2000@%%@2@%%@AB@%15.2  Performing Library-Management Tasks with LIB%@AE@%%@EH@%%@NL@%
  11830. %@NL@%
  11831. %@CR:MCVF2001@%%@4@%You can perform a number of library-management functions with LIB, including%@EH@%
  11832. the following tasks:%@NL@%
  11833. %@NL@%
  11834. %@CR:MCVF2002@%  ■  Create a library file%@NL@%
  11835.   ■  Delete modules%@NL@%
  11836.   ■  Copy a module to a separate object file%@NL@%
  11837.   ■  Move a module out of a library and into an object file (extract module)%@NL@%
  11838.   ■  Append an object file as a module of a library%@NL@%
  11839.   ■  Replace a module in the library file with a new module%@NL@%
  11840.   ■  Produce a listing of all public symbols in the library modules%@NL@%
  11841. %@NL@%
  11842. %@CR:MCVF2003@%%@4@%For each library session, LIB reads and interprets the user's commands in%@EH@%
  11843. the order listed below. It determines whether a new library is being created
  11844. or an existing library is being examined or modified.%@NL@%
  11845. %@NL@%
  11846. %@CR:MCVF2004@%  1. LIB processes any deletion and move commands.%@NL@%
  11847. %@NL@%
  11848.      LIB does not actually delete modules from the existing file. Instead,%@NL@%
  11849.      it marks the selected modules for deletion, creates a new library file,%@NL@%
  11850.      and copies only the modules not marked for deletion into the new%@NL@%
  11851.      library file.%@NL@%
  11852. %@NL@%
  11853.   2. LIB processes any additional commands.%@NL@%
  11854. %@NL@%
  11855.      Like deletions, additions are not performed on the original library%@NL@%
  11856.      file. Instead, the additional modules are appended to the new library%@NL@%
  11857.      file. (If there were no deletion or move commands, a new library file%@NL@%
  11858.      would be created in the addition stage by copying the original library%@NL@%
  11859.      file.)%@NL@%
  11860. %@NL@%
  11861. %@CR:MCVF2005@%%@4@%As LIB carries out these commands, it reads the object modules in the%@EH@%
  11862. library, checks them for validity, and gathers the information necessary to
  11863. build a library index and a listing file. The linker uses the library index
  11864. to search the library.%@NL@%
  11865. %@NL@%
  11866. %@CR:MCVF2006@%%@4@%The listing file contains a list of all public symbols in the index and the%@EH@%
  11867. names of the modules in which they are defined. LIB produces the listing
  11868. file only if you ask for it during the library session.%@NL@%
  11869. %@NL@%
  11870. %@CR:MCVF2007@%%@4@%LIB never makes changes to the original library; it copies the library and%@EH@%
  11871. makes changes to the copy. Therefore, when you terminate LIB for any reason,
  11872. you do not lose your original file. It also means that when you run LIB,
  11873. enough space must be available on your disk for both the original library
  11874. file and the copy.%@NL@%
  11875. %@NL@%
  11876. %@CR:MCVF2008@%%@4@%When you change a library file, LIB lets you specify a different name for%@EH@%
  11877. the file containing the changes. If you use this option, the modified
  11878. library is stored under the name you give, and the original, unmodified
  11879. version is preserved under its own name. If you choose not to give a new
  11880. name, LIB gives the modified file the original library name, but keeps a
  11881. backup copy of the original library file. This copy has the extension .BAK
  11882. instead of .LIB.%@NL@%
  11883. %@NL@%
  11884. %@NL@%
  11885. %@CR:MCVF2100@%%@3@%%@AB@%15.2.1  Creating a Library File%@AE@%%@EH@%%@NL@%
  11886. %@NL@%
  11887. %@CR:MCVF2101@%%@4@%To create a new library file, give the name of the library file you want to%@EH@%
  11888. create in the %@AI@%oldlibrary%@AE@% field of the command line or at the %@AS@%Library name%@AE@%
  11889. prompt. LIB supplies the .LIB extension.%@NL@%
  11890. %@NL@%
  11891. %@CR:MCVF2102@%%@4@%The name of the new library file must not be the name of an existing file.%@EH@%
  11892. If it is, LIB assumes that you want to change the existing file. When you
  11893. give the name of a library file that does not currently exist, LIB displays
  11894. the following prompt:%@NL@%
  11895. %@NL@%
  11896.      %@AS@%Library file does not exist. Create?%@AE@%%@NL@%
  11897. %@NL@%
  11898. %@CR:MCVF2103@%%@4@%Type %@AS@%y%@AE@% to create the file, or %@AS@%n%@AE@% to terminate the library session. This%@EH@%
  11899. message is suppressed if the nonexistent library name you give is followed
  11900. immediately by commands, a comma, or a semicolon.%@NL@%
  11901. %@NL@%
  11902. %@CR:MCVF2104@%%@4@%You can specify a page size for the library when you create it. The default%@EH@%
  11903. page size is 16 bytes. See Section 15.2.11%@BO:   abfb6@%, "Setting the Library-Page Size,"
  11904. for a discussion of this option.%@NL@%
  11905. %@NL@%
  11906. %@CR:MCVF2105@%%@4@%Once you have given the name of the new library file, you can insert object%@EH@%
  11907. modules into the library by using the add +) in the %@AI@%commands%@AE@% field of the
  11908. command line or at the %@AS@%Operations%@AE@% prompt. You can also add the contents of
  11909. another library, if you wish. See Section 15.2.3%@BO:   aa52d@%, "Adding Library Modules,"
  11910. and Section 15.2.8%@BO:   ab138@%, "Combining Libraries," for a discussion of these
  11911. options.%@NL@%
  11912. %@NL@%
  11913. %@NL@%
  11914. %@CR:MCVF2200@%%@3@%%@AB@%15.2.2  Changing a Library File%@AE@%%@EH@%%@NL@%
  11915. %@NL@%
  11916. %@CR:MCVF2201@%%@4@%You can change an existing library file by giving the name of the library%@EH@%
  11917. file at the %@AS@%Library name%@AE@% prompt. All operations you specify in the
  11918. %@AI@%oldlibrary%@AE@% field of the command line or at the %@AS@%Operations%@AE@% prompt are
  11919. performed on that library.%@NL@%
  11920. %@NL@%
  11921. %@CR:MCVF2202@%%@4@%However, LIB lets you keep both the unchanged library file and the newly%@EH@%
  11922. changed version, if you like. You can do this by giving the name of a new
  11923. library file in the %@AI@%newlibrary%@AE@% field or at the %@AS@%Output library%@AE@% prompt. The
  11924. changed library file is stored under the new library-file name, while the
  11925. original library file remains unchanged.%@NL@%
  11926. %@NL@%
  11927. %@CR:MCVF2203@%%@4@%If you don't give a new file name, the changed version of the library file%@EH@%
  11928. replaces the original library file. Even in this case, LIB saves the
  11929. original, unchanged library file with the extension .BAK instead of .LIB.
  11930. Thus, at the end of the session you have two library files: the changed
  11931. version with the .LIB extension and the original, unchanged version with the
  11932. .BAK extension.%@NL@%
  11933. %@NL@%
  11934. %@NL@%
  11935. %@CR:MCVF2300@%%@3@%%@AB@%15.2.3  Adding Library Modules%@AE@%%@EH@%%@NL@%
  11936. %@NL@%
  11937. %@CR:MCVF2301@%%@4@%Use the add command symbol (%@AB@%+%@AE@%) in the %@AI@%commands%@AE@% field of the command line or%@EH@%
  11938. at the %@AS@%Operations%@AE@% prompt to add an object module to a library. Give the name
  11939. of the object file to be added without the .OBJ extension, immediately
  11940. following the plus sign.%@NL@%
  11941. %@NL@%
  11942. %@CR:MCVF2302@%%@4@%LIB strips the drive designation and the extension from the object-file%@EH@%
  11943. specification, leaving only the base name. This becomes the name of the
  11944. object module in the library. For example, if the object file %@AS@%B:\CURSOR%@AE@% is
  11945. added to a library file, the name of the corresponding object module is%@AE@%
  11946. %@AS@%CURSOR.%@AE@%%@NL@%
  11947. %@NL@%
  11948. %@CR:MCVF2303@%%@4@%Object modules are always added to the end of a library file.%@EH@%%@NL@%
  11949. %@NL@%
  11950. %@NL@%
  11951. %@CR:MCVF2400@%%@3@%%@AB@%15.2.4  Deleting Library Modules%@AE@%%@EH@%%@NL@%
  11952. %@NL@%
  11953. %@CR:MCVF2401@%%@4@%Use the delete command symbol (%@AB@%-+%@AE@%) in the %@AI@%commands%@AE@% field of the command line%@EH@%
  11954. or at the %@AS@%Operations%@AE@% prompt to delete an object module from a
  11955. library. After the minus sign, give the name of the module to be deleted. A
  11956. module name does not have a path name or extension; it is simply a name,
  11957. such as %@AS@%CURSOR%@AE@%.%@NL@%
  11958. %@NL@%
  11959. %@NL@%
  11960. %@CR:MCVF2500@%%@3@%%@AB@%15.2.5  Replacing Library Modules%@AE@%%@EH@%%@NL@%
  11961. %@NL@%
  11962. %@CR:MCVF2501@%%@4@%Use the replace command symbol (%@AB@%-+%@AE@%) in the %@AI@%commands%@AE@% field to replace a%@EH@%
  11963. module in the library. Following the replace command symbol, give the name
  11964. of the module to be replaced. Remember that module names do not have path
  11965. names or extensions.%@NL@%
  11966. %@NL@%
  11967. %@CR:MCVF2502@%%@4@%To replace a module, LIB deletes the given module, then appends the object%@EH@%
  11968. file having the same name as the module. The object file is assumed to have
  11969. an .OBJ extension and to reside in the current working directory.%@NL@%
  11970. %@NL@%
  11971. %@NL@%
  11972. %@CR:MCVF2600@%%@3@%%@AB@%15.2.6  Copying Library Modules%@AE@%%@EH@%%@NL@%
  11973. %@NL@%
  11974. %@CR:MCVF2601@%%@4@%To copy a module from the library file into an object file of the same name,%@EH@%
  11975. use the copy command symbol (%@AB@%*%@AE@%) followed by a module name in the %@AI@%commands%@AE@%
  11976. field. The module remains in the library file. When LIB copies the module to
  11977. an object file, it adds the .OBJ extension and the drive designation and
  11978. path name of the current working directory to the module name. This forms a
  11979. complete object-file name. You cannot override the .OBJ extension, drive
  11980. designation, or path name given to the object file, but you can later rename
  11981. the file or copy it to any location you like.%@NL@%
  11982. %@NL@%
  11983. %@NL@%
  11984. %@CR:MCVF2700@%%@3@%%@AB@%15.2.7  Moving Library Modules (Extracting)%@AE@%%@EH@%%@NL@%
  11985. %@NL@%
  11986. %@CR:MCVF2701@%%@4@%Use the move c field to move an object module from the library file to an%@EH@%
  11987. object file. This operation is equivalent to copying the module to an object
  11988. file, then deleting the module from the library.%@NL@%
  11989. %@NL@%
  11990. %@NL@%
  11991. %@CR:MCVF2800@%%@3@%%@AB@%15.2.8  Combining Libraries%@AE@%%@EH@%%@NL@%
  11992. %@NL@%
  11993. %@CR:MCVF2801@%%@4@%You can add another library by using the add command symbol (%@AB@%+%@AE@%) with a%@EH@%
  11994. library-file name instead of an object-file name in the %@AI@%commands%@AE@% field. In
  11995. the %@AI@%commands%@AE@% field or at the %@AS@%Operations%@AE@% prompt, give the add command symbol
  11996. (%@AB@%+%@AE@%) followed by the name of the library whose contents you wish to add to
  11997. the library being changed. When you use this option, you must include the
  11998. .LIB extension of the library-file name. Otherwise, LIB assumes that the
  11999. file is an object file and looks for the file with an .OBJ extension.%@NL@%
  12000. %@NL@%
  12001. %@CR:MCVF2802@%%@4@%In addition to DOS libraries as input, LIB also accepts 286 XENIX archives%@EH@%
  12002. and Intel-format libraries. Therefore, you can use LIB to convert libraries
  12003. from either of these formats to the DOS format.%@NL@%
  12004. %@NL@%
  12005. %@CR:MCVF2803@%%@4@%LIB adds the modules of the library to the end of the library being changed.%@EH@%
  12006. Note that the added library still exists as an independent library. LIB
  12007. copies the modules without deleting them.%@NL@%
  12008. %@NL@%
  12009. %@CR:MCVF2804@%%@4@%Once you have added the contents of a library or libraries, you can save the%@EH@%
  12010. new, combined library under a new name by giving a new name in the
  12011. %@AI@%newlibrary%@AE@% field of the command line or at the %@AS@%Output library%@AE@% prompt. If you
  12012. omit the %@AS@%Output library%@AE@% response, LIB saves the combined library under the
  12013. name of the original library being changed. The original library is saved
  12014. with the same base name and the extension .BAK.%@NL@%
  12015. %@NL@%
  12016. %@NL@%
  12017. %@CR:MCVF2900@%%@3@%%@AB@%15.2.9  Creating a Cross-Reference-Listing File%@AE@%%@EH@%%@NL@%
  12018. %@NL@%
  12019. %@CR:MCVF2901@%%@4@%Create a cross-reference-listing file by giving a name for the listing file%@EH@%
  12020. in the %@AI@%listfile%@AE@% field of the command line or at the %@AS@%List file%@AE@% prompt. If you
  12021. do not give a listing-file name, LIB uses the special file name NUL, which
  12022. means no listing file is created.%@NL@%
  12023. %@NL@%
  12024. %@CR:MCVF2902@%%@4@%You can give the listing file any name and any extension. To cause the%@EH@%
  12025. listing file to be created outside your current working directory, you can
  12026. specify a full path name, including drive designation. LIB does not supply a
  12027. default extension if you omit the extension.%@NL@%
  12028. %@NL@%
  12029. %@CR:MCVF2903@%%@4@%A cross-reference-listing file contains two lists. The first is an%@EH@%
  12030. alphabetical listing of all public symbols in the library. Each symbol name
  12031. is followed by the name of the module in which it is referenced.%@NL@%
  12032. %@NL@%
  12033. %@CR:MCVF2904@%%@4@%The second list is an alphabetical list of the modules in the library. Under%@EH@%
  12034. each module name is an alphabetical listing of the public symbols referenced
  12035. in that module.%@NL@%
  12036. %@NL@%
  12037. %@NL@%
  12038. %@CR:MCVF2A00@%%@3@%%@AB@%15.2.10  Performing Consistency Checks%@AE@%%@EH@%%@NL@%
  12039. %@NL@%
  12040. %@CR:MCVF2A01@%%@4@%When you give only a library name followed by a semicolon in the %@AI@%oldlibrary%@AE@%%@EH@%
  12041. field of the command line or at the %@AS@%Library name%@AE@% prompt, LIB performs a
  12042. consistency check, displaying messages about any errors it finds. No changes
  12043. are made to the library. It is not usually necessary to perform consistency
  12044. checks since LIB automatically checks object files for consistency before
  12045. adding them to the library.%@NL@%
  12046. %@NL@%
  12047. %@CR:MCVF2A02@%%@4@%To produce a cross-reference-listing file with a consistency check, invoke%@EH@%
  12048. LIB, specify the library name followed by a semicolon, and give the name of
  12049. the listing file. LIB then performs the consistency check and creates the
  12050. cross-reference-listing file.%@NL@%
  12051. %@NL@%
  12052. %@NL@%
  12053. %@CR:MCVF2B00@%%@3@%%@AB@%15.2.11  Setting the Library-Page Size%@AE@%%@EH@%%@NL@%
  12054. %@NL@%
  12055. %@CR:MCVF2B01@%%@4@%You can set the library-page size while you are creating a library, and you%@EH@%
  12056. can change the page size of an existing library by adding a page-size option
  12057. after the library-file name in the LIB command line or after the new
  12058. library-file name at the %@AS@%Library name%@AE@% prompt. The option has the following
  12059. form:%@NL@%
  12060. %@NL@%
  12061.      %@AB@%/PA%@AE@%«%@AB@%GESIZE%@AE@%» %@AB@%:%@AE@%%@AI@%number%@AE@%%@NL@%
  12062. %@NL@%
  12063. %@CR:MCVF2B02@%%@4@%The %@AI@%number%@AE@% specifies the new page size. It must be an integer value%@EH@%
  12064. representing a power of 2 between the values 16 and 32,768.%@NL@%
  12065. %@NL@%
  12066. %@CR:MCVF2B03@%%@4@%The page size of a library affects the alignment of modules stored in the%@EH@%
  12067. library. Modules in the library are always aligned to start at a position
  12068. that is a multiple of the page size (in bytes) from the beginning of the
  12069. file. The default page size is 16 bytes for a new library or the current
  12070. page size for an existing library.%@NL@%
  12071. %@NL@%
  12072. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12073. %@AI@%NOTE%@AE@%%@NL@%
  12074.    Because of the indexing technique used by %@AB@%LIB%@AE@%, a library with a large page%@NL@%
  12075.    size can hold more modules than a library with a smaller page size.%@NL@%
  12076.    However, for each module in the library, an average of %@AI@%pagesize%@AE@%/2 bytes%@NL@%
  12077.    of storage space is wasted. In most cases, a small page size is%@NL@%
  12078.    advantageous; you should use a small page size unless you need to put a%@NL@%
  12079.    very large number of modules in a library.%@NL@%
  12080. %@NL@%
  12081.    Another consequence of this indexing technique is that the page size%@NL@%
  12082.    determines the maximum possible size of the %@AB@%.LIB%@AE@% file. Specifically,%@NL@%
  12083.    this limit is %@AI@%number%@AE@% %@AB@%*%@AE@% 65,536. For example, %@AS@%/P:16%@AE@% means that the %@AB@%.LIB%@AE@%%@NL@%
  12084.    file has to be smaller than 1 megabyte (16 %@AB@%*%@AE@% 65,536 bytes).%@NL@%
  12085. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12086. %@NL@%
  12087. %@NL@%
  12088. %@CR:MCVG0000@%%@1@%%@AB@%Chapter 16  NMAKE%@AE@%%@EH@%%@NL@%
  12089. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12090. %@NL@%
  12091. %@CR:MCVG0001@%%@4@%The Microsoft Program-Maintenance Utility (NMAKE) can save you time by%@EH@%
  12092. automating the process of updating project files. NMAKE compares the
  12093. modification dates for one set of files, the target files, to those of
  12094. another set of files, the dependent files. If any of the dependent files
  12095. have changed more recently than the target files, NMAKE executes a specified
  12096. series of commands.%@NL@%
  12097. %@NL@%
  12098. %@CR:MCVG0002@%%@4@%NMAKE is typically used by specifying a project's executable files as target%@EH@%
  12099. files and the project's source files as the dependent files. If any of the
  12100. source files have changed since the executable file was created, NMAKE can
  12101. issue a command to assemble or compile the changed source files and link
  12102. them into the executable file.%@NL@%
  12103. %@NL@%
  12104. %@CR:MCVG0003@%%@4@%NMAKE reads the target- and dependent-file specifications from a%@EH@%
  12105. "description file," also called a "makefile." The description file comprises
  12106. any number of description blocks. Each description block lists one or more
  12107. targets and the dependent files related to those targets. The block also
  12108. gives the commands that NMAKE must execute to bring the targets up to date.
  12109. The description file may also contain macros, inference rules, and
  12110. directives.%@NL@%
  12111. %@NL@%
  12112. %@NL@%
  12113. %@CR:MCVG1000@%%@2@%%@AB@%16.1  Invoking NMAKE%@AE@%%@EH@%%@NL@%
  12114. %@NL@%
  12115. %@CR:MCVG1001@%%@4@%Two methods for invoking NMAKE are available:%@EH@%%@NL@%
  12116. %@NL@%
  12117. %@CR:MCVG1002@%  1. Specify options, macro definitions, and the names of targets to be%@NL@%
  12118.      built on the DOS command line.%@NL@%
  12119. %@NL@%
  12120.   2. Specify options, macro definitions, and the names of targets to be%@NL@%
  12121.      built in a command file, and give the file name on the DOS command%@NL@%
  12122.      line.%@NL@%
  12123. %@NL@%
  12124. %@NL@%
  12125. %@CR:MCVG1100@%%@3@%%@AB@%16.1.1  Using a Command Line to Invoke NMAKE%@AE@%%@EH@%%@NL@%
  12126. %@NL@%
  12127. %@CR:MCVG1101@%%@4@%The syntax for invoking NMAKE from the command line is as follows:%@EH@%%@NL@%
  12128. %@NL@%
  12129.      NMAKE «%@AI@%options%@AE@%» «%@AI@%macrodefinitions%@AE@%» «%@AI@%target...%@AE@%» «%@AI@%filename%@AE@%»%@NL@%
  12130. %@NL@%
  12131. %@CR:MCVG1102@%%@4@%The %@AI@%options%@AE@% field specifies options that modify the action of NMAKE.%@EH@%
  12132. (Options are not required.) They are described in Section 16.2%@BO:   adfed@%.%@NL@%
  12133. %@NL@%
  12134. %@CR:MCVG1103@%%@4@%The optional %@AI@%macrodefinitions%@AE@% field lists macro definitions for NMAKE to%@EH@%
  12135. use. Macros provide a convenient method for replacing a string of text in
  12136. the description file. Macro definitions that contain spaces must be enclosed
  12137. by quotation marks. Macros are discussed in Section 16.3.2%@BO:   b1bf8@%.%@NL@%
  12138. %@NL@%
  12139. %@CR:MCVG1104@%%@4@%The optional %@AI@%target...%@AE@% field specifies the name of one or more targets to%@EH@%
  12140. build. If you do not list any targets, NMAKE builds the first target in the
  12141. description file.%@NL@%
  12142. %@NL@%
  12143. %@CR:MCVG1105@%%@4@%The optional %@AI@%filename%@AE@% field gives the name of the description file from%@EH@%
  12144. which NMAKE reads target- and dependent-file specifications and commands. A
  12145. better way of designating the description file is to use the /F option
  12146. (described in Section 16.2%@BO:   adfed@%). By default, NMAKE looks for a file named
  12147. MAKEFILE in the current directory. If MAKEFILE does not exist, NMAKE uses
  12148. the %@AI@%filename%@AE@% field; it interprets the first string on the command line that
  12149. is not an option or macro definition as the name of the description file,
  12150. provided its file-name extension isn't listed in the .SUFFIXES list. (See
  12151. Section 16.3.5%@BO:   b8373@% for more information on the .SUFFIXES list.)%@NL@%
  12152. %@NL@%
  12153. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12154. %@AI@%NOTE%@AE@%%@NL@%
  12155.    Unless you use the /F option, NMAKE always searches for a file named%@NL@%
  12156.    MAKEFILE in the current directory.%@NL@%
  12157. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12158. %@NL@%
  12159. %@CR:MCVG1106@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  12160. %@NL@%
  12161.      NMAKE /S "program = flash" sort.exe search.exe%@NL@%
  12162. %@NL@%
  12163. %@CR:MCVG1107@%%@4@%This example invokes NMAKE with the /S option, a macro assigning %@AS@%flash%@AE@% to%@EH@%
  12164. %@AS@%program%@AE@%, and two targets, %@AS@%sort.exe%@AE@% and %@AS@%search.exe%@AE@%. By default, NMAKE uses
  12165. the file named MAKEFILE as the description file.%@NL@%
  12166. %@NL@%
  12167. %@NL@%
  12168. %@CR:MCVG1200@%%@3@%%@AB@%16.1.2  Using a Command File to Invoke NMAKE%@AE@%%@EH@%%@NL@%
  12169. %@NL@%
  12170. %@CR:MCVG1201@%%@4@%To invoke NMAKE with a command file, first create the command file, then%@EH@%
  12171. issue a command with the following syntax:%@NL@%
  12172. %@NL@%
  12173.      NMAKE @%@AI@%commandfile%@AE@%%@NL@%
  12174. %@NL@%
  12175. %@CR:MCVG1202@%%@4@%Here %@AI@%commandfile%@AE@% is the name of a file containing the same information that%@EH@%
  12176. would be specified on the command line: options, macro definitions, and
  12177. targets. The command file is not the same as the description file.%@NL@%
  12178. %@NL@%
  12179. %@CR:MCVG1203@%%@4@%A command file is useful for invoking NMAKE with a long string of%@EH@%
  12180. command-line arguments, such as macro definitions, that might exceed the DOS
  12181. limit of 128 characters. NMAKE treats line breaks that occur between
  12182. arguments as spaces. Macro definitions can span multiple lines by ending
  12183. each line except the last with a backslash ( \). Macro definitions that
  12184. contain spaces must be enclosed by quotation marks, just as if they were
  12185. entered directly on the command line.%@NL@%
  12186. %@NL@%
  12187. %@CR:MCVG1204@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  12188. %@NL@%
  12189.      /S "program \%@NL@%
  12190.      = flash" sort.exe search.exe%@NL@%
  12191. %@NL@%
  12192. %@CR:MCVG1205@%%@4@%Assume a file named %@AS@%update%@AE@% contains the text above. The command below%@EH@%
  12193. invokes NMAKE with the description file MAKEFILE, the /S option, the macro
  12194. definition %@AS@%program = flash%@AE@%, and the targets %@AS@%sort.exe%@AE@% and %@AS@%search.exe%@AE@%. Note
  12195. that the backslash ending the line allows the macro definition to span two
  12196. lines.%@NL@%
  12197. %@NL@%
  12198.      NMAKE @update%@NL@%
  12199. %@NL@%
  12200. %@NL@%
  12201. %@CR:MCVG2000@%%@2@%%@AB@%16.2  NMAKE Options%@AE@%%@EH@%%@NL@%
  12202. %@NL@%
  12203. %@CR:MCVG2001@%%@4@%NMAKE accepts a number of command-line options, which are listed below. You%@EH@%
  12204. may specify options in uppercase or lowercase and use either a slash or
  12205. dash. For example, -B, /B, -b, and /b all represent the same option.%@NL@%
  12206. %@CR:MCVG2002@%%@NL@%
  12207. %@TH:   64   3395  2 27 49 @%%@CR:MCVG3252@%%@AB@%Option                     Action%@AE@%/A                         Executes commands to build all the targets                           requested even if they are not out of date./C                         Suppresses the NMAKE copyright message and                           prevents nonfatal error or warning messages from                           being displayed./D                         Displays the modification date of each file when                           the date is checked./E                         Causes environment variables to override macro                           definitions within description files./F %@AI@%filename%@AE@%                Specifies %@AI@%filename%@AE@% as the name of the description                           file to use. If a dash (-) is entered instead of                           a file name, NMAKE accepts input from the                           standard input device instead of using a                           description file.                           If /F is not specified, NMAKE uses the file named                           MAKEFILE as the description file. If MAKEFILE                           does not exist, NMAKE uses the first string on                           the command line that is not an option or macro                           definition as the name of the file, provided the                           extension is not listed in the .SUFFIXES list                           (see Section 16.3.5%@BO:   b8373@%)./I                         Ignores exit codes (also called return or                           "errorlevel" codes) returned by programs called                           from the NMAKE description file. NMAKE continues                           executing the rest of the description file                           despite the errors./N                         Displays the commands from the description file                           that NMAKE would execute but does not execute                           these commands. This option is useful for                           checking which targets are out of date and for                           debugging description files./P                         Prints all macro definitions and target                           descriptions./Q                         Returns a zero status code if the target is up to                           date and                           a nonzero status code if it is not. This option                           is useful when invoking NMAKE from within a batch                           file./R                         Ignores inference rules and macros contained in                           the TOOLS.INI file./S                         Does not display commands as they are executed./T                         Changes the modification dates for out-of-date                           target files to the current date. The file                           contents are not                           modified./X %@AI@%filename%@AE@%                Sends all error output to %@AI@%filename%@AE@%, which can be                           either a file or a device. If a dash (-) is                           entered instead of a file name, the error output                           is sent to the standard output device.%@TE:   64   3395  2 27 49 @%
  12208. %@NL@%
  12209. %@CR:MCVG2003@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  12210. %@NL@%
  12211.      NMAKE /f quick /c f1 f2%@NL@%
  12212. %@NL@%
  12213. %@CR:MCVG2004@%%@4@%The example above causes NMAKE to execute the commands in the description%@EH@%
  12214. file %@AS@%quick%@AE@% to update the targets %@AS@%f1%@AE@% and %@AS@%f2%@AE@%. The /c option prevents NMAKE
  12215. from displaying nonfatal error messages and warnings.%@NL@%
  12216. %@NL@%
  12217.      NMAKE  /D /N f1 f1.mak%@NL@%
  12218. %@NL@%
  12219. %@CR:MCVG2005@%%@4@%In the example above, NMAKE updates the target %@AS@%f1%@AE@%. If the current directory%@EH@%
  12220. does not contain a file named MAKEFILE, NMAKE reads the file %@AS@%f1.mak%@AE@% as the
  12221. description file. The /D option displays the modification date of each file
  12222. and the /N option displays the commands without executing them.%@NL@%
  12223. %@NL@%
  12224. %@NL@%
  12225. %@CR:MCVG3000@%%@2@%%@AB@%16.3  Description Files%@AE@%%@EH@%%@NL@%
  12226. %@NL@%
  12227. %@CR:MCVG3001@%%@4@%NMAKE reads a description file to determine what to do. The description file%@EH@%
  12228. may contain any number of description blocks, along with macros, inference
  12229. rules, and directives. These can be in any order.%@NL@%
  12230. %@NL@%
  12231. %@CR:MCVG3002@%%@4@%When NMAKE runs, it builds the first target in the description file by%@EH@%
  12232. default. You can override this default by specifying on the command line the
  12233. names of the targets to build.%@NL@%
  12234. %@NL@%
  12235. %@CR:MCVG3003@%%@4@%The sections that follow describe the elements of a description file.%@EH@%%@NL@%
  12236. %@NL@%
  12237. %@NL@%
  12238. %@CR:MCVG3100@%%@3@%%@AB@%16.3.1  Description Blocks%@AE@%%@EH@%%@NL@%
  12239. %@NL@%
  12240. %@CR:MCVG3101@%%@4@%An NMAKE description file contains one or more description blocks. Each has%@EH@%
  12241. the following form:%@NL@%
  12242. %@NL@%
  12243.     %@CR:MCVG3102@%%@AI@%target... %@AB@%:%@AE@% «%@AI@%dependent%@AE@%...» «%@AB@%;%@AE@% %@AI@%command%@AE@%»«%@AB@%#%@AE@%%@AI@%comment%@AE@%»%@NL@%
  12244.     «%@AI@%command%@AE@%» «%@AB@%#%@AE@%%@AI@%comment%@AE@%» «%@AB@%#%@AE@%%@AI@%comment%@AE@%»  |  «%@AI@%command%@AE@%»      .      .      .%@NL@%
  12245. %@NL@%
  12246. %@CR:MCVG3103@%%@4@%The file to be updated is target; %@AI@%dependent%@AE@% is a file upon which %@AI@%target%@AE@%%@EH@%
  12247. depends; %@AI@%command%@AE@% target; and %@AI@%comment%@AE@% documents what is happening. The line
  12248. containing %@AI@%target%@AE@% and %@AI@%dependent%@AE@% is called the dependency line because %@AI@%target%@AE@%
  12249. depends on %@AI@%dependent%@AE@%.%@NL@%
  12250. %@NL@%
  12251. %@CR:MCVG3104@%%@4@%Each component of a description block is discussed below.%@EH@%%@NL@%
  12252. %@NL@%
  12253. %@CR:MCVG3110@%%@4@%%@AB@%The Target Field%@AE@%%@EH@%%@NL@%
  12254. %@NL@%
  12255. %@CR:MCVG3111@%%@4@%The %@AI@%target%@AE@% field specifies the name of one or more files to update. If you%@EH@%
  12256. specify more than one file, separate the file names by a space. The first
  12257. target name must start in the first column of the line; it may not be
  12258. preceded by any tabs or spaces. Note that the target need not be a file; it
  12259. may be a pseudotarget, as described in Section 16.3.5%@BO:   b8373@%. A target name can
  12260. have a complete path specification, i.e., drive: path filename.ext. If a
  12261. target name is a single letter, then a space must be inserted before the ":"
  12262. to avoid confusion with a path name, such as "a:".%@NL@%
  12263. %@NL@%
  12264. %@CR:MCVG3120@%%@4@%%@AB@%The Dependent Field%@AE@%%@EH@%%@NL@%
  12265. %@NL@%
  12266. %@CR:MCVG3121@%%@4@%The %@AI@%dependent%@AE@% field lists one or more files on which the target depends. If%@EH@%
  12267. you specify more than one file, separate the file names by a space. You can
  12268. specify directories for NMAKE to search for the dependent files by using the
  12269. following form:%@NL@%
  12270. %@NL@%
  12271.      %@AI@%target%@AE@% : {%@AI@%directory1%@AE@%;%@AI@%directory2...%@AE@%}%@AI@%dependent%@AE@%%@NL@%
  12272. %@NL@%
  12273. %@CR:MCVG3122@%%@4@%NMAKE searches the current directory first, then %@AI@%directory1%@AE@%, %@AI@%directory2%@AE@%, and%@EH@%
  12274. so on. If %@AI@%dependent%@AE@% cannot be found in any of these directories, NMAKE looks
  12275. for an inference rule to create the dependent in the current directory. See
  12276. Section 16.3.3%@BO:   b4fe0@% for more information on inference rules.%@NL@%
  12277. %@NL@%
  12278. %@CR:MCVG3123@%%@4@%In the following example, NMAKE first searches the current directory for%@EH@%
  12279. %@AS@%pass.obj%@AE@%, then the %@AS@%\src\alpha%@AE@% directory, and finally the %@AS@%d:\proj%@AE@% directory:%@NL@%
  12280. %@NL@%
  12281.      forward.exe : {\src\alpha;d:\proj}pass.obj%@NL@%
  12282. %@NL@%
  12283. %@CR:MCVG3130@%%@4@%%@AB@%TheCommand Field%@AE@%%@EH@%%@NL@%
  12284. %@NL@%
  12285. %@CR:MCVG3131@%%@4@%The %@AI@%command%@AE@% is used to update the target. This can be any command that can%@EH@%
  12286. be issued on the DOS command line. A semicolon must precede the command if
  12287. it is given on the same line as the target and dependent files. Commands may
  12288. be placed on separate lines following the dependency line, but each line
  12289. must start with at least one space or tab character. Blank lines may be
  12290. intermixed with commands. A long command may span several lines if each line
  12291. ends with a backslash (\). If no commands are specified, NMAKE looks for an
  12292. inference rule to build the target.%@NL@%
  12293. %@NL@%
  12294. %@CR:MCVG3140@%%@4@%%@AB@%The Comment Field%@AE@%%@EH@%%@NL@%
  12295. %@NL@%
  12296. %@CR:MCVG3141@%%@4@%NMAKE considers any text between a number sign (#) and a new-line character%@EH@%
  12297. to be a comment and ignores it. You may place a comment on a line by itself
  12298. or at the end of any line except a command line. In the command section of
  12299. the description file, comments must start in the first column.%@NL@%
  12300. %@NL@%
  12301. %@CR:MCVG3150@%%@4@%%@AB@%Wild-Card Characters%@AE@%%@EH@%%@NL@%
  12302. %@NL@%
  12303. %@CR:MCVG3151@%%@4@%You can use the DOS wild-card characters (* and ?) when specifying target-%@EH@%
  12304. and dependent-file names. NMAKE expands wild cards in target names when it
  12305. reads the description file. It expands wild cards in the dependent names
  12306. when it builds the target. For example, the following description block
  12307. compiles all source files with the .C extension:%@NL@%
  12308. %@NL@%
  12309.      astro.exe : *.c%@NL@%
  12310.           QCL *.c%@NL@%
  12311. %@NL@%
  12312. %@CR:MCVG3160@%%@4@%%@AB@%Escape Character%@AE@%%@EH@%%@NL@%
  12313. %@NL@%
  12314. %@CR:MCVG3161@%%@4@%You can use a caret (^) to escape any DOS or OS/2 file-name character in a%@EH@%
  12315. description file, so that the character takes on its literal meaning and
  12316. does not have any special significance to NMAKE. Specifically, the caret
  12317. escapes the following characters:%@NL@%
  12318. %@NL@%
  12319.      %@CR:MCVG3162@%%@4@%# ( ) $ ^ \ { } ! @ -%@EH@%%@NL@%
  12320. %@NL@%
  12321. %@CR:MCVG3163@%%@4@%For example, NMAKE interprets the specification%@EH@%%@NL@%
  12322. %@NL@%
  12323.      big^#.c%@NL@%
  12324. %@NL@%
  12325. %@CR:MCVG3164@%%@4@%as the file name%@EH@%%@NL@%
  12326. %@NL@%
  12327.      big#.c%@NL@%
  12328. %@NL@%
  12329. %@CR:MCVG3165@%%@4@%Using the caret, you can include a literal new-line character in a%@EH@%
  12330. description file. This capability is primarily useful in macro definitions,
  12331. as in the following example:%@NL@%
  12332. %@NL@%
  12333.      XYZ=abc^%@NL@%
  12334.      def%@NL@%
  12335. %@NL@%
  12336. %@CR:MCVG3166@%%@4@%NMAKE interprets this example as if you had assigned to the XYZ macro the%@EH@%
  12337. C-style string %@AS@%abc\ndef%@AE@%. Note that this effect differs from the use of the
  12338. backslash (\) to continue a line. A new-line character that follows a
  12339. backslash is replaced with a space.%@NL@%
  12340. %@NL@%
  12341. %@CR:MCVG3167@%%@4@%NMAKE ignores a caret that is not followed by any of the characters%@EH@%
  12342. mentioned above, as in the following:%@NL@%
  12343. %@NL@%
  12344.      mno ^: def%@NL@%
  12345. %@NL@%
  12346. %@CR:MCVG3168@%%@4@%In this case, NMAKE ignores the caret and treats the line as%@EH@%%@NL@%
  12347. %@NL@%
  12348.      mno : def%@NL@%
  12349. %@NL@%
  12350. %@CR:MCVG3169@%%@4@%Carets that appear within quotation marks are not treated as escape%@EH@%
  12351. characters.%@NL@%
  12352. %@NL@%
  12353. %@CR:MCVG3170@%%@4@%%@AB@%16.3.1.2  Modifying Commands%@AE@%%@EH@%%@NL@%
  12354. %@NL@%
  12355. %@CR:MCVG3171@%%@4@%Three different characters may be placed in front of a command to modify its%@EH@%
  12356. effect. The character must be preceded by at least one space, and spaces may
  12357. separate the character from the command. You may use more than one character
  12358. to modify a single command. The characters are listed below.%@NL@%
  12359. %@CR:MCVG3172@%%@NL@%
  12360. %@TH:   42   2184  2 27 49 @%%@AB@%Character                  Action%@AE@%Dash (-)                   Turns off error checking for the command. If the                           dash is followed by a number, NMAKE halts only if                           the error level returned by the command is                           greater than the number. In the following                           example, if the program %@AS@%flash%@AE@% returned an error                           code NMAKE would not halt, but would continue to                           execute commands:                           %@AS@%light.lst:light.txt%@AE@%                           %@AS@%  -flash light.txt%@AE@%At sign(@)                 Prevents NMAKE from displaying the command as it                           executes. In the example below, NMAKE does not                           display the ECHO command line:                           %@AS@%sort.exe:sort.obj%@AE@%                           %@AS@%   @ECHO sorting%@AE@%                           The output of the ECHO command, however, appears                           as usual. (This modifier does not work with DOS                           2.1.)Exclamation                Causes the command to be executed for eachpoint (!)                  dependent file if the command uses one of the                           special macros $? or $**. The $? macro refers to                           all dependent files that are out of date with                           respect to the target, while $** refers to all                           dependent files in the description block. (See                           Section 16.3.2%@BO:   b1bf8@% for more information on macros.)                           For example,                           %@AS@%print: hop.asm skip.bas jump.c%@AE@%                           %@AS@%   !print $** lpt1:%@AE@%                           causes the following three commands to be                           generated:                           %@AS@%print hop.asm lpt1:%@AE@%                           %@AS@%print skip.bas lpt1:%@AE@%                           %@AS@%print jump.c lpt1:%@TE:   42   2184  2 27 49 @%
  12361. %@NL@%
  12362. %@CR:MCVG3180@%%@4@%%@AB@%16.3.1.3  Specifying a Target in Multiple Description Blocks%@AE@%%@EH@%%@NL@%
  12363. %@NL@%
  12364. %@CR:MCVG3181@%%@4@%You can specify more than one description block for the same target by using%@EH@%
  12365. two colons (::) as the separator instead of one. For example:%@NL@%
  12366. %@NL@%
  12367.      target.lib :: a.asm b.asm c.asm%@NL@%
  12368.         ML a.asm b.asm c.asm%@NL@%
  12369.         LIB target -+a.obj -+b.obj -+c.obj;%@NL@%
  12370.      target.lib :: d.c e.c%@NL@%
  12371.         QCL /c d.c e.c%@NL@%
  12372.         LIB target -+d.obj -+e.obj;%@NL@%
  12373. %@NL@%
  12374. %@CR:MCVG3182@%%@4@%These two description blocks both update the library named %@AS@%target.lib%@AE@%. If%@EH@%
  12375. any of the assembly-language files have changed more recently than the
  12376. library file, NMAKE executes the commands in the first block to assemble the
  12377. source files and update the library. Similarly, if any of the C-language
  12378. files have changed, NMAKE executes the second group of commands that compile
  12379. the C files and then update the library.%@NL@%
  12380. %@NL@%
  12381. %@CR:MCVG3183@%%@4@%If you use a single colon in the above example, NMAKE issues an error%@EH@%
  12382. message. It is legal, however, to use single colons if commands are listed
  12383. in only one block. In this case, dependency lines are cumulative. For
  12384. example,%@NL@%
  12385. %@NL@%
  12386.      target: jump.bas%@NL@%
  12387.      target: up.c%@NL@%
  12388.        %@AI@%commands%@AE@%%@NL@%
  12389. %@NL@%
  12390. %@CR:MCVG3184@%%@4@%is equivalent to%@EH@%%@NL@%
  12391. %@NL@%
  12392.      target: jump.bas up.c%@NL@%
  12393.        %@AI@%commands%@AE@%%@NL@%
  12394. %@NL@%
  12395. %@NL@%
  12396. %@CR:MCVG3200@%%@3@%%@AB@%16.3.2  Macros%@AE@%%@EH@%%@NL@%
  12397. %@NL@%
  12398. %@CR:MCVG3201@%%@4@%Macros provide a convenient way to replace a string in the description file%@EH@%
  12399. with another string. The text is automatically replaced each time NMAKE is
  12400. invoked. This feature makes it easy to change text used throughout the
  12401. description file without having to edit every line that uses the text.%@NL@%
  12402. %@NL@%
  12403. %@CR:MCVG3202@%%@4@%Macros can be used in a variety of situations, including the following:%@EH@%%@NL@%
  12404. %@NL@%
  12405. %@CR:MCVG3203@%  ■  To create a standard description file for several projects. The macro%@NL@%
  12406.      represents the file names used in commands. These file names are then%@NL@%
  12407.      defined when you run NMAKE. When you switch to a different project,%@NL@%
  12408.      changing the macro changes the file names NMAKE uses throughout the%@NL@%
  12409.      description file.%@NL@%
  12410. %@NL@%
  12411.   ■  To control the options that NMAKE passes to the compiler, assembler, or%@NL@%
  12412.      linker. When you use a macro to specify the options, you can quickly%@NL@%
  12413.      change the options used throughout the description file in one easy%@NL@%
  12414.      step.%@NL@%
  12415. %@NL@%
  12416. %@CR:MCVG3210@%%@4@%%@AB@%16.3.2.1  Macro Definitions%@AE@%%@EH@%%@NL@%
  12417. %@NL@%
  12418. %@CR:MCVG3211@%%@4@%A macro definition uses the following form:%@EH@%%@NL@%
  12419. %@NL@%
  12420.      %@AI@%macroname%@AE@% = %@AI@%string%@AE@%%@NL@%
  12421. %@NL@%
  12422. %@CR:MCVG3212@%%@4@%The %@AI@%macroname%@AE@% may be any combination of alphanumeric characters and the%@EH@%
  12423. underscore (_) character. The %@AI@%string%@AE@% may be any valid string.%@NL@%
  12424. %@NL@%
  12425. %@CR:MCVG3213@%%@4@%You can define macros on the NMAKE command line or in the description file.%@EH@%
  12426. Because of the way DOS parses command lines, the rules for the two methods
  12427. are slightly different.%@NL@%
  12428. %@NL@%
  12429. %@CR:MCVG3220@%%@4@%%@AB@%Defining Macros in Description Files%@AE@%%@EH@%%@NL@%
  12430. %@NL@%
  12431. %@CR:MCVG3221@%%@4@%In NMAKE description files, define each macro on a separate line. The first%@EH@%
  12432. character of the macro name must be the first character on the line. NMAKE
  12433. ignores spaces following %@AI@%macroname%@AE@% or preceding %@AI@%string%@AE@%. The %@AI@%string%@AE@% may be a
  12434. null string and may contain embedded spaces. Do not enclose %@AI@%string%@AE@% in
  12435. quotation marks; NMAKE will consider them part of the string.%@NL@%
  12436. %@NL@%
  12437. %@CR:MCVG3230@%%@4@%%@AB@%Defining Macros on the NMAKE Command Line%@AE@%%@EH@%%@NL@%
  12438. %@NL@%
  12439. %@CR:MCVG3231@%%@4@%On the command line, no spaces may surround the equal sign. Spaces cause DOS%@EH@%
  12440. to treat %@AI@%macroname%@AE@% and %@AI@%string%@AE@% as separate tokens. Strings that contain
  12441. embedded spaces must be enclosed in double quotation marks. Alternatively,
  12442. you can enclose the entire macro definition──%@AI@%macroname%@AE@% and %@AI@%string%@AE@%──in
  12443. quotation marks. The %@AI@%string%@AE@% may be a null string. C command line macro
  12444. definitions override definitions of the same macro in the description file.%@NL@%
  12445. %@NL@%
  12446. %@CR:MCVG3232@%%@4@%After you have defined a macro, use the following to include it in a%@EH@%
  12447. dependency line or command:%@NL@%
  12448. %@NL@%
  12449.      $(%@AI@%macroname%@AE@%)%@NL@%
  12450. %@NL@%
  12451. %@CR:MCVG3233@%%@4@%The parentheses are not required if %@AI@%macroname%@AE@% is only one character long. If%@EH@%
  12452. you want to use a dollar sign ($) in the file but do not want to invoke a
  12453. macro, enter two dollar signs ($$), or use the caret (^) as an escape
  12454. character preceding the dollar sign.%@NL@%
  12455. %@NL@%
  12456. %@CR:MCVG3234@%%@4@%When NMAKE runs, it replaces all occurrences of $(%@AI@%macroname%@AE@%) with %@AI@%string%@AE@%. If%@EH@%
  12457. the macro is undefined──that is, if its name does not appear to the left of
  12458. an equal sign in the file or on the NMAKE command line, NMAKE treats it as a
  12459. null string. Once a macro is defined, the only way to cancel its definition
  12460. is to use the %@AB@%!UNDEF%@AE@% directive (see Section 16.3.4%@BO:   b66d0@%).%@NL@%
  12461. %@NL@%
  12462. %@CR:MCVG3235@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  12463. %@NL@%
  12464. %@CR:MCVG3236@%%@4@%Assume the following text is in a file named MAKEFILE:%@EH@%%@NL@%
  12465. %@NL@%
  12466.      program = flash%@NL@%
  12467.      c = LINK%@NL@%
  12468.      options =%@NL@%
  12469. %@NL@%
  12470.      $(program).exe : $(program).obj%@NL@%
  12471.         $c  $(options)  $(program).obj;%@NL@%
  12472. %@NL@%
  12473. %@CR:MCVG3237@%%@4@%When you invoke NMAKE, it interprets the description block as the following:%@EH@%%@NL@%
  12474. %@NL@%
  12475.      flash.exe : flash.obj%@NL@%
  12476.         LINK    flash.obj;%@NL@%
  12477. %@NL@%
  12478. %@CR:MCVG3240@%%@4@%%@AB@%16.3.2.1  Macro Substitutions%@AE@%%@EH@%%@NL@%
  12479. %@NL@%
  12480. %@CR:MCVG3241@%%@4@%Just as macros allow you to substitute text in a description file, you can%@EH@%
  12481. also substitute text within a macro itself. Use the following form:%@NL@%
  12482. %@NL@%
  12483.      $(%@AI@%macroname%@AE@%:%@AI@%string1%@AE@% = %@AI@%string2%@AE@%)%@NL@%
  12484. %@NL@%
  12485. %@CR:MCVG3242@%%@4@%Every occurrence of %@AI@%string1%@AE@% is replaced by %@AI@%string2%@AE@% in the macro %@AI@%macroname%@AE@%.%@EH@%
  12486. Spaces between the colon and %@AI@%string1%@AE@% are considered part of %@AI@%string1%@AE@%. Any
  12487. spaces following %@AI@%string1%@AE@% or preceding %@AI@%string2%@AE@% are ignored. If %@AI@%string2%@AE@% is a
  12488. null string, all occurrences of %@AI@%string1%@AE@% are deleted from the %@AI@%macroname%@AE@%
  12489. macro.%@NL@%
  12490. %@NL@%
  12491. %@CR:MCVG3243@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  12492. %@NL@%
  12493.      SRCS = prog.c sub1.c sub2.c%@NL@%
  12494. %@NL@%
  12495.      DUP : $(SRCS)%@NL@%
  12496.          echo $(srcs)%@NL@%
  12497.          echo $(srcs:.c=.obj)%@NL@%
  12498. %@NL@%
  12499. %@CR:MCVG3244@%%@4@%Note that the special macro $** stands for the names of all the dependent%@EH@%
  12500. files (see Section 16.3.2.3%@BO:   b4c9e@%). If the description file above is invoked with
  12501. a command line that specifies both targets, NMAKE will execute the following
  12502. commands:%@NL@%
  12503. %@NL@%
  12504.          echo prog.c sub1.c sub2.c%@NL@%
  12505.      prog.c sub1.c sub2.c%@NL@%
  12506.          echo prog.obj sub1.obj sub2.obj%@NL@%
  12507.      prog.obj sub1.obj sub2.obj%@NL@%
  12508. %@NL@%
  12509. %@CR:MCVG3245@%%@4@%The macro substitution does not alter the definition of the macro %@AS@%SRCS%@AE@%, but%@EH@%
  12510. replaces the listed characters. When NMAKE builds the target %@AS@%prog.exe%@AE@%, it
  12511. picks up the definition for the special macro $** (that is, the list of
  12512. dependents) from the dependency line, which specifies the macro substitution
  12513. in %@AS@%SRCS%@AE@%. The same is true for the second target, %@AS@%DUP%@AE@%. In this case, however,
  12514. no macro substitution is requested, so %@AS@%SRCS%@AE@% retains its original value, and
  12515. $** represents the names of the C source files.%@NL@%
  12516. %@NL@%
  12517. %@CR:MCVG3250@%%@4@%%@AB@%16.3.2.2  Special Macros%@AE@%%@EH@%%@NL@%
  12518. %@NL@%
  12519. %@CR:MCVG3251@%%@4@%Several macros have special meaning. These macros are listed below with%@EH@%
  12520. their values:%@NL@%
  12521. %@NL@%
  12522. %@TH:   46   2323  2 27 49 @%%@AB@%Macro                      Value%@AE@%$*                         The target name with the extension deleted.$@                         The full name of the current target.$**                        The complete list of dependent files.$<                         The dependent file that is out of date with                           respect to the target (evaluated only for                           inference rules).$?                         The list of dependents that are out of date with                           respect to the target.$$@                        The target NMAKE is currently evaluating. This is                           a dynamic dependency parameter that can be used                           only in dependency lines. See "Examples," below,                           for a typical use of this macro.$(CC)                      The command to invoke the C compiler. By default,                           NMAKE predefines this macro as %@AS@%CC = cl%@AE@%, which                           invokes the Microsoft C Optimizing Compiler. To                           redefine the macro to invoke the QuickC compiler,                           use                           %@AS@%CC = qcl%@AE@%                           You might want to place the above definition in                           your TOOLS.INI file to avoid having to redefine                           it for each description file.$(AS)                      The command that invokes the Microsoft Macro                           Assembler. NMAKE predefines this macro as                           %@AS@%AS = masm%@AE@%.$(MAKE)                    The name with which the NMAKE utility was                           invoked. This macro is used to invoke NMAKE                           recursively. It causes the line on which it                           appears to be executed even if the /N option is                           on. You may redefine this macro if you want to                           execute another program.$(MAKEFLAGS)               The NMAKE options currently in effect. If you                           invoke NMAKE recursively, you should use the                           command: %@AS@%$(MAKE)%@AE@%. You cannot redefine this macro.%@TE:   46   2323  2 27 49 @%
  12523. %@NL@%
  12524. %@CR:MCVG3253@%%@4@%You can append characters to any of the first six macros in the above list%@EH@%
  12525. to modify its meaning. Appending a D specifies the directory part of the
  12526. file name only, an F specifies the file name, a B specifies just the base
  12527. name, and an R specifies the complete file name without the extension. If
  12528. you add one of these characters, you must enclose the macro name in
  12529. parentheses. (The special macros $$@ and $** are the only exceptions to the
  12530. rule that macro names more than one character long must be enclosed in
  12531. parentheses.)%@NL@%
  12532. %@NL@%
  12533. %@CR:MCVG3254@%%@4@%For example, assume that $@ has the value %@AS@%C:\SOURCE\PROG\SORT.OBJ%@AE@%. The list%@EH@%
  12534. below shows the effect the special characters have when combined with $@:%@NL@%
  12535. %@NL@%
  12536. %@CR:MCVG3255@%%@AB@%Macro                      Value%@AE@%%@NL@%
  12537. %@NL@%
  12538. $(@D)                      %@AS@%C:\SOURCE\PROG%@AE@%%@NL@%
  12539. %@NL@%
  12540. $(@F)                      %@AS@%SORT.OBJ%@AE@%%@NL@%
  12541. %@NL@%
  12542. $(@B)                      %@AS@%SORT%@AE@%%@NL@%
  12543. %@NL@%
  12544. $(@R)                      %@AS@%C:\SOURCE\PROG\SORT%@AE@%%@NL@%
  12545. %@NL@%
  12546. %@CR:MCVG3256@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  12547. %@NL@%
  12548.      trig.lib : sin.obj cos.obj arctan.obj%@NL@%
  12549.              !LIB trig.lib -+$?;%@NL@%
  12550. %@NL@%
  12551. %@CR:MCVG3257@%%@4@%In the example above, the macro $? represents the names of all dependents%@EH@%
  12552. that are more recent than the target. The exclamation point causes NMAKE to
  12553. execute the LIB command once for each dependent in the list. As a result of
  12554. this description, the LIB command is executed up to three times, each time
  12555. replacing a module with a newer version.%@NL@%
  12556. %@NL@%
  12557.      # Include files depend on versions in current directory%@NL@%
  12558.      DIR=c:\include%@NL@%
  12559.      $(DIR)\globals.h : globals.h%@NL@%
  12560.           COPY globals.h $@%@NL@%
  12561.      $(DIR)\types.h : types.h%@NL@%
  12562.           COPY types.h $@%@NL@%
  12563.      $(DIR)\macros.h : macros.h%@NL@%
  12564.           COPY macros.h $@%@NL@%
  12565. %@NL@%
  12566. %@CR:MCVG3258@%%@4@%This example shows the use of NMAKE to update a group of include files. In%@EH@%
  12567. the description file above, each of the files %@AS@%globals.h%@AE@%, %@AS@%types.h%@AE@%, and
  12568. %@AS@%macros.h%@AE@% in the directory %@AS@%c:\include%@AE@% depends on its counterpart in the
  12569. current directory. If one of the include files is out of date, NMAKE
  12570. replaces it with the file of the same name from the current directory.%@NL@%
  12571. %@NL@%
  12572. %@CR:MCVG3259@%%@4@%The description file below, which uses the special macro $$@, is equivalent.%@EH@%%@NL@%
  12573. %@NL@%
  12574.      # Include files depend on versions in current directory%@NL@%
  12575.      DIR=c:\include%@NL@%
  12576.      $(DIR)\globals.h $(DIR)\types.h $(DIR)\macros.h: $$(@F)%@NL@%
  12577.           !COPY $? $@%@NL@%
  12578. %@NL@%
  12579. %@CR:MCVG325A@%%@4@%In this example, the special macro $$(@F) signifies the file name (without%@EH@%
  12580. the directory) of the current target.%@NL@%
  12581. %@NL@%
  12582. %@CR:MCVG325B@%%@4@%When NMAKE executes the description, it evaluates the three targets, one at%@EH@%
  12583. a time, with respect to their dependents. Thus, NMAKE first checks whether
  12584. %@AS@%c:\include\globals.h%@AE@% is out of date compared with %@AS@%globals.h%@AE@% in the current
  12585. directory. If so, it executes the command to copy the dependent file
  12586. %@AS@%globals.h%@AE@% to the target. NMAKE repeats the procedure for the other two
  12587. targets. Note that in the command line, the macro $? refers to the dependent
  12588. for this target. The macro $@ means the full name of the target.%@NL@%
  12589. %@NL@%
  12590. %@CR:MCVG3260@%%@4@%%@AB@%16.3.2.3  Precedence of Macro Definitions%@AE@%%@EH@%%@NL@%
  12591. %@NL@%
  12592. %@CR:MCVG3261@%%@4@%If the same macro is defined in more than one place, the rule with the%@EH@%
  12593. highest priority is used. The priority from highest to lowest is as follows:%@NL@%
  12594. %@NL@%
  12595. %@CR:MCVG3262@%  1. Definitions on the command line%@NL@%
  12596. %@NL@%
  12597.   2. Definitions in the description file or in an include file%@NL@%
  12598. %@NL@%
  12599.   3. Definitions by an environment variable%@NL@%
  12600. %@NL@%
  12601.   4. Definitions in the TOOLS.INI file%@NL@%
  12602. %@NL@%
  12603.   5. Predefined macros such as CC and AS%@NL@%
  12604. %@NL@%
  12605. %@CR:MCVG3263@%%@4@%If NMAKE is invoked with the /E option, which causes environment variables%@EH@%
  12606. to override macro definitions, macros defined by environment variables take
  12607. precedence over those defined in a description file.%@NL@%
  12608. %@NL@%
  12609. %@NL@%
  12610. %@CR:MCVG3300@%%@3@%%@AB@%16.3.3  Inference Rules%@AE@%%@EH@%%@NL@%
  12611. %@NL@%
  12612. %@CR:MCVG3301@%%@4@%Inference rules are templates that NMAKE uses to generate files with a given%@EH@%
  12613. extension. When NMAKE encounters a description block with no commands, it
  12614. looks for an inference rule that specifies how to create the target from the
  12615. dependent files, given the two file extensions. Similarly, if a dependent
  12616. file does not exist, NMAKE looks for an inference rule that specifies how to
  12617. create the dependent from another file with the same base name.%@NL@%
  12618. %@NL@%
  12619. %@CR:MCVG3302@%%@4@%The use of inference rules eliminates the need to put the same commands in%@EH@%
  12620. several description blocks. For example, you can use inference rules to
  12621. specify a single QCL command that changes any C source file (which has an
  12622. extension of .C) to an object file (which has an extension of .OBJ).%@NL@%
  12623. %@NL@%
  12624. %@CR:MCVG3303@%%@4@%Inference rules have the following form:%@EH@%%@NL@%
  12625. %@NL@%
  12626.      .%@AI@%fromext%@AE@%.%@AI@%toext%@AE@%:%@NL@%
  12627.             %@AI@%command%@AE@%%@NL@%
  12628.              «%@AI@%command%@AE@%»%@NL@%
  12629.              .%@NL@%
  12630.              .%@NL@%
  12631.              .%@NL@%
  12632. %@NL@%
  12633. %@CR:MCVG3304@%%@4@%In this format, %@AI@%command%@AE@% specifies one of the commands involved in converting%@EH@%
  12634. a file with the extension %@AI@%fromext%@AE@% to a file with the extension %@AI@%toext%@AE@%. Using
  12635. the earlier example of converting C source files to object files, the
  12636. inference rule looks as follows:%@NL@%
  12637. %@NL@%
  12638.      .C.OBJ:%@NL@%
  12639.         QCL -c $<;%@NL@%
  12640. %@NL@%
  12641. %@CR:MCVG3305@%%@4@%The special macro $< represents the name of a dependent that is out of date%@EH@%
  12642. relative to the target.%@NL@%
  12643. %@NL@%
  12644. %@CR:MCVG3310@%%@4@%%@AB@%Path Specifications%@AE@%%@EH@%%@NL@%
  12645. %@NL@%
  12646. %@CR:MCVG3311@%%@4@%You can specify a single path for each of the extensions, using the%@EH@%
  12647. following form:%@NL@%
  12648. %@NL@%
  12649.      {%@AI@%frompath%@AE@%}.%@AI@%fromext%@AE@%{%@AI@%topath%@AE@%}.%@AI@%toext%@AE@%%@NL@%
  12650.             %@AI@%commands%@AE@%%@NL@%
  12651. %@NL@%
  12652. %@CR:MCVG3312@%%@4@%NMAKE takes the files with the %@AI@%fromext%@AE@% extension it finds in the directory%@EH@%
  12653. specified by %@AI@%frompath%@AE@% and uses %@AI@%commands%@AE@% to create files with the %@AI@%toext%@AE@%
  12654. extension in the directory specified by %@AI@%topath%@AE@%.%@NL@%
  12655. %@NL@%
  12656. %@CR:MCVG3313@%%@4@%If NMAKE finds a description block without commands, it looks for an%@EH@%
  12657. inference rule that matches both extensions. NMAKE searches for inference
  12658. rules in the following order:%@NL@%
  12659. %@NL@%
  12660. %@CR:MCVG3314@%  1. In the current description file.%@NL@%
  12661. %@NL@%
  12662.   2. In the tools-initialization file, TOOLS.INI. NMAKE first looks for the%@NL@%
  12663.      TOOLS.INI file in the current working directory and then in the%@NL@%
  12664.      directory indicated by the INIT environment variable. If it finds the%@NL@%
  12665.      file, NMAKE looks for the inference rules following the line that%@NL@%
  12666.      begins with the tag [nmake]. This begins a section that can contain all%@NL@%
  12667.      default macros, .SUFFIXES lists, and inference rules.%@NL@%
  12668. %@NL@%
  12669. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12670. %@AI@%NOTE%@AE@%%@NL@%
  12671.    NMAKE applies an inference rule only if the base name of the file it is%@NL@%
  12672.    trying to create matches the base name of a file that already exists.%@NL@%
  12673.    In effect, this means that inference rules are useful only when there is%@NL@%
  12674.    a one-to-one correspondence between the files with the "from" extension%@NL@%
  12675.    and the files with the "to" extension. You cannot, for example, define an%@NL@%
  12676.    inference rule that inserts a number of modules into a library.%@NL@%
  12677. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12678. %@NL@%
  12679. %@CR:MCVG3320@%%@4@%%@AB@%Predefined Inference Rules%@AE@%%@EH@%%@NL@%
  12680. %@NL@%
  12681. %@CR:MCVG3321@%%@4@%NMAKE uses three predefined inference rules, summarized in Table 16.1. Note%@EH@%
  12682. that these rules use the macro CC, which invokes the Microsoft C Optimizing
  12683. Compiler by default. If you plan to rely on inference rules to build your
  12684. targets, you should redefine CC to invoke the QuickC compiler, as shown in
  12685. the list in Section 16.3.2.3%@BO:   b4c9e@%.%@NL@%
  12686. %@NL@%
  12687. %@CR:MCVGT100@%%@4@%%@AB@%Table 16.1  Predefined Inference Rules%@AE@%%@EH@%%@NL@%
  12688. %@NL@%
  12689. %@AB@%Inference           Rule                  Command        Default Action%@AE@%%@NL@%
  12690. %@NL@%
  12691. .c.obj              $(CC) $(CFLAGS)       %@AS@%/c $*.c        CL /c $*.c%@AE@%%@NL@%
  12692. .c.exe              $(CC) $(CFLAGS)       %@AS@%$*.c           CL $*.c%@AE@%%@NL@%
  12693. .asm.obj            $(AS) $(AFLAGS)       %@AS@%$*;            masm $*;%@AE@%%@NL@%
  12694. %@NL@%
  12695. %@CR:MCVG3322@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  12696. %@NL@%
  12697.      .OBJ.EXE:%@NL@%
  12698.         LINK $<;%@NL@%
  12699. %@NL@%
  12700.      EXAMPLE1.EXE: EXAMPLE1.OBJ%@NL@%
  12701. %@NL@%
  12702.      EXAMPLE2.EXE: EXAMPLE2.OBJ%@NL@%
  12703.         LINK /CO EXAMPLE2,,,LIBV3.LIB%@NL@%
  12704. %@NL@%
  12705. %@CR:MCVG3323@%%@4@%In the sample description file above, the first line defines an inference%@EH@%
  12706. rule that executes the LINK command on the second line to create an
  12707. executable file whenever a change is made in the corresponding object file.
  12708. The file name in the inference rule is specified with the special macro $<
  12709. so that the rule applies to any .OBJ file that has an out-of-date executable
  12710. file.%@NL@%
  12711. %@NL@%
  12712. %@CR:MCVG3324@%%@4@%When NMAKE does not find any commands in the first description block, it%@EH@%
  12713. checks for a rule that may apply and finds the rule defined on the first two
  12714. lines of the description file. NMAKE applies the rule, replacing the $<
  12715. macro with %@AS@%EXAMPLE1.OBJ%@AE@% when it executes the command, so that the LINK
  12716. command becomes%@NL@%
  12717. %@NL@%
  12718.      LINK EXAMPLE1.OBJ;%@NL@%
  12719. %@NL@%
  12720. %@CR:MCVG3325@%%@4@%NMAKE does not search for an inference rule when examining the second%@EH@%
  12721. description block because a command is explicitly given.%@NL@%
  12722. %@NL@%
  12723. %@NL@%
  12724. %@CR:MCVG3400@%%@3@%%@AB@%16.3.4  Directives%@AE@%%@EH@%%@NL@%
  12725. %@NL@%
  12726. %@CR:MCVG3401@%%@4@%Using directives, you can construct description files that are similar to%@EH@%
  12727. batch files. NMAKE provides directives that specify conditional execution of
  12728. commands, display error messages, include the contents of other files, and
  12729. turn on or off some of NMAKE's options.%@NL@%
  12730. %@NL@%
  12731. %@CR:MCVG3402@%%@4@%Each directive begins with an exclamation point (!) in the first column of%@EH@%
  12732. the description file. Spaces can be placed between the exclamation point and
  12733. the directive keyword. The list below describes the directives.%@NL@%
  12734. %@NL@%
  12735. %@CR:MCVG3403@%%@NL@%
  12736. %@TH:   52   3548  2 27 49 @%%@AB@%Directive                           Description%@AE@%%@AB@%!IF%@AE@% %@AI@%expression%@AE@%                      Executes the statements between the %@AB@%!IF%@AE@%                                    keyword and the next %@AB@%!ELSE%@AE@% or %@AB@%!ENDIF%@AE@%                                    directive if %@AI@%constantexpression%@AE@%                                    evaluates to a nonzero value.%@AB@%!ELSE%@AE@%                               Executes the statements between the%@AB@%!ELSE%@AE@%                                    and %@AB@%!ENDIF%@AE@% directives if the statements                                    preceding the%@AB@%!ELSE%@AE@% directive were not                                    executed.%@AB@%!ENDIF%@AE@%                              Marks the end of the %@AB@%!IF%@AE@%, %@AB@%!IFDEF%@AE@%, or                                    %@AB@%!IFNDEF%@AE@% block of statements.%@AB@%!IFDEF%@AE@% %@AI@%macroname%@AE@%                    Executes the statements between                                    the%@AB@%!IFDEF%@AE@% keyword and the next%@AB@%!ELSE%@AE@% or                                    %@AB@%!ENDIF%@AE@% directive if %@AI@%macroname%@AE@% is defined                                    in the description file. NMAKE considers                                    a macro with a null value to be defined.%@AB@%!IFNDEF%@AE@% %@AI@%macroname%@AE@%                   Executes the statements between the                                    %@AB@%!IFNDEF%@AE@% keyword and the next %@AB@%!ELSE%@AE@% or                                    %@AB@%!ENDIF%@AE@% directive if %@AI@%macroname%@AE@% is not                                    defined in the description file.%@AB@%!UNDEF%@AE@% %@AI@%macroname%@AE@%                    Marks %@AI@%macroname%@AE@% as being undefined in                                    NMAKE's symbol table.%@AB@%!ERROR%@AE@% %@AI@%text%@AE@%                         Causes %@AI@%text%@AE@% to be printed and then stops                                    execution.!%@AB@%INCLUDE%@AE@% %@AI@%filename%@AE@%                   Reads and evaluates the file %@AI@%filename%@AE@%                                    before continuing with the current                                    description file. If %@AI@%filename%@AE@% is                                    enclosed by angle brackets (< >), NMAKE                                    searches for the file in the directories                                    specified by the INCLUDE macro;                                    otherwise it looks in the current                                    directory only. The INCLUDE macro is                                    initially set to the value of the                                    INCLUDE environment variable.!%@AB@%CMDSWITCHES: {%@AE@%%@AB@%+%@AE@%|%@AB@%-%@AE@%}%@AI@%opt%@AE@%.             Turns on or off one of four NMAKE                                    options: /D, /I, /N, and /S. If no                                    options are specified, the options are                                    reset to the way they were when NMAKE                                    was started. Turn an option on by                                    preceding it with a plus sign (+), or                                    turn it off by preceding it with a minus                                    sign (-). Using this directive updates                                    the MAKEFLAGS macro.%@TE:   52   3548  2 27 49 @%
  12737. %@NL@%
  12738. %@CR:MCVG3404@%%@4@%The %@AI@%constantexpression%@AE@% used with the !IF directive may consist of integer%@EH@%
  12739. constants, string constants, or program invocations. Integer constants can
  12740. use the C unary operators for numerical negation (-), one's complement (~),
  12741. and logical negation (!). They may also use any of the C binary operators
  12742. listed below:%@NL@%
  12743. %@CR:MCVG3405@%%@NL@%
  12744. %@TH:   37   1031  2 27 49 @%%@AB@%Operator                   Description%@AE@%%@AB@%+%@AE@%                          Addition%@AB@%-%@AE@%                          Subtraction%@AB@%*%@AE@%                          Multiplication%@AB@%/%@AE@%                          Division%@AB@%%%@AE@%                          Modulus%@AB@%&%@AE@%                          Bitwise AND%@AB@%|-%@AE@%                         Bitwise OR%@AB@%^^%@AE@%                         Bitwise XOR%@AB@%&&%@AE@%                         Logical AND%@AB@%%@AB@%|-|-%@AE@%                       Logical OR%@AB@%<<%@AE@%                         Left shift%@AB@%>>%@AE@%                         Right shift%@AB@%==%@AE@%                         Equality%@AB@%!=%@AE@%                         Inequality%@AB@%<%@AE@%                          Less than%@AB@%>%@AE@%                          Greater than%@AB@%<=%@AE@%                         Less than or equal to%@AB@%>=%@AE@%                         Greater than or equal to%@TE:   37   1031  2 27 49 @%
  12745. %@NL@%
  12746. %@CR:MCVG3406@%%@4@%You can use parentheses to group expressions. Values are assumed to be%@EH@%
  12747. decimal values unless specified with a leading 0 (octal) or leading 0x
  12748. (hexadecimal). Use the equality (%@AB@%==%@AE@%) operator to compare two strings for
  12749. equality or the inequality (%@AB@%!=%@AE@%) operator to compare for inequality. Strings
  12750. are enclosed by quotes. Program invocations must be in square brackets ([
  12751. ]).%@NL@%
  12752. %@NL@%
  12753. %@CR:MCVG3407@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  12754. %@NL@%
  12755.      !INCLUDE <infrules.txt>%@NL@%
  12756.      !CMDSWITCHES +D%@NL@%
  12757.      winner.exe:winner.obj%@NL@%
  12758.      !IFDEF debug%@NL@%
  12759.      !  IF "$(debug)"=="y"%@NL@%
  12760.           LINK /CO winner.obj;%@NL@%
  12761.      !  ELSE%@NL@%
  12762.           LINK winner.obj;%@NL@%
  12763.      !  ENDIF%@NL@%
  12764.      !ELSE%@NL@%
  12765.      !  ERROR Macro named debug is not defined.%@NL@%
  12766.      !ENDIF%@NL@%
  12767. %@NL@%
  12768. %@CR:MCVG3408@%%@4@%The %@AB@%!INCLUDE%@AE@% directive causes the file %@AS@%INFRULES.TXT%@AE@% to be read and evaluated%@EH@%
  12769. as if it were a part of the description file. The %@AB@%!CMDSWITCHES%@AE@% directive
  12770. turns on the /D option, which displays the dates of the files as they are
  12771. checked. If %@AS@%winner.exe%@AE@% is out of date with respect to %@AS@%winner.obj%@AE@%, the
  12772. %@AB@%!IFDEF%@AE@% directive checks to see if the macro %@AS@%debug%@AE@% is defined. If it is
  12773. defined, the %@AB@%!IF%@AE@% directive checks to see if it is set to %@AS@%y%@AE@%. If it is, then
  12774. the linker is invoked with the /CO option; otherwise it is invoked without
  12775. it. If the %@AS@%debug%@AE@% macro is not defined, the %@AB@%!ERROR%@AE@% directive prints the
  12776. message and NMAKE stops executing.%@NL@%
  12777. %@NL@%
  12778. %@NL@%
  12779. %@CR:MCVG3500@%%@3@%%@AB@%16.3.5  Pseudotargets%@AE@%%@EH@%%@NL@%
  12780. %@NL@%
  12781. %@CR:MCVG3501@%%@4@%A "pseudotarget" is a target that is not a file but instead is a name that%@EH@%
  12782. serves as a "handle" for building a group of files or executing a group of
  12783. commands. In the following example, %@AS@%UPDATE%@AE@% is a pseudotarget.%@NL@%
  12784. %@NL@%
  12785.      UPDATE: *.*%@NL@%
  12786.           !copy $** a:\product%@NL@%
  12787. %@NL@%
  12788. %@CR:MCVG3502@%%@4@%When NMAKE evaluates a pseudotarget, it always considers the dependents out%@EH@%
  12789. of date. In the description above, NMAKE copies each of the dependent files
  12790. to the specified drive and directory.%@NL@%
  12791. %@NL@%
  12792. %@CR:MCVG3503@%%@4@%The NMAKE utility includes four predefined pseudotargets that provide%@EH@%
  12793. special rules within a description file. The list below describes these
  12794. pseudotargets.%@NL@%
  12795. %@CR:MCVG3504@%%@NL@%
  12796. %@TH:   50   2874  2 27 49 @%%@AB@%Pseudotarget               Action%@AE@%.SILENT:                   Does not display lines as they are executed. Same                           effect as invoking NMAKE with the /S option..IGNORE:                   Ignores exit codes returned by programs called                           from the description file. Same effect as                           invoking NMAKE with the /I option..SUFFIXES:%@AI@%list%@AE@%             Lists file suffixes for NMAKE to try if it needs                           to build a target file for which no dependents                           are specified. NMAKE searches the current                           directory for a file with the same name as the                           target file and a suffix from the list. If NMAKE                           finds such a file, and if an inference rule                           applies to the file, then NMAKE treats the file                           as a dependent of the target. The order of the                           suffixes in the list defines the order in which                           NMAKE searches for the files. The list is                           predefined as follows:                           %@AS@%.SUFFIXES: .obj .exe .c .asm%@AE@%                           To add suffixes to the list, specify .SUFFIXES:                           followed by the new suffixes. To clear the list,                           specify .SUFFIXES:PRECIOUS: %@AI@%target%@AE@%...        Tells NMAKE not to delete %@AI@%target%@AE@% if the commands                           that build it are quit or interrupted. Using this                           pseudotarget overrides the NMAKE default. By                           default, NMAKE deletes the target if it cannot be                           sure the target was built successfully. For                           example:                           %@AS@%.PRECIOUS: tools.lib%@AE@%                           %@AS@%tools.lib : a2z.obj z2a.obj%@AE@%                           %@AS@%        .%@AE@%                           %@AS@%        .%@AE@%                           %@AS@%        .%@AE@%                           If the commands (not shown here) to build                           %@AS@%tools.lib%@AE@% are interrupted, leaving an incomplete                           file, NMAKE does not delete the partially built                           %@AS@%tools.lib%@AE@% because it is listed with .PRECIOUS.                           Note, however, that .PRECIOUS is useful only in                           limited circumstances. Most professional                           development tools, including those provided by                           Microsoft, have their own interrupt handlers and                           "clean up" when errors occur.%@TE:   50   2874  2 27 49 @%
  12797. %@NL@%
  12798. %@CR:MCVG4000@%%@2@%%@AB@%16.4  Response-File Generation%@AE@%%@EH@%%@NL@%
  12799. %@NL@%
  12800. %@CR:MCVG4001@%%@4@%At times, you may need to issue a command in the description file that has a%@EH@%
  12801. list of arguments that exceeds the DOS limit of 128 characters. NMAKE can
  12802. generate response files for use with other programs.%@NL@%
  12803. %@NL@%
  12804. %@CR:MCVG4002@%%@4@%The syntax for creating a response file is%@EH@%%@NL@%
  12805. %@NL@%
  12806.      %@AI@%target%@AE@% : %@AI@%dependents%@AE@%%@NL@%
  12807.        %@AI@%command%@AE@% @<< «%@AI@%filename%@AE@%»%@NL@%
  12808.      %@AI@%response-file-text%@AE@%%@NL@%
  12809.      <<%@AI@%%@NL@%
  12810. %@NL@%
  12811. %@CR:MCVG4003@%%@4@%All of the text between the two sets of double brackets (<<) is placed in a%@EH@%
  12812. response file and given the name %@AI@%filename%@AE@%. The response file can be referred
  12813. to at a later time using %@AI@%filename%@AE@%. If %@AI@%filename%@AE@% is not given, NMAKE gives the
  12814. file a unique name in the directory specified by the TMP environment
  12815. variable if it is defined; otherwise it creates it in the current directory.
  12816. Note that the at sign (@) is not part of the NMAKE syntax but is the typical
  12817. response-file character for utilities such as LIB and LINK.%@NL@%
  12818. %@NL@%
  12819. %@CR:MCVG4004@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  12820. %@NL@%
  12821.      math.lib : add.obj sub.obj mul.obj div.obj%@NL@%
  12822.        LIB @<<%@NL@%
  12823.      math.lib%@NL@%
  12824.      -+add.obj-+sub.obj-+mul.obj-+div.obj%@NL@%
  12825.      listing%@NL@%
  12826.      <<%@NL@%
  12827. %@NL@%
  12828. %@CR:MCVG4005@%%@4@%The above example creates a response file and uses it to invoke the%@EH@%
  12829. Microsoft Library Manager LIB. The response file specifies which library to
  12830. use, the commands to execute, and the listing file to produce. The response
  12831. file contains the following:%@NL@%
  12832. %@NL@%
  12833.      math.lib%@NL@%
  12834.      -+add.obj-+sub.obj-+mul.obj-+div.obj%@NL@%
  12835.      listing%@NL@%
  12836. %@NL@%
  12837. %@NL@%
  12838. %@CR:MCVG5000@%%@2@%%@AB@%16.5  Differences between NMAKE and MAKE%@AE@%%@EH@%%@NL@%
  12839. %@NL@%
  12840. %@CR:MCVG5001@%%@4@%NMAKE differs from MAKE in the following ways:%@EH@%%@NL@%
  12841. %@NL@%
  12842. %@CR:MCVG5002@%  ■  It accepts command-line arguments from a file.%@NL@%
  12843. %@NL@%
  12844.   ■  It provides more command-line options.%@NL@%
  12845. %@NL@%
  12846.   ■  It no longer evaluates targets sequentially. Instead, it updates the%@NL@%
  12847.      targets you specify when you invoke NMAKE, regardless of their%@NL@%
  12848.      positions in the description file. If no targets are specified, NMAKE%@NL@%
  12849.      updates the first target in the file.%@NL@%
  12850. %@NL@%
  12851.   ■  It provides more special macros.%@NL@%
  12852. %@NL@%
  12853.   ■  It permits substitutions within macros.%@NL@%
  12854. %@NL@%
  12855.   ■  It supports directives placed in the description file.%@NL@%
  12856. %@NL@%
  12857.   ■  It allows you to specify include files in the description file.%@NL@%
  12858. %@NL@%
  12859. %@CR:MCVG5003@%%@4@%MAKE assumed that all targets in the description file would be built.%@EH@%
  12860. Because NMAKE builds the first target in the file unless you specify
  12861. otherwise, you may need to change your old description files to work with
  12862. the new utility.%@NL@%
  12863. %@NL@%
  12864. %@CR:MCVG5004@%%@4@%Description files written for use with MAKE typically list a series of%@EH@%
  12865. subordinate targets followed by a higher-level target that depends on the
  12866. subordinates. As MAKE executed, it would build the targets sequentially,
  12867. creating the highest-level target at the end.%@NL@%
  12868. %@NL@%
  12869. %@CR:MCVG5005@%%@4@%The easiest way to convert these description files is to create a new%@EH@%
  12870. description block at the top of the file. Give this block a pseudotarget
  12871. named ALL and set its dependents to all of the other targets in the file.
  12872. When NMAKE executes the description, it will assume you want to build the
  12873. target ALL and consequently will build all targets in the file.%@NL@%
  12874. %@NL@%
  12875. %@CR:MCVG5006@%%@4@%Alternatively, if your description file already contains a block that builds%@EH@%
  12876. a single, top-level target, you can simply make that block the first in the
  12877. file.%@NL@%
  12878. %@NL@%
  12879. %@CR:MCVG5007@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  12880. %@NL@%
  12881.      one.obj: one.c%@NL@%
  12882. %@NL@%
  12883.      two.obj: two.c%@NL@%
  12884. %@NL@%
  12885.      three.obj: three.c%@NL@%
  12886. %@NL@%
  12887.      prog1.exe: one.obj two.obj three.obj%@NL@%
  12888.           link one two three, prog1;%@NL@%
  12889. %@NL@%
  12890.      x.obj: x.c%@NL@%
  12891. %@NL@%
  12892.      y.obj: y.c%@NL@%
  12893. %@NL@%
  12894.      z.obj: z.c%@NL@%
  12895. %@NL@%
  12896.      xyz.exe: x.obj y.obj z.obj%@NL@%
  12897.           link x y z, xyz;%@NL@%
  12898. %@NL@%
  12899. %@CR:MCVG5008@%%@4@%Assume the above is an old MAKE description file named MAKEFILE. Note that%@EH@%
  12900. it builds two top-level targets, %@AS@%prog1.exe%@AE@% and %@AS@%xyz.exe%@AE@%. To use this file
  12901. with the new NMAKE, insert the following as the first line in the file:%@NL@%
  12902. %@NL@%
  12903.      ALL : prog1.exe xyz.exe%@NL@%
  12904. %@NL@%
  12905. %@CR:MCVG5009@%%@4@%With the addition of this line, %@AS@%ALL%@AE@% becomes the first target in the file.%@EH@%
  12906. Since NMAKE, by default, builds the first target, you can invoke NMAKE with%@NL@%
  12907. %@NL@%
  12908.      NMAKE%@NL@%
  12909. %@NL@%
  12910. %@CR:MCVG500A@%%@4@%and it will build both %@AS@%prog1.exe%@AE@% and %@AS@%xyz.exe%@AE@%.%@EH@%%@NL@%
  12911. %@NL@%
  12912. %@NL@%
  12913. %@CR:MCVH0000@%%@1@%%@AB@%Chapter 17  Using Other Utilities%@AE@%%@EH@%%@NL@%
  12914. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12915. %@NL@%
  12916. %@CR:MCVH0001@%%@4@%The following utilities allow you to modify files and change the operating%@EH@%
  12917. environment:%@NL@%
  12918. %@NL@%
  12919. %@CR:MCVH0002@%  ■  Microsoft EXE File Header Utility (EXEMOD)%@NL@%
  12920. %@NL@%
  12921.      Modifies header information in executable files.%@NL@%
  12922. %@NL@%
  12923.   ■  Microsoft Environment Expansion Utility (SETENV)%@NL@%
  12924. %@NL@%
  12925.      Enlarges the DOS environment table in IBM PC-DOS Versions 2.0, 2.1,%@NL@%
  12926.      3.0, and 3.1. SETENV allows you to use more, larger environment%@NL@%
  12927.      variables.%@NL@%
  12928. %@NL@%
  12929.   ■  Microsoft Debug Information Compactor Utility (CVPACK)%@NL@%
  12930. %@NL@%
  12931.      Compresses executable files by reducing the size of CodeView debugging%@NL@%
  12932.      information within the files.%@NL@%
  12933. %@NL@%
  12934. %@CR:MCVH0003@%%@4@%The following sections explain how to use the  EXEMOD, SETENV, and CVPACK%@EH@%
  12935. utilities.%@NL@%
  12936. %@NL@%
  12937. %@NL@%
  12938. %@CR:MCVH1000@%%@2@%%@AB@%17.1  Modifying Program Headers with the EXEMOD Utility%@AE@%%@EH@%%@NL@%
  12939. %@NL@%
  12940. %@CR:MCVH1001@%%@4@%The EXEMOD utility allows you to modify fields in the header of an%@EH@%
  12941. executable file. Some of the options available with EXEMOD are the same as
  12942. LINK options, except that they work on files that have already been linked.
  12943. Unlike the LINK options, the EXEMOD options require that values be specified
  12944. as hexadecimal numbers.%@NL@%
  12945. %@NL@%
  12946. %@CR:MCVH1002@%%@4@%To display the current status of the header fields, type the following:%@EH@%%@NL@%
  12947. %@NL@%
  12948.      EXEMOD %@AI@%executablefile%@AE@%%@NL@%
  12949. %@NL@%
  12950. %@CR:MCVH1003@%%@4@%To modify one or more of the fields in the file header, type the following:%@EH@%%@NL@%
  12951. %@NL@%
  12952.      EXEMOD %@AI@%executablefile%@AE@% «%@AI@%options%@AE@%»%@NL@%
  12953. %@NL@%
  12954. %@CR:MCVH1004@%%@4@%EXEMOD expects %@AI@%executablefile%@AE@% to be the name of an existing file with the%@EH@%
  12955. .EXE extension. If the file name is given without an extension, EXEMOD
  12956. appends .EXE and searches for that file. If you supply a file with an
  12957. extension other than .EXE, EXEMOD displays the following error message:%@NL@%
  12958. %@NL@%
  12959.      %@AS@%exemod: file not .EXE%@AE@%%@NL@%
  12960. %@NL@%
  12961. %@CR:MCVH1005@%%@4@%The EXEMOD options are shown with the forward slash (%@AB@%/%@AE@%) designator, but a%@EH@%
  12962. dash (%@AB@%-%@AE@%) may also be used. Options can be given in either uppercase or
  12963. lowercase, but they cannot be abbreviated. The EXEMOD options and their
  12964. effects are described in the following list:%@NL@%
  12965. %@CR:MCVH1006@%%@NL@%
  12966. %@TH:   30   1992  2 28 48 @%%@AB@%Option                      Effect%@AE@%%@AB@%/H%@AE@%                          Displays the current status of the DOS program                            header. Its effect is the same as entering                            EXEMOD with an %@AI@%executablefile%@AE@% specification but                            without options. The /H option should not be                            used with other options.%@AB@%/STACK%@AE@% %@AI@%hexnum%@AE@%               Allows you to set the size of the stack (in                            bytes) for your program by setting the initial                            SP (stack pointer) value to %@AI@%hexnum%@AE@%. The minimum                            allocation value is adjusted upward, if                            necessary. This option has the same effect as                            the LINK /STACK option, except it works on files                            that are already linked.%@AB@%/MIN%@AE@% %@AI@%hexnum%@AE@%                 Sets the minimum allocation value (that is, the                            minimum number of 16-byte paragraphs needed by                            the program when it is loaded into memory) to                            %@AI@%hexnum%@AE@%. The actual value set may be different                            from the requested value if adjustments are                            necessary to accommodate the stack.%@AB@%/MAX%@AE@% %@AI@%hexnum%@AE@%                 Sets the maximum allocation value (that is, the                            maximum number of 16-byte paragraphs used by the                            program when it is loaded into memory) to                            %@AI@%hexnum%@AE@%. The maximum allocation value must be                            greater than or equal to the minimum allocation                            value. This option has the same effect as the                            LINK /CPARMAXALLOC option.%@TE:   30   1992  2 28 48 @%
  12967. %@NL@%
  12968. %@CR:MCVH1007@%%@4@%For each of the options listed above, %@AI@%hexnum%@AE@% is a number entered using%@EH@%
  12969. hexadecimal digits (uppercase or lowercase); no prefix is needed.%@NL@%
  12970. %@NL@%
  12971. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12972. %@AI@%NOTE%@AE@%%@NL@%
  12973.    Use of the %@AB@%/STACK%@AE@% option on programs developed with other than Microsoft%@NL@%
  12974.    compilers or assemblers may cause the programs to fail, or %@AB@%EXEMOD%@AE@% may%@NL@%
  12975.    return an error message.%@NL@%
  12976. ───────────────────────────────────────────────────────────────────────────%@NL@%
  12977. %@NL@%
  12978. %@CR:MCVH1008@%%@4@%EXEMOD works on packed files. When it recognizes a packed file, it prints%@EH@%
  12979. the message%@NL@%
  12980. %@NL@%
  12981.      %@AS@%packed file%@AE@%%@NL@%
  12982. %@NL@%
  12983. %@CR:MCVH1009@%then continues to modify the file header.%@NL@%
  12984. %@NL@%
  12985. %@CR:MCVH100A@%%@4@%When packed files are loaded, they are expanded to their unpacked state in%@EH@%
  12986. memory. If the EXEMOD /STACK option is used on a packed file, the value
  12987. changed is the value that SP has after expansion. If either the /MIN or the
  12988. /STACK option is used, the value is corrected as necessary to accommodate
  12989. unpacking of the modified stack. The /MAX option operates as it would for
  12990. unpacked files.%@NL@%
  12991. %@NL@%
  12992. %@CR:MCVH100B@%%@4@%If the header of a packed file is displayed, the CS:IP and SS:SP values are%@EH@%
  12993. displayed as they are after expansion. These values are not the same as the
  12994. actual values in the header of the packed file.%@NL@%
  12995. %@NL@%
  12996. %@CR:MCVH100C@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  12997. %@NL@%
  12998.      Microsoft (R) EXE File Header Utility  Version 4.02%@NL@%
  12999.      Copyright (C) Microsoft Corp 1985.  All rights reserved.%@NL@%
  13000. %@NL@%
  13001.      TEST.EXE                           (hex)           (dec)%@NL@%
  13002. %@NL@%
  13003.      .EXE size (bytes)                   439D           17309%@NL@%
  13004.      Minimum load size (bytes)           419D           16797%@NL@%
  13005.      Overlay number                         0               0%@NL@%
  13006.      Initial CS:IP                  0403:0000%@NL@%
  13007.      Initial SS:SP                  0000:0000               0%@NL@%
  13008.      Minimum allocation (para)              0               0%@NL@%
  13009.      Maximum allocation (para)           FFFF           65535%@NL@%
  13010.      Header size (para)                    20              32%@NL@%
  13011.      Relocation table offset               1E              30%@NL@%
  13012.      Relocation entries                     1               1%@NL@%
  13013. %@NL@%
  13014. %@CR:MCVH100D@%%@4@%The display above shows how EXEMOD would display the current file header for%@EH@%
  13015. file %@AS@%TEST.EXE%@AE@%. Note that %@AS@%(para)%@AE@% refers to paragraphs, which are units of 16
  13016. bytes. To translate paragraphs to bytes, multiply by 16. The meaning of each
  13017. field is given below.%@NL@%
  13018. %@NL@%
  13019. %@CR:MCVH100E@%%@4@%.EXE size is the size of the file as stored on disk. %@AS@%Minimum load size%@AE@% is%@EH@%
  13020. the total amount of memory that DOS must provide in order for the program to
  13021. execute.%@NL@%
  13022. %@NL@%
  13023. %@CR:MCVH100F@%%@4@%%@AS@%Overlay number%@AE@% is the ordinal number of the overlay as generated by LINK.%@EH@%
  13024. (If the executable file does not use overlays, there is exactly one overlay
  13025. module, the root.) Since EXEMOD looks only at the beginning of the file, the
  13026. overlay number displayed is normally 0.%@NL@%
  13027. %@NL@%
  13028. %@CR:MCVH100G@%%@4@%%@AS@%Initial CS:IP%@AE@% and %@AS@%Initial SS:SP%@AE@% indicate the initial values of the%@EH@%
  13029. instruction pointer and the stack pointer, respectively. The values of CS
  13030. and SS are relative to the beginning of the load module and are changed once
  13031. the file is actually loaded into memory. The offset address of the stack
  13032. pointer (SP) indicates the amount of room available for the stack to grow
  13033. downward before reaching SS. (Some of this room may be needed by other
  13034. segments, however.) The initial value of SP can be changed with EXEMOD.%@NL@%
  13035. %@NL@%
  13036. %@CR:MCVH100H@%%@4@%%@AS@%Minimum allocation%@AE@% indicates the amount of memory that the file requires, in%@EH@%
  13037. addition to the memory that DOS uses to load the file itself. If DOS is
  13038. unable to allocate this amount of memory, it does not execute the file. This
  13039. value can be changed with EXEMOD.%@NL@%
  13040. %@NL@%
  13041. %@CR:MCVH100I@%%@4@%%@AS@%Maximum allocation%@AE@% indicates the amount of memory the file requests, in%@EH@%
  13042. addition to memory used to load the file itself. If the amount specified is
  13043. not available, DOS allocates all available memory. This value can be changed
  13044. with EXEMOD.%@NL@%
  13045. %@NL@%
  13046. %@CR:MCVH100J@%%@4@%%@AS@%Header size%@AE@% gives the size of all header information, including relocation%@EH@%
  13047. entries.%@NL@%
  13048. %@NL@%
  13049. %@CR:MCVH100K@%%@4@%%@AS@%Relocation table offset%@AE@% indicates the number of bytes from the beginning of%@EH@%
  13050. the file to the relocation entries.%@NL@%
  13051. %@NL@%
  13052. %@CR:MCVH100L@%%@4@%%@AS@%Relocation entries%@AE@% gives the number of relocation entries. Each of these%@EH@%
  13053. entries is a piece of information used to adjust segment addresses in the
  13054. load module (the portion of the file that is actually loaded into memory).
  13055. DOS adds the load address to each segment address so that the segment
  13056. address refers to a true location in physical memory.%@NL@%
  13057. %@NL@%
  13058. %@CR:MCVH100M@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  13059. %@NL@%
  13060.      >EXEMOD TEST.EXE%@NL@%
  13061. %@NL@%
  13062. %@CR:MCVH100N@%%@4@%The command in the above example generates the display in the previous%@EH@%
  13063. example for the file %@AS@%TEST.EXE%@AE@%.%@NL@%
  13064. %@NL@%
  13065.      EXEMOD TEST.EXE /STACK FF /MIN FF /MAX FFF%@NL@%
  13066. %@NL@%
  13067. %@CR:MCVH100O@%%@4@%The example above uses the EXEMOD command line to modify the header fields%@EH@%
  13068. in %@AS@%TEST.EXE%@AE@%.%@NL@%
  13069. %@NL@%
  13070.      >EXEMOD TEST.EXE%@NL@%
  13071. %@NL@%
  13072.      Microsoft (R) EXE File Header Utility  Version 4.02%@NL@%
  13073.      Copyright (C) Microsoft Corp 1985.  All rights reserved.%@NL@%
  13074. %@NL@%
  13075.      TEST.EXE                           (hex)           (dec)%@NL@%
  13076. %@NL@%
  13077.      .EXE size (bytes)                   439D           17309%@NL@%
  13078.      Minimum load size (bytes)           528D           20877%@NL@%
  13079.      Overlay number                         0               0%@NL@%
  13080.      Initial CS:IP                  0403:0000%@NL@%
  13081.      Initial SS:SP                  0000:00FF             256%@NL@%
  13082.      Minimum allocation (para)             FF             256%@NL@%
  13083.      Maximum allocation (para)            FFF            4095%@NL@%
  13084.      Header size (para)                    20              32%@NL@%
  13085.      Relocation table offset               1E              30%@NL@%
  13086.      Relocation entries                     1               1%@NL@%
  13087. %@NL@%
  13088. %@CR:MCVH100P@%%@4@%The last example shows the current status of the header for %@AS@%TEST.EXE%@AE@% after%@EH@%
  13089. being altered by the previous example.%@NL@%
  13090. %@NL@%
  13091. %@NL@%
  13092. %@CR:MCVH2000@%%@2@%%@AB@%17.2  Enlarging the DOS Environment with the SETENV Utility%@AE@%%@EH@%%@NL@%
  13093. %@NL@%
  13094. %@CR:MCVH2001@%%@4@%The SETENV utility allows you to allocate more operating-environment space%@EH@%
  13095. to DOS by modifying a copy of COMMAND.COM.%@NL@%
  13096. %@NL@%
  13097. %@CR:MCVH2002@%%@4@%Normally, DOS Versions 2.0 and later allocate 160 bytes (10 paragraphs) for%@EH@%
  13098. the environment table. This may not be enough space if you want to set
  13099. numerous environment variables using the SET or PATH command. For example,
  13100. if you have a hard disk with several levels of subdirectories, a single
  13101. environment variable might take 40 or 50 characters. Since each character
  13102. uses 1 byte, you could easily require more than 160 bytes if you want to set
  13103. several environment variables.%@NL@%
  13104. %@NL@%
  13105. ───────────────────────────────────────────────────────────────────────────%@NL@%
  13106. %@AI@%NOTE%@AE@%%@NL@%
  13107.    %@AB@%SETENV%@AE@% works with most MS-DOS and PC-DOS operating systems, Versions 2.0
  13108.    through 3.1. If the %@AB@%SETENV%@AE@% utility does not work with your version of
  13109.    %@AB@%COMMAND.COM%@AE@%, please contact Microsoft Technical Support.
  13110. %@NL@%
  13111.    If you use DOS 3.2 or later, you can set the environment space with the
  13112.    DOS %@AB@%SHELL%@AE@% command. For example, the following command sets the
  13113.    environment size at 3000 bytes when placed in %@AB@%CONFIG.SYS%@AE@%:
  13114. %@NL@%
  13115.        SHELL = COMMAND.COM /E:3000 /P%@NL@%
  13116. %@NL@%
  13117.    See your DOS manual for further information.%@NL@%
  13118. ───────────────────────────────────────────────────────────────────────────%@NL@%
  13119. %@NL@%
  13120. To enlarge the environment table, you can modify a copy of COMMAND.COM using
  13121. SETENV. Make sure you work on a copy, and retain an unmodified version of
  13122. COMMAND.COM for backup.%@NL@%
  13123. %@NL@%
  13124. %@CR:MCVH2003@%%@4@%The command line for modifying the environment table is as follows:%@EH@%%@NL@%
  13125. %@NL@%
  13126.      SETENV %@AI@%filename%@AE@% «%@AI@%environmentsize%@AE@%»%@NL@%
  13127. %@NL@%
  13128. %@CR:MCVH2004@%%@4@%Normally, %@AI@%filename%@AE@% specifies COMMAND.COM. It must be a valid, unmodified%@EH@%
  13129. copy of COMMAND.COM, though it can be renamed. The optional %@AI@%environmentsize%@AE@%
  13130. is a decimal number specifying the size in bytes of the new allocation;
  13131. %@AI@%environmentsize%@AE@% must be a number greater than or equal to 160 and less than
  13132. or equal to 65,520. The specified %@AI@%environmentsize%@AE@% is rounded up to the
  13133. nearest multiple of 16 (the size of a paragraph).%@NL@%
  13134. %@NL@%
  13135. %@CR:MCVH2005@%%@4@%If %@AI@%environmentsize%@AE@% is not given, SETENV reports the value currently%@EH@%
  13136. allocated by the COMMAND.COM file.%@NL@%
  13137. %@NL@%
  13138. %@CR:MCVH2006@%%@4@%After modifying COMMAND.COM, you must reboot so that the environment table%@EH@%
  13139. is set to the new size.%@NL@%
  13140. %@NL@%
  13141. %@CR:MCVH2007@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  13142. %@NL@%
  13143.      >SETENV COMMAND.COM%@NL@%
  13144. %@NL@%
  13145.      Microsoft (R) Environment Expansion Utility  Version 2.10%@NL@%
  13146.      Copyright (C) Microsoft Corp 1985,1986.  All rights reserved.%@NL@%
  13147. %@NL@%
  13148.      command.com: Environment allocation = 160%@NL@%
  13149. %@NL@%
  13150. %@CR:MCVH2008@%%@4@%In the example above, no environment size is specified, so SETENV reports%@EH@%
  13151. the current size of the environment table.%@NL@%
  13152. %@NL@%
  13153.      >SETENV COMMAND.COM 605%@NL@%
  13154. %@NL@%
  13155. %@CR:MCVH2009@%%@4@%In the example above, an environment size of 605 bytes is requested. Since%@EH@%
  13156. 605 bytes is not on a paragraph boundary (a multiple of 16), SETENV rounds
  13157. the request up to 608 bytes. COMMAND.COM is modified so that it
  13158. automatically sets an environment table of 608 bytes (38 paragraphs). You
  13159. must reboot to set the new environment-table size.%@NL@%
  13160. %@NL@%
  13161. %@NL@%
  13162. %@CR:MCVH3000@%%@2@%%@AB@%17.3  Saving Memory with the CVPACK Utility%@AE@%%@EH@%%@NL@%
  13163. %@NL@%
  13164. %@CR:MCVH3001@%%@4@%After you compile and link a program with CodeView debugging information,%@EH@%
  13165. you can use the Microsoft Debug Information Compactor Utility (CVPACK) to
  13166. reduce the size of the executable file. CVPACK compresses information in the
  13167. file, and allows the CodeView debugger to load larger programs without
  13168. running out of memory.%@NL@%
  13169. %@NL@%
  13170. %@CR:MCVH3002@%%@4@%The CVPACK utility has the following command line:%@EH@%%@NL@%
  13171. %@NL@%
  13172.      %@CR:MCVH3003@%CVPACK «/p» %@AI@%exefile%@AE@%%@NL@%
  13173. %@NL@%
  13174. %@CR:MCVH3004@%%@4@%The /p option results in the most effective possible packing but causes%@EH@%
  13175. CVPACK to take longer to execute. When the /p option is specified, unused
  13176. debugging information is discarded, and the packed information is sorted
  13177. within the file. When the /p option is not specified, packed information is
  13178. simply appended to the end of the file.%@NL@%
  13179. %@NL@%
  13180. %@CR:MCVH3005@%%@4@%To debug a file that has been altered with CVPACK, you must use Version 2.10%@EH@%
  13181. or later of the CodeView debugger.%@NL@%
  13182. %@NL@%
  13183. %@NL@%
  13184. %@CR:MCVI0000@%%@1@%%@AB@%Chapter 18  Linking for Windows and OS/2 Systems%@AE@%%@EH@%%@NL@%
  13185. ───────────────────────────────────────────────────────────────────────────%@NL@%
  13186. %@NL@%
  13187. %@CR:MCVI0001@%%@4@%This chapter covers concepts important to linking for Windows and OS/2%@EH@%
  13188. systems, such as dynamic-linking and import libraries. Section 18.6%@BO:   c0e10@%
  13189. describes the IMPLIB utility for creating import libraries.%@NL@%
  13190. %@NL@%
  13191. %@CR:MCVI0002@%%@4@%In most respects, linking a program using the Microsoft Segmented-Executable%@EH@%
  13192. Linker (LINK) for the OS/2 environment is similar to linking a program for
  13193. the DOS 3.x environment. The principal difference is that most programs
  13194. created for the DOS 3.x environment run as stand-alone applications, whereas
  13195. programs that run under OS/2 protected mode generally call one or more
  13196. "dynamic-link libraries."%@NL@%
  13197. %@NL@%
  13198. %@NL@%
  13199. %@CR:MCVI1000@%%@2@%%@AB@%18.1  Dynamic-Link Libraries%@AE@%%@EH@%%@NL@%
  13200. %@NL@%
  13201. %@CR:MCVI1001@%%@4@%A dynamic-link library contains executable code for common functions, just%@EH@%
  13202. as an ordinary library does. Yet code for dynamic-link functions is not
  13203. linked into the executable (.EXE) file. Instead, the library itself is
  13204. loaded into memory at run time, along with the .EXE file.%@NL@%
  13205. %@NL@%
  13206. %@CR:MCVI1002@%%@4@%Each .DLL file (dynamic-link library) must use "export definitions" to make%@EH@%
  13207. its functions directly available to other modules. At run time, functions
  13208. not exported can only be called from within the same file. Each export
  13209. definition specifies a function name.%@NL@%
  13210. %@NL@%
  13211. %@CR:MCVI1003@%%@4@%Conversely, the .EXE file must use "import definitions" that tell where each%@EH@%
  13212. dynamic-link function can be found. Otherwise, OS/2 would not know what
  13213. dynamic-link libraries to load when the program is run. Each import
  13214. definition specifies a function name and the .DLL file where the function
  13215. resides.%@NL@%
  13216. %@NL@%
  13217. %@CR:MCVI1004@%%@4@%Assume the simplest case, in which you create one application and one%@EH@%
  13218. dynamic-link library. The linker requires export and import definitions for
  13219. dynamic-link function calls. The OS/2 operating system provides two ways for
  13220. you to supply these definitions:%@NL@%
  13221. %@NL@%
  13222. %@CR:MCVI1005@%  ■  You create one module-definition file (.DEF extension) with export%@NL@%
  13223.      definitions for the .DLL file and another module-definition file with%@NL@%
  13224.      import definitions for the .EXE file. The module-definition files%@NL@%
  13225.      provide these definitions in an ASCII format.%@NL@%
  13226. %@NL@%
  13227.   ■  You create one module-definition file (.DEF extension) for the .DLL%@NL@%
  13228.      file and then generate an import library to be linked to the .EXE file.%@NL@%
  13229. %@NL@%
  13230. %@CR:MCVI1006@%%@4@%The next two sections consider each of these methods in turn. Chapter 19%@BO:   c14f2@%,%@EH@%
  13231. "Using Module-Definition Files," gives a complete description of
  13232. module-definition files.%@NL@%
  13233. %@NL@%
  13234. %@NL@%
  13235. %@CR:MCVI2000@%%@2@%%@AB@%18.2  Linking without an Import Library%@AE@%%@EH@%%@NL@%
  13236. %@NL@%
  13237. %@CR:MCVI2001@%%@4@%Figure 18.1%@FN@%
  13238. Figure 18.1 is found on page 316 of the printed version.%@EF@% illustrates the first way to supply definitions for dynamic-link%@EH@%
  13239. function calls, in which each of the two files──the .DLL file and the .EXE
  13240. file──has a corresponding module-definition file. (A module-definition file
  13241. has a .DEF default extension.)%@NL@%
  13242. %@NL@%
  13243. %@CR:MCVI2002@%%@4@%The two major steps are described below.%@EH@%%@NL@%
  13244. %@NL@%
  13245. %@CR:MCVI2003@%  1. Object files (and possibly standard-library files) are linked together%@NL@%
  13246.      with a module-definition file to create a dynamic-link library. A%@NL@%
  13247.      module-definition file for a dynamic-link library has at least two%@NL@%
  13248.      statements. The first is a %@AB@%LIBRARY%@AE@% statement, which directs the linker%@NL@%
  13249.      to create a .DLL rather than an .EXE file. The second statement is a%@NL@%
  13250.      list of export definitions.%@NL@%
  13251. %@NL@%
  13252.   2. Object files (and possibly standard-library files) are linked together%@NL@%
  13253.      with a module-definition file to create an application. The%@NL@%
  13254.      module-definition file for this application contains a list of import%@NL@%
  13255.      definitions. Each definition in this list contains both a function name%@NL@%
  13256.      and the name of a dynamic-link library.%@NL@%
  13257. %@NL@%
  13258. %@NL@%
  13259. %@CR:MCVI3000@%%@2@%%@AB@%18.3  Linking with an Import Library%@AE@%%@EH@%%@NL@%
  13260. %@NL@%
  13261. %@CR:MCVI3001@%%@4@%Figure 18.2%@FN@%
  13262. Figure 18.2 is found on page 317 of the printed version.%@EF@% illustrates the second way to supply definitions for%@EH@%
  13263. dynamic-link function calls, in which a module-definition file is supplied
  13264. for the dynamic-link library and an import library is supplied for the
  13265. application.%@NL@%
  13266. %@NL@%
  13267. %@CR:MCVI3002@%%@4@%The three major steps are explained below.%@EH@%%@NL@%
  13268. %@NL@%
  13269. %@CR:MCVI3003@%  1. Object files are linked to produce a .DLL file. This step is identical%@NL@%
  13270.      to the first step in the section above. Note that the module-definition%@NL@%
  13271.      file contains export definitions.%@NL@%
  13272. %@NL@%
  13273.   2. The IMPLIB utility is used to generate an import library. IMPLIB takes%@NL@%
  13274.      as input the same module-definition file used in the first step. IMPLIB%@NL@%
  13275.      knows the name of the library module (which by default has the same%@NL@%
  13276.      base name as the .DEF file), and it determines the name of each%@NL@%
  13277.      exported function by examining export definitions. For each export%@NL@%
  13278.      definition in the .DEF file, IMPLIB generates a corresponding import%@NL@%
  13279.      definition.%@NL@%
  13280. %@NL@%
  13281.   3. The .LIB file generated by IMPLIB is used as input to LINK, which%@NL@%
  13282.      creates an application. This .LIB file does not use the same file%@NL@%
  13283.      format as a .DEF file, but it fulfills the same purpose: to provide the%@NL@%
  13284.      linker with information about imported dynamic-link functions.%@NL@%
  13285. %@NL@%
  13286. %@CR:MCVI3004@%%@4@%The .LIB file generated by IMPLIB is called an import library. Import%@EH@%
  13287. libraries are similar in most respects to ordinary libraries; you specify
  13288. import libraries and ordinary libraries in the same command-line field of
  13289. LINK, and you can append the two kinds of libraries together (by using the
  13290. Library Manager). Furthermore, both kinds of libraries resolve external
  13291. references at link time. The only difference is import libraries do not
  13292. contain executable code, merely records that describe where the executable
  13293. code can be found at run time.%@NL@%
  13294. %@NL@%
  13295. %@CR:MCVI3005@%%@4@%The cases considered in this section have been simple ones. Dynamic linking%@EH@%
  13296. is flexible and supports more complicated cases. An application can make
  13297. calls to more than one dynamic-link library. Furthermore, module-definition
  13298. files for libraries can import functions as well as export them. It is
  13299. possible for a .DLL file to call another .DLL file, and so on, to any level
  13300. of complexity; the result may be a situation in which many files are loaded
  13301. at run time.%@NL@%
  13302. %@NL@%
  13303. %@NL@%
  13304. %@CR:MCVI4000@%%@2@%%@AB@%18.4  Why Use Import Libraries?%@AE@%%@EH@%%@NL@%
  13305. %@NL@%
  13306. %@CR:MCVI4001@%%@4@%At first glance, it may seem easier to create programs without import%@EH@%
  13307. libraries since import libraries add an extra step to the linking process.
  13308. However, it is easier to use import libraries for two reasons.%@NL@%
  13309. %@NL@%
  13310. %@CR:MCVI4002@%%@4@%First, the IMPLIB utility automates much of the program-creation process for%@EH@%
  13311. you. To run IMPLIB, you specify the .DEF file that you already created for
  13312. the dynamic-link library. Operation of IMPLIB is simple. If you do not use
  13313. an import library generated by IMPLIB, you must use an ASCII text editor to
  13314. create a second .DEF file where you explicitly give all needed import
  13315. definitions.%@NL@%
  13316. %@NL@%
  13317. %@CR:MCVI4003@%%@4@%Second, the first two steps in the linking process described above (creation%@EH@%
  13318. of the .DLL file and creation of the import library) may be carried out only
  13319. by the author of the dynamic-link library. The libraries may then be given
  13320. to an applications programmer, who focuses on linking the application (third
  13321. step). An applications programmer's task is simplified by linking with the
  13322. import library because then it is not necessary to edit the .DEF file. The
  13323. import library comes ready to link.%@NL@%
  13324. %@NL@%
  13325. %@CR:MCVI4004@%%@4@%A good example of a useful import library is the file DOSCALLS.LIB.%@EH@%
  13326. Generally, protected-mode applications need to call one of the dynamic-link
  13327. system libraries released with OS/2; the DOSCALLS.LIB file contains import
  13328. definitions for all calls to these system libraries. It is much easier to
  13329. link with DOSCALLS.LIB than to create a .DEF file for every OS/2 program you
  13330. link.%@NL@%
  13331. %@NL@%
  13332. %@NL@%
  13333. %@CR:MCVI5000@%%@2@%%@AB@%18.5  Advantages of Dynamic Linking%@AE@%%@EH@%%@NL@%
  13334. %@NL@%
  13335. %@CR:MCVI5001@%%@4@%Why use dynamic-link libraries at all? Dynamic-link libraries serve much the%@EH@%
  13336. same purpose that standard libraries do but they also give you the following
  13337. advantages:%@NL@%
  13338. %@NL@%
  13339. %@CR:MCVI5002@%  1. Link applications faster.%@NL@%
  13340. %@NL@%
  13341.      With dynamic linking, the executable code for a dynamic-link function%@NL@%
  13342.      is not copied into the application's .EXE file. Instead, only an import%@NL@%
  13343.      definition is copied.%@NL@%
  13344. %@NL@%
  13345.   2. Save significant disk space.%@NL@%
  13346. %@NL@%
  13347.      Suppose you create a library function called %@AS@%printit%@AE@%, and this function%@NL@%
  13348.      is called by many different programs. If %@AS@%printit%@AE@% is in a standard%@NL@%
  13349.      library, the function's executable code must be linked into each .EXE%@NL@%
  13350.      file that calls the function. In other words, the same code resides on%@NL@%
  13351.      your disk in many different files. But if %@AS@%printit%@AE@% is stored in a%@NL@%
  13352.      dynamic-link library, the executable code resides in just one file──the%@NL@%
  13353.      library itself.%@NL@%
  13354. %@NL@%
  13355.   3. Make libraries and applications more independent.%@NL@%
  13356. %@NL@%
  13357.      Dynamic-link libraries can be updated any number of times without%@NL@%
  13358.      relinking the applications that use them. If you are a user of%@NL@%
  13359.      third-party libraries, this is particularly convenient. You receive the%@NL@%
  13360.      updated .DLL file from the third-party developers, and you need only%@NL@%
  13361.      copy the new library onto your disk. At run time, your applications%@NL@%
  13362.      automatically call the updated library functions.%@NL@%
  13363. %@NL@%
  13364.   4. Utilize shared code and data segments.%@NL@%
  13365. %@NL@%
  13366.      Code and data segments loaded in from a dynamic-link library can be%@NL@%
  13367.      shared. Without dynamic linking, this sharing is not possible because%@NL@%
  13368.      each file has its own copy of all the code and data it uses. By sharing%@NL@%
  13369.      segments with dynamic linking, you can use memory more efficiently.%@NL@%
  13370. %@NL@%
  13371. %@NL@%
  13372. %@CR:MCVI6000@%%@2@%%@AB@%18.6  Creating Import Libraries with IMPLIB%@AE@%%@EH@%%@NL@%
  13373. %@NL@%
  13374. %@CR:MCVI6001@%%@4@%This section summarizes the use of the Microsoft Import Library Manager%@EH@%
  13375. (IMPLIB), and assumes you are familiar with the concepts of import
  13376. libraries, dynamic linking, and module-definition files discussed in Section
  13377. 18.2.%@BO:   bef80@%%@NL@%
  13378.  
  13379. %@NL@%
  13380. %@CR:MCVI6002@%%@4@%You can create an import library for use by other programmers in resolving%@EH@%
  13381. external references to your dynamic-link library. The IMPLIB command creates
  13382. an import library, which is a file with a .LIB extension that can be read by
  13383. the OS/2 linker. The .LIB file can be specified in the LINK command line
  13384. with other libraries. Import libraries are recommended for all dynamic-link
  13385. libraries. Without the use of import libraries, external references to
  13386. dynamic-link routines must be declared in an %@AB@%IMPORTS%@AE@% statement in the
  13387. module-definition file for the application being linked. IMPLIB is supported
  13388. only in protected mode.%@NL@%
  13389. %@NL@%
  13390. %@CR:MCVI6003@%%@4@%The IMPLIB command-line format is as follows:%@EH@%%@NL@%
  13391. %@NL@%
  13392.      IMPLIB %@AI@%implibname mod-def-file%@AE@% «%@AI@%mod-def-file%@AE@%...»%@NL@%
  13393. %@NL@%
  13394. %@CR:MCVI6004@%%@4@%The %@AI@%implibname%@AE@% is the name you wish the new import library to have.%@EH@%%@NL@%
  13395. %@NL@%
  13396. %@CR:MCVI6005@%%@4@%The %@AI@%mod-def-file%@AE@% is the name of a module-definition file for the%@EH@%
  13397. dynamic-link module. You may enter more than one.%@NL@%
  13398. %@NL@%
  13399. %@CR:MCVI6006@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  13400. %@NL@%
  13401. %@CR:MCVI6007@%%@4@%The following command creates the import library named MYLIB.LIB from the%@EH@%
  13402. module-definition file MYLIB.DEF:%@NL@%
  13403. %@NL@%
  13404.      IMPLIB mylib.lib mylib.def%@NL@%
  13405. %@NL@%
  13406. %@NL@%
  13407. %@CR:MCVJ0000@%%@1@%%@AB@%Chapter 19  Using Module-Definition Files%@AE@%%@EH@%%@NL@%
  13408. ───────────────────────────────────────────────────────────────────────────%@NL@%
  13409. %@NL@%
  13410. %@CR:MCVJ0001@%%@4@%A module-definition file describes the name, attributes, exports, imports,%@EH@%
  13411. and other characteristics of an application or library for OS/2 or Microsoft
  13412. Windows. This file is required for Windows applications and libraries and is
  13413. also required for dynamic-link libraries that run under OS/2.%@NL@%
  13414. %@NL@%
  13415. %@NL@%
  13416. %@CR:MCVJ1000@%%@2@%%@AB@%19.1  Module Statements%@AE@%%@EH@%%@NL@%
  13417. %@NL@%
  13418. %@CR:MCVJ1001@%%@4@%A module-definition file contains one or more "module statements." Each%@EH@%
  13419. module statement defines an attribute of the executable file, such as its
  13420. module name, the attributes of program segments, and the number and names of
  13421. exported and imported functions. The module statements and the attributes
  13422. they define are listed below.%@NL@%
  13423. %@CR:MCVJ1002@%%@NL@%
  13424. %@TH:   37   1573  2 27 49 @%%@AB@%Module Statements          Attribute Defined%@AE@%%@AB@%NAME%@AE@%                       Names application (no library created)%@AB@%LIBRARY%@AE@%                    Names dynamic-link library (no application                           created)%@AB@%DESCRIPTION%@AE@%                Describes the module in one line%@AB@%CODE%@AE@%                       Gives default attributes for code segments%@AB@%DATA%@AE@%                       Gives default attributes for data segments%@AB@%SEGMENTS%@AE@%                   Gives attributes for specific segments%@AB@%STACKSIZE%@AE@%                  Specifies local-stack size in bytes%@AB@%EXPORTS%@AE@%                    Defines exported functions%@AB@%IMPORTS%@AE@%                    Defines imported functions%@AB@%STUB%@AE@%                       Adds a DOS 3.x executable file to the beginning                           of the module, usually to terminate the program                           when run in real mode%@AB@%HEAPSIZE%@AE@%                   Specifies local heap size in bytes%@AB@%PROTMODE%@AE@%                   Specifies that the module runs only in DOS                           protected mode%@AB@%OLD%@AE@%                        Preserves import information from a previous                           version of the library%@AB@%REALMODE%@AE@%                   Relaxes some restrictions that the linker imposes                           for protected-mode programs%@AB@%EXETYPE%@AE@%                    Identifies operating system%@TE:   37   1573  2 27 49 @%
  13425. %@NL@%
  13426. %@CR:MCVJ1003@%%@4@%The following rules govern the use of module statements in a%@EH@%
  13427. module-definition file:%@NL@%
  13428. %@NL@%
  13429. %@CR:MCVJ1004@%  ■  If you use either a %@AB@%NAME%@AE@% or a %@AB@%LIBRARY%@AE@% statement, it must precede all%@NL@%
  13430.      other statements in the module-definition file.%@NL@%
  13431. %@NL@%
  13432.   ■  You can include source-level comments in the module-definition file by%@NL@%
  13433.      beginning a line with a semicolon (%@AB@%;%@AE@%). The OS/2 utilities ignore each%@NL@%
  13434.      such comment line.%@NL@%
  13435. %@NL@%
  13436.   ■  All module-definition keywords (such as %@AB@%NAME%@AE@%, %@AB@%LIBRARY%@AE@%, and %@AB@%OLD%@AE@%) must be%@NL@%
  13437.      entered in uppercase letters.%@NL@%
  13438. %@NL@%
  13439. %@CR:MCVJ1005@%%@4@%The sample module-definition file below gives module definitions for a%@EH@%
  13440. dynamic-link library. This sample file includes one source-level comment and
  13441. five statements.%@NL@%
  13442. %@NL@%
  13443.      %@AI@%; Sample module-definition file%@AE@%%@NL@%
  13444. %@NL@%
  13445.      LIBRARY%@NL@%
  13446. %@NL@%
  13447.      DESCRIPTION 'Sample .DEF file for a dynamic-link library'%@NL@%
  13448. %@NL@%
  13449.      CODE       PRELOAD%@NL@%
  13450. %@NL@%
  13451.      STACKSIZE  1024%@NL@%
  13452. %@NL@%
  13453.      EXPORTS%@NL@%
  13454.          Init   @1%@NL@%
  13455.          Begin  @2%@NL@%
  13456.          Finish @3%@NL@%
  13457.          Load   @4%@NL@%
  13458.          Print  @5%@NL@%
  13459. %@NL@%
  13460. %@CR:MCVJ1006@%%@4@%The sections below explain the meaning of these statements, as well as%@EH@%
  13461. others, giving syntax and examples.%@NL@%
  13462. %@NL@%
  13463. %@NL@%
  13464. %@CR:MCVJ2000@%%@2@%%@AB@%19.2  The NAME Statement%@AE@%%@EH@%%@NL@%
  13465. %@NL@%
  13466. %@CR:MCVJ2001@%%@4@%The %@AB@%NAME%@AE@% statement identifies the executable file as an application and%@EH@%
  13467. optionally defines the name.%@NL@%
  13468. %@NL@%
  13469. %@CR:MCVJ2002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  13470. %@NL@%
  13471.      %@CR:MCVJ2003@%%@AB@%NAME%@AE@% «%@AI@%appname%@AE@%» «%@AI@%apptype%@AE@%»%@NL@%
  13472. %@NL@%
  13473. %@CR:MCVJ2004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  13474. %@NL@%
  13475. %@CR:MCVJ2005@%%@4@%If %@AI@%appname%@AE@% is given, it becomes the name of the application as it is known%@EH@%
  13476. by OS/2. This name can be any valid file name. If %@AI@%appname%@AE@% is not given, the
  13477. name of the module-definition file──with the extension removed──becomes the
  13478. name of the application.%@NL@%
  13479. %@NL@%
  13480. %@CR:MCVJ2006@%%@4@%The %@AI@%apptype%@AE@% field will be used by a future version of OS/2 and should be%@EH@%
  13481. declared for compatibility with this future version.%@NL@%
  13482. %@NL@%
  13483. %@CR:MCVJ2007@%%@4@%If %@AI@%apptype%@AE@% is given, it defines the type of application being linked. This%@EH@%
  13484. information is kept in the executable-file header. You do not need to use
  13485. this field unless you may be using your application in a Windows
  13486. environment. The %@AI@%apptype%@AE@% field may have one of the following values:%@NL@%
  13487. %@NL@%
  13488. %@CR:MCVJ2008@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13489. %@NL@%
  13490. %@AB@%WINDOWAPI%@AE@%                   Real-mode Presentation Manager application. The%@NL@%
  13491.                             application uses the API provided by the%@NL@%
  13492.                             Presentation Manager and must be executed in the%@NL@%
  13493.                             Presentation Manager environment.%@NL@%
  13494. %@NL@%
  13495. %@AB@%WINDOWCOMPAT%@AE@%                Presentation Manager-compatible application. The%@NL@%
  13496.                             application can run inside the Presentation%@NL@%
  13497.                             Manager, or it can run in a separate screen%@NL@%
  13498.                             group. An application can be of this type if it%@NL@%
  13499.                             uses the proper subset of OS/2 video, keyboard,%@NL@%
  13500.                             and mouse functions supported in the%@NL@%
  13501.                             Presentation Manager applications.%@NL@%
  13502. %@NL@%
  13503. %@AB@%NOTWINDOWCOMPAT%@AE@%             Application is not compatible with the%@NL@%
  13504.                             Presentation Manager and must operate in a%@NL@%
  13505.                             separate screen group from the Presentation%@NL@%
  13506.                             Manager.%@NL@%
  13507. %@NL@%
  13508. %@CR:MCVJ2009@%%@4@%If the %@AB@%NAME%@AE@% statement is included in the module-definition file, the %@AB@%LIBRARY%@AE@%%@EH@%
  13509. statement cannot appear. If neither a %@AB@%NAME%@AE@% statement nor a %@AB@%LIBRARY%@AE@% statement
  13510. appears in a module-definition file, the default is %@AB@%NAME%@AE@%──that is, the
  13511. linker acts as though a %@AB@%NAME%@AE@% statement were included, and thus creates an
  13512. application rather than a library.%@NL@%
  13513. %@NL@%
  13514. %@CR:MCVJ200A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  13515. %@NL@%
  13516. %@CR:MCVJ200B@%%@4@%The example below assigns the name %@AS@%calendar%@AE@% to the application being%@EH@%
  13517. defined:%@NL@%
  13518. %@NL@%
  13519.      NAME calendar WINDOWCOMPAT%@NL@%
  13520. %@NL@%
  13521. %@NL@%
  13522. %@CR:MCVJ3000@%%@2@%%@AB@%19.3  The LIBRARY Statement%@AE@%%@EH@%%@NL@%
  13523. %@NL@%
  13524. %@CR:MCVJ3001@%%@4@%The %@AB@%LIBRARY%@AE@% statement identifies the executable file as a dynamic-link%@EH@%
  13525. library and it can specify the name of the library or the type of
  13526. library-module initialization required.%@NL@%
  13527. %@NL@%
  13528. %@CR:MCVJ3002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  13529. %@NL@%
  13530.      %@CR:MCVJ3003@%%@AB@%LIBRARY%@AE@% «%@AI@%libraryname%@AE@%» «%@AI@%initialization%@AE@%»%@NL@%
  13531. %@NL@%
  13532. %@CR:MCVJ3004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  13533. %@NL@%
  13534. %@CR:MCVJ3005@%%@4@%If %@AI@%libraryname%@AE@% is given, it becomes the name of the library as it is known%@EH@%
  13535. by OS/2. This name can be any valid file name. If %@AI@%libraryname%@AE@% is not given,
  13536. the name of the module-definition file──with the extension removed──becomes
  13537. the name of the library.%@NL@%
  13538. %@NL@%
  13539. %@CR:MCVJ3006@%%@4@%The %@AI@%initialization%@AE@% field is optional and can have one of the two values%@EH@%
  13540. listed below. If neither is given, then the %@AI@%initialization%@AE@% default
  13541. is %@AB@%INITGLOBAL%@AE@%.%@NL@%
  13542. %@NL@%
  13543. %@CR:MCVJ3007@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13544. %@NL@%
  13545. %@AB@%INITGLOBAL%@AE@%                  The library-initialization routine is called%@NL@%
  13546.                             only when the library module is initially loaded%@NL@%
  13547.                             into memory%@NL@%
  13548. %@NL@%
  13549. %@AB@%INITINSTANCE%@AE@%                The library-initialization routine is called%@NL@%
  13550.                             each time a new process gains access to the%@NL@%
  13551.                             library%@NL@%
  13552. %@NL@%
  13553. %@CR:MCVJ3008@%%@4@%If the %@AB@%LIBRARY%@AE@% statement is included in a module-definition file, %@AB@%NAME%@AE@%%@EH@%
  13554. cannot appear. If no %@AB@%LIBRARY%@AE@% statement appears in a module-definition file,
  13555. the linker assumes that the module-definition file is defining an
  13556. application.%@NL@%
  13557. %@NL@%
  13558. %@CR:MCVJ3009@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  13559. %@NL@%
  13560. %@CR:MCVJ300A@%%@4@%The following example assigns the name %@AS@%calendar%@AE@% to the dynamic-link module%@EH@%
  13561. being defined, and specifies that library initialization is performed each
  13562. time a new process gains access to %@AS@%calendar%@AE@%:%@NL@%
  13563. %@NL@%
  13564.      LIBRARY calendar INITINSTANCE%@NL@%
  13565. %@NL@%
  13566. %@NL@%
  13567. %@CR:MCVJ4000@%%@2@%%@AB@%19.4  The DESCRIPTION Statement%@AE@%%@EH@%%@NL@%
  13568. %@NL@%
  13569. %@CR:MCVJ4001@%%@4@%The %@AB@%DESCRIPTION%@AE@% statement inserts the specified %@AI@%text%@AE@% into the application or%@EH@%
  13570. library. This statement is useful for embedding source-control or copyright
  13571. information into an application or library.%@NL@%
  13572. %@NL@%
  13573. %@CR:MCVJ4002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  13574. %@NL@%
  13575.     %@CR:MCVJ4003@%%@AB@%DESCRIPTION%@AE@% %@AB@%'%@AE@%%@AI@%text%@AE@%%@AB@%'%@AE@%%@NL@%
  13576. %@NL@%
  13577. %@CR:MCVJ4004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  13578. %@NL@%
  13579. %@CR:MCVJ4005@%%@4@%The %@AI@%text%@AE@% is a one-line string enclosed in single quotation marks. Use of the%@EH@%
  13580. %@AB@%DESCRIPTION%@AE@% statement is different from the inclusion of a comment because
  13581. comments──lines that begin with a semicolon (;)──are not placed in the
  13582. application or library.%@NL@%
  13583. %@NL@%
  13584. %@CR:MCVJ4006@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  13585. %@NL@%
  13586. %@CR:MCVJ4007@%%@4@%The following example inserts the text %@AS@%Template Program%@AE@% into the application%@EH@%
  13587. or library being defined:%@NL@%
  13588. %@NL@%
  13589.      DESCRIPTION 'Template Program'%@NL@%
  13590. %@NL@%
  13591. %@NL@%
  13592. %@CR:MCVJ5000@%%@2@%%@AB@%19.5  The CODE Statement%@AE@%%@EH@%%@NL@%
  13593. %@NL@%
  13594. %@CR:MCVJ5001@%%@4@%The %@AB@%CODE%@AE@% statement defines the default attributes for code segments within%@EH@%
  13595. the application or library.%@NL@%
  13596. %@NL@%
  13597. %@CR:MCVJ5002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  13598. %@NL@%
  13599.      %@CR:MCVJ5003@%%@AB@%CODE%@AE@% «%@AI@%attribute%@AE@%...»%@NL@%
  13600. %@NL@%
  13601. %@CR:MCVJ5004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  13602. %@NL@%
  13603. %@CR:MCVJ5005@%%@4@%Each %@AI@%attribute%@AE@% must correspond to one of the following attribute fields.%@EH@%
  13604. Each field can appear at most one time, and order is not significant. The
  13605. attribute fields are presented below, along with legal values. In each case,
  13606. the default value is listed last. The last three fields have no effect on
  13607. OS/2 code segments and are included for use with Microsoft Windows.%@NL@%
  13608. %@NL@%
  13609. %@CR:MCVJ5006@%%@AB@%Field                       Values%@AE@%%@NL@%
  13610. %@NL@%
  13611. %@AI@%load%@AE@%                        %@AB@%PRELOAD%@AE@%, %@AB@%LOADONCALL%@AE@%%@NL@%
  13612. %@NL@%
  13613. %@AI@%executeonly%@AE@%                 %@AB@%EXECUTEONLY%@AE@%, %@AB@%EXECUTEREAD%@AE@%%@NL@%
  13614. %@NL@%
  13615. %@AI@%iopl%@AE@%                        %@AB@%IOPL%@AE@%, %@AB@%NOIOPL%@AE@%%@NL@%
  13616. %@NL@%
  13617. %@AI@%conforming%@AE@%                  %@AB@%CONFORMING%@AE@%, %@AB@%NONCONFORMING%@AE@%%@NL@%
  13618. %@NL@%
  13619. %@AI@%shared%@AE@%                      %@AB@%SHARED%@AE@%, %@AB@%NONSHARED%@AE@%%@NL@%
  13620. %@NL@%
  13621. %@AI@%movable%@AE@%                     %@AB@%MOVABLE%@AE@%, %@AB@%FIXED%@AE@%%@NL@%
  13622. %@NL@%
  13623. %@AI@%discard%@AE@%                     %@AB@%NONDISCARDABLE%@AE@%, %@AB@%DISCARDABLE%@AE@%%@NL@%
  13624. %@NL@%
  13625. %@CR:MCVJ5007@%%@4@%The %@AI@%load%@AE@% field determines when a code segment is to be loaded. This field%@EH@%
  13626. contains one of the following keywords:%@NL@%
  13627. %@NL@%
  13628. %@CR:MCVJ5008@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13629. %@NL@%
  13630. %@AB@%PRELOAD%@AE@%                     The segment is loaded automatically at the%@NL@%
  13631.                             beginning of the program%@NL@%
  13632. %@NL@%
  13633. %@AB@%LOADONCALL%@AE@%                  The segment is not loaded until accessed (the%@NL@%
  13634.                             default)%@NL@%
  13635. %@NL@%
  13636. %@CR:MCVJ5009@%%@4@%The %@AI@%executeonly%@AE@% field determines whether a code segment can be read as well%@EH@%
  13637. as executed. This field contains one of the following keywords:%@NL@%
  13638. %@NL@%
  13639. %@CR:MCVJ500A@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13640. %@NL@%
  13641. %@AB@%EXECUTEONLY%@AE@%                 The segment can only be executed%@NL@%
  13642. %@NL@%
  13643. %@AB@%EXECUTEREAD%@AE@%                 The segment can be both executed and read (the%@NL@%
  13644.                             default)%@NL@%
  13645. %@NL@%
  13646. %@CR:MCVJ500B@%%@4@%The %@AI@%iopl%@AE@% field determines whether or not a segment has I/O privilege (that%@EH@%
  13647. is, whether it can access the hardware directly). This field contains one of
  13648. the following keywords:%@NL@%
  13649. %@NL@%
  13650. %@CR:MCVJ500C@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13651. %@NL@%
  13652. %@AB@%IOPL%@AE@%                        The code segment has I/O privilege%@NL@%
  13653. %@NL@%
  13654. %@AB@%NOIOPL%@AE@%                      The code segment does not have I/O privilege%@NL@%
  13655.                             (the default)%@NL@%
  13656. %@NL@%
  13657. %@CR:MCVJ500D@%%@4@%The %@AI@%conforming%@AE@% field specifies whether a code segment is a 286 "conforming"%@EH@%
  13658. segment. The concept of a conforming segment deals with privilege level (the
  13659. range of instructions that the process can execute) and is relevant only to
  13660. users writing device drivers and system-level code. A conforming segment can
  13661. be called from either Ring 2 or Ring 3, and the segment executes at the
  13662. caller's privilege level. This field contains one of the following keywords:%@NL@%
  13663. %@NL@%
  13664. %@CR:MCVJ500E@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13665. %@NL@%
  13666. %@AB@%CONFORMING%@AE@%                  The segment is conforming%@NL@%
  13667. %@NL@%
  13668. %@AB@%NONCONFORMING%@AE@%               The segment is nonconforming (the default)%@NL@%
  13669. %@NL@%
  13670. %@CR:MCVJ500F@%%@4@%The %@AI@%shared%@AE@% field determines whether all instances of the program can share a%@EH@%
  13671. given code segment. This field is ignored by OS/2, but is provided for use
  13672. with real-mode Windows. Under OS/2, all code segments are shared. The %@AI@%shared%@AE@%
  13673. field contains one of the following keywords: %@AB@%SHARED%@AE@% or %@AB@%NONSHARED%@AE@% (the
  13674. default for Windows).%@NL@%
  13675. %@NL@%
  13676. %@CR:MCVJ500G@%%@4@%The %@AI@%movable%@AE@% field determines whether a segment can be moved around in%@EH@%
  13677. memory. This field is ignored by OS/2, but is provided for use with
  13678. real-mode Windows. Under OS/2, all segments are movable. The %@AI@%movable%@AE@% field
  13679. contains one of the following keywords: %@AB@%MOVABLE%@AE@% or %@AB@%FIXED%@AE@% (the default for
  13680. Windows).%@NL@%
  13681. %@NL@%
  13682. %@CR:MCVJ500H@%%@4@%The %@AI@%discard%@AE@% field determines whether a segment can be swapped out to disk by%@EH@%
  13683. the operating system when not currently needed. This attribute is ignored by
  13684. OS/2, but is provided for use with real-mode Windows. Under OS/2 systems,
  13685. all segments can be swapped as needed. The %@AI@%shared%@AE@% attribute contains one of
  13686. the following keywords: %@AB@%DISCARDABLE%@AE@% or %@AB@%NONDISCARDABLE%@AE@% (the default for
  13687. Windows).%@NL@%
  13688. %@NL@%
  13689. %@CR:MCVJ500I@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  13690. %@NL@%
  13691. %@CR:MCVJ500J@%%@4@%The following example sets defaults for the module's code segments so they%@EH@%
  13692. are not loaded until accessed and have I/O hardware privilege:%@NL@%
  13693. %@NL@%
  13694.      CODE LOADONCALL IOPL%@NL@%
  13695. %@NL@%
  13696. %@NL@%
  13697. %@CR:MCVJ6000@%%@2@%%@AB@%19.6  The DATA Statement%@AE@%%@EH@%%@NL@%
  13698. %@NL@%
  13699. %@CR:MCVJ6001@%%@4@%The %@AB@%DATA%@AE@% statement defines the default attributes for the data segments%@EH@%
  13700. within the application or module.%@NL@%
  13701. %@NL@%
  13702. %@CR:MCVJ6002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  13703. %@NL@%
  13704.      %@CR:MCVJ6003@%%@AB@%DATA%@AE@% «%@AI@%attribute%@AE@%...»%@NL@%
  13705. %@NL@%
  13706. %@CR:MCVJ6004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  13707. %@NL@%
  13708. %@CR:MCVJ6005@%%@4@%Each %@AI@%attribute%@AE@% must correspond to one of the following attribute fields.%@EH@%
  13709. Each field can appear at most one time, and order is not significant. The
  13710. attribute fields are present below, along with legal values. In each case,
  13711. the default value is listed last. The last two fields have no effect on OS/2
  13712. data segments, but are included for use with Microsoft Windows.%@NL@%
  13713. %@NL@%
  13714. %@CR:MCVJ6006@%%@AB@%Field                       Values%@AE@%%@NL@%
  13715. %@NL@%
  13716. %@AI@%load%@AE@%                        %@AB@%PRELOAD%@AE@%, %@AB@%LOADONCALL%@AE@%%@NL@%
  13717. %@NL@%
  13718. %@AI@%readonly%@AE@%                    %@AB@%READONLY%@AE@%, %@AB@%READWRITE%@AE@%%@NL@%
  13719. %@NL@%
  13720. %@AI@%instance%@AE@%                    %@AB@%NONE%@AE@%, %@AB@%SINGLE%@AE@%, %@AB@%MULTIPLE%@AE@%%@NL@%
  13721. %@NL@%
  13722. %@AI@%iopl%@AE@%                        %@AB@%IOPL%@AE@%, %@AB@%NOIOPL%@AE@%%@NL@%
  13723. %@NL@%
  13724. %@AI@%shared%@AE@%                      %@AB@%SHARED%@AE@%, %@AB@%NONSHARED%@AE@%%@NL@%
  13725. %@NL@%
  13726. %@AI@%movable%@AE@%                     %@AB@%MOVABLE%@AE@%, %@AB@%FIXED%@AE@%%@NL@%
  13727. %@NL@%
  13728. %@AI@%discard%@AE@%                     %@AB@%NONDISCARDABLE%@AE@%, %@AB@%DISCARDABLE%@AE@%%@NL@%
  13729. %@NL@%
  13730. %@CR:MCVJ6007@%%@4@%The %@AI@%load%@AE@% field determines when a segment will be loaded. This field contains%@EH@%
  13731. one of the following keywords:%@NL@%
  13732. %@NL@%
  13733. %@CR:MCVJ6008@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13734. %@NL@%
  13735. %@AB@%PRELOAD%@AE@%                     The segment is loaded when the program begins%@NL@%
  13736.                             execution%@NL@%
  13737. %@NL@%
  13738. %@AB@%LOADONCALL%@AE@%                  The segment is not loaded until it is accessed%@NL@%
  13739.                             (the default)%@NL@%
  13740. %@NL@%
  13741. %@CR:MCVJ6009@%%@4@%The %@AI@%readonly%@AE@% field determines the access rights to a data segment. This%@EH@%
  13742. field contains one of the following keywords:%@NL@%
  13743. %@NL@%
  13744. %@CR:MCVJ600A@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13745. %@NL@%
  13746. %@AB@%READONLY%@AE@%                    The segment can only be read%@NL@%
  13747. %@NL@%
  13748. %@AB@%READWRITE%@AE@%                   The segment can be both read and written to (the%@NL@%
  13749.                             default)%@NL@%
  13750. %@NL@%
  13751. %@CR:MCVJ600B@%%@4@%The %@AI@%instance%@AE@% field affects the sharing attributes of the automatic data%@EH@%
  13752. segment, which is the physical segment represented by the group name DGROUP.
  13753. (This segment group makes up the physical segment which contains the local
  13754. stack and heap of the application.) The %@AI@%instance%@AE@% field contains one of the
  13755. following keywords:%@NL@%
  13756. %@NL@%
  13757. %@CR:MCVJ600C@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13758. %@NL@%
  13759. %@AB@%NONE%@AE@%                        No automatic data segment is created.%@NL@%
  13760. %@NL@%
  13761. %@AB@%SINGLE%@AE@%                      A single automatic data segment is shared by all%@NL@%
  13762.                             instances of the module. In this case, the%@NL@%
  13763.                             module is said to have "solo" data. This keyword%@NL@%
  13764.                             is the default for dynamic-link libraries.%@NL@%
  13765. %@NL@%
  13766. %@AB@%MULTIPLE%@AE@%                    The automatic data segment is copied for each%@NL@%
  13767.                             instance of the module. In this case, the module%@NL@%
  13768.                             is said to have "instance" data. This keyword is%@NL@%
  13769.                             the default for applications.%@NL@%
  13770. %@NL@%
  13771. %@CR:MCVJ600D@%%@4@%The %@AI@%iopl%@AE@% field determines whether or not data segments have I/O privilege%@EH@%
  13772. (that is, whether or not they can access the hardware directly). This field
  13773. contains one of the following keywords:%@NL@%
  13774. %@NL@%
  13775. %@CR:MCVJ600E@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13776. %@NL@%
  13777. %@AB@%IOPL%@AE@%                        The data segments have I/O privilege%@NL@%
  13778. %@NL@%
  13779. %@AB@%NOIOPL%@AE@%                      The data segments do not have I/O privilege (the%@NL@%
  13780.                             default)%@NL@%
  13781. %@NL@%
  13782. %@CR:MCVJ600F@%%@4@%The %@AI@%shared%@AE@% field determines whether all instances of the program can share a%@EH@%
  13783. %@AB@%READWRITE%@AE@% data segment. Under OS/2, this field is ignored by the linker if
  13784. the segment has the attribute %@AB@%READONLY%@AE@%, since %@AB@%READONLY%@AE@% data segments are
  13785. always shared. The %@AI@%shared%@AE@% field contains one of the following keywords:%@NL@%
  13786. %@NL@%
  13787. %@CR:MCVJ600G@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13788. %@NL@%
  13789. %@AB@%SHARED%@AE@%                      One copy of the data segment will be loaded and%@NL@%
  13790.                             shared among all processes accessing the module.%@NL@%
  13791.                             This keyword is the default for dynamic-link%@NL@%
  13792.                             libraries%@NL@%
  13793. %@NL@%
  13794. %@AB@%NONSHARED%@AE@%                   The segment cannot be shared and must be loaded%@NL@%
  13795.                             separately for each process. This keyword is the%@NL@%
  13796.                             default for applications%@NL@%
  13797. %@NL@%
  13798. %@CR:MCVJ600H@%%@4@%The %@AI@%movable%@AE@% field determines whether a segment can be moved around in%@EH@%
  13799. memory. This field is ignored by OS/2, but is provided for use with
  13800. real-mode Windows. Under OS/2, all segments are movable. The %@AI@%movable%@AE@% field
  13801. contains one of the following keywords: %@AB@%MOVABLE%@AE@% or %@AB@%FIXED%@AE@% (the default for
  13802. Windows).%@NL@%
  13803. %@NL@%
  13804. %@CR:MCVJ600I@%%@4@%The optional %@AI@%discard%@AE@% field determines whether a segment can be swapped out%@EH@%
  13805. to disk by the operating system when not currently needed. This attribute is
  13806. ignored by OS/2, but is provided for use with real-mode Windows. Under OS/2
  13807. systems, all segments can be swapped as needed. The %@AI@%discard%@AE@% attribute
  13808. contains one of the following keywords: %@AB@%DISCARDABLE%@AE@% or %@AB@%NONDISCARDABLE%@AE@% (the
  13809. default for Windows).%@NL@%
  13810. %@NL@%
  13811. %@CR:MCVJ600J@%%@4@%Note that the linker makes the automatic-data-segment attribute (specified%@EH@%
  13812. by an instance value of %@AB@%SINGLE%@AE@% or %@AB@%MULTIPLE%@AE@%) match the sharing attribute of
  13813. the automatic data segment (specified by a shared value of %@AB@%SHARED%@AE@% or
  13814. %@AB@%NONSHARED%@AE@%). Solo data (specified by %@AB@%SINGLE%@AE@%) force shared data segments by
  13815. default. Instance data (specified by %@AB@%MULTIPLE%@AE@%) force nonshared data by
  13816. default. Similarly, %@AB@%SHARED%@AE@% forces solo data, and %@AB@%NONSHARED%@AE@% forces instance
  13817. data.%@NL@%
  13818. %@NL@%
  13819. %@CR:MCVJ600K@%%@4@%If you give a contradictory %@AB@%DATA%@AE@% statement such as %@AS@%DATA SINGLE NONSHARED%@AE@%,%@EH@%
  13820. all segments in DGROUP are shared, and all other data segments are nonshared
  13821. by default. If a segment that is a member of DGROUP is defined with a
  13822. sharing attribute that conflicts with the automatic data type, a warning
  13823. about the bad segment is issued, and the segment's flags are converted to a
  13824. consistent sharing attribute. For example, the following%@NL@%
  13825. %@NL@%
  13826.      DATA SINGLE%@NL@%
  13827.      SEGMENTS%@NL@%
  13828.      _DATA CLASS 'DATA' NONSHARED%@NL@%
  13829. %@NL@%
  13830. %@CR:MCVJ600L@%is converted to%@NL@%
  13831. %@NL@%
  13832.      _DATA CLASS 'DATA' SHARED%@NL@%
  13833. %@NL@%
  13834. %@CR:MCVJ600M@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  13835. %@NL@%
  13836. %@CR:MCVJ600N@%%@4@%The example below defines the application's data segment so it is loaded%@EH@%
  13837. only when it is accessed and cannot be shared by more than one copy of the
  13838. program.%@NL@%
  13839. %@NL@%
  13840.      DATA LOADONCALL NONSHARED%@NL@%
  13841. %@NL@%
  13842. %@CR:MCVJ600O@%%@4@%By default, the data segment can be read and written, the automatic-data%@EH@%
  13843. segment is copied for each instance of the module, and the data segment has
  13844. no I/O privilege.%@NL@%
  13845. %@NL@%
  13846. %@NL@%
  13847. %@CR:MCVJ7000@%%@2@%%@AB@%19.7  The SEGMENTS Statement%@AE@%%@EH@%%@NL@%
  13848. %@NL@%
  13849. %@CR:MCVJ7001@%%@4@%The %@AB@%SEGMENTS%@AE@% statement defines the attributes of one or more segments in the%@EH@%
  13850. application or library on a segment-by-segment basis. The attributes
  13851. specified by this statement override defaults set in %@AB@%CODE%@AE@% and %@AB@%DATA%@AE@%
  13852. statements.%@NL@%
  13853. %@NL@%
  13854. %@CR:MCVJ7002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  13855. %@NL@%
  13856.      %@CR:MCVJ7003@%%@AB@%SEGMENTS%@AE@% %@AI@%segmentdefinitions%@AE@%%@NL@%
  13857. %@NL@%
  13858. %@CR:MCVJ7004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  13859. %@NL@%
  13860. %@CR:MCVJ7005@%%@4@%The %@AB@%SEGMENTS%@AE@% keyword marks the beginning of the segment definitions. This%@EH@%
  13861. keyword can be followed by one or more segment definitions, each on a
  13862. separate line (limited by the number set by the linker's /SEGMENTS option,
  13863. or 128 if the option is not used). The syntax for each segment definition is
  13864. as follows:%@NL@%
  13865. %@NL@%
  13866.      %@CR:MCVJ7006@%«%@AB@%'%@AE@%»%@AI@%segmentname%@AE@%«%@AB@%'%@AE@%»«%@AB@%CLASS%@AE@%%@AB@%'%@AE@%%@AI@%classname%@AE@%%@AB@%'%@AE@%» «%@AI@%attribute%@AE@%... »%@NL@%
  13867. %@NL@%
  13868. %@CR:MCVJ7007@%%@4@%Each segment definition begins with a %@AI@%segmentname%@AE@%, which can be placed in%@EH@%
  13869. optional single quotation marks (%@AB@%'%@AE@%). The quotation marks are required if
  13870. %@AI@%segmentname%@AE@% conflicts with a module-definition keyword, such as %@AB@%CODE%@AE@% or
  13871. %@AB@%DATA%@AE@%.%@NL@%
  13872. %@NL@%
  13873. %@CR:MCVJ7008@%%@4@%The %@AB@%CLASS%@AE@% keyword specifies the class of the segment. Single quotation marks%@EH@%
  13874. (%@AB@%'%@AE@%) are required around %@AI@%classname%@AE@%. If you do not use the %@AB@%CLASS%@AE@% argument, the
  13875. linker assumes that the class is %@AB@%CODE%@AE@%.%@NL@%
  13876. %@NL@%
  13877. %@CR:MCVJ7009@%%@4@%Each %@AI@%attribute%@AE@% must correspond to one of the following attribute fields.%@EH@%
  13878. Each field can appear at most one time, and order is not significant. The
  13879. attribute fields are presented below, along with legal values. In each case,
  13880. the default value is listed last.%@NL@%
  13881. %@NL@%
  13882. %@CR:MCVJ700A@%%@AB@%Field                       Values%@AE@%%@NL@%
  13883. %@NL@%
  13884. %@AI@%load%@AE@%                        %@AB@%PRELOAD%@AE@%, %@AB@%LOADONCALL%@AE@%%@NL@%
  13885. %@NL@%
  13886. %@AI@%readonly%@AE@%                    %@AB@%READONLY%@AE@%, %@AB@%READWRITE%@AE@%%@NL@%
  13887. %@NL@%
  13888. %@AI@%executeonly%@AE@%                 %@AB@%EXECUTEONLY%@AE@%, %@AB@%EXECUTEREAD%@AE@%%@NL@%
  13889. %@NL@%
  13890. %@AI@%iopl%@AE@%                        %@AB@%IOPL%@AE@%, %@AB@%NOIOPL%@AE@%%@NL@%
  13891. %@NL@%
  13892. %@AI@%conforming%@AE@%                  %@AB@%CONFORMING%@AE@%, %@AB@%NONCONFORMING%@AE@%%@NL@%
  13893. %@NL@%
  13894. %@AI@%shared%@AE@%                      %@AB@%SHARED%@AE@%, %@AB@%NONSHARED%@AE@%%@NL@%
  13895. %@NL@%
  13896. %@AI@%movable%@AE@%                     %@AB@%MOVABLE%@AE@%, %@AB@%FIXED%@AE@%%@NL@%
  13897. %@NL@%
  13898. %@AI@%discard%@AE@%                     %@AB@%NONDISCARDABLE%@AE@%, %@AB@%DISCARDABLE%@AE@%%@NL@%
  13899. %@NL@%
  13900. %@CR:MCVJ700B@%%@4@%The %@AI@%load%@AE@% field determines when a segment is to be loaded. This field%@EH@%
  13901. contains one of the following keywords:%@NL@%
  13902. %@NL@%
  13903. %@CR:MCVJ700C@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13904. %@NL@%
  13905. %@AB@%PRELOAD%@AE@%                     The segment is loaded automatically at the%@NL@%
  13906.                             beginning of the program%@NL@%
  13907. %@NL@%
  13908. %@AB@%LOADONCALL%@AE@%                  The segment is not loaded until accessed (the%@NL@%
  13909.                             default)%@NL@%
  13910. %@NL@%
  13911. %@CR:MCVJ700D@%%@4@%The %@AI@%readonly%@AE@% field determines the access rights to a data segment. This%@EH@%
  13912. field contains one of the following keywords:%@NL@%
  13913. %@NL@%
  13914. %@CR:MCVJ700E@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13915. %@NL@%
  13916. %@AB@%READONLY%@AE@%                    The segment can only be read%@NL@%
  13917. %@NL@%
  13918. %@AB@%READWRITE%@AE@%                   The segment can be both read and written to (the%@NL@%
  13919.                             default)%@NL@%
  13920. %@NL@%
  13921. %@CR:MCVJ700F@%%@4@%The %@AI@%executeonly%@AE@% field determines whether a code segment can be read as well%@EH@%
  13922. as executed. (The attribute has no effect on data segments.) This field
  13923. contains one of the following keywords:%@NL@%
  13924. %@NL@%
  13925. %@CR:MCVJ700G@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13926. %@NL@%
  13927. %@AB@%EXECUTEONLY%@AE@%                 The segment can only be executed%@NL@%
  13928. %@NL@%
  13929. %@AB@%EXECUTEREAD%@AE@%                 The segment can be both executed and read (the%@NL@%
  13930.                             default)%@NL@%
  13931. %@NL@%
  13932. %@CR:MCVJ700H@%%@4@%The %@AI@%iopl%@AE@% field determines whether or not a segment has I/O privilege (that%@EH@%
  13933. is, whether it can access the hardware directly). This field contains one of
  13934. the following keywords:%@NL@%
  13935. %@NL@%
  13936. %@CR:MCVJ700I@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13937. %@NL@%
  13938. %@AB@%IOPL%@AE@%                        The segments have I/O privilege%@NL@%
  13939. %@NL@%
  13940. %@AB@%NOIOPL%@AE@%                      The segments do not have I/O privilege (the%@NL@%
  13941.                             default)%@NL@%
  13942. %@NL@%
  13943. %@CR:MCVJ700J@%%@4@%The %@AI@%conforming%@AE@% field specifies whether a code segment is a 286 "conforming"%@EH@%
  13944. segment. The concept of a conforming segment deals with privilege level (the
  13945. range of instructions that the process can execute) and is relevant only to
  13946. users writing device drivers and system-level code. A conforming segment can
  13947. be called from either Ring 2 or Ring 3, and the segment executes at the
  13948. caller's privilege level. (The attribute has no effect on data segments.)
  13949. This field contains one of the following keywords:%@NL@%
  13950. %@NL@%
  13951. %@CR:MCVJ700K@%%@AB@%Keyword                     Meaning%@AE@%%@NL@%
  13952. %@NL@%
  13953. %@AB@%CONFORMING%@AE@%                  The segment is conforming%@NL@%
  13954. %@NL@%
  13955. %@AB@%NONCONFORMING%@AE@%               The segment is nonconforming (the default)%@NL@%
  13956. %@NL@%
  13957. %@CR:MCVJ700L@%%@4@%The %@AI@%shared%@AE@% field determines whether all instances of the program can share a%@EH@%
  13958. %@AB@%READWRITE%@AE@% segment. For code segments and %@AB@%READONLY%@AE@% data segments, this field
  13959. is ignored by OS/2, but is provided for use with real-mode Windows. Under
  13960. OS/2, all code segments and all %@AB@%READONLY%@AE@% data segments are shared. The
  13961. %@AI@%shared%@AE@% field contains one of the following keywords: %@AB@%SHARED%@AE@% or %@AB@%NONSHARED%@AE@%
  13962. (the default).%@NL@%
  13963. %@NL@%
  13964. %@CR:MCVJ700M@%%@4@%The %@AI@%movable%@AE@% field determines whether a segment can be moved around in%@EH@%
  13965. memory. This field is ignored by OS/2, but is provided for use with
  13966. real-mode Windows. Under OS/2, all segments are movable. The %@AI@%movable%@AE@% field
  13967. contains one of the following keywords: %@AB@%MOVABLE%@AE@% or %@AB@%FIXED%@AE@% (the default for
  13968. Windows).%@NL@%
  13969. %@NL@%
  13970. %@CR:MCVJ700N@%%@4@%The optional %@AI@%discard%@AE@% field determines whether a segment can be swapped out%@EH@%
  13971. to disk by the operating system, when not currently needed. This attribute
  13972. is ignored by OS/2, but is provided for use with real-mode Windows. Under
  13973. OS/2 systems, all segments can be swapped as needed. The %@AI@%shared%@AE@% attribute
  13974. contains one of the following keywords: %@AB@%DISCARDABLE%@AE@% or %@AB@%NONDISCARDABLE%@AE@% (the
  13975. default for Windows).%@NL@%
  13976. %@NL@%
  13977. %@CR:MCVJ700O@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  13978. %@NL@%
  13979. %@CR:MCVJ700P@%%@4@%The following example specifies segments named %@AS@%cseg1%@AE@%, %@AS@%cseg2%@AE@%, and %@AS@%dseg%@AE@%. The%@EH@%
  13980. first segment is assigned class %@AS@%mycode%@AE@% and the second is assigned %@AB@%CODE%@AE@% by
  13981. default. Each segment is given different attributes.%@AS@%%@NL@%
  13982. %@NL@%
  13983.      SEGMENTS%@NL@%
  13984.          cseg1 CLASS 'mycode' IOPL%@NL@%
  13985.          cseg2 EXECUTEONLY PRELOAD CONFORMING%@NL@%
  13986.          dseg  CLASS 'data' LOADONCALL READONLY%@NL@%
  13987. %@NL@%
  13988. %@NL@%
  13989. %@CR:MCVJ8000@%%@2@%%@AB@%19.8  The STACKSIZE Statement%@AE@%%@EH@%%@NL@%
  13990. %@NL@%
  13991. %@CR:MCVJ8001@%%@4@%The %@AB@%STACKSIZE%@AE@% statement performs the same function as the /STACKSIZE linker%@EH@%
  13992. option. It overrides the size of any stack segment defined in an
  13993. application. (The %@AB@%STACKSIZE%@AE@% statement overrides the /STACKSIZE option).%@NL@%
  13994. %@NL@%
  13995. %@CR:MCVJ8002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  13996. %@NL@%
  13997.      %@CR:MCVJ8003@%%@AB@%STACKSIZE%@AE@% %@AI@%number%@AE@%%@NL@%
  13998. %@NL@%
  13999. %@CR:MCVJ8004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  14000. %@NL@%
  14001. %@CR:MCVJ8005@%%@4@%The %@AI@%number%@AE@% must be an integer; it is considered to be in decimal format by%@EH@%
  14002. default, but you can use C notation to specify hexadecimal or octal.%@NL@%
  14003. %@NL@%
  14004. %@CR:MCVJ8006@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  14005. %@NL@%
  14006. %@CR:MCVJ8007@%%@4@%The following example allocates 4,096 bytes of local-stack space:%@EH@%%@NL@%
  14007. %@NL@%
  14008.      STACKSIZE 4096%@NL@%
  14009. %@NL@%
  14010. %@NL@%
  14011. %@CR:MCVJ9000@%%@2@%%@AB@%19.9  The EXPORTS Statement%@AE@%%@EH@%%@NL@%
  14012. %@NL@%
  14013. %@CR:MCVJ9001@%%@4@%The %@AB@%EXPORTS%@AE@% statement defines the names and attributes of the functions%@EH@%
  14014. exported to other modules and of the functions that run with I/O privilege.
  14015. The term "export" refers to the process of making a function available to
  14016. other run-time modules. By default, functions are hidden from other modules
  14017. at run time.%@NL@%
  14018. %@NL@%
  14019. %@CR:MCVJ9002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  14020. %@NL@%
  14021.      %@CR:MCVJ9003@%%@AB@%EXPORTS%@AE@% %@AI@%exportdefinitions%@AE@%%@NL@%
  14022. %@NL@%
  14023. %@CR:MCVJ9004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  14024. %@NL@%
  14025. %@CR:MCVJ9005@%%@4@%The %@AB@%EXPORTS%@AE@% keyword marks the beginning of the export definitions. It may be%@EH@%
  14026. followed by up to 3,072 export definitions, each on a separate line. You
  14027. need to give an export definition for each dynamic-link routine you want to
  14028. make available to other modules. The syntax for an export definition is as
  14029. follows:%@NL@%
  14030. %@NL@%
  14031.      %@CR:MCVJ9006@%%@AI@%entryname%@AE@%«=%@AI@%internalname%@AE@%» «%@AB@%@%@AE@%%@AI@%ord%@AE@%«%@AB@%RESIDENTNAME%@AE@%»» «%@AI@%pwords%@AE@%» «%@AB@%NODATA%@AE@%»%@AB@%%@NL@%
  14032. %@NL@%
  14033. %@CR:MCVJ9007@%%@4@%The %@AI@%entryname%@AE@% specification defines the function name as it is known to%@EH@%
  14034. other modules. The optional %@AI@%internalname%@AE@% defines the actual name of the
  14035. export function as it appears within the module itself; by default, this
  14036. name is the same as %@AI@%entryname%@AE@%.%@NL@%
  14037. %@NL@%
  14038. %@CR:MCVJ9008@%%@4@%The optional %@AI@%ord%@AE@% field defines the function's ordinal position within the%@EH@%
  14039. module-definition table. If this field is used, the function's entry point
  14040. can be invoked by name or by ordinal. Use of ordinal positions is faster and
  14041. may save space.%@NL@%
  14042. %@NL@%
  14043. %@CR:MCVJ9009@%%@4@%The optional keyword %@AB@%RESIDENTNAME%@AE@% specifies that the function's name be kept%@EH@%
  14044. resident in memory at all times. This keyword is applicable only if the %@AI@%ord%@AE@%
  14045. option is used because if the %@AI@%ord%@AE@% option is not used, OS/2 automatically
  14046. keeps the names of all exported functions resident in memory anyway.%@NL@%
  14047. %@NL@%
  14048. %@CR:MCVJ900A@%%@4@%The %@AI@%pwords%@AE@% field specifies the total size of the function's parameters, as%@EH@%
  14049. meas-ured in words (the total number of bytes divided by two). This field is
  14050. required only if the function executes with I/O privilege. When a function
  14051. with I/O privilege is called, OS/2 consults the %@AI@%pwords%@AE@% field to determine
  14052. how many words to copy from the caller's stack to the I/O-privileged
  14053. function's stack.%@NL@%
  14054. %@NL@%
  14055. %@CR:MCVJ900B@%%@4@%The optional keyword %@AB@%NODATA%@AE@% is ignored by OS/2, but is provided for use by%@EH@%
  14056. real-mode Windows.%@NL@%
  14057. %@NL@%
  14058. %@CR:MCVJ900C@%%@4@%Normally, the %@AB@%EXPORTS%@AE@% statement is only meaningful for functions within%@EH@%
  14059. dynamic-link libraries and for functions that execute with I/O privilege.%@NL@%
  14060. %@NL@%
  14061. %@CR:MCVJ900D@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  14062. %@NL@%
  14063. %@CR:MCVJ900E@%%@4@%The following %@AB@%EXPORTS%@AE@% statement defines the three export functions %@EH@%
  14064. %@AS@%SampleRead%@AE@%, %@AS@%StringIn%@AE@%, and %@AS@%CharTest%@AE@%. The first two functions can be accessed
  14065. either by their exported names or by an ordinal number. Note that in the
  14066. module's own source code, these functions are defined as %@AS@%read2bin%@AE@% and %@AS@%str1%@AE@%,
  14067. respectively. The last function runs with I/O privilege and therefore is
  14068. given with the total size of the parameters: six words.%@NL@%
  14069. %@NL@%
  14070.      EXPORTS%@NL@%
  14071.             SampleRead = read2bin  @8%@NL@%
  14072.             StringIn = str1        @4  RESIDENTNAME%@NL@%
  14073.             CharTest   6%@NL@%
  14074. %@NL@%
  14075. %@NL@%
  14076. %@CR:MCVJA000@%%@2@%%@AB@%19.10  The IMPORTS Statement%@AE@%%@EH@%%@NL@%
  14077. %@NL@%
  14078. %@CR:MCVJA001@%%@4@%The %@AB@%IMPORTS%@AE@% statement defines the names of the functions that will be%@EH@%
  14079. imported for the application or library. The term "import" refers to the
  14080. process of declaring that a symbol is defined in another run-time module (a
  14081. dynamic-link library). Typically, LINK uses an import library (created by
  14082. the IMPLIB utility) to resolve external references to dynamic-link symbols.
  14083. However, the %@AB@%IMPORTS%@AE@% statement provides an alternative for resolving these
  14084. references within a module.%@NL@%
  14085. %@NL@%
  14086. %@CR:MCVJA002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  14087. %@NL@%
  14088.      %@CR:MCVJA003@%%@AB@%IMPORTS%@AE@% %@AI@%importdefinitions%@AE@%%@NL@%
  14089. %@NL@%
  14090. %@CR:MCVJA004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  14091. %@NL@%
  14092. %@CR:MCVJA005@%%@4@%The %@AB@%IMPORTS%@AE@% keyword marks the beginning of the import definitions. This%@EH@%
  14093. keyword is followed by one or more import definitions, each on a separate
  14094. line. The only limit on the number of import definitions is that the total
  14095. amount of space required for their names must be less than 64K. Each import
  14096. definition corresponds to a particular function. The syntax for an import
  14097. definition is as follows:%@AI@%%@NL@%
  14098. %@NL@%
  14099.      %@CR:MCVJA006@%«%@AI@%internalname%@AE@%%@AB@%=%@AE@%»%@AI@%modulename%@AE@%%@AB@%.%@AE@%%@AI@%entry%@AE@%%@NL@%
  14100. %@NL@%
  14101. %@CR:MCVJA007@%%@4@%The %@AI@%internalname%@AE@% specifies the name that the importing module actually uses%@EH@%
  14102. to call the function. Thus, %@AI@%internalname%@AE@% appears in the source code of the
  14103. importing module, though the function may have a different name in the
  14104. module where it is defined. By default, %@AI@%internalname%@AE@% is the same as the name
  14105. given in %@AI@%entry%@AE@%.%@NL@%
  14106. %@NL@%
  14107. %@CR:MCVJA008@%%@4@%The %@AI@%modulename%@AE@% is the name of the application or library that contains the%@EH@%
  14108. function.%@NL@%
  14109. %@NL@%
  14110. %@CR:MCVJA009@%%@4@%The %@AI@%entry%@AE@% field determines the function to be imported and can be a name or%@EH@%
  14111. an ordinal value. (Ordinal values are set in an %@AB@%EXPORTS%@AE@% statement.) If an
  14112. ordinal value is given, the %@AI@%internalname%@AE@% field is required.%@NL@%
  14113. %@NL@%
  14114. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14115. %@AI@%NOTE%@AE@%%@NL@%
  14116.    A given function has a name for each of three different contexts. The%@NL@%
  14117.    function has a name used by the exporting module (where it is defined), a%@NL@%
  14118.    name used as an entry point between modules, and a name as it is used by%@NL@%
  14119.    the importing module (where it is called). If neither module uses the%@NL@%
  14120.    optional %@AI@%internalname%@AE@% field, the function has the same name in all three%@NL@%
  14121.    contexts. If either of the modules use the %@AI@%internalname%@AE@% field, the%@NL@%
  14122.    function may have more than one distinct name.%@NL@%
  14123. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14124. %@NL@%
  14125. %@CR:MCVJA00A@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  14126. %@NL@%
  14127. %@CR:MCVJA00B@%%@4@%The following %@AB@%IMPORTS%@AE@% statement defines three functions to be imported:%@EH@%
  14128. %@AS@%SampleRead%@AE@%, %@AS@%SampleWrite%@AE@%, and a function that has been assigned an ordinal
  14129. value of 1. The functions are found in the modules %@AS@%Sample%@AE@%, %@AS@%SampleA%@AE@%, and
  14130. %@AS@%Read%@AE@%, respectively. The function from the %@AS@%Read%@AE@% module is referred to as
  14131. %@AS@%ReadChar%@AE@% in the importing module; the original name of the function, as it
  14132. is defined in the %@AS@%Read%@AE@% module, may or may not be known.%@NL@%
  14133. %@NL@%
  14134.      IMPORTS%@NL@%
  14135.          Sample.SampleRead%@NL@%
  14136.          SampleA.SampleWrite%@NL@%
  14137.          ReadChar = Read.1%@NL@%
  14138. %@NL@%
  14139. %@NL@%
  14140. %@CR:MCVJB000@%%@2@%%@AB@%19.11  The STUB Statement%@AE@%%@EH@%%@NL@%
  14141. %@NL@%
  14142. %@CR:MCVJB001@%%@4@%The %@AB@%STUB%@AE@% statement adds a DOS 3.x executable file to the beginning of the%@EH@%
  14143. application or library being created. The stub is invoked whenever the
  14144. module is executed under DOS 2.x or DOS 3.x. Typically, the stub displays a
  14145. message and terminates execution. (By default, the linker adds its own
  14146. standard stub for this purpose.)%@NL@%
  14147. %@NL@%
  14148. %@CR:MCVJB002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  14149. %@NL@%
  14150.      %@CR:MCVJB003@%%@AB@%STUB%@AE@% %@AB@%'%@AE@%%@AI@%filename%@AE@%%@AB@%'%@AE@%%@NL@%
  14151. %@NL@%
  14152. %@CR:MCVJB004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  14153. %@NL@%
  14154. %@CR:MCVJB005@%%@4@%The filename specifies the DOS executable file to be added. If the linker%@EH@%
  14155. does not find %@AI@%filename%@AE@% in the current directory, it searches in the list of
  14156. directories specified in the PATH environment variable.%@NL@%
  14157. %@NL@%
  14158. %@CR:MCVJB006@%%@4@%%@AB@%Example%@AE@%%@EH@%%@NL@%
  14159. %@NL@%
  14160. %@CR:MCVJB007@%%@4@%The following example appends the DOS executable file STOPIT.EXE to the%@EH@%
  14161. beginning of the module:%@NL@%
  14162. %@NL@%
  14163.      STUB 'STOPIT.EXE'%@NL@%
  14164. %@NL@%
  14165. %@CR:MCVJB008@%%@4@%The file STOPIT.EXE is executed when you attempt to run the module under%@EH@%
  14166. DOS.%@NL@%
  14167. %@NL@%
  14168. %@NL@%
  14169. %@CR:MCVJC000@%%@2@%%@AB@%19.12  The HEAPSIZE Statement%@AE@%%@EH@%%@NL@%
  14170. %@NL@%
  14171. %@CR:MCVJC001@%%@4@%The %@AB@%HEAPSIZE%@AE@% statement defines the size of the application's local heap in%@EH@%
  14172. bytes. This value affects the size of the automatic data segment.%@NL@%
  14173. %@NL@%
  14174. %@CR:MCVJC002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  14175. %@NL@%
  14176.      %@CR:MCVJC003@%%@AB@%HEAPSIZE%@AE@% %@AI@%bytes%@AE@% | %@AB@%MAXVAL%@AE@%%@NL@%
  14177. %@NL@%
  14178. %@CR:MCVJC004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  14179. %@NL@%
  14180. %@CR:MCVJC005@%%@4@%The %@AI@%bytes%@AE@% field is an integer number considered decimal by default. However,%@EH@%
  14181. hexadecimal and octal numbers can be entered by using C notation.%@NL@%
  14182. %@NL@%
  14183. %@CR:MCVJC006@%%@4@%%@AB@%MAXVAL%@AE@% is an optional keyword that may be substituted for %@AI@%bytes%@AE@% to set the%@EH@%
  14184. field parameter. %@AB@%MAXVAL%@AE@% sets the heap size to the value of DGROUP-64K.
  14185. DGROUP is the automatic or default data segment. The effect is that the
  14186. loader allocates exactly 64K for DGROUP. This may be useful in bound
  14187. applications in which you want to force a 64K requirement for DGROUP on the
  14188. program in DOS. The bound program fails to load if 64K minus the size of
  14189. DGROUP is less than zero.%@NL@%
  14190. %@NL@%
  14191. %@CR:MCVJC007@%%@4@%%@AB@%Examples%@AE@%%@EH@%%@NL@%
  14192. %@NL@%
  14193.      HEAPSIZE 4000%@NL@%
  14194. %@NL@%
  14195.      HEAPSIZE MAXVAL%@NL@%
  14196. %@NL@%
  14197. %@NL@%
  14198. %@CR:MCVJD000@%%@2@%%@AB@%19.13  The PROTMODE Statement%@AE@%%@EH@%%@NL@%
  14199. %@NL@%
  14200. %@CR:MCVJD001@%%@4@%The %@AB@%PROTMODE%@AE@% statement specifies that the module runs only in protected mode%@EH@%
  14201. and not in Windows or dual mode. This statement is always optional, and
  14202. permits a protected-mode-only application to omit some information from the
  14203. executable-file header.%@NL@%
  14204. %@NL@%
  14205. %@CR:MCVJD002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  14206. %@NL@%
  14207. %@CR:MCVJD003@%%@4@%%@AB@%PROTMODE%@AE@%%@EH@%%@NL@%
  14208. %@NL@%
  14209. %@CR:MCVJD004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  14210. %@NL@%
  14211. %@CR:MCVJD005@%%@4@%If this statement is not included in the module-definition file, the linker%@EH@%
  14212. assumes the application can be run in either real or protected mode.%@NL@%
  14213. %@NL@%
  14214. %@NL@%
  14215. %@CR:MCVJE000@%%@2@%%@AB@%19.14  The OLD Statement%@AE@%%@EH@%%@NL@%
  14216. %@NL@%
  14217. %@CR:MCVJE001@%%@4@%The %@AB@%OLD%@AE@% statement directs the linker to search another dynamic-link module%@EH@%
  14218. for export ordinals. For more information on ordinals, see the sections
  14219. above on the %@AB@%EXPORTS%@AE@% and %@AB@%IMPORTS%@AE@% statements. Exported names in the current
  14220. module that match exported names in the %@AB@%OLD%@AE@% module are assigned ordinal
  14221. values from that module unless one of the following conditions is in effect:
  14222. the name in the %@AB@%OLD%@AE@% module has no ordinal value assigned, or an ordinal
  14223. value is explicitly assigned in the current module.%@NL@%
  14224. %@NL@%
  14225. %@CR:MCVJE002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  14226. %@NL@%
  14227.      %@CR:MCVJE003@%%@AB@%OLD%@AE@% %@AB@%'%@AE@%%@AI@%filename%@AE@%%@AB@%'%@AE@%%@NL@%
  14228. %@NL@%
  14229. %@CR:MCVJE004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  14230. %@NL@%
  14231. %@CR:MCVJE005@%%@4@%This statement is useful for preserving export ordinal values throughout%@EH@%
  14232. successive versions of a dynamic-link module. The %@AB@%OLD%@AE@% has no effect on
  14233. application modules.%@NL@%
  14234. %@NL@%
  14235. %@NL@%
  14236. %@CR:MCVJF000@%%@2@%%@AB@%19.15  The REALMODE Statement%@AE@%%@EH@%%@NL@%
  14237. %@NL@%
  14238. %@CR:MCVJF001@%%@4@%The %@AB@%REALMODE%@AE@% statement is analogous to the %@AB@%PROTMODE%@AE@% statement and is%@EH@%
  14239. provided for use with real-mode Windows applications.%@NL@%
  14240. %@NL@%
  14241. %@CR:MCVJF002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  14242. %@NL@%
  14243.      %@CR:MCVJF003@%%@AB@%REALMODE%@AE@%%@NL@%
  14244. %@NL@%
  14245. %@CR:MCVJF004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  14246. %@NL@%
  14247. %@CR:MCVJF005@%%@4@%%@AB@%REALMODE%@AE@% specifies that the application runs only in real mode. With this%@EH@%
  14248. statement, the linker relaxes some of the restrictions that it imposes on
  14249. programs running in protected mode.%@NL@%
  14250. %@NL@%
  14251. %@NL@%
  14252. %@CR:MCVJG000@%%@2@%%@AB@%19.16  The EXETYPE Statement%@AE@%%@EH@%%@NL@%
  14253. %@NL@%
  14254. %@CR:MCVJG001@%%@4@%The %@AB@%EXETYPE%@AE@% statement specifies in which operating system the application%@EH@%
  14255. (or dynamic-link library) is to run. This statement is optional and provides
  14256. an additional degree of protection against the program being run in an
  14257. incorrect operating system.%@NL@%
  14258. %@NL@%
  14259. %@CR:MCVJG002@%%@4@%%@AB@%Syntax%@AE@%%@EH@%%@NL@%
  14260. %@NL@%
  14261.      %@CR:MCVJG003@%%@AB@%EXETYPE%@AE@% «%@AB@%OS2%@AE@% | %@AB@%WINDOWS%@AE@% | %@AB@%DOS4%@AE@%»%@NL@%
  14262. %@NL@%
  14263. %@CR:MCVJG004@%%@4@%%@AB@%Remarks%@AE@%%@EH@%%@NL@%
  14264. %@NL@%
  14265. %@CR:MCVJG005@%%@4@%The %@AB@%EXETYPE%@AE@% keyword must be followed by a descriptor of the operating%@EH@%
  14266. system, either %@AB@%OS2%@AE@% (for OS/2 applications and dynamic-link libraries),
  14267. %@AB@%WINDOWS%@AE@%, or %@AB@%DOS4%@AE@%. If no %@AB@%EXETYPE%@AE@% statement is given, %@AB@%EXETYPE OS2%@AE@% is assumed
  14268. by an operating system that is loading the program.%@NL@%
  14269. %@NL@%
  14270. %@CR:MCVJG006@%%@4@%The effect of %@AB@%EXETYPE%@AE@% is to set bits in the header which identify%@EH@%
  14271. operating-system type. Operating-system loaders may check these bits.%@NL@%
  14272. %@NL@%
  14273. %@NL@%
  14274. %@CR:MCVK0000@%%@1@%%@AB@%Chapter 20  Creating Dual-Mode Programs with BIND%@AE@%%@EH@%%@NL@%
  14275. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14276. %@NL@%
  14277. %@CR:MCVK0001@%%@4@%The Microsoft Operating System/2 Bind (BIND) utility converts protected-mode%@EH@%
  14278. programs so they can run in both real mode and protected mode. Not every
  14279. protected-mode program can readily be converted. Programs you wish to
  14280. convert should make no system calls other than calls to the functions listed
  14281. in the Family API. (The Family API, see the %@AI@%Microsoft Operating System/2%@AE@%
  14282. %@AI@%Programmer's Reference%@AE@%, is a subset of the API functions.)%@NL@%
  14283. %@NL@%
  14284. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14285. %@AI@%NOTE%@AE@%%@NL@%
  14286.    The BIND utility will not work on BASIC programs.%@NL@%
  14287. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14288. %@NL@%
  14289. %@CR:MCVK0002@%%@4@%The BIND utility must "bind" dynamic-link functions──that is, the utility%@EH@%
  14290. brings an application program together with libraries and links everything
  14291. into a single stand-alone file that can run in real mode. The BIND utility
  14292. also alters the executable-file format of the program so it is recognized as
  14293. a standard executable file in both real mode and protected mode.%@NL@%
  14294. %@NL@%
  14295. %@CR:MCVK0003@%%@4@%If you are unable to create a bound version of your program, you can build a%@EH@%
  14296. dual-mode version, as explained at the end of the chapter.%@NL@%
  14297. %@NL@%
  14298. %@CR:MCVK0004@%%@4@%There are three components to the BIND utility:%@EH@%%@NL@%
  14299. %@NL@%
  14300. %@CR:MCVK0005@%  ■  BIND. This utility merges the executable file with the appropriate%@NL@%
  14301.      libraries as described above.%@NL@%
  14302. %@NL@%
  14303.   ■  Loader. This tool loads the OS/2 executable file when running DOS 2.x%@NL@%
  14304.      or 3.x and simulates the OS/2 startup conditions in a DOS environment.%@NL@%
  14305.      The loader consists of code that is stored in BIND.EXE and copied into%@NL@%
  14306.      files as needed.%@NL@%
  14307. %@NL@%
  14308.   ■  API.LIB. This library simulates the OS/2 API in a DOS environment.%@NL@%
  14309. %@NL@%
  14310. %@NL@%
  14311. %@CR:MCVK1000@%%@2@%%@AB@%20.1  Binding Library Routines%@AE@%%@EH@%%@NL@%
  14312. %@NL@%
  14313. %@CR:MCVK1001@%%@4@%The BIND utility replaces Family-API calls with simulator routines from the%@EH@%
  14314. standard (object-code) library API.LIB. However, your program may also make
  14315. dynamic-link calls to functions outside the API (that is, you can make
  14316. dynamic-link calls that are not system calls). This section explains how
  14317. BIND can accommodate these calls.%@NL@%
  14318. %@NL@%
  14319. %@CR:MCVK1002@%%@4@%If your program makes dynamic-link calls to functions outside the API, use%@EH@%
  14320. the %@AI@%linklibs%@AE@% field described in Section 20.3%@BO:   cddc2@%, "The BIND Command Line." BIND
  14321. searches each of the libraries and files specified in %@AI@%linklibs%@AE@% for object
  14322. code corresponding to the imported functions. In addition, if you are using
  14323. import definitions with either the ordinal or the internal-name option, you
  14324. need to specify import libraries so the functions you call can be identified
  14325. correctly. (For a discussion of various options within import definitions,
  14326. see Chapter 19%@BO:   c14f2@%, "Using Module-Definition Files.")%@NL@%
  14327. %@NL@%
  14328. %@NL@%
  14329. %@CR:MCVK2000@%%@2@%%@AB@%20.2  Binding Functions as Protected Mode Only%@AE@%%@EH@%%@NL@%
  14330. %@NL@%
  14331. %@CR:MCVK2001@%%@4@%If your program freely makes non-Family-API calls without regard to which%@EH@%
  14332. operating system is in use, the program cannot be converted for use in real
  14333. mode. However, you may choose to write a program so it first checks the
  14334. operating system and then restricts system calls (to the Family API) when
  14335. running in real mode. The BIND utility supports conversion of these
  14336. programs.%@NL@%
  14337. %@NL@%
  14338. %@CR:MCVK2002@%%@4@%By using the /n command-line option described below you can specify a list%@EH@%
  14339. of functions supported in protected mode only. If your program ever attempts
  14340. to call one of these functions when running in real mode, the BadDynLink
  14341. system function is called and aborts your program. The advantage of this
  14342. option is that it helps resolve external references, yet it remains the
  14343. responsibility of your program to check the operating-system version and
  14344. ensure that not one of these functions is ever called in real mode.%@NL@%
  14345. %@NL@%
  14346. %@CR:MCVK2003@%%@4@%If your program makes calls (either directly or indirectly) to%@EH@%
  14347. non-Family-API system calls, but you do not use the /n option, then BIND
  14348. fails to convert your program.%@NL@%
  14349. %@NL@%
  14350. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14351. %@AI@%NOTE%@AE@%%@NL@%
  14352.    %@AB@%BIND%@AE@% Version 1.0 does not work with files linked with the %@AB@%/EXEPACK%@AE@%%@NL@%
  14353.    option.%@NL@%
  14354. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14355. %@NL@%
  14356. %@NL@%
  14357. %@CR:MCVK3000@%%@2@%%@AB@%20.3  The BIND Command Line%@AE@%%@EH@%%@NL@%
  14358. %@NL@%
  14359. %@CR:MCVK3001@%%@4@%Invoke BIND with the following command line:%@EH@%%@NL@%
  14360. %@NL@%
  14361.      %@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@%
  14362. %@NL@%
  14363. %@CR:MCVK3003@%%@CR:MCVK3004@%%@4@%The %@AI@%infile%@AE@% field contains the name of the OS/2 application. The file name%@EH@%
  14364. may contain a complete path name. The file extension is optional; if you
  14365. provide no extension, .EXE is assumed.%@NL@%
  14366. %@NL@%
  14367. %@CR:MCVK3005@%%@4@%The %@AI@%implibs%@AE@% field contains the name of one or more import libraries. As%@EH@%
  14368. explained above, use this field if your program uses an import definition
  14369. with either the %@AI@%ordinal%@AE@% or %@AI@%internalname%@AE@% fields.%@NL@%
  14370. %@NL@%
  14371. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14372. %@AI@%NOTE%@AE@%%@NL@%
  14373.    If you want to specify a 64K default data segment when running in real%@NL@%
  14374.    mode, specify the file APILMR.OBJ, which guarantees a 64K stack. The%@NL@%
  14375.    reason this object file may be necessary is that a protected-mode%@NL@%
  14376.    application is not automatically given a 64K default data segment; a%@NL@%
  14377.    protected-mode application is only allocated the space it specifically%@NL@%
  14378.    requests. If you do not specify the file APILMR.OBJ, you may not have the%@NL@%
  14379.    local heap area needed when you run in real mode.%@NL@%
  14380. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14381. %@NL@%
  14382. %@CR:MCVK3006@%%@4@%The %@AI@%linklibs%@AE@% field contains the name of one or more standard libraries and%@EH@%
  14383. object files. Use this field to supply object code needed to resolve
  14384. dynamic-link calls. Include DOSCALLS.LIB in this field. You must give the
  14385. complete path name to DOSCALLS.LIB if it is not in the current directory. If
  14386. you specify a second library, API.LIB, you need to give the complete path
  14387. name for it also. If you do not specify API.LIB in this field, BIND
  14388. automatically searches for API.LIB by looking in directories listed in the
  14389. LIB environment variable. For example, the following command line
  14390. successfully uses BIND if API.LIB is located in a directory listed in the
  14391. LIB environment variable:%@NL@%
  14392. %@NL@%
  14393.      BIND FOO.EXE \LIB\DOSCALLS.LIB%@NL@%
  14394. %@NL@%
  14395. %@CR:MCVK3007@%%@4@%The /o option specifies the name for the bound application, %@AI@%outfile%@AE@%, and may%@EH@%
  14396. contain a full path name. The default value for this field is the name of
  14397. the file that was given as %@AI@%infile%@AE@%.%@NL@%
  14398. %@NL@%
  14399. %@CR:MCVK3008@%%@4@%The /n option provides a way of listing functions that are supported in%@EH@%
  14400. protected mode only. As explained above, if any of these functions are ever
  14401. called in real mode, the BadDynLink function is called to abort the program.
  14402. The /n option can be used either with a list of one or more %@AI@%names%@AE@% (separated
  14403. by spaces), or Module Statements Attribute Defined with a %@AI@%file%@AE@%
  14404. specification preceded by the %@AB@%@%@AE@% sign. The specified file should consist of a
  14405. list of functions, one per line.%@NL@%
  14406. %@NL@%
  14407. %@CR:MCVK3009@%%@4@%The /m option causes a link map to be generated for the DOS 3.x environment%@EH@%
  14408. of the .EXE file. The %@AI@%mapfile%@AE@% is the destination of the link map. If %@AI@%mapfile%@AE@%
  14409. is not specified with the /m option, the destination of the link map is
  14410. standard output.%@NL@%
  14411. %@NL@%
  14412. %@NL@%
  14413. %@CR:MCVK4000@%%@2@%%@AB@%20.4  BIND Operation%@AE@%%@EH@%%@NL@%
  14414. %@NL@%
  14415. %@CR:MCVK4001@%%@4@%BIND produces a single executable file that can run in either real mode or%@EH@%
  14416. protected mode. To complete this task, BIND executes three major steps:%@NL@%
  14417. %@NL@%
  14418. %@CR:MCVK4002@%  1. Reads in the dynamic-link entry points (for imported functions) from%@NL@%
  14419.      the OS/2 executable file and outputs to a temporary object file the%@NL@%
  14420.      EXTDEF object records for each imported item. Each EXTDEF record tells%@NL@%
  14421.      the linker of an external reference that needs to be resolved through%@NL@%
  14422.      ordinary linking.%@NL@%
  14423. %@NL@%
  14424.   2. Invokes LINK, giving the executable file, the temporary object file,%@NL@%
  14425.      the API.LIB file, and any other libraries specified on the BIND command%@NL@%
  14426.      line. By linking in the loader and the API-simulator routines, LINK%@NL@%
  14427.      produces an executable file that can run in real mode.%@NL@%
  14428. %@NL@%
  14429.   3. Merges the protected-mode and real-mode executable files to produce a%@NL@%
  14430.      single file that can run in either mode.%@NL@%
  14431. %@NL@%
  14432. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14433. %@AI@%NOTE%@AE@%%@NL@%
  14434.    A dual-mode executable file produced with BIND can be run in both DOS 2.x%@NL@%
  14435.    and 3.x environments. However, if you change the name of an executable%@NL@%
  14436.    file produced by BIND, then it will not run under DOS 2.x.%@NL@%
  14437. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14438. %@NL@%
  14439. %@NL@%
  14440. %@CR:MCVK5000@%%@2@%%@AB@%20.5  Executable-File Layout%@AE@%%@EH@%%@NL@%
  14441. %@NL@%
  14442. %@CR:MCVK5001@%%@4@%OS/2 executable files have two headers. The first header has a DOS 3.x%@EH@%
  14443. format. The second header has the OS/2 format. When the executable file is
  14444. run on an OS/2 system, it ignores the first header and uses the OS/2 format.
  14445. When run under DOS 3.x, the old header is used to load the file. Figure
  14446. 20.1%@FN@%
  14447. Figure 20.1 is found on page 345 of the printed version.%@EF@% shows the arrangement of the merged headers.%@NL@%
  14448. %@NL@%
  14449. %@NL@%
  14450. %@CR:MCVK6000@%%@2@%%@AB@%20.6  How to Build a Dual-Mode Application%@AE@%%@EH@%%@NL@%
  14451. %@NL@%
  14452. %@CR:MCVK6001@%%@4@%If you cannot create a bound application out of your program, you may want%@EH@%
  14453. to create a dual-mode executable (.EXE) file instead. A dual-mode .EXE file
  14454. is similar to a bound file; both types of files run in either real mode or
  14455. protected mode. However, the two types of files have a different internal
  14456. structure.%@NL@%
  14457. %@NL@%
  14458. %@CR:MCVK6002@%%@4@%A bound file has common executable code that actually runs in both modes.%@EH@%
  14459. System calls are specific to real mode or protected mode, but all system
  14460. calls are modified at load time.%@NL@%
  14461. %@NL@%
  14462. %@CR:MCVK6003@%%@4@%In contrast, a dual-mode file has two separate programs contained in one%@EH@%
  14463. file. One of these programs is real-mode-only and the other is
  14464. protected-mode-only. All the code in a dual-mode executable file runs in
  14465. either one mode or the other.%@NL@%
  14466. %@NL@%
  14467. %@CR:MCVK6004@%%@4@%To create a dual-mode application:%@EH@%%@NL@%
  14468. %@NL@%
  14469. %@CR:MCVK6005@%  1. Link a real-mode version of your program.%@NL@%
  14470. %@NL@%
  14471.   2. Create a module-definition file that contains the statement%@NL@%
  14472. %@NL@%
  14473.           %@AS@%STUB 'PROGR.EXE'%@AE@%%@NL@%
  14474. %@NL@%
  14475.      in which you substitute the name of your real-mode program for%@NL@%
  14476.      PROGR.EXE.%@NL@%
  14477. %@NL@%
  14478.   3. Link the protected-mode version of your program with this%@NL@%
  14479.      module-definition file. The protected-mode version and the real-mode%@NL@%
  14480.      version should have different names.%@NL@%
  14481. %@NL@%
  14482. %@NL@%
  14483. %@CR:MCVL0000@%%@1@%%@AB@%Chapter 21  Using EXEHDR%@AE@%%@EH@%%@NL@%
  14484. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14485. %@NL@%
  14486. %@CR:MCVL0001@%%@4@%The Microsoft Segmented-EXE Header Utility (EXEHDR) displays the contents of%@EH@%
  14487. an executable-file header. You can use EXEHDR with OS/2 or Windows, and you
  14488. can use it with an application or dynamic-link library. (With a Windows
  14489. file, some of the meanings of the executable-file-header fields change; see
  14490. your Windows documentation for more information.) The principal uses of
  14491. EXEHDR include the following:%@NL@%
  14492. %@NL@%
  14493. %@CR:MCVL0002@%  ■  Determining whether a file is an application or a dynamic-link library%@NL@%
  14494. %@NL@%
  14495.   ■  Viewing the attributes set by the module-definition file%@NL@%
  14496. %@NL@%
  14497.   ■  Viewing the number and size of code and data segments%@NL@%
  14498. %@NL@%
  14499. %@CR:MCVL0003@%%@4@%Except where noted otherwise, the special terms and keywords mentioned in%@EH@%
  14500. this section are explained in Chapter 19%@BO:   c14f2@%, "Using Module-Definition Files."%@NL@%
  14501. %@NL@%
  14502. %@NL@%
  14503. %@CR:MCVL1000@%%@2@%%@AB@%21.1  The EXEHDR Command Line%@AE@%%@EH@%%@NL@%
  14504. %@NL@%
  14505. %@CR:MCVL1001@%%@4@%To invoke the EXEHDR utility, use the syntax%@EH@%%@NL@%
  14506. %@NL@%
  14507.      %@CR:MCVL1002@%EXEHDR «/v» %@AI@%file%@AE@%%@NL@%
  14508. %@NL@%
  14509. %@CR:MCVL1003@%in which %@AI@%file%@AE@% is an application or dynamic-link library for either the OS/2
  14510. or Windows environment. The /v option specifies output in verbose mode.%@NL@%
  14511. %@NL@%
  14512. %@CR:MCVL1004@%%@4@%Section 21.2%@BO:   d003c@% presents sample output and explains the meaning of each field%@EH@%
  14513. of the output. Section 21.3%@BO:   d13d9@% describes additional output that EXEHDR
  14514. produces when it is run in verbose mode.%@NL@%
  14515. %@NL@%
  14516. %@NL@%
  14517. %@CR:MCVL2000@%%@2@%%@AB@%21.2  EXEHDR Output%@AE@%%@EH@%%@NL@%
  14518. %@NL@%
  14519. %@CR:MCVL2001@%%@4@%This section discusses the meaning of each field in the output below──output%@EH@%
  14520. produced when %@AS@%EXEHDR LINK.EXE%@AE@% is specified on the OS/2 command line. The
  14521. first six fields list the contents of the segmented-executable-file header.
  14522. The rest of the output lists each physical segment in the file. (The term
  14523. "physical segment" is defined in Chapter 14, "Incremental Linking with
  14524. ILINK.")%@NL@%
  14525. %@NL@%
  14526.      Module:                   LINK%@NL@%
  14527.      Description:              Microsoft Segmented-Executable Linker%@NL@%
  14528.      Data:                     NONSHARED%@NL@%
  14529.      Initial CS:IP:            seg   2 offset 3d9c%@NL@%
  14530.      Initial SS:SP:            seg   4 offset 8e40%@NL@%
  14531.      DGROUP:                   seg   4%@NL@%
  14532. %@NL@%
  14533.      no. type address  file  mem   flags%@NL@%
  14534.        1 CODE 00003400 0f208 0f208%@NL@%
  14535.        2 CODE 00012e00 05b04 05b04%@NL@%
  14536.        3 DATA 00018c00 01c1f 01c1f%@NL@%
  14537.        4 DATA 0001aa00 01b10 08e40%@NL@%
  14538. %@NL@%
  14539. %@CR:MCVL2002@%%@4@%The %@AS@%Module%@AE@% field is the name of the application as specified in the %@AB@%NAME%@AE@%%@EH@%
  14540. statement of the module-definition file. If no module definition was used to
  14541. create the executable file, this field displays the name assumed by default.
  14542. If a module definition was used to create the file, but the %@AB@%LIBRARY%@AE@%
  14543. statement appeared instead of the %@AB@%NAME%@AE@% statement (thus specifying a
  14544. dynamic-link library), the name of the library is given and EXEHDR uses the
  14545. word %@AS@%Library%@AE@% instead of %@AS@%Module.%@AE@%%@NL@%
  14546. %@NL@%
  14547. %@CR:MCVL2003@%%@4@%The %@AS@%Description%@AE@% field gives the contents, if any, of the %@AB@%DESCRIPTION%@AE@%%@EH@%
  14548. statement of the module-definition file used to create the file being
  14549. examined.%@NL@%
  14550. %@NL@%
  14551. %@CR:MCVL2004@%%@4@%The %@AS@%Data%@AE@% field indicates the type of the program's automatic data segment:%@EH@%
  14552. %@AB@%SHARED%@AE@%, %@AB@%NONSHARED%@AE@%, or %@AB@%NONE%@AE@%. This type can be specified in a
  14553. module-definition file, but by default is %@AB@%NONSHARED%@AE@% for applications and
  14554. %@AB@%SHARED%@AE@% for dynamic-link libraries. In this context, %@AB@%SHARED%@AE@% and %@AB@%NONSHARED%@AE@% are
  14555. equivalent to the %@AB@%SINGLE%@AE@% and %@AB@%MULTIPLE%@AE@% attributes listed in Section 19.6%@BO:   c53df@%.
  14556. (The "automatic data segment" is the physical segment corresponding to the
  14557. group named DGROUP.)%@NL@%
  14558. %@NL@%
  14559. %@CR:MCVL2005@%%@4@%The %@AS@%Initial CS:IP%@AE@% field is the program starting address (if an application%@EH@%
  14560. is being examined) or address of the initialization routine (if a
  14561. dynamic-link library is being examined).%@NL@%
  14562. %@NL@%
  14563. %@CR:MCVL2006@%%@4@%The %@AS@%Initial SS:SP%@AE@% field gives the value of the initial stack pointer.%@EH@%%@NL@%
  14564. %@NL@%
  14565. %@CR:MCVL2007@%%@4@%The %@AS@%DGROUP%@AE@% field is the segment number of the automatic data segment. This%@EH@%
  14566. segment corresponds to the group named DGROUP in the program's object
  14567. modules. Note that segment numbers start with the number 1.%@NL@%
  14568. %@NL@%
  14569. %@CR:MCVL2008@%%@4@%After the contents of the OS/2 executable header are displayed, the contents%@EH@%
  14570. of the segment table are listed. The following list describes the meaning of
  14571. each heading in the table. Note that all values are given in hexadecimal
  14572. radix except for the segment index number.%@NL@%
  14573. %@CR:MCVL2009@%%@NL@%
  14574. %@TH:   30   1578  2 20 56 @%%@AB@%Heading             Meaning%@AE@%%@AS@%no.%@AE@%                 Segment index number, starting with 1, in                    decimal radix.%@AS@%type%@AE@%                Identification of the segment as a code or data                    segment. A code segment is any segment with                    class name ending in %@AS@%'CODE'%@AE@%. All other segments                    are data segments.%@AS@%%@AS@%address%@AE@%             Location, within the file, of the contents of                    the segment.%@AS@%file%@AE@%                Size in bytes of the segment, as contained in                    the file.%@AS@%mem%@AE@%                 Size in bytes of the segment as it will be                    stored in memory. If the value of this field is                    greater than the value of the %@AS@%file%@AE@% field, OS/2                    pads the additional space with zero values at                    load time.%@AS@%flags%@AE@%               Segment attributes, as defined in Chapter 19,                    "Using Module-Definition Files." If the /v                    option is not used, only nondefault attributes                    are listed. Attributes are given in the form                    specified in Chapter 19%@BO:   c14f2@%: %@AB@%READWRITE%@AE@%, %@AB@%PRELOAD%@AE@%,                    and so forth. Attributes that are meaningful to                    Windows but not to OS/2 are displayed as                    lowercase and in parentheses, [e.g., %@AS@%(movable)%@AE@%]%@TE:   30   1578  2 20 56 @%
  14575. %@NL@%
  14576. %@CR:MCVL3000@%%@2@%%@AB@%21.3  Output in Verbose Mode%@AE@%%@EH@%%@NL@%
  14577. %@NL@%
  14578. %@CR:MCVL3001@%%@4@%When you specify the /v mode, the EXEHDR utility gives all the information%@EH@%
  14579. discussed in Section 21.2%@BO:   d003c@%, as well as some additional information.
  14580. Specifically, when running in verbose mode, EXEHDR displays the following
  14581. information in this order:%@NL@%
  14582. %@NL@%
  14583. %@CR:MCVL3002@%  1. DOS 3.x header information. All OS/2 executable files have a DOS 3.x%@NL@%
  14584.      header, whether bound or not. If the program is not bound, the DOS 3.x%@NL@%
  14585.      portion typically consists of a stub that terminates the program. For a%@NL@%
  14586.      de-scription of DOS executable-file-header fields, see the %@AI@%Microsoft%@AE@%%@NL@%
  14587.      %@AI@%MS-DOS Programmer's Reference%@AE@%, or see Chapter 17%@BO:   ba564@% in this manual,%@NL@%
  14588.      "Using Other Utilities," for information on the Microsoft EXE File%@NL@%
  14589.      Header Utility (EXEMOD).%@NL@%
  14590. %@NL@%
  14591.   2. OS/2-specific header fields. This output includes the fields described%@NL@%
  14592.      in Section 21.2%@BO:   d003c@% except for the segment table. (The segment-table%@NL@%
  14593.      display for verbose mode is described below.)%@NL@%
  14594. %@NL@%
  14595.   3. File addresses and lengths of the various tables in the executable%@NL@%
  14596.      file, as in the following example:%@NL@%
  14597. %@NL@%
  14598.      Resource Table:            00003273 length 0000 (0)%@NL@%
  14599.      Resident Names Table:      00003273 length 0008 (8)%@NL@%
  14600.      Module Reference Table:    0000327b length 0006 (6)%@NL@%
  14601.      Imported Names Table:      00003281 length 0033 (51)%@NL@%
  14602.      Entry Table:               000032b4 length 0002 (2)%@NL@%
  14603.      Non-resident Names Table:  000032b6 length 0029 (41)%@NL@%
  14604.      Movable entry points:      0%@NL@%
  14605.      Segment sector size:       512%@NL@%
  14606. %@NL@%
  14607.      The first field in each row gives the name of the table, the second%@NL@%
  14608.      field gives the address of the table within the file, the third field%@NL@%
  14609.      gives the length of the table in hexadecimal radix, and the last field%@NL@%
  14610.      gives the length of the table in decimal radix. See the %@AI@%Microsoft%@AE@%%@NL@%
  14611.      %@AI@%Operating System/2 Programmer's Reference%@AE@% for an explanation of each%@NL@%
  14612.      table.%@AI@%%@NL@%
  14613. %@NL@%
  14614.   4. Segment table with complete attributes, not just the nondefault%@NL@%
  14615.      attributes. In addition to the attributes described in Section 21.2%@BO:   d003c@%,%@NL@%
  14616.      verbose mode also displays these two additional attributes:%@NL@%
  14617. %@NL@%
  14618.        ■  The %@AS@%relocs%@AE@% attribute is displayed for each segment that has%@NL@%
  14619.           address relocations. Relocations occur in each segment that%@NL@%
  14620.           references objects in other segments or makes dynamic-link%@NL@%
  14621.           references.%@NL@%
  14622. %@NL@%
  14623.        ■  The %@AS@%iterated%@AE@% attribute is displayed for each segment that has%@NL@%
  14624.           iterated data. Iterated data consist of a special code that packs%@NL@%
  14625.           repeated bytes; for example, OS/2 executables produced with the%@NL@%
  14626.           /EXEPACK option of LINK have iterated data.%@NL@%
  14627. %@NL@%
  14628.   5. Run-time relocations and fixups. See the object-module information in%@NL@%
  14629.      the %@AI@%Microsoft Operating System/2 Programmer's Reference%@AE@% for more%@NL@%
  14630.      information.%@NL@%
  14631. %@NL@%
  14632.   6. Finally, EXEHDR lists all exported entry points. Exports are discussed%@NL@%
  14633.      in Chapter 18%@BO:   be41d@%, "Linking for Windows and OS/2 Systems," and in Section%@NL@%
  14634.      19.9%@BO:   c9500@%, "The EXPORTS Statement."%@NL@%
  14635. %@NL@%
  14636. %@NL@%
  14637. %@CR:MCVa0000@%%@1@%%@AB@%Appendix A  Regular Expressions%@AE@%%@EH@%%@NL@%
  14638. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14639. %@NL@%
  14640. %@CR:MCVa0001@%%@4@%Regular expressions are used to specify text patterns in searches for%@EH@%
  14641. variable text strings. Special characters can be used within regular
  14642. expressions to specify groups of characters to be searched for.%@NL@%
  14643. %@NL@%
  14644. %@CR:MCVa0002@%%@4@%This appendix explains all of the special characters you can use to form%@EH@%
  14645. regular expressions, but you do not need to learn them all to use the
  14646. CodeView Search commands. The simplest form of regular expression is simply
  14647. a text string. For example, if you want to search for all instances of the
  14648. symbol %@AS@%COUNT%@AE@%, you can specify %@AS@%COUNT%@AE@% as the string to be found.%@NL@%
  14649. %@NL@%
  14650. %@CR:MCVa0003@%%@4@%If you want to search only for simple strings, you do not need to read this%@EH@%
  14651. entire appendix, but you should know how to search for strings containing
  14652. the special characters used in regular expressions. See Section A.2%@BO:   d2e49@% for
  14653. more information.%@NL@%
  14654. %@NL@%
  14655. %@NL@%
  14656. %@CR:MCVa1000@%%@2@%%@AB@%A.1  Special Characters in Regular Expressions%@AE@%%@EH@%%@NL@%
  14657. %@NL@%
  14658. %@CR:MCVa1001@%%@4@%The following characters have special meanings in regular expressions:%@EH@%%@NL@%
  14659. %@NL@%
  14660. %@CR:MCVa1002@%%@AB@%Character                   Purpose%@AE@%%@NL@%
  14661. %@NL@%
  14662. Asterisk (%@AB@%*%@AE@%)                Matches any number of repetitions of the%@NL@%
  14663.                             previous character.%@NL@%
  14664. %@NL@%
  14665. Backslash (%@AB@%\%@AE@%)               Removes the special characteristics of the%@NL@%
  14666.                             following characters: backslash (%@AB@%\%@AE@%), period (%@AB@%.%@AE@%),%@NL@%
  14667.                             caret (%@AB@%^%@AE@%), dollar sign (%@AB@%$%@AE@%), asterisk (%@AB@%*%@AE@%), and%@NL@%
  14668.                             left bracket (%@AB@%[%@AE@%).%@NL@%
  14669. %@NL@%
  14670. Brackets (%@AB@%[ ]%@AE@%)              Matches characters specified within the%@NL@%
  14671.                             brackets. The following special characters may%@NL@%
  14672.                             be used:%@NL@%
  14673. %@NL@%
  14674.                             %@AB@%Character       Purpose%@AE@%%@NL@%
  14675. %@NL@%
  14676.                             Caret (%@AB@%^%@AE@%)       Reverses the function of the%@NL@%
  14677.                                             brackets. That is, the caret%@NL@%
  14678.                                             matches any character except%@NL@%
  14679.                                             those specified within the%@NL@%
  14680.                                             brackets.%@NL@%
  14681. %@NL@%
  14682.                             Dash (%@AB@%-%@AE@%)        Matches characters in ASCII%@NL@%
  14683.                                             order between (inclusive of)%@NL@%
  14684.                                             the characters on either%@NL@%
  14685.                                             side of the dash.%@NL@%
  14686. %@NL@%
  14687.                             Caret (%@AB@%^%@AE@%)       Matches beginning of line.%@NL@%
  14688. %@NL@%
  14689.                             Dollar sign (%@AB@%$%@AE@%) Matches end of line.%@NL@%
  14690. %@NL@%
  14691.                             Period (%@AB@%.%@AE@%)      Matches any character.%@NL@%
  14692. %@NL@%
  14693. %@NL@%
  14694. %@CR:MCVa2000@%%@2@%%@AB@%A.2  Searching for Special Characters%@AE@%%@EH@%%@NL@%
  14695. %@NL@%
  14696. %@CR:MCVa2001@%%@4@%If you need to match one of the special characters used in regular%@EH@%
  14697. expressions, precede it with a backslash when you specify a search string.
  14698. The special charac-ters are the asterisk (%@AB@%*%@AE@%), backslash (%@AB@%\%@AE@%), left bracket
  14699. (%@AB@%[%@AE@%), caret (%@AB@%^%@AE@%), dollar sign (%@AB@%$%@AE@%), and period (%@AB@%.%@AE@%).%@NL@%
  14700. %@NL@%
  14701. %@CR:MCVa2002@%%@4@%For example, the regular expression %@AS@%I*J%@AE@% matches such combinations as %@AS@%J,%@AE@% %@AS@%IJ,%@AE@%%@EH@%
  14702. %@AS@%IIJ,%@AE@% and %@AS@%IIIJ%@AE@%. The regular expression %@AS@%I\*J%@AE@% matches only %@AS@%I*J%@AE@%. The backslash
  14703. is necessary because the asterisk (%@AB@%*%@AE@%) is a special character in regular
  14704. expressions.%@NL@%
  14705. %@NL@%
  14706. %@NL@%
  14707. %@CR:MCVa3000@%%@2@%%@AB@%A.3  Using the Period%@AE@%%@EH@%%@NL@%
  14708. %@NL@%
  14709. %@CR:MCVa3001@%%@4@%A period in a regular expression matches any single character. This%@EH@%
  14710. corresponds to the question mark (%@AB@%?%@AE@%) used in specifying DOS file names.%@NL@%
  14711. %@NL@%
  14712. %@CR:MCVa3002@%%@4@%For example, you could use the regular expression %@AS@%AMAX.%@AE@% to search for either%@EH@%
  14713. of the intrinsic functions%@AS@%AMAX0%@AE@% and %@AS@%AMAX1%@AE@%. You could use the expression %@AS@%X.Y%@AE@%
  14714. to search for strings such as %@AS@%X+Y%@AE@%, %@AS@%X-Y%@AE@%, or %@AS@%X*Y%@AE@%. If your programming style is
  14715. to put a space between variables and operators, you could use the regular
  14716. expression %@AS@%X.Y%@AE@% for the same purpose.%@NL@%
  14717. %@NL@%
  14718. %@CR:MCVa3003@%%@4@%Note that when you use the period as a wild card, you will find the strings%@EH@%
  14719. you are looking for, but you may also find other strings that you aren't
  14720. interested in. You can use brackets to be more exact about the strings you
  14721. want to find.%@NL@%
  14722. %@NL@%
  14723. %@NL@%
  14724. %@CR:MCVa4000@%%@2@%%@AB@%A.4  Using Brackets%@AE@%%@EH@%%@NL@%
  14725. %@NL@%
  14726. %@CR:MCVa4001@%%@4@%You can use brackets to specify a character or characters you want to match.%@EH@%
  14727. Any of the characters listed within the brackets is an acceptable match.
  14728. This method is more exact than using a period to match any character.%@NL@%
  14729. %@NL@%
  14730. %@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@%
  14731. but not %@AS@%x=y%@AE@% or %@AS@%xzy%@AE@%. The regular expression %@AS@%COUNT[12]%@AE@% matches %@AS@%COUNT1%@AE@% and
  14732. %@AS@%COUNT2%@AE@%, but not %@AS@%COUNT3%@AE@%.%@NL@%
  14733. %@NL@%
  14734. %@CR:MCVa4003@%%@4@%Most regular-expression special characters have no special meaning when used%@EH@%
  14735. within brackets. The only special characters within brackets are the caret
  14736. (%@AB@%^%@AE@%), dash (%@AB@%-%@AE@%), and right bracket (%@AB@%]%@AE@%). Even these characters only have
  14737. special meanings in certain contexts, as explained in Sections A.4.1%@BO:   d39c0@%-A.4.3.%@NL@%
  14738. %@NL@%
  14739. %@NL@%
  14740. %@CR:MCVa4100@%%@3@%%@AB@%A.4.1  Using the Dash within Brackets%@AE@%%@EH@%%@NL@%
  14741. %@NL@%
  14742. %@CR:MCVa4101@%%@4@%The dash (minus sign) can be used within brackets to specify a group of%@EH@%
  14743. sequential ASCII characters. For example, the regular expression %@AS@%[0-9]%@AE@%
  14744. matches any digit; it is equivalent to %@AS@%[0123456789]%@AE@%. Similarly, %@AS@%[a-z]%@AE@%
  14745. matches any lowercase letter, and %@AS@%[A-Z]%@AE@% matches any uppercase letter.%@NL@%
  14746. %@NL@%
  14747. %@CR:MCVa4102@%%@4@%You can combine ASCII ranges of characters with other listed characters. For%@EH@%
  14748. example, %@AS@%[A-Za-z ]%@AE@% matches any uppercase or lowercase letter or a space.%@NL@%
  14749. %@NL@%
  14750. %@CR:MCVa4103@%%@4@%The dash has this special meaning only if you use it to separate two ASCII%@EH@%
  14751. characters. It has no special meaning if used directly after the starting
  14752. bracket or directly before the ending bracket. This means you must be
  14753. careful where you place the dash (minus sign) within brackets.%@NL@%
  14754. %@NL@%
  14755. %@CR:MCVa4104@%%@4@%For example, you might use the regular expression %@AS@%[+-/*]%@AE@% to match the%@EH@%
  14756. characters %@AS@%+%@AE@%, %@AS@%-%@AE@%, %@AS@%/%@AE@%, and %@AS@%*%@AE@%. However, this does not give the intended result.
  14757. Instead it matches the characters between %@AS@%+%@AE@% and %@AS@%/%@AE@% and also the character %@AS@%*%@AE@%.
  14758. To specify the intended characters, put the dash first or last in the list:
  14759. %@AS@%[-+/*]%@AE@% or %@AS@%[+/*-]%@AE@%.%@NL@%
  14760. %@NL@%
  14761. %@NL@%
  14762. %@CR:MCVa4200@%%@3@%%@AB@%A.4.2  Using the Caret within Brackets%@AE@%%@EH@%%@NL@%
  14763. %@NL@%
  14764. %@CR:MCVa4201@%%@4@%If used as the first character within brackets, the caret (%@AB@%^%@AE@%) reverses the%@EH@%
  14765. meaning of the brackets. That is, any character except the ones in brackets
  14766. is matched. For example, the regular expression %@AS@%[^0-9]%@AE@% matches any character
  14767. that is not a digit. Specifying the characters to be excluded is often more
  14768. concise than specifying the characters you want to match.%@NL@%
  14769. %@NL@%
  14770. %@CR:MCVa4202@%%@4@%If the caret is not in the first position within the brackets, it is treated%@EH@%
  14771. as an ordinary character. For example, the expression %@AS@%[0-9^]%@AE@% matches any
  14772. digit or a caret.%@NL@%
  14773. %@NL@%
  14774. %@NL@%
  14775. %@CR:MCVa4300@%%@3@%%@AB@%A.4.3  Matching Brackets within Brackets%@AE@%%@EH@%%@NL@%
  14776. %@NL@%
  14777. %@CR:MCVa4301@%%@4@%Sometimes you may want to specify the bracket characters as characters to be%@EH@%
  14778. matched. This is no problem with the left bracket; it is treated as a normal
  14779. character. However, the right bracket is interpreted as the end of the
  14780. character list rather than as a character to be matched.%@NL@%
  14781. %@NL@%
  14782. %@CR:MCVa4302@%%@4@%If you want the right bracket to be matched, you must make it the first%@EH@%
  14783. character after the initial left bracket. For example, the regular
  14784. expression %@AS@%[]#![@%]%@AE@% matches either bracket character or any of the other
  14785. characters listed within the brackets. However, if you changed the order of
  14786. just one of the characters (to %@AS@%[#]![@%]%@AE@%), the meaning would be changed so
  14787. that you would be specifying two groups of characters in brackets: %@AS@%[#]%@AE@% and
  14788. %@AS@%[@%]%@AE@%.%@NL@%
  14789. %@NL@%
  14790. %@NL@%
  14791. %@CR:MCVa5000@%%@2@%%@AB@%A.5  Using the Asterisk%@AE@%%@EH@%%@NL@%
  14792. %@NL@%
  14793. %@CR:MCVa5001@%%@4@%The asterisk matches zero or more occurrences of the character preceding the%@EH@%
  14794. asterisk.%@NL@%
  14795. %@NL@%
  14796. %@CR:MCVa5002@%%@4@%For example, the regular expression %@AS@%IF * TEST%@AE@% matches any number of%@EH@%
  14797. repetitions of the space character that follow the word "%@AS@%if%@AE@%."%@NL@%
  14798. %@NL@%
  14799.      IF TEST%@NL@%
  14800.      IF        TEST%@NL@%
  14801.      IF TEST%@NL@%
  14802.      IFTEST%@NL@%
  14803. %@NL@%
  14804. %@CR:MCVa5003@%%@4@%Notice that the last example contains zero repetitions of the space%@EH@%
  14805. character.%@NL@%
  14806. %@NL@%
  14807. %@CR:MCVa5004@%%@4@%The asterisk is convenient if the text you are searching for might contain%@EH@%
  14808. some spaces, but you don't know the exact number. (Be careful in this
  14809. situation: you can't be sure if the text contains a series of spaces or a
  14810. tab.)%@NL@%
  14811. %@NL@%
  14812. %@CR:MCVa5005@%%@4@%You might also use the asterisk to search for a symbol when you aren't sure%@EH@%
  14813. of the spelling. For example, you could use %@AS@%first*ime%@AE@% if you aren't sure if
  14814. the identifier you are searching for is spelled %@AS@%firsttime%@AE@% or %@AS@%firstime%@AE@%.%@NL@%
  14815. %@NL@%
  14816. %@CR:MCVa5006@%%@4@%One particularly powerful use of the asterisk is to combine it with the%@EH@%
  14817. period (%@AB@%.%@AE@%*). This combination searches for any group of characters. It is
  14818. similar to the asterisk used in specifying DOS file names. For example, the
  14819. expression %@AS@%(.*)%@AE@% matches %@AS@%(test)%@AE@%, %@AS@%(response .EQ. 'Y')%@AE@%, %@AS@%(x=0;x .LE. 20;x=x+1)%@AE@%,
  14820. or any other string that starts with a left parenthesis and ends with a
  14821. right parenthesis.%@NL@%
  14822. %@NL@%
  14823. %@CR:MCVa5007@%%@4@%You can use brackets with the asterisk to search for a sequence of repeated%@EH@%
  14824. characters of a given type. For example, %@AS@%\[[0-9]*]%@AE@% matches number strings
  14825. within brackets (%@AS@%[1353]%@AE@% or %@AS@%[3]%@AE@%), but does not match character strings within
  14826. brackets (%@AS@%[count]%@AE@%). Empty brackets (%@AS@%[%@AE@%%@AS@%]%@AE@%) are also matched since the
  14827. characters in the brackets are repeated zero times.%@AS@%%@NL@%
  14828. %@NL@%
  14829. %@NL@%
  14830. %@CR:MCVa6000@%%@2@%%@AB@%A.6  Matching the Start or End of a Line%@AE@%%@EH@%%@NL@%
  14831. %@NL@%
  14832. %@CR:MCVa6001@%%@4@%In regular expressions, the caret (%@AB@%^%@AE@%) matches the start of a line, and the%@EH@%
  14833. dollar sign (%@AB@%$%@AE@%) matches the end of a line.%@NL@%
  14834. %@NL@%
  14835. %@CR:MCVa6002@%%@4@%For example, the regular expression %@AS@%^C%@AE@% matches any uppercase C that starts a%@EH@%
  14836. line. Similarly, %@AS@%)$%@AE@% matches a right parenthesis at the end of a line, but
  14837. not a right parenthesis within a line.%@NL@%
  14838. %@NL@%
  14839. %@CR:MCVa6003@%%@4@%You can combine both symbols to search for entire lines. For example, %@AS@%^{$%@AE@%%@EH@%
  14840. matches any line consisting of only a left curly brace in the left margin
  14841. and %@AS@%^$%@AE@% matches blank lines.%@NL@%
  14842. %@NL@%
  14843. %@NL@%
  14844.  
  14845. %@CR:MCVb0000@%%@1@%%@AB@%Appendix B  Using Exit Codes%@AE@%%@EH@%%@NL@%
  14846. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14847. %@NL@%
  14848. %@CR:MCVb0001@%%@4@%Most utilities return an exit code (sometimes called an "errorlevel" code)%@EH@%
  14849. used by DOS batch files or other programs. If the program finishes without
  14850. errors, it returns an exit code 0. The code varies if the program encounters
  14851. an error.%@NL@%
  14852. %@NL@%
  14853. %@NL@%
  14854. %@CR:MCVb1000@%%@2@%%@AB@%B.1  Exit Codes with NMAKE%@AE@%%@EH@%%@NL@%
  14855. %@NL@%
  14856. %@CR:MCVb1001@%%@4@%The NMAKE stops execution if a program executed by one of the commands in%@EH@%
  14857. the NMAKE description file encounters an error. (Invoke NMAKE with the /I
  14858. option to disable this behavior for the entire description file, or place a
  14859. minus sign (-) in front of a command to disable it only for that command.)
  14860. The exit code returned by the program is displayed as part of the error
  14861. message.%@NL@%
  14862. %@NL@%
  14863. %@CR:MCVb1002@%%@4@%Assume the NMAKE description file %@AS@%TEST%@AE@% contains the following lines:%@EH@%%@NL@%
  14864. %@NL@%
  14865.      TEST.OBJ :     TEST.FOR%@NL@%
  14866.            FL /c TEST.FOR%@NL@%
  14867. %@NL@%
  14868. %@CR:MCVb1003@%%@4@%If the source code in %@AS@%TEST.FOR%@AE@% contains a program error (but not if it%@EH@%
  14869. contains a warning error), you would see the following message the first
  14870. time you use NMAKE with the NMAKE description file %@AS@%TEST%@AE@%:%@NL@%
  14871. %@NL@%
  14872.      "nmake: CL /c TEST.FOR - error 2"%@NL@%
  14873. %@NL@%
  14874. %@CR:MCVb1004@%%@4@%This error message indicates that the command %@AS@%CL /c TEST.FOR%@AE@% in the NMAKE%@EH@%
  14875. description file returned exit code 2.%@NL@%
  14876. %@NL@%
  14877. %@CR:MCVb1005@%%@4@%You can also test exit codes in NMAKE description files with the %@AB@%!IF%@AE@%%@EH@%
  14878. directive.%@NL@%
  14879. %@NL@%
  14880. %@NL@%
  14881. %@CR:MCVb2000@%%@2@%%@AB@%B.2  Exit Codes with DOS Batch Files%@AE@%%@EH@%%@NL@%
  14882. %@NL@%
  14883. %@CR:MCVb2001@%%@4@%If you prefer to use DOS batch files instead of NMAKE description files, you%@EH@%
  14884. can test the code returned with the IF command. The following sample batch
  14885. file, called %@AS@%COMPILE.BAT%@AE@%, illustrates how to do this:%@NL@%
  14886. %@NL@%
  14887.      CL /c %1%@NL@%
  14888.      IF NOT ERRORLEVEL 1 LINK %1;%@NL@%
  14889.      IF NOT ERRORLEVEL 1 %1%@NL@%
  14890. %@NL@%
  14891. %@CR:MCVb2002@%%@4@%You can execute this sample batch file with the following command:%@EH@%%@NL@%
  14892. %@NL@%
  14893.      COMPILE TEST.C%@NL@%
  14894. %@NL@%
  14895. %@CR:MCVb2003@%%@4@%DOS then executes the first line of the batch file, substituting %@AS@%TEST.C%@AE@% for%@EH@%
  14896. the parameter %@AS@%%1%@AE@%, as in the command line below.%@NL@%
  14897. %@NL@%
  14898.      CL /c TEST.C%@NL@%
  14899. %@NL@%
  14900. %@CR:MCVb2004@%%@4@%It returns an exit code 0 if the compilation is successful or a higher code%@EH@%
  14901. if the compiler encounters an error. In the second line, DOS tests to see if
  14902. the code returned by the previous line is 1 or higher. If it is not (that
  14903. is, if the code is 0), DOS executes the following command:%@NL@%
  14904. %@NL@%
  14905.      LINK TEST;%@NL@%
  14906. %@NL@%
  14907. %@CR:MCVb2005@%%@4@%LINK also returns a code that is tested by the third line.%@EH@%%@NL@%
  14908. %@NL@%
  14909. %@NL@%
  14910. %@CR:MCVb3000@%%@2@%%@AB@%B.3  Exit Codes for Programs%@AE@%%@EH@%%@NL@%
  14911. %@NL@%
  14912. %@CR:MCVb3001@%%@4@%An exit code 0 always indicates execution of the program with no fatal%@EH@%
  14913. errors. Warning errors also return exit code 0. NMAKE can return several
  14914. codes indica-ting different kinds of errors; other programs return only one
  14915. code. The exit codes for each program are listed in Sections B.3.1%@BO:   d5edc@%-B.3.4.%@NL@%
  14916. %@NL@%
  14917. %@NL@%
  14918. %@CR:MCVb3100@%%@3@%%@AB@%B.3.1  LINK Exit Codes%@AE@%%@EH@%%@NL@%
  14919. %@NL@%
  14920. %@CR:MCVb3101@%%@NL@%%@AU@%Code                       Meaning%@AE@%%@NL@%
  14921. %@NL@%
  14922. 0                          No error.%@NL@%
  14923. %@NL@%
  14924. 2                          Program error. Commands or files given as input%@NL@%
  14925.                            to the linker produced the error.%@NL@%
  14926. %@NL@%
  14927. 4                          System error. The linker encountered one of the%@NL@%
  14928.                            following problems: 1) ran out of space on output%@NL@%
  14929.                            files; 2) was unable to reopen the temporary%@NL@%
  14930.                            file; 3) experienced an internal error; 4) was%@NL@%
  14931.                            interrupted by the user.%@NL@%
  14932. %@NL@%
  14933. %@NL@%
  14934. %@NL@%
  14935. %@CR:MCVb3200@%%@3@%%@AB@%B.3.2  LIB Exit Codes%@AE@%%@EH@%%@NL@%
  14936. %@NL@%
  14937. %@CR:MCVb3201@%%@AU@%Code                       Meaning%@AE@%%@NL@%
  14938. %@NL@%
  14939. 0                          No error.%@NL@%
  14940. %@NL@%
  14941. 2                          Program error. Commands or files given as input%@NL@%
  14942.                            to the utility produced the error.%@NL@%
  14943. %@NL@%
  14944. 4                          System error. The library manager encountered one%@NL@%
  14945.                            of the following problems: 1) ran out of memory;%@NL@%
  14946.                            2) experienced an internal error; 3) was%@NL@%
  14947.                            interrupted by the user.%@NL@%
  14948. %@NL@%
  14949. %@NL@%
  14950. %@CR:MCVb3300@%%@3@%%@AB@%B.3.3  NMAKE Exit Codes%@AE@%%@EH@%%@NL@%
  14951. %@NL@%
  14952. %@CR:MCVb3301@%%@AU@%Code                       Meaning%@AE@%%@NL@%
  14953. %@NL@%
  14954. 0                          No error%@NL@%
  14955. %@NL@%
  14956. 2                          Program error%@NL@%
  14957. %@NL@%
  14958. 4                          System error──out of memory%@NL@%
  14959. %@NL@%
  14960. %@NL@%
  14961. %@CR:MCVb3302@%%@4@%If a program called by a command in the NMAKE description file produces an%@EH@%
  14962. error, the exit code is displayed in the NMAKE error message.%@NL@%
  14963. %@NL@%
  14964. %@NL@%
  14965. %@CR:MCVb3400@%%@3@%%@AB@%B.3.4  EXEMOD and SETENV Exit Codes%@AE@%%@EH@%%@NL@%
  14966. %@NL@%
  14967. %@CR:MCVb3401@%%@AU@%Code                       Meaning%@AE@%%@NL@%
  14968. %@NL@%
  14969. 0                          No error.%@NL@%
  14970. %@NL@%
  14971. 2                          Program error. Commands or files given as input%@NL@%
  14972.                            to the utility produced the error.%@NL@%
  14973. %@NL@%
  14974. 4                          System error. The utility encountered one of the%@NL@%
  14975.                            following problems: 1) ran out of memory; 2)%@NL@%
  14976.                            experienced an internal error; 3) was interrupted%@NL@%
  14977.                            by the user.%@NL@%
  14978. %@NL@%
  14979. %@NL@%
  14980. %@CR:MCVb3500@%%@3@%%@AB@%B.3.5  CVPACK Exit Codes%@AE@%%@EH@%%@NL@%
  14981. %@NL@%
  14982. %@CR:MCVb3501@%%@AU@%Code                       Meaning%@AE@%%@NL@%
  14983. %@NL@%
  14984. 0                          No error.%@NL@%
  14985. %@NL@%
  14986. 1                          Program error.  Commands or files given as%@NL@%
  14987.                            input to the utility produced the error.%@NL@%
  14988. %@NL@%
  14989. %@CR:MCVc0000@%%@1@%%@AB@%Appendix C  Error Messages%@AE@%%@EH@%%@NL@%
  14990. ───────────────────────────────────────────────────────────────────────────%@NL@%
  14991. %@NL@%
  14992. %@NL@%
  14993. %@CR:MCVc1000@%%@2@%%@AB@%C.1  CodeView Error Messages%@AE@%%@EH@%%@NL@%
  14994. %@NL@%
  14995. %@CR:MCVc1001@%%@4@%The CodeView debugger displays an error message whenever it detects a%@EH@%
  14996. command it cannot execute. Most errors (start-up errors are the exception)
  14997. terminate the CodeView command under which the error occurred but do not
  14998. terminate the debugger. You may see any of the following messages.%@NL@%
  14999. %@NL@%
  15000. %@CR:MCVcE001@%%@4@%%@AB@%? cannot display%@AE@%%@EH@%%@NL@%
  15001. %@NL@%
  15002.           The Display Expression command (%@AB@%?%@AE@%) has been passed a valid symbol%@NL@%
  15003.           it cannot display. A variable with enumeration type cannot be%@NL@%
  15004.           displayed.%@NL@%
  15005. %@NL@%
  15006. %@CR:MCVcE002@%%@4@%%@AB@%Argument to IMAG/DIMAG must be simple type%@AE@%%@EH@%%@NL@%
  15007. %@NL@%
  15008.           You specified an argument to an %@AB@%IMAG%@AE@% or %@AB@%DIMAG%@AE@% function not%@NL@%
  15009.           permitted, such as an array with no subscripts.%@NL@%
  15010. %@NL@%
  15011. %@CR:MCVcE003@%%@4@%%@AB@%Array must have subscript%@AE@%%@EH@%%@NL@%
  15012. %@NL@%
  15013.           You specified an array without any subscripts in an expression,%@NL@%
  15014.           such as %@AS@%IARRAY+2%@AE@%. A correct example would be %@AS@%IARRAY[1]+2%@AE@%.%@NL@%
  15015. %@NL@%
  15016. %@CR:MCVcE004@%%@4@%%@AB@%Bad address%@AE@%%@EH@%%@NL@%
  15017. %@NL@%
  15018.           You specified an address in an invalid form.%@NL@%
  15019. %@NL@%
  15020.           For instance, you may have entered an address containing%@NL@%
  15021.           hexadecimal characters when the radix is decimal.%@NL@%
  15022. %@NL@%
  15023. %@CR:MCVcE005@%%@4@%%@AB@%Bad breakpoint command%@AE@%%@EH@%%@NL@%
  15024. %@NL@%
  15025.           You typed an invalid breakpoint number with the Breakpoint Clear,%@NL@%
  15026.           Breakpoint Disable, or Breakpoint Enable command.%@NL@%
  15027. %@NL@%
  15028.           The number must be in the range 0 to 19.%@NL@%
  15029. %@NL@%
  15030. %@CR:MCVcE006@%%@4@%%@AB@%Bad emulator info%@AE@%%@EH@%%@NL@%
  15031. %@NL@%
  15032.           The CodeView debugger cannot read data from the floating-point%@NL@%
  15033.           emulator.%@NL@%
  15034. %@NL@%
  15035. %@CR:MCVcE007@%%@4@%%@AB@%Bad flag%@AE@%%@EH@%%@NL@%
  15036. %@NL@%
  15037.           You specified an invalid flag mnemonic with the Register dialog%@NL@%
  15038.           command (%@AB@%R%@AE@%).%@NL@%
  15039. %@NL@%
  15040.           Use one of the mnemonics displayed when you enter the command %@AB@%RF%@AE@%.%@NL@%
  15041. %@NL@%
  15042. %@CR:MCVcE008@%%@4@%%@AB@%Bad format string%@AE@%%@EH@%%@NL@%
  15043. %@NL@%
  15044.           You used an invalid format specifier following an expression.%@NL@%
  15045. %@NL@%
  15046.           Expressions used with the Display Expression, Watch, Watchpoint,%@NL@%
  15047.           and Tracepoint commands can have CodeView format specifiers set%@NL@%
  15048.           off from the expression by a comma. The valid format specifiers%@NL@%
  15049.           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@%
  15050.           can be preceded by the prefix %@AB@%h%@AE@% or %@AB@%l%@AE@%. See the Display Expression%@NL@%
  15051.           command for more information about format specifiers.%@NL@%
  15052. %@NL@%
  15053. %@CR:MCVcE009@%%@4@%%@AB@%Bad integer or real constant%@AE@%%@EH@%%@NL@%
  15054. %@NL@%
  15055.           You specified an illegal numeric constant in an expression.%@NL@%
  15056. %@NL@%
  15057. %@CR:MCVcE010@%%@4@%%@AB@%Bad intrinsic function%@AE@%%@EH@%%@NL@%
  15058. %@NL@%
  15059.           You specified an illegal intrinsic function name in an expression.%@NL@%
  15060. %@NL@%
  15061. %@CR:MCVcE011@%%@4@%%@AB@%Bad radix (use 8, 10, or 16)%@AE@%%@EH@%%@NL@%
  15062. %@NL@%
  15063.           With the %@AB@%N%@AE@% command, you can use only octal, decimal, and%@NL@%
  15064.           hexadecimal radixes.%@NL@%
  15065. %@NL@%
  15066. %@CR:MCVcE012@%%@4@%%@AB@%Bad register%@AE@%%@EH@%%@NL@%
  15067. %@NL@%
  15068.           You typed the Register command (%@AB@%R%@AE@%) with an invalid register name.%@NL@%
  15069. %@NL@%
  15070.           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@%
  15071. %@NL@%
  15072. %@CR:MCVcE013@%%@4@%%@AB@%Bad subscript%@AE@%%@EH@%%@NL@%
  15073. %@NL@%
  15074.           You entered an illegal subscript expression for an array, such as%@NL@%
  15075.           %@AS@%IARRAY(3.3)%@AE@% or %@AS@%IARRAY((3,3))%@AE@%. The correct expression for this%@NL@%
  15076.           example (in BASIC or FORTRAN) is %@AS@%IARRAY(3,3)%@AE@%.%@NL@%
  15077. %@NL@%
  15078. %@CR:MCVcE014@%%@4@%%@AB@%Bad type case%@AE@%%@EH@%%@NL@%
  15079. %@NL@%
  15080.           The types of the operands in an expression are incompatible.%@NL@%
  15081. %@NL@%
  15082. %@CR:MCVcE015@%%@4@%%@AB@%Bad type (use one of 'ABDILSTUW')%@AE@%%@EH@%%@NL@%
  15083. %@NL@%
  15084.           The valid dump types are ASCII (%@AB@%A%@AE@%), Byte (%@AB@%B%@AE@%), Double Word (%@AB@%D%@AE@%),%@NL@%
  15085.           Integer (%@AB@%I%@AE@%), Long Real (%@AB@%L%@AE@%), Short Real (%@AB@%S%@AE@%), 10-Byte Real (%@AB@%T%@AE@%),%@NL@%
  15086.           Unsigned (%@AB@%U%@AE@%), and Word (%@AB@%W%@AE@%).%@NL@%
  15087. %@NL@%
  15088. %@CR:MCVcE016@%%@4@%%@AB@%Badly formed type%@AE@%%@EH@%%@NL@%
  15089. %@NL@%
  15090.           The type information in the symbol table of the file you are%@NL@%
  15091.           debugging is incorrect.%@NL@%
  15092. %@NL@%
  15093.           If the message occurs, please note the circumstances of the error%@NL@%
  15094.           and inform Microsoft Corporation by following the directions in%@NL@%
  15095.           the Microsoft Product Assistance Request form at the back of one%@NL@%
  15096.           of your manuals.%@NL@%
  15097. %@NL@%
  15098. %@CR:MCVcE017@%%@4@%%@AB@%Breakpoint # or '*' expected%@AE@%%@EH@%%@NL@%
  15099. %@NL@%
  15100.           You entered the Breakpoint Clear (%@AB@%BC%@AE@%), Breakpoint Disable (%@AB@%BD%@AE@%), or%@NL@%
  15101.           Breakpoint Enable (%@AB@%BE%@AE@%) command with no argument.%@NL@%
  15102. %@NL@%
  15103.           These commands require that you specify the number of the%@NL@%
  15104.           breakpoint to be acted on, or that you specify the asterisk (%@AB@%*%@AE@%)%@NL@%
  15105.           indicating that all breakpoints are to be acted on.%@NL@%
  15106. %@NL@%
  15107. %@CR:MCVcE018@%%@4@%%@AB@%Cannot use struct or union as scalar%@AE@%%@EH@%%@NL@%
  15108. %@NL@%
  15109.           A struct or union variable cannot be used as a scalar value in a C%@NL@%
  15110.           expression.%@NL@%
  15111. %@NL@%
  15112.           Such variables must be followed by a file separator or preceded by%@NL@%
  15113.           the address of operator.%@NL@%
  15114. %@NL@%
  15115. %@CR:MCVcE019@%%@4@%%@AB@%Cannot cast complex constant component into REAL%@AE@%%@EH@%%@NL@%
  15116. %@NL@%
  15117.           Both the real and imaginary components of a %@AB@%COMPLEX%@AE@% constant must%@NL@%
  15118.           be compatible with the type %@AB@%REAL%@AE@%.%@NL@%
  15119. %@NL@%
  15120. %@CR:MCVcE020@%%@4@%%@AB@%Cannot cast IMAG/DIMAG argument to COMPLEX%@AE@%%@EH@%%@NL@%
  15121. %@NL@%
  15122.           Arguments to %@AB@%IMAG%@AE@% and %@AB@%DIMAG%@AE@% must be simple numeric types.%@NL@%
  15123. %@NL@%
  15124. %@CR:MCVcE021@%%@4@%%@AB@%Cannot find%@AE@% %@AI@%filename%@AE@%%@EH@%%@NL@%
  15125. %@NL@%
  15126.           The CodeView debugger could not find the executable file you%@NL@%
  15127.           specified when you started.%@NL@%
  15128. %@NL@%
  15129.           You may have misspelled the file name, or the file is in a%@NL@%
  15130.           different directory.%@NL@%
  15131. %@NL@%
  15132. %@CR:MCVcE022@%%@4@%%@AB@%Character constant too long%@AE@%%@EH@%%@NL@%
  15133. %@NL@%
  15134.           You specified a character constant too long for the FORTRAN%@NL@%
  15135.           expression evaluator (the limit is 126 bytes).%@NL@%
  15136. %@NL@%
  15137. %@CR:MCVcE023@%%@4@%%@AB@%Character too big for current radix%@AE@%%@EH@%%@NL@%
  15138. %@NL@%
  15139.           In a constant, you specified a radix that is larger than the%@NL@%
  15140.           current CodeView radix.%@NL@%
  15141. %@NL@%
  15142.           Use the %@AB@%N%@AE@% command to change the radix.%@NL@%
  15143. %@NL@%
  15144. %@CR:MCVcE024@%%@4@%%@AB@%Constant too big%@AE@%%@EH@%%@NL@%
  15145. %@NL@%
  15146.           The CodeView debugger cannot accept an unsigned constant number%@NL@%
  15147.           larger than 4,294,967,295 (16#FFFFFFFF).%@NL@%
  15148. %@NL@%
  15149. %@CR:MCVcE025@%%@4@%%@AB@%CPU not an 80386%@AE@%%@EH@%%@NL@%
  15150. %@NL@%
  15151.           The 386 option cannot be selected if you are using a machine%@NL@%
  15152.           without an 80386 processor.%@NL@%
  15153. %@NL@%
  15154. %@CR:MCVcE026@%%@4@%%@AB@%Divide by zero%@AE@%%@EH@%%@NL@%
  15155. %@NL@%
  15156.           An expression in an argument of a dialog command attempts to%@NL@%
  15157.           divide by zero.%@NL@%
  15158. %@NL@%
  15159. %@CR:MCVcE027@%%@4@%%@AB@%EMM error%@AE@%%@EH@%%@NL@%
  15160. %@NL@%
  15161.           The debugger is failing to use EMM correctly. Please contact%@NL@%
  15162.           Microsoft Corporation by following the directions in the Microsoft%@NL@%
  15163.           Product Assistance Request form at the back of one of your%@NL@%
  15164.           manuals.%@NL@%
  15165. %@NL@%
  15166. %@CR:MCVcE028@%%@4@%%@AB@%EMM hardware error%@AE@%%@EH@%%@NL@%
  15167. %@NL@%
  15168.           The Expanded Memory routines report a hardware error. Your%@NL@%
  15169.           expanded memory board may need replacement.%@NL@%
  15170. %@NL@%
  15171. %@CR:MCVcE029@%%@4@%%@AB@%EMM memory not found%@AE@%%@EH@%%@NL@%
  15172. %@NL@%
  15173.           You tried to use the %@AB@%/E%@AE@% option without having installed expanded%@NL@%
  15174.           memory. You must make this installation with software that%@NL@%
  15175.           accesses the memory according to the Lotus/Intel/Microsoft EMS%@NL@%
  15176.           specification.%@NL@%
  15177. %@NL@%
  15178. %@CR:MCVcE030@%%@4@%%@AB@%EMM software error%@AE@%%@EH@%%@NL@%
  15179. %@NL@%
  15180.           The Expanded Memory routines report a software error. Reinstall%@NL@%
  15181.           EMM software.%@NL@%
  15182. %@NL@%
  15183. %@CR:MCVcE031@%%@4@%%@AB@%Expression not a memory address%@AE@%%@EH@%%@NL@%
  15184. %@NL@%
  15185.           A Tracepoint command was given without a symbol that evaluates to%@NL@%
  15186.           a single memory address.%@NL@%
  15187. %@NL@%
  15188.           For example, the commands %@AS@%TP?1%@AE@% and %@AS@%TP?a+b%@AE@% each produce this error%@NL@%
  15189.           message. The proper way to put a tracepoint on the word at address%@NL@%
  15190.           1 is with the command %@AS@%TPW 1%@AE@%.%@NL@%
  15191. %@NL@%
  15192. %@CR:MCVcE032@%%@4@%%@AB@%Expression too complex%@AE@%%@EH@%%@NL@%
  15193. %@NL@%
  15194.           An expression given as a dialog-command argument is too complex.%@NL@%
  15195. %@NL@%
  15196.           Try simplifying the expression.%@NL@%
  15197. %@NL@%
  15198. %@CR:MCVcE033@%%@4@%%@AB@%Extra input ignored%@AE@%%@EH@%%@NL@%
  15199. %@NL@%
  15200.           You specified too many arguments to a command.%@NL@%
  15201. %@NL@%
  15202.           The CodeView debugger evaluates the valid arguments and ignores%@NL@%
  15203.           the rest. Often in this situation the debugger does not evaluate%@NL@%
  15204.           the arguments in the way you intended.%@NL@%
  15205. %@NL@%
  15206. %@CR:MCVcE034@%%@4@%%@AB@%Flip/Swap option off - application output lost%@AE@%%@EH@%%@NL@%
  15207. %@NL@%
  15208.           The program you are debugging is writing to the screen, but the%@NL@%
  15209.           output cannot be displayed because you have turned off the%@NL@%
  15210.           flip/swap option.%@NL@%
  15211. %@NL@%
  15212. %@CR:MCVcE035@%%@4@%%@AB@%Floating point error%@AE@%%@EH@%%@NL@%
  15213. %@NL@%
  15214.           This message should not occur, but if it does, please note the%@NL@%
  15215.           circumstances of the error and inform Microsoft Corporation by%@NL@%
  15216.           following the directions in the Microsoft Product Assistance%@NL@%
  15217.           Request form at the back of one of your manuals.%@NL@%
  15218. %@NL@%
  15219. %@CR:MCVcE036@%%@4@%%@AB@%Floating point not loaded%@AE@%%@EH@%%@NL@%
  15220. %@NL@%
  15221.           This message occurs when the current thread has not initialized%@NL@%
  15222.           its own emulator. Each thread has its own floating-point emulator.%@NL@%
  15223. %@NL@%
  15224. %@CR:MCVcE037@%%@4@%%@AB@%Function call before 'main'%@AE@%%@EH@%%@NL@%
  15225. %@NL@%
  15226.           This message occurs when you attempt to evaluate a program-defined%@NL@%
  15227.           function before you have entered the main function.%@NL@%
  15228. %@NL@%
  15229.           Execute at least to the beginning of the main function before%@NL@%
  15230.           attempting to evaluate program-defined functions.%@NL@%
  15231. %@NL@%
  15232. %@CR:MCVcE038@%%@4@%%@AB@%Illegal instruction%@AE@%%@EH@%%@NL@%
  15233. %@NL@%
  15234.           This message usually indicates that a divide-by-zero machine%@NL@%
  15235.           instruction was attempted.%@NL@%
  15236. %@NL@%
  15237. %@CR:MCVcE039@%%@4@%%@AB@%Index out of bound%@AE@%%@EH@%%@NL@%
  15238. %@NL@%
  15239.           You specified a subscript value outside the bounds declared for%@NL@%
  15240.           the array.%@NL@%
  15241. %@NL@%
  15242. %@CR:MCVcE040@%%@4@%%@AB@%Insufficient EMM memory%@AE@%%@EH@%%@NL@%
  15243. %@NL@%
  15244.           Not enough expanded memory is available to hold the program's%@NL@%
  15245.           symbol table.%@NL@%
  15246. %@NL@%
  15247. %@CR:MCVcE041@%%@4@%%@AB@%Internal debugger error%@AE@%%@EH@%%@NL@%
  15248. %@NL@%
  15249.           If this message occurs, please note the circumstances of the error%@NL@%
  15250.           and notify Microsoft Corporation by following the directions in%@NL@%
  15251.           the Microsoft Product Assistance Request form at the back of one%@NL@%
  15252.           of your manuals.%@NL@%
  15253. %@NL@%
  15254. %@CR:MCVcE042@%%@4@%%@AB@%Invalid argument%@AE@%%@EH@%%@NL@%
  15255. %@NL@%
  15256.           One of the arguments you specified is not a valid CodeView%@NL@%
  15257.           expression.%@NL@%
  15258. %@NL@%
  15259. %@CR:MCVcE043@%%@4@%%@AB@%Invalid executable file format - please relink%@AE@%%@EH@%%@NL@%
  15260. %@NL@%
  15261.           The executable file was not linked with the version of the linker%@NL@%
  15262.           released with this version of the CodeView debugger. Relink with%@NL@%
  15263.           the more current version of the linker.%@NL@%
  15264. %@NL@%
  15265. %@CR:MCVcE044@%%@4@%%@AB@%Invalid option%@AE@%%@EH@%%@NL@%
  15266. %@NL@%
  15267.           The option specified cannot be used with the CodeView Option%@NL@%
  15268.           command.%@NL@%
  15269. %@NL@%
  15270. %@CR:MCVcE045@%%@4@%%@AB@%Missing '"'%@AE@%%@EH@%%@NL@%
  15271. %@NL@%
  15272.           You specified a string as an argument to a dialog command, but you%@NL@%
  15273.           did not supply a closing double quotation mark.%@NL@%
  15274. %@NL@%
  15275. %@CR:MCVcE046@%%@4@%%@AB@%Missing '('%@AE@%%@EH@%%@NL@%
  15276. %@NL@%
  15277.           An argument to a dialog command was specified as an expression%@NL@%
  15278.           containing a right parenthesis, but no left parenthesis.%@NL@%
  15279. %@NL@%
  15280. %@CR:MCVcE047@%%@4@%%@AB@%Missing ')'%@AE@%%@EH@%%@NL@%
  15281. %@NL@%
  15282.           An argument to a dialog command was specified as an expression%@NL@%
  15283.           containing a left parenthesis, but no right parenthesis.%@NL@%
  15284. %@NL@%
  15285. %@CR:MCVcE048@%%@4@%%@AB@%Missing ']'%@AE@%%@EH@%%@NL@%
  15286. %@NL@%
  15287.           An argument to a dialog command was specified as an expression%@NL@%
  15288.           containing a left bracket, but no right bracket.%@NL@%
  15289. %@NL@%
  15290.           This error message can also occur if a regular expression is%@NL@%
  15291.           specified with a right bracket but no left bracket.%@NL@%
  15292. %@NL@%
  15293. %@CR:MCVcE049@%%@4@%%@AB@%Missing '(' in complex constant%@AE@%%@EH@%%@NL@%
  15294. %@NL@%
  15295.           The debugger is expecting an opening parenthesis of a complex%@NL@%
  15296.           constant in an expression, but it is missing.%@NL@%
  15297. %@NL@%
  15298. %@CR:MCVcE050@%%@4@%%@AB@%Missing ')' in complex constant%@AE@%%@EH@%%@NL@%
  15299. %@NL@%
  15300.           The debugger expects a closing parenthesis of a complex constant%@NL@%
  15301.           in an expression.%@NL@%
  15302. %@NL@%
  15303. %@CR:MCVcE051@%%@4@%%@AB@%Missing ')' in substring%@AE@%%@EH@%%@NL@%
  15304. %@NL@%
  15305.           The debugger expects a closing parenthesis of a substring%@NL@%
  15306.           expression.%@NL@%
  15307. %@NL@%
  15308. %@CR:MCVcE052@%%@4@%%@AB@%Missing '(' to intrinsic%@AE@%%@EH@%%@NL@%
  15309. %@NL@%
  15310.           The debugger expects an opening parenthesis for an intrinsic%@NL@%
  15311.           function.%@NL@%
  15312. %@NL@%
  15313. %@CR:MCVcE053@%%@4@%%@AB@%Missing ')' to intrinsic%@AE@%%@EH@%%@NL@%
  15314. %@NL@%
  15315.           The debugger expects a closing parenthesis for an intrinsic%@NL@%
  15316.           function.%@NL@%
  15317. %@NL@%
  15318. %@CR:MCVcE054@%%@4@%%@AB@%No closing single quote%@AE@%%@EH@%%@NL@%
  15319. %@NL@%
  15320.           You specified a character in an expression used as a%@NL@%
  15321.           dialog-command argument, but the closing single quotation mark is%@NL@%
  15322.           missing.%@NL@%
  15323. %@NL@%
  15324. %@CR:MCVcE055@%%@4@%%@AB@%No code at this line number%@AE@%%@EH@%%@NL@%
  15325. %@NL@%
  15326.           You tried to set a breakpoint on a source line that does not%@NL@%
  15327.           correspond to machine code. (In other words, the source line does%@NL@%
  15328.           not contain an executable statement.)%@NL@%
  15329. %@NL@%
  15330.           For instance, the line may be a data declaration or a comment.%@NL@%
  15331. %@NL@%
  15332. %@CR:MCVcE056@%%@4@%%@AB@%No free EMM memory handles%@AE@%%@EH@%%@NL@%
  15333. %@NL@%
  15334.           The debugger cannot find an available handle. EMM software%@NL@%
  15335.           allocates a fixed number of memory handles (usually 256) to be%@NL@%
  15336.           used for specific tasks.%@NL@%
  15337. %@NL@%
  15338. %@CR:MCVcE057@%%@4@%%@AB@%No match of regular expression%@AE@%%@EH@%%@NL@%
  15339. %@NL@%
  15340.           No match was found for the regular expression you specified with%@NL@%
  15341.           the Search command or with the Find selection from the Search%@NL@%
  15342.           menu.%@NL@%
  15343. %@NL@%
  15344. %@CR:MCVcE058@%%@4@%%@AB@%No previous regular expression%@AE@%%@EH@%%@NL@%
  15345. %@NL@%
  15346.           You selected Previous from the Search menu, but there was no%@NL@%
  15347.           previous match for the last regular expression specified.%@NL@%
  15348. %@NL@%
  15349. %@CR:MCVcE059@%%@4@%%@AB@%No source lines at this address%@AE@%%@EH@%%@NL@%
  15350. %@NL@%
  15351.           The address you specified as an argument for the View command (%@AB@%V%@AE@%)%@NL@%
  15352.           does not have any source lines.%@NL@%
  15353. %@NL@%
  15354.           For instance, it could be an address in a library routine or an%@NL@%
  15355.           assembly-language module.%@NL@%
  15356. %@NL@%
  15357. %@CR:MCVcE060@%%@4@%%@AB@%No such file/directory%@AE@%%@EH@%%@NL@%
  15358. %@NL@%
  15359.           A file specified in a command argument or in response to a prompt%@NL@%
  15360.           does not exist.%@NL@%
  15361. %@NL@%
  15362.           For instance, the message appears when you select Load from the%@NL@%
  15363.           File menu and then enter the name of a nonexistent file.%@NL@%
  15364. %@NL@%
  15365. %@CR:MCVcE061@%%@4@%%@AB@%No symbolic information = CV options not used or wrong LINK version%@AE@%%@EH@%%@NL@%
  15366. %@NL@%
  15367.           The program file you specified is not in the CodeView format.%@NL@%
  15368. %@NL@%
  15369.           You cannot debug in source mode unless you recreate the file in%@NL@%
  15370.           CodeView format. However, you can debug in assembly mode.%@NL@%
  15371. %@NL@%
  15372. %@CR:MCVcE062@%%@4@%%@AB@%Not a text file%@AE@%%@EH@%%@NL@%
  15373. %@NL@%
  15374.           You attempted to load a file by using the Load selection from the%@NL@%
  15375.           File menu or using the View command, but the file is not a text%@NL@%
  15376.           file.%@NL@%
  15377. %@NL@%
  15378.           The CodeView debugger determines if a file is a text file by%@NL@%
  15379.           checking the first 128 bytes for characters that are not in the%@NL@%
  15380.           ASCII ranges 9 to 13 and 20 to 126.%@NL@%
  15381. %@NL@%
  15382. %@CR:MCVcE063@%%@4@%%@AB@%Not an executable file%@AE@%%@EH@%%@NL@%
  15383. %@NL@%
  15384.           The file you specified to be debugged when you started the%@NL@%
  15385.           CodeView debugger is not an executable file having the extension%@NL@%
  15386.           %@AB@%.EXE%@AE@% or %@AB@%.COM%@AE@%.%@NL@%
  15387. %@NL@%
  15388. %@CR:MCVcE064@%%@4@%%@AB@%Not enough space%@AE@%%@EH@%%@NL@%
  15389. %@NL@%
  15390.           You typed the Shell Escape command (%@AB@%!%@AE@%) or selected Shell from the%@NL@%
  15391.           File menu, but there is not enough free memory to execute%@NL@%
  15392.           %@AB@%COMMAND.COM%@AE@%.%@NL@%
  15393. %@NL@%
  15394.           Since memory is released by code in the FORTRAN start-up routines,%@NL@%
  15395.           this error always occurs if you try to use the Shell Escape%@NL@%
  15396.           command before you have executed any code. Use any of the%@NL@%
  15397.           code-execution commands (Trace, Program Step, or Go) to execute%@NL@%
  15398.           the FORTRAN start-up code, then try the Shell Escape command%@NL@%
  15399.           again. The message also occurs with assembly-language programs%@NL@%
  15400.           that do not specifically release memory.%@NL@%
  15401. %@NL@%
  15402. %@CR:MCVcE065@%%@4@%%@AB@%Object too big%@AE@%%@EH@%%@NL@%
  15403. %@NL@%
  15404.           You entered a Tracepoint command with a data object (such as an%@NL@%
  15405.           array) larger than 128 bytes.%@NL@%
  15406. %@NL@%
  15407. %@CR:MCVcE066@%%@4@%%@AB@%Operand types incorrect for this operation%@AE@%%@EH@%%@NL@%
  15408. %@NL@%
  15409.           An operand in a FORTRAN expression had a type incompatible with%@NL@%
  15410.           the operation applied to it.%@NL@%
  15411. %@NL@%
  15412.           For example, if %@AS@%P%@AE@% is declared as %@AS@%CHARACTER P(10)%@AE@%, the %@AS@%? P+5%@AE@% would%@NL@%
  15413.           produce this error, since a character array cannot be an operand%@NL@%
  15414.           of an arithmetic operator.%@NL@%
  15415. %@NL@%
  15416. %@CR:MCVcE067@%%@4@%%@AB@%Operator must have a struct\union type%@AE@%%@EH@%%@NL@%
  15417. %@NL@%
  15418.           You have used one of the C member-selection operators (-, >, or .)%@NL@%
  15419.           in an expression that does not reference an element of a structure%@NL@%
  15420.           or union.%@NL@%
  15421. %@NL@%
  15422. %@CR:MCVcE068@%%@4@%%@AB@%Operator needs lvalue%@AE@%%@EH@%%@NL@%
  15423. %@NL@%
  15424.           You specified an expression that does not evaluate to a memory%@NL@%
  15425.           location in an operation that requires one. (An lvalue is an%@NL@%
  15426.           expression that refers to a memory location.)%@NL@%
  15427. %@NL@%
  15428.           For example, %@AS@%buffer(count)%@AE@% is correct because it represents a%@NL@%
  15429.           symbol in memory. However, %@AS@%I .EQV. 10%@AE@% is invalid because it%@NL@%
  15430.           evaluates to TRUE or FALSE instead of to a single memory location.%@NL@%
  15431. %@NL@%
  15432. %@CR:MCVcE069@%%@4@%%@AB@%Overlay not resident%@AE@%%@EH@%%@NL@%
  15433. %@NL@%
  15434.           You tried to unassemble machine code from a function that is%@NL@%
  15435.           currently not in memory.%@NL@%
  15436. %@NL@%
  15437. %@CR:MCVcE070@%%@4@%%@AB@%Program terminated normally (%@AE@%%@AI@%number%@AE@%%@AB@%)%@AE@%%@EH@%%@NL@%
  15438. %@NL@%
  15439.           You executed your program to the end. The number displayed in%@NL@%
  15440.           parentheses is the exit code returned to DOS by your program.%@NL@%
  15441. %@NL@%
  15442.           You must use the Restart command (or the Start menu selection) to%@NL@%
  15443.           start the program before executing more code.%@NL@%
  15444. %@NL@%
  15445. %@CR:MCVcE071@%%@4@%%@AB@%Radix must be between 2 and 36 inclusive%@AE@%%@EH@%%@NL@%
  15446. %@NL@%
  15447.           You specified a radix outside the allowable range.%@NL@%
  15448. %@NL@%
  15449.  
  15450. %@CR:MCVcE072@%%@4@%%@AB@%Register variable out of scope%@AE@%%@EH@%%@NL@%
  15451. %@NL@%
  15452.           You tried to specify a register variable by using the period (%@AB@%.%@AE@%)%@NL@%
  15453.           operator and a routine name.%@NL@%
  15454. %@NL@%
  15455.           For example, if you are in a third-level routine, you can display%@NL@%
  15456.           the value of a local variable called %@AS@%local%@AE@% in a second-level%@NL@%
  15457.           routine called %@AS@%parent%@AE@% with the following command:%@NL@%
  15458. %@NL@%
  15459.                ? parent.local%@NL@%
  15460. %@NL@%
  15461.           However, this command will not work if %@AS@%local%@AE@% is declared as a%@NL@%
  15462.           register variable.%@NL@%
  15463. %@NL@%
  15464. %@CR:MCVcE073@%%@4@%%@AB@%Regular expression too complex%@AE@%%@EH@%%@NL@%
  15465. %@NL@%
  15466.           The regular expression specified is too complex for the CodeView%@NL@%
  15467.           debugger to evaluate.%@NL@%
  15468. %@NL@%
  15469. %@CR:MCVcE074@%%@4@%%@AB@%Regular expression too long%@AE@%%@EH@%%@NL@%
  15470. %@NL@%
  15471.           The regular expression specified is too long for the CodeView%@NL@%
  15472.           debugger to evaluate.%@NL@%
  15473. %@NL@%
  15474. %@CR:MCVcE075@%%@4@%%@AB@%Restart program to debug%@AE@%%@EH@%%@NL@%
  15475. %@NL@%
  15476.           You have executed to the end of the program you are debugging.%@NL@%
  15477. %@NL@%
  15478. %@CR:MCVcE076@%%@4@%%@AB@%Simple variable cannot have argument%@AE@%%@EH@%%@NL@%
  15479. %@NL@%
  15480.           In an expression, you specified an argument to a simple variable.%@NL@%
  15481. %@NL@%
  15482.           For example, given the declaration %@AS@%INTEGER NUM%@AE@%, the expression%@NL@%
  15483.           %@AS@%NUM(I)%@AE@% is not allowed.%@NL@%
  15484. %@NL@%
  15485. %@CR:MCVcE077@%%@4@%%@AB@%Substring range out of bound%@AE@%%@EH@%%@NL@%
  15486. %@NL@%
  15487.           A character expression exceeds the length specified in the%@NL@%
  15488.           %@AB@%CHARACTER%@AE@% statement.%@NL@%
  15489. %@NL@%
  15490. %@CR:MCVcE078@%%@4@%%@AB@%Syntax error%@AE@%%@EH@%%@NL@%
  15491. %@NL@%
  15492.           You specified an invalid command line for a dialog command.%@NL@%
  15493. %@NL@%
  15494.           Check for an invalid command letter. This message also appears if%@NL@%
  15495.           you enter an invalid assembly-language instruction using the%@NL@%
  15496.           Assembly command. The error is preceded by a caret that points to%@NL@%
  15497.           the first character the CodeView debugger could not interpret.%@NL@%
  15498. %@NL@%
  15499. %@CR:MCVcE079@%%@4@%%@AB@%Too few array bounds given%@AE@%%@EH@%%@NL@%
  15500. %@NL@%
  15501.           The bounds that you specified in an array subscript do not match%@NL@%
  15502.           the array declaration.%@NL@%
  15503. %@NL@%
  15504.           For example, given the array declaration %@AS@%INTEGER IARRAY(3,4)%@AE@%, the%@NL@%
  15505.           expression %@AS@%IARRAY(I)%@AE@% would produce this error message.%@NL@%
  15506. %@NL@%
  15507. %@CR:MCVcE080@%%@4@%%@AB@%Too many array bounds given%@AE@%%@EH@%%@NL@%
  15508. %@NL@%
  15509.           The bounds that you specified in an array subscript do not match%@NL@%
  15510.           the array declaration.%@NL@%
  15511. %@NL@%
  15512.           For example, given the array declaration %@AS@%INTEGER IARRAY(3,4)%@AE@%, the%@NL@%
  15513.           expression %@AS@%IARRAY(I,3,J)%@AE@% would produce this error message.%@NL@%
  15514. %@NL@%
  15515. %@CR:MCVcE081@%%@4@%%@AB@%Too many breakpoints%@AE@%%@EH@%%@NL@%
  15516. %@NL@%
  15517.           You tried to specify a 21st breakpoint; the CodeView debugger%@NL@%
  15518.           permits only 20.%@NL@%
  15519. %@NL@%
  15520. %@CR:MCVcE082@%%@4@%%@AB@%Too many open files%@AE@%%@EH@%%@NL@%
  15521. %@NL@%
  15522.           You do not have enough file handles for the CodeView debugger to%@NL@%
  15523.           operate correctly.%@NL@%
  15524. %@NL@%
  15525.           You must specify more files in your %@AB@%CONFIG.SYS%@AE@% file. See the DOS%@NL@%
  15526.           user's guide for information on using the %@AB@%CONFIG.SYS%@AE@% file.%@NL@%
  15527. %@NL@%
  15528. %@CR:MCVcE083@%%@4@%%@AB@%Type clash in function argument%@AE@%%@EH@%%@NL@%
  15529. %@NL@%
  15530.           The type of an actual parameter does not match the corresponding%@NL@%
  15531.           formal parameter.%@NL@%
  15532. %@NL@%
  15533.           This message also appears when a subroutine that uses alternate%@NL@%
  15534.           returns is called and the values of the return labels in the%@NL@%
  15535.           actual parameter list are not 0.%@NL@%
  15536. %@NL@%
  15537. %@CR:MCVcE084@%%@4@%%@AB@%Type conversion too complex%@AE@%%@EH@%%@NL@%
  15538. %@NL@%
  15539.           You tried to type cast an element of an expression in a type other%@NL@%
  15540.           than the simple types or with more than one level of indirection.%@NL@%
  15541. %@NL@%
  15542.           An example of a complex type would be type casting to a struct or%@NL@%
  15543.           union type. An example of two levels of indirection is %@AS@%char **%@AE@%.%@NL@%
  15544. %@NL@%
  15545. %@CR:MCVcE085@%%@4@%%@AB@%Unable to open file%@AE@%%@EH@%%@NL@%
  15546. %@NL@%
  15547.           A file you specified in a command argument or in response to a%@NL@%
  15548.           prompt cannot be opened.%@NL@%
  15549. %@NL@%
  15550.           For instance, this message appears when you select Load from the%@NL@%
  15551.           File menu, and then enter the name of a file that is corrupted or%@NL@%
  15552.           has its file attributes set so that it cannot be opened.%@NL@%
  15553. %@NL@%
  15554. %@CR:MCVcE086@%%@4@%%@AB@%Unknown symbol%@AE@%%@EH@%%@NL@%
  15555. %@NL@%
  15556.           You specified an identifier not in the CodeView debugger's symbol%@NL@%
  15557.           table.%@NL@%
  15558. %@NL@%
  15559.           Check for a misspelling. This message may also occur if you try to%@NL@%
  15560.           use a local variable in an argument when you are not in the%@NL@%
  15561.           routine where the variable is defined. The message also occurs%@NL@%
  15562.           when a subroutine that uses alternate returns is called and the%@NL@%
  15563.           values of the return labels in the actual parameter list are
  15564.           not 0.%@NL@%
  15565. %@NL@%
  15566. %@CR:MCVcE087@%%@4@%%@AB@%Unrecognized option%@AE@% %@AI@%option%@AE@%%@EH@%%@NL@%
  15567. %@AB@%Valid options: /B /C<%@AE@%%@AI@%command%@AE@%%@AB@%> /D /F /I /M /S /T /W /43 /2%@AE@%%@NL@%
  15568. %@NL@%
  15569.           You entered an invalid option when starting the CodeView debugger.%@NL@%
  15570. %@NL@%
  15571.           Try retyping the command line.%@NL@%
  15572. %@NL@%
  15573. %@CR:MCVcE088@%%@4@%%@AB@%Usage cv [%@AE@%%@AI@%options%@AE@%%@AB@%] file [%@AE@%%@AI@%arguments%@AE@%%@AB@%]%@AE@%%@EH@%%@NL@%
  15574. %@NL@%
  15575.           You failed to specify an executable file when you started%@NL@%
  15576.           CodeView.%@NL@%
  15577. %@NL@%
  15578.           Try again with the syntax shown in the message.%@NL@%
  15579. %@NL@%
  15580. %@CR:MCVcE089@%%@4@%%@AB@%Video mode changed without the /S option%@AE@%%@EH@%%@NL@%
  15581. %@NL@%
  15582.           The program changed video modes (either to or from graphics modes)%@NL@%
  15583.           when screen swapping was not specified.%@NL@%
  15584. %@NL@%
  15585.           You must use the %@AB@%/S%@AE@% option to specify screen swapping when%@NL@%
  15586.           debugging graphics programs. You can continue debugging when you%@NL@%
  15587.           get this message, but the output screen of the debugged program%@NL@%
  15588.           may be damaged.%@NL@%
  15589. %@NL@%
  15590. %@CR:MCVcE090@%%@4@%%@AB@%Warning: packed file%@AE@%%@EH@%%@NL@%
  15591. %@NL@%
  15592.           You started the CodeView debugger with a packed file as the%@NL@%
  15593.           executable file.%@NL@%
  15594. %@NL@%
  15595.           You can attempt to debug the program in assembly mode, but the%@NL@%
  15596.           packing routines at the start of the program may make this%@NL@%
  15597.           difficult. You cannot debug in source mode because all symbolic%@NL@%
  15598.           information is stripped from a file when it is packed with the%@NL@%
  15599.           %@AB@%/EXEPACK%@AE@% linker option.%@NL@%
  15600. %@NL@%
  15601. %@CR:MCVcE091@%%@4@%%@AB@%Wrong number of function arguments%@AE@%%@EH@%%@NL@%
  15602. %@NL@%
  15603.           You specified an incorrect number of arguments when you tried to%@NL@%
  15604.           evaluate a function in a CodeView expression.%@NL@%
  15605. %@NL@%
  15606. %@NL@%
  15607. %@CR:MCVc2000@%%@2@%%@AB@%C.2  LINK Error Messages%@AE@%%@EH@%%@NL@%
  15608. %@NL@%
  15609. %@CR:MCVc2001@%%@4@%This section lists and describes error messages generated by the Microsoft%@EH@%
  15610. Segmented-Executable Linker, %@AB@%LINK%@AE@%.%@NL@%
  15611. %@NL@%
  15612. %@CR:MCVc2002@%%@4@%%@AB@%Fatal errors%@AE@% cause the linker to stop execution. Fatal error messages have%@EH@%
  15613. the following format:%@NL@%
  15614. %@NL@%
  15615.      %@AI@%location%@AE@%%@AS@%:  error L1%@AE@%%@AI@%xxx%@AE@%%@AS@%:%@AE@%%@AI@% messagetext%@AE@%%@NL@%
  15616. %@NL@%
  15617. %@CR:MCVc2003@%%@4@%%@AB@%Nonfatal errors%@AE@% indicate problems in the executable file. LINK produces the%@EH@%
  15618. executable file. Nonfatal error messages have the following format:%@NL@%
  15619. %@NL@%
  15620.      %@AI@%location%@AE@% %@AS@%:  error L2%@AE@%%@AI@%xxx%@AE@%%@AS@%:%@AE@%%@AI@%messagetext%@AE@%%@NL@%
  15621. %@NL@%
  15622. %@CR:MCVc2004@%%@4@%%@AB@%Warnings%@AE@% indicate possible problems in the executable file. LINK produces%@EH@%
  15623. the executable file. Warnings have the following format:%@NL@%
  15624. %@NL@%
  15625.      %@AI@%location%@AE@%%@AS@% :  warning L4%@AE@%%@AI@%xxx%@AE@%%@AS@%:%@AE@%%@AI@%messagetext%@AE@%%@NL@%
  15626. %@NL@%
  15627. %@CR:MCVc2005@%%@4@%In all three kinds of messages, location is the input file associated with%@EH@%
  15628. the error, or %@AS@%LINK%@AE@% if there is no input file. If the input file is an %@AB@%.OBJ%@AE@%
  15629. or %@AB@%.LIB%@AE@% file and has a module name, the module name is enclosed in
  15630. parentheses, as shown below.%@NL@%
  15631. %@NL@%
  15632.      SLIBC.LIB(_file)%@NL@%
  15633.      MAIN.OBJ(main.c)%@NL@%
  15634.      TEXT.OBJ%@NL@%
  15635. %@NL@%
  15636. %@CR:MCVc2006@%%@4@%The following error messages may appear when you link object files with the%@EH@%
  15637. Microsoft Segmented-Executable Linker, %@AB@%LINK%@AE@%.%@NL@%
  15638. %@NL@%
  15639. %@NL@%
  15640. %@CR:MCVc2100@%%@3@%%@AB@%C.3.1  LINK Fatal Error Messages%@AE@%%@EH@%%@NL@%
  15641. %@NL@%
  15642. %@CR:MCVcE092@%%@4@%%@AB@%L1001%@AE@%     %@AI@%option%@AE@%%@AB@% : option name ambiguous%@AE@%%@EH@%%@NL@%
  15643. %@NL@%
  15644.           A unique option name did not appear after the option indicator%@NL@%
  15645.           (%@AB@%/%@AE@%). For example, the command%@NL@%
  15646. %@NL@%
  15647.           LINK /N main;%@NL@%
  15648. %@NL@%
  15649.           generates this error, since %@AB@%LINK%@AE@% cannot tell which of the options%@NL@%
  15650.           beginning with the letter "N" was intended.%@NL@%
  15651. %@NL@%
  15652. %@CR:MCVcE093@%%@4@%%@AB@%L1002%@AE@%     %@AI@%option%@AE@%%@AB@% : unrecognized option name%@AE@%%@EH@%%@NL@%
  15653. %@NL@%
  15654.           An unrecognized character followed the option indicator (%@AB@%/%@AE@%), as%@NL@%
  15655.           shown below.%@NL@%
  15656. %@NL@%
  15657.           LINK /ABCDEF main;%@NL@%
  15658. %@NL@%
  15659. %@CR:MCVcE094@%%@4@%%@AB@%L1003     /QUICKLIB, /EXEPACK incompatible%@AE@%%@EH@%%@NL@%
  15660. %@NL@%
  15661.           You cannot link with both the %@AB@%/QU%@AE@% option and the %@AB@%/E%@AE@% option.%@NL@%
  15662. %@NL@%
  15663. %@CR:MCVcE095@%%@4@%%@AB@%L1004%@AE@%     %@AI@%option%@AE@%%@AB@% : invalid numeric value%@AE@%%@EH@%%@NL@%
  15664. %@NL@%
  15665.           An incorrect value appeared for one of the linker options. For%@NL@%
  15666.           example, a character string was given for an option that requires%@NL@%
  15667.           a numeric value.%@NL@%
  15668. %@NL@%
  15669. %@CR:MCVcE096@%%@4@%%@AB@%L1005     /PACKCODE : packing limit exceeds 65536 bytes%@AE@%%@EH@%%@NL@%
  15670. %@NL@%
  15671.           The value supplied with the %@AB@%/PACKCODE%@AE@% option exceeds the limit of%@NL@%
  15672.           65,536 bytes.%@NL@%
  15673. %@NL@%
  15674. %@CR:MCVcE097@%%@4@%%@AB@%%@AB@%L1006%@AE@%     %@AI@%option-text%@AE@%%@AB@% : stack size exceeds 65535 bytes%@AE@%%@EH@%%@NL@%
  15675. %@NL@%
  15676.           The value given as a parameter to the %@AB@%/STACKSIZE%@AE@% option exceeds%@NL@%
  15677.           the maximum allowed.%@NL@%
  15678. %@NL@%
  15679. %@CR:MCVcE098@%%@4@%%@AB@%L1007%@AE@%     %@AI@%option%@AE@%%@AB@% : interrupt number exceeds 255%@AE@%%@EH@%%@NL@%
  15680. %@NL@%
  15681.           A number greater than 255 was given as the /OVERLAYINTERRUPT%@NL@%
  15682.           option value.%@NL@%
  15683. %@NL@%
  15684. %@CR:MCVcE099@%%@4@%%@AB@%L1008%@AE@%     %@AI@%option%@AE@%%@AB@% : segment limit set too high%@AE@%%@EH@%%@NL@%
  15685. %@NL@%
  15686.           The %@AB@%/SEGMENTS%@AE@% option specified a limit on the number of segments%@NL@%
  15687.           allowed greater than 3,072.%@NL@%
  15688. %@NL@%
  15689. %@CR:MCVcE100@%%@4@%%@AB@%L1009%@AE@%     %@AI@%number%@AE@%%@AB@% : CPARMAXALLOC : illegal value%@AE@%%@EH@%%@NL@%
  15690. %@NL@%
  15691.           The number specified in the %@AB@%/CPARMAXALLOC%@AE@% option was not in the%@NL@%
  15692.           range 1- 65,535.%@NL@%
  15693. %@NL@%
  15694. %@CR:MCVcE101@%%@4@%%@AB@%L1020     no object modules specified%@AE@%%@EH@%%@NL@%
  15695. %@NL@%
  15696.           No object-file names were specified to the linker.%@NL@%
  15697. %@NL@%
  15698. %@CR:MCVcE102@%%@4@%%@AB@%L1021     cannot nest response files%@AE@%%@EH@%%@NL@%
  15699. %@NL@%
  15700.           A response file occurred within a response file.%@NL@%
  15701. %@NL@%
  15702. %@CR:MCVcE103@%%@4@%%@AB@%L1022     response line too long%@AE@%%@EH@%%@NL@%
  15703. %@NL@%
  15704.           A line in a response file was longer than 127 characters.%@NL@%
  15705. %@NL@%
  15706. %@CR:MCVcE104@%%@4@%%@AB@%L1023     terminated by user%@AE@%%@EH@%%@NL@%
  15707. %@NL@%
  15708.           You entered CTRL+C.%@NL@%
  15709. %@NL@%
  15710. %@CR:MCVcE105@%%@4@%%@AB@%L1024     nested right parentheses%@AE@%%@EH@%%@NL@%
  15711. %@NL@%
  15712.           The contents of an overlay were typed incorrectly on the command%@NL@%
  15713.           line.%@NL@%
  15714. %@NL@%
  15715. %@CR:MCVcE106@%%@4@%%@AB@%L1025     nested left parentheses%@AE@%%@EH@%%@NL@%
  15716. %@NL@%
  15717.           The contents of an overlay were typed incorrectly on the command%@NL@%
  15718.           line.%@NL@%
  15719. %@NL@%
  15720. %@CR:MCVcE107@%%@4@%%@AB@%L1026     unmatched right parenthesis%@AE@%%@EH@%%@NL@%
  15721. %@NL@%
  15722.           A right parenthesis was missing from the contents specification of%@NL@%
  15723.           an overlay on the command line.%@NL@%
  15724. %@NL@%
  15725. %@CR:MCVcE108@%%@4@%%@AB@%L1027     unmatched left parenthesis%@AE@%%@EH@%%@NL@%
  15726. %@NL@%
  15727.           A left parenthesis was missing from the contents specification of%@NL@%
  15728.           an overlay on the command line.%@NL@%
  15729. %@NL@%
  15730. %@CR:MCVcE109@%%@4@%%@AB@%L1030     missing internal name%@AE@%%@EH@%%@NL@%
  15731. %@NL@%
  15732.           An %@AB@%IMPORT%@AE@% statement specified an ordinal in the module-definition%@NL@%
  15733.           file without including the internal name of the routine. The name%@NL@%
  15734.           must be given if the import is by ordinal.%@NL@%
  15735. %@NL@%
  15736. %@CR:MCVcE110@%%@4@%%@AB@%L1031     module description redefined%@AE@%%@EH@%%@NL@%
  15737. %@NL@%
  15738.           A %@AB@%DESCRIPTION%@AE@% statement in the module-definition file was%@NL@%
  15739.           specified more than once, a procedure that is not allowed.%@NL@%
  15740. %@NL@%
  15741. %@CR:MCVcE111@%%@4@%%@AB@%L1032     module name redefined%@AE@%%@EH@%%@NL@%
  15742. %@NL@%
  15743.           The module name was specified more than once (via a %@AB@%NAME%@AE@% or%@NL@%
  15744.           %@AB@%LIBRARY%@AE@% statement), a procedure that is not allowed.%@NL@%
  15745. %@NL@%
  15746. %@CR:MCVcE112@%%@4@%%@AB@%L1040     too many exported entries%@AE@%%@EH@%%@NL@%
  15747. %@NL@%
  15748.           The module-definition file exceeded the limit of 3,072 exported%@NL@%
  15749.           names.%@NL@%
  15750. %@NL@%
  15751. %@CR:MCVcE113@%%@4@%%@AB@%L1041     resident-name table overflow%@AE@%%@EH@%%@NL@%
  15752. %@NL@%
  15753.           The size of the resident-name table exceeds 65,534 bytes. (An%@NL@%
  15754.           entry in the resident-name table is made for each exported routine%@NL@%
  15755.           designated %@AB@%RESIDENTNAME%@AE@%, and consists of the name plus three bytes%@NL@%
  15756.           of information. The first entry is the module name.)%@NL@%
  15757. %@NL@%
  15758.           Reduce the number of exported routines or change some to%@NL@%
  15759.           nonresident status.%@NL@%
  15760. %@NL@%
  15761. %@CR:MCVcE114@%%@4@%%@AB@%L1042     nonresident-name table overflow%@AE@%%@EH@%%@NL@%
  15762. %@NL@%
  15763.           The size of the nonresident-name table exceeds 65,534 bytes. (An%@NL@%
  15764.           entry in the nonresident-name table is made for each exported%@NL@%
  15765.           routine not designated %@AB@%RESIDENT-NAME%@AE@%, and consists of the name%@NL@%
  15766.           plus three bytes of information. The first entry is the%@NL@%
  15767.           %@AB@%DESCRIPTION%@AE@% statement.)%@NL@%
  15768. %@NL@%
  15769.           Reduce the number of exported routines or change some to resident%@NL@%
  15770.           status.%@NL@%
  15771. %@NL@%
  15772. %@CR:MCVcE115@%%@4@%%@AB@%L1043     relocation table overflow%@AE@%%@EH@%%@NL@%
  15773. %@NL@%
  15774.           More than 32,768 long calls, long jumps, or other long pointers%@NL@%
  15775.           appeared in the program.%@NL@%
  15776. %@NL@%
  15777.           Try replacing long references with short references where%@NL@%
  15778.           possible, and recreate the object module.%@NL@%
  15779. %@NL@%
  15780. %@CR:MCVcE116@%%@4@%%@AB@%L1044     imported-name table overflow%@AE@%%@EH@%%@NL@%
  15781. %@NL@%
  15782.           The size of the imported-names table exceeds 65,534 bytes. (An%@NL@%
  15783.           entry in the imported-names table is made for each new name given%@NL@%
  15784.           in the %@AB@%IMPORTS%@AE@% section──including the module names──and consists%@NL@%
  15785.           of the name plus one byte.)%@NL@%
  15786. %@NL@%
  15787.           Reduce the number of imports.%@NL@%
  15788. %@NL@%
  15789. %@CR:MCVcE117@%%@4@%%@AB@%L1045     too many TYPDEF records%@AE@%%@EH@%%@NL@%
  15790. %@NL@%
  15791.           An object module contained more than 255 %@AB@%TYPDEF%@AE@% records. These%@NL@%
  15792.           records describe communal variables. This error can appear only%@NL@%
  15793.           with programs produced by the Microsoft FORTRAN Compiler or other%@NL@%
  15794.           compilers that support communal variables. (%@AB@%TYPDEF%@AE@% is a DOS term.%@NL@%
  15795.           It is explained in the %@AI@%Microsoft MS-DOS Programmer's Reference%@AE@% and%@NL@%
  15796.           in other reference books on DOS.)%@NL@%
  15797. %@NL@%
  15798. %@CR:MCVcE118@%%@4@%%@AB@%L1046     too many external symbols in one module%@AE@%%@EH@%%@NL@%
  15799. %@NL@%
  15800.           An object module specified more than the limit of 1,023 external%@NL@%
  15801.           symbols.%@NL@%
  15802. %@NL@%
  15803.           Break the module into smaller parts.%@NL@%
  15804. %@NL@%
  15805. %@CR:MCVcE119@%%@4@%%@AB@%L1047     too many group, segment, and class names in one module%@AE@%%@EH@%%@NL@%
  15806. %@NL@%
  15807.           The program contained too many group, segment, and class names.%@NL@%
  15808. %@NL@%
  15809.           Reduce the number of groups, segments, or classes, and recreate%@NL@%
  15810.           the object file.%@NL@%
  15811. %@NL@%
  15812. %@CR:MCVcE120@%%@4@%%@AB@%L1048     too many segments in one module%@AE@%%@EH@%%@NL@%
  15813. %@NL@%
  15814.           An object module had more than 255 segments.%@NL@%
  15815. %@NL@%
  15816.           Split the module or combine segments.%@NL@%
  15817. %@NL@%
  15818. %@CR:MCVcE121@%%@4@%%@AB@%L1049     too many segments%@AE@%%@EH@%%@NL@%
  15819. %@NL@%
  15820.           The program had more than the maximum number of segments. (The%@NL@%
  15821.           %@AB@%/SEGMENTS%@AE@% option specifies the maximum legal number; the default%@NL@%
  15822.           is 128.)%@NL@%
  15823. %@NL@%
  15824.           Relink by using the %@AB@%/SEGMENTS%@AE@% option with an appropriate number of%@NL@%
  15825.           segments.%@NL@%
  15826. %@NL@%
  15827. %@CR:MCVcE122@%%@4@%%@AB@%L1050     too many groups in one module%@AE@%%@EH@%%@NL@%
  15828. %@NL@%
  15829.           %@AB@%LINK%@AE@% encountered more than 21 group definitions (%@AB@%GRPDEF%@AE@%) in a%@NL@%
  15830.           single module.%@NL@%
  15831. %@NL@%
  15832.           Reduce the number of group definitions or split the module. (Group%@NL@%
  15833.           definitions are explained in the %@AI@%Microsoft MS-DOS Programmer's%@AE@%%@NL@%
  15834.           %@AI@%Reference%@AE@% and in other reference books on DOS.)%@NL@%
  15835. %@NL@%
  15836. %@CR:MCVcE123@%%@4@%%@AB@%L1051     too many groups%@AE@%%@EH@%%@NL@%
  15837. %@NL@%
  15838.           The program defined more than 20 groups, not counting %@AB@%DGROUP%@AE@%.%@NL@%
  15839. %@NL@%
  15840.           Reduce the number of groups.%@NL@%
  15841. %@NL@%
  15842. %@CR:MCVcE124@%%@4@%%@AB@%L1052     too many libraries%@AE@%%@EH@%%@NL@%
  15843. %@NL@%
  15844.           An attempt was made to link with more than 32 libraries.%@NL@%
  15845. %@NL@%
  15846.           Combine libraries, or use modules that require fewer libraries.%@NL@%
  15847. %@NL@%
  15848. %@CR:MCVcE125@%%@4@%%@AB@%L1053     out of memory for symbol table%@AE@%%@EH@%%@NL@%
  15849. %@NL@%
  15850.           The program had more symbolic information (such as public,%@NL@%
  15851.           external, segment, group, class, and file names) than could fit in%@NL@%
  15852.           available memory.%@NL@%
  15853. %@NL@%
  15854.           Try freeing memory by linking from the DOS command level instead%@NL@%
  15855.           of from a %@AB@%MAKE%@AE@% file or an editor. Otherwise, combine modules or%@NL@%
  15856.           segments and try to eliminate as many public symbols as possible.%@NL@%
  15857. %@NL@%
  15858. %@CR:MCVcE126@%%@4@%%@AB@%L1054     requested segment limit too high%@AE@%%@EH@%%@NL@%
  15859. %@NL@%
  15860.           The linker did not have enough memory to allocate tables%@NL@%
  15861.           describing the num-ber of segments requested. (The default is 128%@NL@%
  15862.           or the value specified with the %@AB@%/SEGMENTS%@AE@% option.)%@NL@%
  15863. %@NL@%
  15864.           Try linking again by using the %@AB@%/SEGMENTS%@AE@% option to select a%@NL@%
  15865.           smaller number of segments (for example, use 64 if the default was%@NL@%
  15866.           used previously), or free some memory by eliminating resident%@NL@%
  15867.           programs or shells.%@NL@%
  15868. %@NL@%
  15869. %@CR:MCVcE127@%%@4@%%@AB@%L1056     too many overlays%@AE@%%@EH@%%@NL@%
  15870. %@NL@%
  15871.           The program defined more than 63 overlays.%@NL@%
  15872. %@NL@%
  15873. %@CR:MCVcE128@%%@4@%%@AB@%L1057     data record too large%@AE@%%@EH@%%@NL@%
  15874. %@NL@%
  15875.           A %@AB@%LEDATA%@AE@% record (in an object module) contained more than 1,024%@NL@%
  15876.           bytes of data. This is a translator error. (%@AB@%LEDATA%@AE@% is a DOS term%@NL@%
  15877.           that is explained in the %@AI@%Microsoft MS-DOS Programmer's Reference%@AE@%%@NL@%
  15878.           and in other DOS reference books.)%@NL@%
  15879. %@NL@%
  15880.           Note which translator (compiler or assembler) produced the%@NL@%
  15881.           incorrect object module and the circumstances. Please report this%@NL@%
  15882.           error to Microsoft Corporation by following the directions in the%@NL@%
  15883.           Microsoft Product Assistance Request form at the back of one of%@NL@%
  15884.           your manuals.%@NL@%
  15885. %@NL@%
  15886. %@CR:MCVcE129@%%@4@%%@AB@%L1061     out of memory for/INCREMENTAL%@AE@%%@EH@%%@NL@%
  15887. %@NL@%
  15888.           The linker ran out of memory when trying to process the additional%@NL@%
  15889.           information required for %@AB@%ILINK%@AE@% support.%@NL@%
  15890. %@NL@%
  15891.           Disable incremental linking.%@NL@%
  15892. %@NL@%
  15893. %@CR:MCVcE130@%%@4@%%@AB@%L1062     too many symbols for/INCREMENTAL%@AE@%%@EH@%%@NL@%
  15894. %@NL@%
  15895.           The program had more symbols than can be stored in the %@AB@%.SYM%@AE@% file.%@NL@%
  15896. %@NL@%
  15897.           Reduce the number of symbols or disable incremental linking.%@NL@%
  15898. %@NL@%
  15899. %@CR:MCVcE131@%%@4@%%@AB@%L1063     out of memory for CodeView information%@AE@%%@EH@%%@NL@%
  15900. %@NL@%
  15901.           The linker was given too many object files with debug information,%@NL@%
  15902.           and the linker ran out of space to store it.%@NL@%
  15903. %@NL@%
  15904.           Reduce the number of object files that have debug information.%@NL@%
  15905. %@NL@%
  15906. %@CR:MCVcE132@%%@4@%%@AB@%L1064     out of memory%@AE@%%@EH@%%@NL@%
  15907. %@NL@%
  15908.           The linker was not able to allocate enough memory from the%@NL@%
  15909.           operating system to link the program. On OS/2, try increasing the%@NL@%
  15910.           swap space. Otherwise, reduce the size of the program in terms of%@NL@%
  15911.           code, data, and symbols. On OS/2, consider splitting the program%@NL@%
  15912.           into dynlink libraries.%@NL@%
  15913. %@NL@%
  15914. %@CR:MCVcE133@%%@4@%%@AB@%L1070%@AE@%     %@AI@%name%@AE@%%@AB@% : segment size exceeds 64K%@AE@%%@EH@%%@NL@%
  15915. %@NL@%
  15916.           A single segment contained more than 64K of code or data.%@NL@%
  15917. %@NL@%
  15918.           Try compiling and linking using the large model.%@NL@%
  15919. %@NL@%
  15920. %@CR:MCVcE134@%%@4@%%@AB@%L1071     segment _TEXT larger than 65520 bytes%@AE@%%@EH@%%@NL@%
  15921. %@NL@%
  15922.           This error is likely to occur only in small-model C programs, but%@NL@%
  15923.           it can occur when any program with a segment named %@AB@%_TEXT%@AE@% is linked%@NL@%
  15924.           using the %@AB@%/DOSSEG%@AE@% option of the %@AB@%LINK%@AE@% command. Small-model C%@NL@%
  15925.           programs must reserve code addresses 0 and 1; this range is%@NL@%
  15926.           increased to 16 for alignment purposes.%@NL@%
  15927. %@NL@%
  15928.           Try compiling and linking using the large model.%@NL@%
  15929. %@NL@%
  15930. %@CR:MCVcE135@%%@4@%%@AB@%L1072     common area longer than 65536 bytes%@AE@%%@EH@%%@NL@%
  15931. %@NL@%
  15932.           The program had more than 64K of communal variables. This error%@NL@%
  15933.           cannot appear with object files generated by the Microsoft Macro%@NL@%
  15934.           Assembler, %@AB@%MASM%@AE@%. It occurs only with programs produced by the%@NL@%
  15935.           Microsoft FORTRAN Compiler or other compilers that support%@NL@%
  15936.           communal variables.%@NL@%
  15937. %@NL@%
  15938. %@CR:MCVcE136@%%@4@%%@AB@%L1073     file segment limit exceeded%@AE@%%@EH@%%@NL@%
  15939. %@NL@%
  15940.           The number of physical or file segments exceeds the limit of 254%@NL@%
  15941.           imposed by OS/2 protected mode and by Windows for each application%@NL@%
  15942.           or dynamic-link library. (A file segment is created for each group%@NL@%
  15943.           definition, nonpacked logical segment, and set of packed%@NL@%
  15944.           segments.)%@NL@%
  15945. %@NL@%
  15946.           Reduce the number of segments or put more information into each%@NL@%
  15947.           segment. Make sure that the %@AB@%/PACKCODE%@AE@% and/or the %@AB@%/PACKDATA%@AE@% options%@NL@%
  15948.           are on.%@NL@%
  15949. %@NL@%
  15950. %@CR:MCVcE137@%%@4@%%@AB@%L1074%@AE@%     %@AI@%name%@AE@%%@AB@% : group larger than 64K bytes%@AE@%%@EH@%%@NL@%
  15951. %@NL@%
  15952.           The given group exceeds the limit of 65,536 bytes.%@NL@%
  15953. %@NL@%
  15954.           Reduce the size of the group, or remove any unneeded segments from%@NL@%
  15955.           the group (refer to the map file for a listing of segments).%@NL@%
  15956. %@NL@%
  15957. %@CR:MCVcE138@%%@4@%%@AB@%L1075     entry table larger than 65535 bytes%@AE@%%@EH@%%@NL@%
  15958. %@NL@%
  15959.           The entry table exceeds the limit of 65,535 bytes. (There is an%@NL@%
  15960.           entry in this table for each exported routine for each address%@NL@%
  15961.           that is the target of a far relocation, and for one of the%@NL@%
  15962.           following conditions when true: the target segment is%@NL@%
  15963.           designated %@AB@%IOPL%@AE@%; or %@AB@%PROTMODE%@AE@% is not enabled and the target segment%@NL@%
  15964.           is designated %@AB@%MOVABLE%@AE@%.)%@NL@%
  15965. %@NL@%
  15966.           Declare %@AB@%PROTMODE%@AE@% if applicable, or reduce the number of exported%@NL@%
  15967.           routines, or make some segments %@AB@%FIXED%@AE@% or %@AB@%NOIOPL%@AE@% if possible.%@NL@%
  15968. %@NL@%
  15969. %@CR:MCVcE139@%%@4@%%@AB@%L1078     file segment alignment too small%@AE@%%@EH@%%@NL@%
  15970. %@NL@%
  15971.           The segment-alignment size given with the %@AB@%/ALIGN:%@AE@%%@AI@%number%@AE@% option was%@NL@%
  15972.           too small. Try increasing %@AI@%number%@AE@%.%@NL@%
  15973. %@NL@%
  15974. %@CR:MCVcE140@%%@4@%%@AB@%L1080     cannot open list file%@AE@%%@EH@%%@NL@%
  15975. %@NL@%
  15976.           The disk or the root directory was full.%@NL@%
  15977. %@NL@%
  15978.           Delete or move files to make space.%@NL@%
  15979. %@NL@%
  15980. %@CR:MCVcE141@%%@4@%%@AB@%L1081     out of space for run file%@AE@%%@EH@%%@NL@%
  15981. %@NL@%
  15982.           The disk on which the %@AB@%.EXE%@AE@% file was being written was full.%@NL@%
  15983. %@NL@%
  15984.           Free more space on the disk and restart the linker.%@NL@%
  15985. %@NL@%
  15986. %@CR:MCVcE142@%%@4@%%@AB@%L1082%@AE@%     %@AI@%name%@AE@%%@AB@% : stub file not found%@AE@%%@EH@%%@NL@%
  15987. %@NL@%
  15988.           The linker could not open the file given in the %@AB@%STUB%@AE@% statement in%@NL@%
  15989.           the module-definition file.%@NL@%
  15990. %@NL@%
  15991. %@CR:MCVcE143@%%@4@%%@AB@%L1083     cannot open run file%@AE@%%@EH@%%@NL@%
  15992. %@NL@%
  15993.           The disk or the root directory was full.%@NL@%
  15994. %@NL@%
  15995.           Delete or move files to make space.%@NL@%
  15996. %@NL@%
  15997. %@CR:MCVcE144@%%@4@%%@AB@%L1084     cannot create temporary file%@AE@%%@EH@%%@NL@%
  15998. %@NL@%
  15999.           The disk or root directory was full.%@NL@%
  16000. %@NL@%
  16001.           Free more space in the directory and restart the linker.%@NL@%
  16002. %@NL@%
  16003. %@CR:MCVcE145@%%@4@%%@AB@%L1085     cannot open temporary file%@AE@%%@EH@%%@NL@%
  16004. %@NL@%
  16005.           The disk or the root directory was full.%@NL@%
  16006. %@NL@%
  16007.           Delete or move files to make space.%@NL@%
  16008. %@NL@%
  16009. %@CR:MCVcE146@%%@4@%%@AB@%L1086     scratch file missing%@AE@%%@EH@%%@NL@%
  16010. %@NL@%
  16011.           An internal error has occurred.%@NL@%
  16012. %@NL@%
  16013.           Note the circumstances of the problem and contact Microsoft%@NL@%
  16014.           Corporation by following the directions in the Microsoft Product%@NL@%
  16015.           Assistance Request form at the back of one of your manuals.%@NL@%
  16016. %@NL@%
  16017. %@CR:MCVcE147@%%@4@%%@AB@%L1087     unexpected end-of-file on scratch file%@AE@%%@EH@%%@NL@%
  16018. %@NL@%
  16019.           The disk with the temporary linker-output file was removed.%@NL@%
  16020. %@NL@%
  16021. %@CR:MCVcE148@%%@4@%%@AB@%L1088     out of space for list file%@AE@%%@EH@%%@NL@%
  16022. %@NL@%
  16023.           The disk (where the listing file was being written) is full.%@NL@%
  16024. %@NL@%
  16025.           Free more space on the disk and restart the linker.%@NL@%
  16026. %@NL@%
  16027. %@CR:MCVcE149@%%@4@%%@AB@%L1089%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot open response file%@AE@%%@EH@%%@NL@%
  16028. %@NL@%
  16029.           %@AB@%LINK%@AE@% could not find the specified response file.%@NL@%
  16030. %@NL@%
  16031.           This usually indicates a typing error.%@NL@%
  16032. %@NL@%
  16033. %@CR:MCVcE150@%%@4@%%@AB@%L1090     cannot reopen list file%@AE@%%@EH@%%@NL@%
  16034. %@NL@%
  16035.           The original disk was not replaced at the prompt.%@NL@%
  16036. %@NL@%
  16037.           Restart the linker.%@NL@%
  16038. %@NL@%
  16039. %@CR:MCVcE151@%%@4@%%@AB@%L1091     unexpected end-of-file on library%@AE@%%@EH@%%@NL@%
  16040. %@NL@%
  16041.           The disk containing the library was probably removed.%@NL@%
  16042. %@NL@%
  16043.           Replace the disk containing the library and run the linker again.%@NL@%
  16044. %@NL@%
  16045. %@CR:MCVcE152@%%@4@%%@AB@%L1092     cannot open module-definitions file%@AE@%%@EH@%%@NL@%
  16046. %@NL@%
  16047.           The linker could not open the module-definition file specified on%@NL@%
  16048.           the command line or in the response file.%@NL@%
  16049. %@NL@%
  16050. %@CR:MCVcE153@%%@4@%%@AB@%L1093%@AE@%     %@AI@%filename%@AE@%%@AB@% : object not found%@AE@%%@EH@%%@NL@%
  16051. %@NL@%
  16052.           One of the object files specified in the linker input was not%@NL@%
  16053.           found.%@NL@%
  16054. %@NL@%
  16055.           Restart the linker and specify the object file.%@NL@%
  16056. %@NL@%
  16057. %@CR:MCVcE154@%%@4@%%@AB@%L1094%@AE@%     %@AI@%file%@AE@%%@AB@% : cannot open file for writing%@AE@%%@EH@%%@NL@%
  16058. %@NL@%
  16059.           The linker was unable to open the file with write permission.%@NL@%
  16060. %@NL@%
  16061.           Check file permissions.%@NL@%
  16062. %@NL@%
  16063. %@CR:MCVcE155@%%@4@%%@AB@%L1095%@AE@%     %@AI@%file%@AE@%%@AB@% : out of space on file%@AE@%%@EH@%%@NL@%
  16064. %@NL@%
  16065.           The linker ran out of disk space for the specified output file.%@NL@%
  16066. %@NL@%
  16067.           Delete or move files to make space.%@NL@%
  16068. %@NL@%
  16069. %@CR:MCVcE156@%%@4@%%@AB@%L1100     stub.EXE file invalid%@AE@%%@EH@%%@NL@%
  16070. %@NL@%
  16071.           The file specified in the %@AB@%STUB%@AE@% statement is not a valid real-mode%@NL@%
  16072.           executable file.%@NL@%
  16073. %@NL@%
  16074. %@CR:MCVcE157@%%@4@%%@AB@%L1101     invalid object module%@AE@%%@EH@%%@NL@%
  16075. %@NL@%
  16076.           One of the object modules was invalid.%@NL@%
  16077. %@NL@%
  16078.           If the error persists after recompiling, please contact Microsoft%@NL@%
  16079.           Corporation by following the directions in the Microsoft Product%@NL@%
  16080.           Assistance Request form at the back of one of your manuals.%@NL@%
  16081. %@NL@%
  16082. %@CR:MCVcE158@%%@4@%%@AB@%L1102     unexpected end-of-file%@AE@%%@EH@%%@NL@%
  16083. %@NL@%
  16084.           An invalid format for a library was encountered.%@NL@%
  16085. %@NL@%
  16086. %@CR:MCVcE159@%%@4@%%@AB@%L1103     attempt to access data outside segment bounds%@AE@%%@EH@%%@NL@%
  16087. %@NL@%
  16088.           A data record in an object module specified data extending beyond%@NL@%
  16089.           the end of a segment. This is a translator error.%@NL@%
  16090. %@NL@%
  16091.           Note which translator (compiler or assembler) produced the%@NL@%
  16092.           incorrect object module and the circumstances in which it was%@NL@%
  16093.           produced. Please report this error to Microsoft Corporation by%@NL@%
  16094.           following the directions in the Microsoft Product Assistance%@NL@%
  16095.           Request form at the back of one of your manuals.%@NL@%
  16096. %@NL@%
  16097. %@CR:MCVcE160@%%@4@%%@AB@%L1104%@AE@%     %@AI@%filename%@AE@%%@AB@% : not valid library%@AE@%%@EH@%%@NL@%
  16098. %@NL@%
  16099.           The specified file was not a valid library file. This error causes%@NL@%
  16100.           %@AB@%LINK%@AE@% to abort.%@NL@%
  16101. %@NL@%
  16102. %@CR:MCVcE161@%%@4@%%@AB@%L1105     invalid object due to aborted incremental compile%@AE@%%@EH@%%@NL@%
  16103. %@NL@%
  16104.           Delete the object file, recompile the program, and relink.%@NL@%
  16105. %@NL@%
  16106. %@CR:MCVcE162@%%@4@%%@AB@%L1113     unresolved COMDEF; internal error%@AE@%%@EH@%%@NL@%
  16107. %@NL@%
  16108.           Note the circumstances of the error and contact Microsoft%@NL@%
  16109.           Corporation by following the directions in the Microsoft Product%@NL@%
  16110.           Assistance Request form at the back of one of your manuals.%@NL@%
  16111. %@NL@%
  16112. %@CR:MCVcE163@%%@4@%%@AB@%L1114     file not suitable for /EXEPACK; relink without%@AE@%%@EH@%%@NL@%
  16113. %@NL@%
  16114.           For the linked program, the size of the packed load image plus%@NL@%
  16115.           packing overhead was larger than that of the unpacked load image.%@NL@%
  16116. %@NL@%
  16117.           Relink without the %@AB@%/EXEPACK%@AE@% option.%@NL@%
  16118. %@NL@%
  16119. %@CR:MCVcE164@%%@4@%%@AB@%L1115%@AE@%     %@AI@%option%@AE@%%@AB@%: option incompatible with overlays%@AE@%%@EH@%%@NL@%
  16120. %@NL@%
  16121.           The given option is not compatible with overlays. Remove the%@NL@%
  16122.           option or else do not use overlaid modules.%@NL@%
  16123. %@NL@%
  16124. %@CR:MCVcE165@%%@4@%%@AB@%L1123%@AE@%     %@AI@%name%@AE@%%@AB@% : segment defined for both 16- and 32-bit.%@AE@%%@EH@%%@NL@%
  16125. %@NL@%
  16126.           Define the segment as either 16-bit or 32-bit.%@NL@%
  16127. %@NL@%
  16128. %@CR:MCVcE166@%%@4@%%@AB@%L1126     conflicting iopl-parameter-words value%@AE@%%@EH@%%@NL@%
  16129. %@NL@%
  16130.           An exported name was specified in the module-definition file with%@NL@%
  16131.           an %@AB@%IOPL%@AE@%-parameter-words value, and the same name was specified as%@NL@%
  16132.           an export by the Microsoft C export pragma with a different%@NL@%
  16133.           parameter-words value.%@NL@%
  16134. %@NL@%
  16135. %@CR:MCVcE167@%%@4@%%@AB@%L1127     far segment references not allowed with /BINARY%@AE@%%@EH@%%@NL@%
  16136. %@NL@%
  16137.           You used the %@AB@%/BINARY%@AE@% option (causing the linker to produce a .COM%@NL@%
  16138.           file) with modules that have a far segment reference. Far segment%@NL@%
  16139.           references are not compatible with the %@AB@%.COM%@AE@% file format.%@NL@%
  16140.           High-level-language modules cause this error message (unless the%@NL@%
  16141.           language supports tiny memory model). Assembly code that%@NL@%
  16142.           references a segment address also produces this error message. For%@NL@%
  16143.           example:%@NL@%
  16144. %@NL@%
  16145.           mov     ax, seg mydata%@NL@%
  16146. %@NL@%
  16147. %@NL@%
  16148. %@CR:MCVc2200@%%@3@%%@AB@%C.2.2  LINK Nonfatal Error Messages%@AE@%%@EH@%%@NL@%
  16149. %@NL@%
  16150. %@CR:MCVcE168@%%@4@%%@AB@%L2000     imported starting address%@AE@%%@EH@%%@NL@%
  16151. %@NL@%
  16152.           The program starting address as specified in the %@AB@%END%@AE@% statement in%@NL@%
  16153.           a %@AB@%MASM%@AE@% file is an imported routine. This is not supported by OS/2%@NL@%
  16154.           or Windows.%@NL@%
  16155. %@NL@%
  16156. %@CR:MCVcE169@%%@4@%%@AB@%L2001     fixup(s) without data%@AE@%%@EH@%%@NL@%
  16157. %@NL@%
  16158.           A %@AB@%FIXUPP%@AE@% record occurred without a data record immediately%@NL@%
  16159.           preceding it. This is probably a compiler error. (See the%@NL@%
  16160.           %@AI@%Microsoft MS-DOS %@AE@%%@AI@%Programmer's Reference%@AE@% for more information on%@NL@%
  16161.           %@AB@%FIXUPP%@AE@%.)%@NL@%
  16162. %@NL@%
  16163.           If the error persists after recompiling, please contact Microsoft%@NL@%
  16164.           Corporation by following the directions in the Microsoft Product%@NL@%
  16165.           Assistance Request form at the back of one or your manuals.%@NL@%
  16166. %@NL@%
  16167. %@CR:MCVcE170@%%@4@%%@AB@%L2002     fixup overflow at %@AI@%number%@AE@%%@AB@% in segment%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  16168. %@NL@%
  16169.           This error message will be followed by one of the following:%@NL@%
  16170. %@NL@%
  16171.           %@CR:MCVc2201@%1. "Target external '%@AI@%name%@AE@%.'"%@NL@%
  16172. %@NL@%
  16173.           2. frm seg %@AI@%name1%@AE@%, tgt seg %@AI@%name2%@AE@%, tgt offset %@AI@%number%@AE@%.%@NL@%
  16174. %@NL@%
  16175. %@CR:MCVc2202@%%@4@%A fixup overflow is essentially an attempted reference to code or data that%@EH@%
  16176. is impossible because the source location, i.e., where the reference is made
  16177. "from," and the target address, i.e., where the reference is made "to," are
  16178. too far apart. A close look at the source location is often all you need to
  16179. correct the problem.%@NL@%
  16180. %@NL@%
  16181. %@CR:MCVc2203@%%@4@%Revise the source file and recreate the object file. (For information about%@EH@%
  16182. frame and target segments, see the %@AI@%Microsoft MS-DOS Programmer's Reference%@AE@%.)%@NL@%
  16183. %@NL@%
  16184. %@CR:MCVcE171@%%@4@%%@AB@%L2003     intersegment self-relative fixup at%@AE@% %@AI@%number%@AE@%%@AB@% in segment name%@AE@%%@EH@%%@NL@%
  16185. %@NL@%
  16186.           The program issued a near call or jump to a label in a different%@NL@%
  16187.           segment. This error most often occurs when you specifically%@NL@%
  16188.           declare an external procedure to be near and it should be declared%@NL@%
  16189.           as far.%@NL@%
  16190. %@NL@%
  16191. %@CR:MCVcE172@%%@4@%%@AB@%L2004     LOBYTE-type fixup overflow%@AE@%%@EH@%%@NL@%
  16192. %@NL@%
  16193.           A %@AB@%LOBYTE%@AE@% fixup generated an address overflow. (See the %@AI@%Microsoft%@AE@%%@NL@%
  16194.           %@AI@%MS-DOS Programmer's Reference%@AE@% for more information.)%@NL@%
  16195. %@NL@%
  16196. %@CR:MCVcE173@%%@4@%%@AB@%L2005     fixup type unsupported%@AE@%%@EH@%%@NL@%
  16197. %@NL@%
  16198.           A fixup type occurred that is not supported by the Microsoft%@NL@%
  16199.           linker. This is probably a compiler error.%@NL@%
  16200. %@NL@%
  16201.           Note the circumstances of the failure and contact Microsoft%@NL@%
  16202.           Corporation by following the directions in the Microsoft Product%@NL@%
  16203.           Assistance Request form at the back of one of your manuals.%@NL@%
  16204. %@NL@%
  16205. %@CR:MCVcE174@%%@4@%%@AB@%L2010     too many fixups in LIDATA record%@AE@%%@EH@%%@NL@%
  16206. %@NL@%
  16207.           The number of far relocations (pointer- or base-type) in a LIDATA%@NL@%
  16208.           record ex- ceeds the limit imposed by the linker. This is%@NL@%
  16209.           typically produced by the %@AB@%DUP%@AE@% statement in an %@AB@%.ASM%@AE@% file. The limit%@NL@%
  16210.           is dynamic: a 1,024-byte buffer is shared by relocations and the%@NL@%
  16211.           contents of the %@AB@%LIDATA%@AE@% record; there are eight bytes per%@NL@%
  16212.           relocation.%@NL@%
  16213. %@NL@%
  16214.           Reduce the number of far relocations in the %@AB@%DUP%@AE@% statement.%@NL@%
  16215. %@NL@%
  16216. %@CR:MCVcE175@%%@4@%%@AB@%L2011%@AE@%     %@AI@%name%@AE@%%@AB@% : NEAR/HUGE conflict%@AE@%%@EH@%%@NL@%
  16217. %@NL@%
  16218.           Conflicting %@AB@%NEAR%@AE@% and %@AB@%HUGE%@AE@% attributes were given for a communal%@NL@%
  16219.           variable. This error can occur only with programs produced by the%@NL@%
  16220.           Microsoft FORTRAN Compiler or other compilers that support%@NL@%
  16221.           communal variables.%@NL@%
  16222. %@NL@%
  16223. %@CR:MCVcE176@%%@4@%%@AB@%L2012%@AE@%     %@AI@%name%@AE@%%@AB@% : array-element size mismatch%@AE@%%@EH@%%@NL@%
  16224. %@NL@%
  16225.           A far communal array was declared with two or more different%@NL@%
  16226.           array-element sizes (for instance, an array was declared once as%@NL@%
  16227.           an array of characters and once as an array of real numbers). This%@NL@%
  16228.           error cannot occur with object files produced by the Microsoft%@NL@%
  16229.           Macro Assembler. It occurs only with the Microsoft FORTRAN%@NL@%
  16230.           Compiler and any other compiler that supports far communal arrays.%@NL@%
  16231. %@NL@%
  16232. %@CR:MCVcE177@%%@4@%%@AB@%L2013     LIDATA record too large%@AE@%%@EH@%%@NL@%
  16233. %@NL@%
  16234.           A %@AB@%LIDATA%@AE@% record contained more than 512 bytes. This is probably a%@NL@%
  16235.           compiler error.%@NL@%
  16236. %@NL@%
  16237.           Note the circumstances of the failure and contact Microsoft%@NL@%
  16238.           Corporation by following the directions in the Microsoft Product%@NL@%
  16239.           Assistance Request form at the back of one of your manuals.%@NL@%
  16240. %@NL@%
  16241. %@CR:MCVcE178@%%@4@%%@AB@%L2022%@AE@%     %@AI@%name%@AE@%%@AB@% (alias%@AE@% %@AI@%internalname%@AE@%%@AB@%) : export undefined%@AE@%%@EH@%%@NL@%
  16242. %@NL@%
  16243.           The internal name of the given exported routine is undefined.%@NL@%
  16244. %@NL@%
  16245.           Number LINK Error Message%@NL@%
  16246. %@NL@%
  16247. %@CR:MCVcE179@%%@4@%%@AB@%L2023%@AE@%     %@AI@%name%@AE@%%@AB@% (alias%@AE@% %@AI@%internalname%@AE@%%@AB@%) : export imported%@AE@%%@EH@%%@NL@%
  16248. %@NL@%
  16249.           The internal name of the given exported routine conflicts with the%@NL@%
  16250.           internal name of a previously imported routine.  The set of%@NL@%
  16251.           imported and exported names cannot overlap.%@NL@%
  16252. %@NL@%
  16253. %@CR:MCVcE180@%%@4@%%@AB@%L2024%@AE@%     %@AI@%name%@AE@%%@AB@% : special symbol already defined%@AE@%%@EH@%%@NL@%
  16254. %@NL@%
  16255.           Your program defined a symbol name already used by the linker for%@NL@%
  16256.           one of its own low-level symbols. (For example, the linker%@NL@%
  16257.           generates special symbols used in overlay support and other%@NL@%
  16258.           operations.)%@NL@%
  16259. %@NL@%
  16260.           Choose another name for the symbol in order to avoid conflict.%@NL@%
  16261. %@NL@%
  16262. %@CR:MCVcE181@%%@4@%%@AB@%L2025%@AE@%     %@AI@%name%@AE@%%@AB@% : symbol defined more than once.%@AE@%%@EH@%%@NL@%
  16263. %@NL@%
  16264.           The same symbol has been found in two different object files.%@NL@%
  16265. %@NL@%
  16266. %@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@%
  16267.           %@AB@%same ordinal%@AE@%%@NL@%
  16268. %@NL@%
  16269.           The given exported name with the given ordinal number conflicted%@NL@%
  16270.           with a different exported name previously assigned to the same%@NL@%
  16271.           ordinal. Only one name can be associated with a particular%@NL@%
  16272.           ordinal.%@NL@%
  16273. %@NL@%
  16274. %@CR:MCVcE183@%%@4@%%@AB@%L2027%@AE@%     %@AI@%name%@AE@%%@AB@% : ordinal too large for export%@AE@%%@EH@%%@NL@%
  16275. %@NL@%
  16276.           The given exported name was assigned an ordinal that exceeded the%@NL@%
  16277.           limit of 3,072.%@NL@%
  16278. %@NL@%
  16279. %@CR:MCVcE184@%%@4@%%@AB@%L2028     automatic data segment plus heap exceed 64K%@AE@%%@EH@%%@NL@%
  16280. %@NL@%
  16281.           The total size of data declared in %@AB@%DGROUP%@AE@%, plus the value given in%@NL@%
  16282.           %@AB@%HEAPSIZE%@AE@% in the module-definition file, plus the stack size given%@NL@%
  16283.           by the %@AB@%/STACKSIZE%@AE@% option or %@AB@%STACKSIZE%@AE@% module-definition file%@NL@%
  16284.           statement, exceeds 64K.  Reduce near-data allocation, %@AB@%HEAPSIZE%@AE@%, or%@NL@%
  16285.           stack.%@NL@%
  16286. %@NL@%
  16287. %@CR:MCVcE185@%%@4@%%@AB@%L2029%@AE@%     %@AI@%name%@AE@%%@AB@% : unresolved external%@AE@%%@EH@%%@NL@%
  16288. %@NL@%
  16289.           The name that comes before %@AS@%in file(s)%@AE@% is the unresolved external%@NL@%
  16290.           symbol. On the next line is a list of object modules that have%@NL@%
  16291.           made references to this symbol. This message and the list are also%@NL@%
  16292.           written to the map file, if one exists.%@NL@%
  16293. %@NL@%
  16294. %@CR:MCVcE186@%%@4@%%@AB@%L2030     starting address not code (use class 'CODE')%@AE@%%@EH@%%@NL@%
  16295. %@NL@%
  16296.           The program starting address, as specified in the %@AB@%END%@AE@% statement of%@NL@%
  16297.           an %@AB@%.ASM%@AE@% file, should be in a code segment. (Code segments are%@NL@%
  16298.           recognized if their class name ends in %@AS@%'CODE'%@AE@%.) This is an error%@NL@%
  16299.           in OS/2 protected mode.%@NL@%
  16300. %@NL@%
  16301.           The error message may be disabled by including the %@AB@%REALMODE%@AE@%%@NL@%
  16302.           statement in the module-definition file.%@NL@%
  16303. %@NL@%
  16304. %@CR:MCVcE187@%%@4@%%@AB@%L2041     stack plus data exceed 64K%@AE@%%@EH@%%@NL@%
  16305. %@NL@%
  16306.           If the total of near data and requested stack size exceeds 64K,%@NL@%
  16307.           the program will not run correctly. The linker checks for this%@NL@%
  16308.           condition only when %@AB@%/DOSSEG%@AE@% is enabled, which is the case in the%@NL@%
  16309.           library startup module.%@NL@%
  16310. %@NL@%
  16311.           Reduce the stack size.%@NL@%
  16312. %@NL@%
  16313. %@CR:MCVcE188@%%@4@%%@AB@%L2043     Quick Library support module missing%@AE@%%@EH@%%@NL@%
  16314. %@NL@%
  16315.           You did not link with the required %@AB@%QUICKLIB.OBJ%@AE@% module when%@NL@%
  16316.           creating a Quick library.%@NL@%
  16317. %@NL@%
  16318. %@CR:MCVcE189@%%@4@%%@AB@%L2044%@AE@%     %@AI@%name%@AE@%%@AB@% : symbol multiply defined, use/NOE%@AE@%%@EH@%%@NL@%
  16319. %@NL@%
  16320.           The linker found what it interprets as a public-symbol%@NL@%
  16321.           redefinition, probably because you have redefined a symbol defined%@NL@%
  16322.           in a library. Relink with the %@AB@%/NOEXTDICTIONARY%@AE@% (%@AB@%NOE%@AE@%) option. If%@NL@%
  16323.           error L2025 results for the same symbol, then you have a genuine%@NL@%
  16324.           symbol-redefinition error.%@NL@%
  16325. %@NL@%
  16326. %@CR:MCVcE190@%%@4@%%@AB@%L2045%@AE@%     %@AI@%segmentname%@AE@%%@AB@% : segment with > 1 class name not allowed with/INC%@AE@%%@EH@%%@NL@%
  16327. %@NL@%
  16328.           Your program defined a segment more than once, giving the segment%@NL@%
  16329.           different class names. Different class names for the same segment%@NL@%
  16330.           are not allowed when you link with the %@AB@%/INCREMENTAL%@AE@% option.%@NL@%
  16331.           Normally, this error should never appear unless you are%@NL@%
  16332.           programming with %@AB@%MASM%@AE@%. For example, if you give the two MASM%@NL@%
  16333.           statements%@NL@%
  16334. %@NL@%
  16335.           %@AS@%_BSS segment%@AE@%%@NL@%
  16336.           %@AS@%'BSS'_BSS segment 'DATA'%@AE@%%@NL@%
  16337. %@NL@%
  16338.           then the statements have the effect of defining two distinct%@NL@%
  16339.           segments with the same name but different classes. This situation%@NL@%
  16340.           is incompatible with the %@AB@%/INCREMENTAL%@AE@% option.%@NL@%
  16341. %@NL@%
  16342. %@CR:MCVcE191@%%@4@%%@AB@%L2047     IOPL attribute conflict - segment:%@AE@% %@AI@%segname%@AE@%%@AB@% in group:%@AE@% %@AI@%grpname%@AE@%%@EH@%%@NL@%
  16343. %@NL@%
  16344.           The segment %@AI@%segname%@AE@% is the a member of the group %@AI@%grpname%@AE@%, but has%@NL@%
  16345.           a different %@AB@%IOPL%@AE@% attribute from other segments in the group.%@NL@%
  16346. %@NL@%
  16347. %@NL@%
  16348. %@CR:MCVc2300@%%@3@%%@AB@%C.2.3  LINK Warning Messages%@AE@%%@EH@%%@NL@%
  16349. %@NL@%
  16350. %@CR:MCVcE192@%%@4@%%@AB@%L4000     seg disp. included near offset in segment%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  16351. %@NL@%
  16352.           This is the warning generated by the %@AB@%/WARNFIXUP%@AE@% option. See%@NL@%
  16353.           Section 13.3.31%@BO:   99af7@%, "Issuing Fixup Warnings," for more information%@NL@%
  16354.           on that option.%@NL@%
  16355. %@NL@%
  16356. %@CR:MCVcE193@%%@4@%%@AB@%L4001     frame-relative fixup, frame ignored near%@AE@% %@AI@%offset%@AE@%%@AB@% in segment%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  16357. %@NL@%
  16358.           A reference is made relative to a segment that is different from%@NL@%
  16359.           the target segment of the reference. For example, if %@AS@%_foo%@AE@% is%@NL@%
  16360.           defined in segment %@AS@%_TEXT%@AE@%, the instruction %@AS@%call DGROUP:_foo%@AE@%%@NL@%
  16361.           produces this warning. The frame %@AB@%DGROUP%@AE@% is ignored, so the linker%@NL@%
  16362.           treats the call as if it were %@AS@%call _TEXT:_foo%@AE@%.%@NL@%
  16363. %@NL@%
  16364. %@CR:MCVcE194@%%@4@%%@AB@%L4002     frame-relative absolute fixup near%@AE@% %@AI@%offset%@AE@%%@AB@% in segment%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  16365. %@NL@%
  16366.           A reference is made similar to the type described in L4001, but%@NL@%
  16367.           both segments are absolute (defined with %@AB@%AT%@AE@%). The linker treats%@NL@%
  16368.           the executable file as if the file were to run in real mode only.%@NL@%
  16369. %@NL@%
  16370. %@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@%
  16371.           %@AI@%offset%@AE@% %@AB@%target external%@AE@% '%@AI@%name%@AE@%'%@NL@%
  16372. %@NL@%
  16373.           The linker found an intersegment self-relative fixup. This error%@NL@%
  16374.           may be caused by compiling a small-model program with the %@AB@%/NT%@AE@%%@NL@%
  16375.           option.%@NL@%
  16376. %@NL@%
  16377. %@CR:MCVcE196@%%@4@%%@AB@%L4010     invalid alignment specification%@AE@%%@EH@%%@NL@%
  16378. %@NL@%
  16379.           The number specified in the %@AB@%/ALIGNMENT%@AE@% option must be a power of 2%@NL@%
  16380.           in the range 2-32,768, inclusive.%@NL@%
  16381. %@NL@%
  16382. %@CR:MCVcE197@%%@4@%%@AB@%L4011     PACKCODE value exceeding 65500 unreliable%@AE@%%@EH@%%@NL@%
  16383. %@NL@%
  16384.           The packing limit specified with the %@AB@%/PACKCODE%@AE@% option was between%@NL@%
  16385.           65,500 and 65,536. Code segments with a size in this range are%@NL@%
  16386.           unreliable on some steppings of the 80286 processor.%@NL@%
  16387. %@NL@%
  16388. %@CR:MCVcE198@%%@4@%%@AB@%L4012     load-high disables EXEPACK%@AE@%%@EH@%%@NL@%
  16389. %@NL@%
  16390.           The %@AB@%/HIGH%@AE@% and %@AB@%/EXEPACK%@AE@% options cannot be used at the same time.%@NL@%
  16391. %@NL@%
  16392. %@CR:MCVcE199@%%@4@%%@AB@%L4013     invalid option for new-format executable file ignored%@AE@%%@EH@%%@NL@%
  16393. %@NL@%
  16394.           The use of overlays with the options %@AB@%/CPARMAXALLOC%@AE@%, %@AB@%/DSALLOCATE%@AE@%,%@NL@%
  16395.           and %@AB@%/NOGROUPASSOCIATION%@AE@% is not allowed with either OS/2%@NL@%
  16396.           protected-mode or Windows executable files.%@NL@%
  16397. %@NL@%
  16398. %@CR:MCVcE200@%%@4@%%@AB@%L4014%@AE@%     %@AI@%option%@AE@%%@AB@% : invalid option for old-format executable file ignored%@AE@%%@EH@%%@NL@%
  16399. %@NL@%
  16400.           The %@AB@%/ALIGNMENT%@AE@% option is invalid for real-mode executables.%@NL@%
  16401. %@NL@%
  16402. %@CR:MCVcE201@%%@4@%%@AB@%L4015     /CODEVIEW disables /DSALLOCATE%@AE@%%@EH@%%@NL@%
  16403. %@NL@%
  16404.           The %@AB@%/CODEVIEW%@AE@% and %@AB@%/DSALLOCATE%@AE@% options cannot be used at the same%@NL@%
  16405.           time.%@NL@%
  16406. %@NL@%
  16407. %@CR:MCVcE202@%%@4@%%@AB@%L4016     /CODEVIEW disables/EXEPACK%@AE@%%@EH@%%@NL@%
  16408. %@NL@%
  16409.           The %@AB@%/CODEVIEW%@AE@% and %@AB@%/EXEPACK%@AE@% options cannot be used at the same%@NL@%
  16410.           time.%@NL@%
  16411. %@NL@%
  16412. %@CR:MCVcE203@%%@4@%%@AB@%L4020%@AE@%     %@AI@%name%@AE@%%@AB@% : code-segment size exceeds 65500%@AE@%%@EH@%%@NL@%
  16413. %@NL@%
  16414.           Code segments of 65,501-65,536 bytes in length may be unreliable%@NL@%
  16415.           on the Intel 80286 processor.%@NL@%
  16416. %@NL@%
  16417. %@CR:MCVcE204@%%@4@%%@AB@%L4021     no stack segment%@AE@%%@EH@%%@NL@%
  16418. %@NL@%
  16419.           The program did not contain a stack segment defined with %@AB@%STACK%@AE@%%@NL@%
  16420.           combine type. This message should not appear for modules compiled%@NL@%
  16421.           with the Microsoft FORTRAN Compiler, but it could appear for an%@NL@%
  16422.           assembly-language module.%@NL@%
  16423. %@NL@%
  16424.           Normally, every program should have a stack segment with the%@NL@%
  16425.           combine type specified as %@AB@%STACK%@AE@%. You may ignore this message if%@NL@%
  16426.           you have a specific reason for not defining a stack or for%@NL@%
  16427.           defining one without the %@AB@%STACK%@AE@% combine type. Linking with versions%@NL@%
  16428.           of %@AB@%LINK%@AE@% earlier than Version 2.40 might cause this message since%@NL@%
  16429.           these linkers search libraries only once.%@NL@%
  16430. %@NL@%
  16431. %@CR:MCVcE205@%%@4@%%@AB@%L4022%@AE@%     %@AI@%group1%@AE@%%@AB@%,%@AE@% %@AI@%group2%@AE@%%@AB@% : groups overlap%@AE@%%@EH@%%@NL@%
  16432. %@NL@%
  16433.           The named groups overlap. Since a group is assigned to a physical%@NL@%
  16434.           segment, groups cannot overlap with either OS/2 protected-mode or%@NL@%
  16435.           Windows executable files.%@NL@%
  16436. %@NL@%
  16437.           Reorganize segments and group definitions so the groups do not%@NL@%
  16438.           overlap. Refer to the map file.%@NL@%
  16439. %@NL@%
  16440. %@CR:MCVcE206@%%@4@%%@AB@%L4023%@AE@%     %@AI@%name%@AE@%%@AB@% (%@AE@%%@AI@%internal name%@AE@%%@AB@%) : export internal name conflict%@AE@%%@EH@%%@NL@%
  16441. %@NL@%
  16442.           The internal name of the given exported routine conflicted with%@NL@%
  16443.           the internal name of a previous import definition or export%@NL@%
  16444.           definition.%@NL@%
  16445. %@NL@%
  16446. %@CR:MCVcE207@%%@4@%%@AB@%L4024%@AE@%     %@AI@%name%@AE@%%@AB@% : multiple definitions for export name%@AE@%%@EH@%%@NL@%
  16447. %@NL@%
  16448.           The given name was exported more than once, an action that is not%@NL@%
  16449.           allowed.%@NL@%
  16450. %@NL@%
  16451. %@CR:MCVcE208@%%@4@%%@AB@%L4025%@AE@%     %@AI@%name%@AE@%%@AB@% : import internal name conflict%@AE@%%@EH@%%@NL@%
  16452. %@NL@%
  16453.           The internal name of the given imported routine (import is either%@NL@%
  16454.           a name or a number) conflicted with the internal name of a%@NL@%
  16455.           previous export or import.%@NL@%
  16456. %@NL@%
  16457. %@CR:MCVcE209@%%@4@%%@AB@%L4026%@AE@%     %@AI@%dynlib.import (name)%@AE@%%@AB@% : self-imported%@AE@%%@EH@%%@NL@%
  16458. %@NL@%
  16459.           The given imported routine was imported from the module being%@NL@%
  16460.           linked. This is not supported on some systems.%@NL@%
  16461. %@NL@%
  16462. %@CR:MCVcE210@%%@4@%%@AB@%L4027%@AE@%     %@AI@%name%@AE@%%@AB@% : multiple definitions for import internal-name%@AE@%%@EH@%%@NL@%
  16463. %@NL@%
  16464.           The given internal name was imported more than once. Previous%@NL@%
  16465.           import definitions are ignored.%@NL@%
  16466. %@NL@%
  16467. %@CR:MCVcE211@%%@4@%%@AB@%L4028%@AE@%     %@AI@%name%@AE@%%@AB@% : segment already defined%@AE@%%@EH@%%@NL@%
  16468. %@NL@%
  16469.           The given segment was defined more than once in the %@AB@%SEGMENTS%@AE@%%@NL@%
  16470.           statement of the module-definition file.%@NL@%
  16471. %@NL@%
  16472. %@CR:MCVcE212@%%@4@%%@AB@%L4029%@AE@%     %@AI@%name%@AE@%%@AB@% : DGROUP segment converted to type data%@AE@%%@EH@%%@NL@%
  16473. %@NL@%
  16474.           The given logical segment in the group %@AB@%DGROUP%@AE@% was defined as a%@NL@%
  16475.           code segment. (%@AB@%DGROUP%@AE@% cannot contain code segments because the%@NL@%
  16476.           linker always considers %@AB@%DGROUP%@AE@% to be a data segment. The name%@NL@%
  16477.           %@AB@%DGROUP%@AE@% is predefined as the automatic data segment.) The linker%@NL@%
  16478.           converts the named segment to type "data."%@NL@%
  16479. %@NL@%
  16480. %@CR:MCVcE213@%%@4@%%@AB@%L4030%@AE@%     %@AI@%name%@AE@%%@AB@% : segment attributes changed to conform with automatic data%@AE@%%@EH@%%@NL@%
  16481.           segment%@NL@%
  16482. %@NL@%
  16483.           The given logical segment in the group %@AB@%DGROUP%@AE@% was given sharing%@NL@%
  16484.           attributes (%@AB@%SHARED/NONSHARED%@AE@%) that differed from the automatic%@NL@%
  16485.           data attributes as declared by the %@AB@%DATA%@AE@% %@AI@%instance%@AE@% specification%@NL@%
  16486.           (%@AB@%SINGLE/MULTIPLE%@AE@%). The attributes are converted to conform to%@NL@%
  16487.           those of %@AB@%DGROUP%@AE@%. Refer to Error L4029 for more information on%@NL@%
  16488.           %@AB@%DGROUP%@AE@%.%@NL@%
  16489. %@NL@%
  16490. %@CR:MCVcE214@%%@4@%%@AB@%L4031%@AE@%     %@AI@%name%@AE@%%@AB@% : segment declared in more than one group%@AE@%%@EH@%%@NL@%
  16491. %@NL@%
  16492.           A segment was declared to be a member of two different groups.%@NL@%
  16493. %@NL@%
  16494.           Correct the source file and recreate the object files.%@NL@%
  16495. %@NL@%
  16496. %@CR:MCVcE215@%%@4@%%@AB@%L4032%@AE@%     %@AI@%name%@AE@%%@AB@% : code-group size exceeds 65500 bytes%@AE@%%@EH@%%@NL@%
  16497. %@NL@%
  16498.           The given code group has a size between 65,500 and 65,536 bytes, a%@NL@%
  16499.           size that is unreliable on some steppings of the 80286 processor.%@NL@%
  16500. %@NL@%
  16501. %@CR:MCVcE216@%%@4@%%@AB@%L4034     more than 239 overlay segments; extra put in root%@AE@%%@EH@%%@NL@%
  16502. %@NL@%
  16503.           Your program designated more than the limit of 239 segments to go%@NL@%
  16504.           in overlays. Starting with the 234th segment, they are assigned to%@NL@%
  16505.           the root (that is, the permanently resident portion of the%@NL@%
  16506.           program).%@NL@%
  16507. %@NL@%
  16508. %@CR:MCVcE217@%%@4@%%@AB@%L4036     no automatic data segment%@AE@%%@EH@%%@NL@%
  16509. %@NL@%
  16510.           The application did not define a group named %@AB@%DGROUP%@AE@%. %@AB@%DGROUP%@AE@% has%@NL@%
  16511.           special meaning to the linker, which uses it to identify the%@NL@%
  16512.           automatic or default data segment used by the operating system.%@NL@%
  16513.           Most OS/2 protected-mode and Windows applications require %@AB@%DGROUP%@AE@%.%@NL@%
  16514.           This warning will not be issued if %@AB@%DATA%@AE@% %@AB@%NONE%@AE@% is declared or if the%@NL@%
  16515.           executable file is a dynamic-link library.%@NL@%
  16516. %@NL@%
  16517. %@CR:MCVcE218@%%@4@%%@AB@%L4038     program has no starting address%@AE@%%@EH@%%@NL@%
  16518. %@NL@%
  16519.           Your OS/2 or Windows application had no starting address, which%@NL@%
  16520.           usually will cause the program to fail. Higher-level languages%@NL@%
  16521.           automatically specify a starting address. If you are writing an%@NL@%
  16522.           assembly-language program, specify a starting address with the %@AB@%END%@AE@%%@NL@%
  16523.           statement.%@NL@%
  16524. %@NL@%
  16525.           Real-mode programs and dynamic-link libraries should never receive%@NL@%
  16526.           this message, regardless whether or not they have starting%@NL@%
  16527.           addresses.%@NL@%
  16528. %@NL@%
  16529. %@CR:MCVcE219@%%@4@%%@AB@%L4042     cannot open old version%@AE@%%@EH@%%@NL@%
  16530. %@NL@%
  16531.           The file specified in the %@AB@%OLD%@AE@% statement in the module-definition%@NL@%
  16532.           file could not be opened.%@NL@%
  16533. %@NL@%
  16534. %@CR:MCVcE220@%%@4@%%@AB@%L4043     old version not segmented-executable format%@AE@%%@EH@%%@NL@%
  16535. %@NL@%
  16536.           The file specified in the %@AB@%OLD%@AE@% statement in the module-definition%@NL@%
  16537.           file was not a valid OS/2 protected-mode or Windows executable%@NL@%
  16538.           file.%@NL@%
  16539. %@NL@%
  16540. %@CR:MCVcE221@%%@4@%%@AB@%L4045     name of output file is%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  16541. %@NL@%
  16542.           The prompt for the run-file field gave an inaccurate default%@NL@%
  16543.           because %@AB@%/QUICKLIB%@AE@% option was not used early enough. The output%@NL@%
  16544.           will be a Quick library with the name given in the error message.%@NL@%
  16545. %@NL@%
  16546. %@CR:MCVcE222@%%@4@%%@AB@%L4046     module name different from output file name%@AE@%%@EH@%%@NL@%
  16547. %@NL@%
  16548.           The name of the executable file as specified in the %@AB@%NAME%@AE@% or%@NL@%
  16549.           %@AB@%LIBRARY%@AE@% statement is different from the output file name. This may%@NL@%
  16550.           cause problems; consult the documentation for your operating%@NL@%
  16551.           system.%@NL@%
  16552. %@NL@%
  16553. %@CR:MCVcE223@%%@4@%%@AB@%L4050     too many public symbols for sorting%@AE@%%@EH@%%@NL@%
  16554. %@NL@%
  16555.           The linker uses the stack and all available memory in the near%@NL@%
  16556.           heap to sort public symbols for the %@AB@%/MAP%@AE@% option. If the number of%@NL@%
  16557.           public symbols exceeds the space available for them, this warning%@NL@%
  16558.           is issued and the symbols are not sorted in the map file but%@NL@%
  16559.           listed in an arbitrary order.%@NL@%
  16560. %@NL@%
  16561.           Reduce the number of symbols.%@NL@%
  16562. %@NL@%
  16563. %@CR:MCVcE224@%%@4@%%@AB@%L4051%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot find library%@AE@%%@EH@%%@NL@%
  16564. %@NL@%
  16565.           The linker could not find the specified file.%@NL@%
  16566. %@NL@%
  16567.           Enter a new file name, a new path specification, or both.%@NL@%
  16568. %@NL@%
  16569. %@CR:MCVcE225@%%@4@%%@AB@%L4053     VM.TMP : illegal file name; ignored%@AE@%%@EH@%%@NL@%
  16570. %@NL@%
  16571.           %@AB@%VM.TMP%@AE@% appeared as an object-file name.%@NL@%
  16572. %@NL@%
  16573.           Rename the file and rerun the linker.%@NL@%
  16574. %@NL@%
  16575. %@CR:MCVcE226@%%@4@%%@AB@%L4054%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot find file%@AE@%%@EH@%%@NL@%
  16576. %@NL@%
  16577.           The linker could not find the specified file.%@NL@%
  16578. %@NL@%
  16579.           Enter a new file name, a new path specification, or both.%@NL@%
  16580. %@NL@%
  16581. %@CR:MCVcE227@%%@4@%%@AB@%L4067     ignoring start address not equal to 0x100 for /TINY%@AE@%%@EH@%%@NL@%
  16582. %@NL@%
  16583.           The code specified a starting address other than the assumed%@NL@%
  16584.           address of 100 hex for a %@AB@%.COM%@AE@% file created with the %@AB@%/TINY%@AE@% option.%@NL@%
  16585.           The linker is proceeding to start the %@AB@%.COM%@AE@% file at 100 hex,%@NL@%
  16586.           regardless of the specified address.%@NL@%
  16587. %@NL@%
  16588.           Present only in the DOS-only 3.xx linkers and the executable 5.xx%@NL@%
  16589.           linkers.%@NL@%
  16590. %@NL@%
  16591. %@NL@%
  16592. %@CR:MCVc3000@%%@2@%%@AB@%C.3  ILINK Error Messages%@AE@%%@EH@%%@NL@%
  16593. %@NL@%
  16594. %@CR:MCVc3001@%%@4@%This section lists and describes error messages generated by the Microsoft%@EH@%
  16595. Incremental Linker, %@AB@%ILINK%@AE@%.%@NL@%
  16596. %@NL@%
  16597. %@CR:MCVc3002@%%@4@%%@AB@%Fatal errors%@AE@% cause the linker to end the linking session. Fatal error%@EH@%
  16598. messages have the following format:%@NL@%
  16599. %@NL@%
  16600. %@CR:MCVc3003@%%@AI@%location%@AE@% : %@AS@%error L1%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  16601. %@NL@%
  16602. %@CR:MCVc3004@%%@4@%%@AB@%Incremental violations%@AE@% cause %@AB@%ILINK%@AE@% to end the linking session and carry out%@EH@%
  16603. the command specified by the /e option.  Incremental violations messages
  16604. have the following format:%@NL@%
  16605. %@NL@%
  16606. %@CR:MCVc3005@%%@AI@%location%@AE@% : %@AS@%error L2%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  16607. %@NL@%
  16608. %@CR:MCVc3006@%%@4@%%@AB@%Warnings%@AE@% give notice of certain conditions without ending the operation of%@EH@%
  16609. ILINK. Warnings have the following format:%@NL@%
  16610. %@NL@%
  16611. %@CR:MCVc3007@%%@AI@%location%@AE@% : %@AS@%warning L4%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  16612. %@NL@%
  16613. %@CR:MCVc3008@%%@4@%In all three kinds of messages, location is the input file associated with%@EH@%
  16614. the error. If the input file is an %@AB@%.OBJ%@AE@% or %@AB@%.LIB%@AE@% file and has a module name,
  16615. the module name is enclosed in parentheses, as shown in the following
  16616. examples:%@NL@%
  16617. %@NL@%
  16618.      SLIBC.LIB (_file)%@NL@%
  16619.      MAIN.OBJ (main.c)%@NL@%
  16620.      TEXT.OBJ%@NL@%
  16621. %@NL@%
  16622. %@CR:MCVc3009@%%@4@%The following error messages may appear when you link object files with the%@EH@%
  16623. Microsoft Incremental Linker, %@AB@%ILINK%@AE@%.%@NL@%
  16624. %@NL@%
  16625. %@NL@%
  16626. %@CR:MCVc3100@%%@3@%%@AB@%C.3.1  ILINK Fatal Errors%@AE@%%@EH@%%@NL@%
  16627. %@NL@%
  16628. %@CR:MCVcE228@%%@4@%%@AB@%L1105     invalid object due to aborted incremental compile%@AE@%%@EH@%%@NL@%
  16629. %@NL@%
  16630.           Delete the object file, recompile the program, and relink.%@NL@%
  16631. %@NL@%
  16632. %@CR:MCVcE229@%%@4@%%@AB@%L1200     .SYM seek error%@AE@%%@EH@%%@NL@%
  16633. %@NL@%
  16634.           The %@AB@%.SYM%@AE@% file could not be properly read. Try redoing a full link%@NL@%
  16635.           with the %@AB@%/INCREMENTAL%@AE@% option.%@NL@%
  16636. %@NL@%
  16637. %@CR:MCVcE230@%%@4@%%@AB@%L1201     .SYM read error%@AE@%%@EH@%%@NL@%
  16638. %@NL@%
  16639.           The %@AB@%.SYM%@AE@% file could not be properly read. Try redoing a full link%@NL@%
  16640.           with the %@AB@%/INCREMENTAL%@AE@% option.%@NL@%
  16641. %@NL@%
  16642. %@CR:MCVcE231@%%@4@%%@AB@%L1202     .SYM write error%@AE@%%@EH@%%@NL@%
  16643. %@NL@%
  16644.           The disk is full or the %@AB@%.SYM%@AE@% file already exists and has the%@NL@%
  16645.           %@AB@%READONLY%@AE@% attribute.%@NL@%
  16646. %@NL@%
  16647. %@CR:MCVcE232@%%@4@%%@AB@%L1203     map for segment%@AE@% %@AI@%name%@AE@%%@AB@% exceeds 64K%@AE@%%@EH@%%@NL@%
  16648. %@NL@%
  16649.           The symbolic information associated with the given segment exceeds%@NL@%
  16650.           64K bytes, an amount more than %@AB@%ILINK%@AE@% can handle.%@NL@%
  16651. %@NL@%
  16652. %@CR:MCVcE233@%%@4@%%@AB@%L1204     .ILK write error%@AE@%%@EH@%%@NL@%
  16653. %@NL@%
  16654.           The disk is full or the %@AB@%.SYM%@AE@% file already exists and has the%@NL@%
  16655.           %@AB@%READONLY%@AE@% attribute.%@NL@%
  16656. %@NL@%
  16657. %@CR:MCVcE234@%%@4@%%@AB@%L1205     fixup overflow at%@AE@% %@AI@%address%@AE@%%@AB@% in segment%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  16658. %@NL@%
  16659.           A %@AB@%FIXUPP%@AE@% object record with the given location referred to a%@NL@%
  16660.           target too far away to be correctly processed. This messages%@NL@%
  16661.           indicates an error in translation by the compiler or assembler.%@NL@%
  16662. %@NL@%
  16663. %@CR:MCVcE235@%%@4@%%@AB@%L1206     .ILK seek error%@AE@%%@EH@%%@NL@%
  16664. %@NL@%
  16665.           The %@AB@%.ILK%@AE@% file is corrupted. Do a full link. If the error%@NL@%
  16666.           persists, note the circumstance of the error and notify Microsoft%@NL@%
  16667.           Corporation by following the directions in the Microsoft Product%@NL@%
  16668.           Assistance Request form at the back of one of your manuals.%@NL@%
  16669. %@NL@%
  16670. %@CR:MCVcE236@%%@4@%%@AB@%L1207     .ILK file too large%@AE@%%@EH@%%@NL@%
  16671. %@NL@%
  16672.           The %@AB@%.ILK%@AE@% file is too large for %@AB@%ILINK%@AE@% to process. Do a full link.%@NL@%
  16673. %@NL@%
  16674. %@CR:MCVcE237@%%@4@%%@AB@%L1208     invalid .SYM file%@AE@%%@EH@%%@NL@%
  16675. %@NL@%
  16676.           The %@AB@%.SYM%@AE@% file is invalid; delete the file and do a full link. If%@NL@%
  16677.           the problem persists, contact Microsoft Product Support.%@NL@%
  16678. %@NL@%
  16679. %@CR:MCVcE238@%%@4@%%@AB@%L1209     .OBJ close error%@AE@%%@EH@%%@NL@%
  16680. %@NL@%
  16681.           The operating system returned an error when %@AB@%ILINK%@AE@% attempted to%@NL@%
  16682.           close one of the %@AB@%.OBJ%@AE@% files.%@NL@%
  16683. %@NL@%
  16684. %@CR:MCVcE239@%%@4@%%@AB@%L1210     .OBJ read error%@AE@%%@EH@%%@NL@%
  16685. %@NL@%
  16686.           The %@AB@%.OBJ%@AE@% file has an unreadable structure. Try rebuilding the .OBJ%@NL@%
  16687.           file and doing a full link. This message indicates an error in%@NL@%
  16688.           translation by the compiler or assembler.%@NL@%
  16689. %@NL@%
  16690. %@CR:MCVcE240@%%@4@%%@AB@%L1211     too many LNAMES%@AE@%%@EH@%%@NL@%
  16691. %@NL@%
  16692.           An object module has more than 255 %@AB@%LNAME%@AE@% records.%@NL@%
  16693. %@NL@%
  16694. %@CR:MCVcE241@%%@4@%%@AB@%L1212     too many SEGDEFs%@AE@%%@EH@%%@NL@%
  16695. %@NL@%
  16696.           The given object module has more than 100 %@AB@%SEGDEF%@AE@% records. A SEGDEF%@NL@%
  16697.           record defines logical segments.%@NL@%
  16698. %@NL@%
  16699. %@CR:MCVcE242@%%@4@%%@AB@%L1213     too many GRPDEFs%@AE@%%@EH@%%@NL@%
  16700. %@NL@%
  16701.           The given object module has more than 10 %@AB@%GRPDEF%@AE@% records. A GRPDEF%@NL@%
  16702.           record defines physical segments.%@NL@%
  16703. %@NL@%
  16704. %@CR:MCVcE243@%%@4@%%@AB@%L1214     too many COMDEFs%@AE@%%@EH@%%@NL@%
  16705. %@NL@%
  16706.           The total number of %@AB@%COMDEF%@AE@% and %@AB@%EXTDEF%@AE@% records exceeded the limit.%@NL@%
  16707.           The limit on the total of %@AB@%COMDEF%@AE@% records (communal data variables)%@NL@%
  16708.           and %@AB@%EXTDEF%@AE@% records (external references) is 1,023. Use fewer%@NL@%
  16709.           communal or external variables in your program.%@NL@%
  16710. %@NL@%
  16711. %@CR:MCVcE244@%%@4@%%@AB@%L1215     too many EXTDEFs%@AE@%%@EH@%%@NL@%
  16712. %@NL@%
  16713.           The total number of %@AB@%COMDEF%@AE@% and %@AB@%EXTDEF%@AE@% records exceeded the limit.%@NL@%
  16714.           The limit on the total of %@AB@%COMDEF%@AE@% records (communal data variables)%@NL@%
  16715.           and %@AB@%EXTDEF%@AE@% records (external references) is 1,023. Use fewer%@NL@%
  16716.           communal or external variables in your program.%@NL@%
  16717. %@NL@%
  16718. %@CR:MCVcE245@%%@4@%%@AB@%L1216     symbol%@AE@% %@AI@%name%@AE@%%@AB@% multiply defined%@AE@%%@EH@%%@NL@%
  16719. %@NL@%
  16720.           The given symbol is defined more than once.%@NL@%
  16721. %@NL@%
  16722. %@CR:MCVcE246@%%@4@%%@AB@%L1217     internal error #3%@AE@%%@EH@%%@NL@%
  16723. %@NL@%
  16724.           Note the circumstance of the error and notify Microsoft%@NL@%
  16725.           Corporation by following the directions in the Microsoft Product%@NL@%
  16726.           Assistance Request form at the back of one of your manuals.%@NL@%
  16727. %@NL@%
  16728. %@CR:MCVcE247@%%@4@%%@AB@%L1218     .EXE file too big, change alignment%@AE@%%@EH@%%@NL@%
  16729. %@NL@%
  16730.           The segment-sector alignment value in the %@AB@%.EXE%@AE@% file is too small%@NL@%
  16731.           to express the size of one of the segments.  Do a full link and%@NL@%
  16732.           increase the alignment value with the %@AB@%/ALIGNMENT%@AE@% option to %@AB@%LINK%@AE@%.%@NL@%
  16733. %@NL@%
  16734. %@CR:MCVcE248@%%@4@%%@AB@%L1219     too many library files%@AE@%%@EH@%%@NL@%
  16735. %@NL@%
  16736.           The number of libraries exceeded %@AB@%ILINK%@AE@%'s limit of 32 libraries%@NL@%
  16737.           (%@AB@%.LIB%@AE@% files). Reduce the number of libraries.%@NL@%
  16738. %@NL@%
  16739. %@CR:MCVcE249@%%@4@%%@AB@%L1220     seek error on library%@AE@%%@EH@%%@NL@%
  16740. %@NL@%
  16741.           A library (%@AB@%.LIB%@AE@% file) is corrupted. Do a full link and check your%@NL@%
  16742.           %@AB@%.LIB%@AE@% files.%@NL@%
  16743. %@NL@%
  16744. %@CR:MCVcE250@%%@4@%%@AB@%L1221     library close error%@AE@%%@EH@%%@NL@%
  16745. %@NL@%
  16746.           The operating system returned an error when %@AB@%ILINK%@AE@% attempted to%@NL@%
  16747.           close one of the libraries (%@AB@%.LIB%@AE@% files). Do a full link. If the%@NL@%
  16748.           error persists, note the circumstances of the error and notify%@NL@%
  16749.           Microsoft Corporation by following the directions in the Microsoft%@NL@%
  16750.           Product Assistance Request form at the back of one of your%@NL@%
  16751.           manuals.%@NL@%
  16752. %@NL@%
  16753. %@CR:MCVcE251@%%@4@%%@AB@%L1222     error closing .EXE file%@AE@%%@EH@%%@NL@%
  16754. %@NL@%
  16755.           The operating system returned an error when %@AB@%ILINK%@AE@% attempted to%@NL@%
  16756.           close the executable file. Do a full link. If the error persists,%@NL@%
  16757.           contact Microsoft Product Support.%@NL@%
  16758. %@NL@%
  16759. %@CR:MCVcE252@%%@4@%%@AB@%L1223     could not update time on%@AE@% %@AI@%file%@AE@%%@EH@%%@NL@%
  16760. %@NL@%
  16761.           The operating system returned an error when %@AB@%ILINK%@AE@% attempted to%@NL@%
  16762.           update the time on the given file. Possibly the file had the%@NL@%
  16763.           %@AB@%READONLY%@AE@% attribute set.%@NL@%
  16764. %@NL@%
  16765. %@CR:MCVcE253@%%@4@%%@AB@%L1224     invalid flag%@AE@% %@AI@%character%@AE@%%@EH@%%@NL@%
  16766. %@NL@%
  16767.           You used incorrect syntax on the %@AB@%ILINK%@AE@% command line.%@NL@%
  16768. %@NL@%
  16769. %@CR:MCVcE254@%%@4@%%@AB@%L1225     only one -e command allowed%@AE@%%@EH@%%@NL@%
  16770. %@NL@%
  16771.           You used incorrect syntax on the %@AB@%ILINK%@AE@% command line.%@NL@%
  16772. %@NL@%
  16773. %@CR:MCVcE255@%%@4@%%@AB@%L1226     terminated by user%@AE@%%@EH@%%@NL@%
  16774. %@NL@%
  16775.           You pressed CTRL+C or CTRL+BREAK, an action that interrupts and%@NL@%
  16776.           terminates %@AB@%ILINK%@AE@%.%@NL@%
  16777. %@NL@%
  16778. %@CR:MCVcE256@%%@4@%%@AB@%L1227     file%@AE@% %@AI@%name%@AE@%%@AB@% write protected%@AE@%%@EH@%%@NL@%
  16779. %@NL@%
  16780.           The %@AB@%.EXE%@AE@%, %@AB@%.ILK%@AE@%, or %@AB@%.SYM%@AE@% file that %@AB@%ILINK%@AE@% attempted to update has%@NL@%
  16781.           the %@AB@%READONLY%@AE@% attribute.%@NL@%
  16782. %@NL@%
  16783. %@CR:MCVcE257@%%@4@%%@AB@%L1228     file%@AE@% %@AI@%name%@AE@%%@AB@% missing%@AE@%%@EH@%%@NL@%
  16784. %@NL@%
  16785.           %@AB@%ILINK%@AE@% could not find one of the %@AB@%.OBJ%@AE@% files specified on the%@NL@%
  16786.           command line.%@NL@%
  16787. %@NL@%
  16788. %@CR:MCVcE258@%%@4@%%@AB@%L1229     invalid.OBJ format%@AE@%%@EH@%%@NL@%
  16789. %@NL@%
  16790.           There may be one of several problems: error in compiler%@NL@%
  16791.           translation, corrupted object file, invalid object file (possibly%@NL@%
  16792.           text file), or object file could not be read or found.%@NL@%
  16793. %@NL@%
  16794. %@CR:MCVcE259@%%@4@%%@AB@%L1230     invalid%@AE@% %@AI@%file%@AE@%%@AB@% record: position =%@AE@% %@AI@%address%@AE@%%@EH@%%@NL@%
  16795. %@NL@%
  16796.           The given %@AB@%.OBJ%@AE@% file has an invalid format or one unrecognized by%@NL@%
  16797.           %@AB@%ILINK%@AE@%. This message may indicate an error in translation by the%@NL@%
  16798.           compiler or assembler.%@NL@%
  16799. %@NL@%
  16800. %@CR:MCVcE260@%%@4@%%@AB@%L1231     file%@AE@% %@AI@%name%@AE@%%@AB@% was not full linked%@AE@%%@EH@%%@NL@%
  16801. %@NL@%
  16802.           You specified an %@AB@%.OBJ%@AE@% file in the %@AB@%ILINK%@AE@% command line that was not%@NL@%
  16803.           in the list of files in the most recent full link.%@NL@%
  16804. %@NL@%
  16805. %@CR:MCVcE261@%%@4@%%@AB@%L1232     cannot run%@AE@% %@AI@%program%@AE@%%@EH@%%@NL@%
  16806. %@NL@%
  16807.           %@AB@%ILINK%@AE@% is unable to execute a program specified for execution with%@NL@%
  16808.           the %@AB@%\e%@AE@% command-line option. Make sure the program is in the search%@NL@%
  16809.           path and is an %@AB@%.EXE%@AE@% or %@AB@%.COM%@AE@% file.%@NL@%
  16810. %@NL@%
  16811. %@CR:MCVcE262@%%@4@%%@AB@%L1233%@AE@%     %@AI@%program%@AE@%%@AB@% returned%@AE@% %@AI@%return-code%@AE@%%@EH@%%@NL@%
  16812. %@NL@%
  16813.           The given program was specified with the %@AB@%\e%@AE@% option. When ILINK%@NL@%
  16814.           executed this program, it terminated with the given nonzero return%@NL@%
  16815.           code. %@AB@%ILINK%@AE@% cannot continue to the next commands, if any.%@NL@%
  16816. %@NL@%
  16817. %@CR:MCVcE263@%%@4@%%@AB@%L1234     error creating%@AE@% %@AI@%file%@AE@%%@EH@%%@NL@%
  16818. %@NL@%
  16819.           %@AB@%ILINK%@AE@% was unable to create the batch file for executing the %@AB@%\e%@AE@%%@NL@%
  16820.           commands. Make sure the directory given in %@AB@%TMP%@AE@% or %@AB@%TEMP%@AE@%, or the%@NL@%
  16821.           current directory, exists and can be written to.%@NL@%
  16822. %@NL@%
  16823. %@CR:MCVcE264@%%@4@%%@AB@%L1235     error writing to%@AE@% %@AI@%file%@AE@%%@EH@%%@NL@%
  16824. %@NL@%
  16825.           %@AB@%ILINK%@AE@% experienced an error while writing the batch file for%@NL@%
  16826.           executing the %@AB@%\e%@AE@% commands.  Make sure the drive for %@AB@%TMP%@AE@% or %@AB@%TEMP%@AE@% or%@NL@%
  16827.           the current drive has enough free space.%@NL@%
  16828. %@NL@%
  16829. %@CR:MCVcE265@%%@4@%%@AB@%L1240     far references in STRUC fields not supported%@AE@%%@EH@%%@NL@%
  16830. %@NL@%
  16831.           %@AB@%ILINK%@AE@% currently does not support %@AB@%STRUC%@AE@% definitions like this:%@NL@%
  16832. %@NL@%
  16833.               extrn   func:FAR%@NL@%
  16834.               rek     STRUC%@NL@%
  16835.               far_adr DD     func    ; %@AI@%Initialized far address%@AE@%%@NL@%
  16836.                                      ; %@AI@%within a STRUC%@AE@%%@NL@%
  16837.               rek     ENDS%@NL@%
  16838. %@NL@%
  16839.           To use %@AB@%ILINK%@AE@%, change your code to get rid of the far address%@NL@%
  16840.           within the %@AB@%STRUC%@AE@%.%@NL@%
  16841. %@NL@%
  16842. %@CR:MCVcE266@%%@4@%%@AB@%L1241     too many defined segments%@AE@%%@EH@%%@NL@%
  16843. %@NL@%
  16844.           %@AB@%ILINK%@AE@% has a limit of 255 physical segments (that is, segments%@NL@%
  16845.           defined in the object module as opposed to groups or logical%@NL@%
  16846.           segments). To use %@AB@%ILINK%@AE@%, reduce the number of segments.%@NL@%
  16847. %@NL@%
  16848. %@CR:MCVcE267@%%@4@%%@AB@%L1242     too many modules%@AE@%%@EH@%%@NL@%
  16849. %@NL@%
  16850.           The program exceeds %@AB@%ILINK%@AE@%'s limit of 1,204 modules. Reduce the%@NL@%
  16851.           number of modules.%@NL@%
  16852. %@NL@%
  16853. %@CR:MCVcE268@%%@4@%%@AB@%L1243     cannot link 64K-length segments%@AE@%%@EH@%%@NL@%
  16854. %@NL@%
  16855.           The program has a segment larger than 65,535 bytes.%@NL@%
  16856. %@NL@%
  16857. %@CR:MCVcE269@%%@4@%%@AB@%L1244     cannot link iterated segments%@AE@%%@EH@%%@NL@%
  16858. %@NL@%
  16859.           %@AB@%ILINK%@AE@% cannot handle programs linked with the %@AB@%/EXEPACK%@AE@% linker%@NL@%
  16860.           option.%@NL@%
  16861. %@NL@%
  16862. %@NL@%
  16863. %@CR:MCVc3200@%%@3@%%@AB@%C.3.2  Incremental Violations%@AE@%%@EH@%%@NL@%
  16864. %@NL@%
  16865. %@CR:MCVcE270@%%@4@%%@AB@%L1250%@AE@%     %@AI@%number%@AE@%%@AB@% undefined symbols%@AE@%%@EH@%%@NL@%
  16866. %@NL@%
  16867.           A number of symbols were referred to in fixups but never publicly%@NL@%
  16868.           defined in the program. The given number indicates how many of%@NL@%
  16869.           these undefined symbols were found.%@NL@%
  16870. %@NL@%
  16871. %@CR:MCVcE271@%%@4@%%@AB@%L1251     invalid module reference%@AE@% %@AI@%library%@AE@%%@EH@%%@NL@%
  16872. %@NL@%
  16873.           The program makes a dynamic-link reference to a dynamic-link%@NL@%
  16874.           library that is not recognized or declared by the %@AB@%.EXE%@AE@% file.%@NL@%
  16875. %@NL@%
  16876. %@CR:MCVcE272@%%@4@%%@AB@%L1252     file%@AE@% %@AI@%name%@AE@%%@AB@% does not exist%@AE@%%@EH@%%@NL@%
  16877. %@NL@%
  16878.           %@AB@%ILINK%@AE@% could not find the given file required for %@AB@%ILINK%@AE@% operation.%@NL@%
  16879. %@NL@%
  16880. %@CR:MCVcE273@%%@4@%%@AB@%L1253     symbol%@AE@% %@AI@%name%@AE@%%@AB@% deleted%@AE@%%@EH@%%@NL@%
  16881. %@NL@%
  16882.           A symbol was deleted from an incrementally linked module.%@NL@%
  16883. %@NL@%
  16884. %@CR:MCVcE274@%%@4@%%@AB@%L1254     new segment definition%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  16885. %@NL@%
  16886.           A segment was added to the program.%@NL@%
  16887. %@NL@%
  16888. %@CR:MCVcE275@%%@4@%%@AB@%L1255     changed segment definition%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  16889. %@NL@%
  16890.           The segment contribution changed for the given module; it%@NL@%
  16891.           contributed to a segment it did not previously contribute to, or a%@NL@%
  16892.           segment contribution was removed.%@NL@%
  16893. %@NL@%
  16894. %@CR:MCVcE276@%%@4@%%@AB@%L1256     segment%@AE@% %@AI@%name%@AE@%%@AB@% grew too big%@AE@%%@EH@%%@NL@%
  16895. %@NL@%
  16896.           The given segment grew beyond the padding for the given module.%@NL@%
  16897. %@NL@%
  16898. %@CR:MCVcE277@%%@4@%%@AB@%L1257     new group definition%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  16899. %@NL@%
  16900.           A new group was defined via the %@AB@%GROUP%@AE@% directive in assembly%@NL@%
  16901.           language or via the %@AB@%\ND%@AE@% C compiler option.%@NL@%
  16902. %@NL@%
  16903. %@CR:MCVcE278@%%@4@%%@AB@%L1258     group%@AE@% %@AI@%name%@AE@%%@AB@% changed to include%@AE@% %@AI@%segment%@AE@%%@EH@%%@NL@%
  16904. %@NL@%
  16905.           The list of segments included in the given group changed.%@NL@%
  16906. %@NL@%
  16907. %@CR:MCVcE279@%%@4@%%@AB@%L1259     symbol%@AE@% %@AI@%name%@AE@%%@AB@% changed%@AE@%%@EH@%%@NL@%
  16908. %@NL@%
  16909.           The given data symbol moved (is now at a new address).%@NL@%
  16910. %@NL@%
  16911. %@CR:MCVcE280@%%@4@%%@AB@%L1260     cannot add new communal data symbol%@AE@% %@AI@%name%@AE@%%@EH@%%@NL@%
  16912. %@NL@%
  16913.           A new communal data symbol was added as an uninitialized variable%@NL@%
  16914.           in C or with the %@AB@%COMM%@AE@% feature in %@AB@%MASM%@AE@%.%@NL@%
  16915. %@NL@%
  16916. %@CR:MCVcE281@%%@4@%%@AB@%L1261     communal variable%@AE@% %@AI@%name%@AE@%%@AB@% grew too big%@AE@%%@EH@%%@NL@%
  16917. %@NL@%
  16918.           The given communal variable changed size too much.%@NL@%
  16919. %@NL@%
  16920. %@CR:MCVcE282@%%@4@%%@AB@%L1262     invalid symbol type for%@AE@% %@AI@%symbol%@AE@%%@EH@%%@NL@%
  16921. %@NL@%
  16922.           A symbol which was previously a code symbol became a data symbol%@NL@%
  16923.           or vice versa.%@NL@%
  16924. %@NL@%
  16925. %@CR:MCVcE283@%%@4@%%@AB@%L1263     new Codeview symbolic info%@AE@%%@EH@%%@NL@%
  16926. %@NL@%
  16927.           A module previously compiled without %@AB@%\Zi%@AE@% was compiled with %@AB@%\Zi%@AE@%.%@NL@%
  16928. %@NL@%
  16929. %@CR:MCVcE284@%%@4@%%@AB@%L1264     new line-number info%@AE@%%@EH@%%@NL@%
  16930. %@NL@%
  16931.           A module previously compiled without %@AB@%\Zi%@AE@% or %@AB@%\Zd%@AE@% was compiled with%@NL@%
  16932.           %@AB@%\Zi%@AE@% or %@AB@%\Zd%@AE@%.%@NL@%
  16933. %@NL@%
  16934. %@CR:MCVcE285@%%@4@%%@AB@%L1265     new public CodeView info%@AE@%%@EH@%%@NL@%
  16935. %@NL@%
  16936.           New information on public symbol addresses was added.%@NL@%
  16937. %@NL@%
  16938. %@CR:MCVcE286@%%@4@%%@AB@%L1266     invalid .EXE file%@AE@%%@EH@%%@NL@%
  16939. %@NL@%
  16940.           The %@AB@%.EXE%@AE@% file is invalid. Make sure you are using an up-to-date%@NL@%
  16941.           linker. If the error persists, note the circumstances of the error%@NL@%
  16942.           and notify Microsoft Corporation by following the directions in%@NL@%
  16943.           the Microsoft Product Assistance Request form at the back of one%@NL@%
  16944.           of your manuals.%@NL@%
  16945. %@NL@%
  16946. %@CR:MCVcE287@%%@4@%%@AB@%L1267     invalid .ILK file%@AE@%%@EH@%%@NL@%
  16947. %@NL@%
  16948.           The %@AB@%.ILK%@AE@% file is invalid. Make sure you are using an up-to-date%@NL@%
  16949.           linker. If the error persists, notify Microsoft Corporation by%@NL@%
  16950.           following the directions in the Microsoft Product Assistance%@NL@%
  16951.           Request form at the back of one of your manuals.%@NL@%
  16952. %@NL@%
  16953. %@CR:MCVcE288@%%@4@%%@AB@%L1268     .SYM/.ILK mismatch%@AE@%%@EH@%%@NL@%
  16954. %@NL@%
  16955.           The %@AB@%.SYM%@AE@% and %@AB@%.ILK%@AE@% files are out of sync.  Make sure you are using%@NL@%
  16956.           an up-to-date linker. If the error persists, note the%@NL@%
  16957.           circumstances of the error and notify Microsoft Corporation by%@NL@%
  16958.           following the directions in the Microsoft Product Assistance%@NL@%
  16959.           Request form at the back of one of your manuals.%@NL@%
  16960. %@NL@%
  16961. %@CR:MCVcE289@%%@4@%%@AB@%L1269     library%@AE@% %@AI@%name%@AE@%%@AB@% has changed%@AE@%%@EH@%%@NL@%
  16962. %@NL@%
  16963.           The given library has changed.%@NL@%
  16964. %@NL@%
  16965. %@CR:MCVcE290@%%@4@%%@AB@%L1270     entry table expansion not implemented%@AE@%%@EH@%%@NL@%
  16966. %@NL@%
  16967.           The program call tree changed in such a way that %@AB@%ILINK%@AE@% could not%@NL@%
  16968.           process it correctly. This problem is caused by new calls to a%@NL@%
  16969.           routine from another routine that did not call it before. Do a%@NL@%
  16970.           full link.%@NL@%
  16971. %@NL@%
  16972. %@CR:MCVcE291@%%@4@%%@AB@%L1271     segment%@AE@% %@AI@%index%@AE@%%@AB@% with relocs exceeds 64K; cannot move%@AE@%%@EH@%%@NL@%
  16973. %@NL@%
  16974.           The given segment, referred to by its index within the program's%@NL@%
  16975.           segment table, is too big along with its runtime relocations for%@NL@%
  16976.           %@AB@%ILINK%@AE@% to process the segment correctly.%@NL@%
  16977. %@NL@%
  16978. %@CR:MCVcE292@%%@4@%%@AB@%L1272     .ILK read error%@AE@%%@EH@%%@NL@%
  16979. %@NL@%
  16980.           The %@AB@%.ILK%@AE@% file does not exist or was not in the expected format.%@NL@%
  16981. %@NL@%
  16982. %@CR:MCVcE293@%%@4@%%@AB@%L1273     out of memory%@AE@%%@EH@%%@NL@%
  16983. %@NL@%
  16984.           %@AB@%ILINK%@AE@% ran out of memory for processing the input. If you are%@NL@%
  16985.           running %@AB@%ILINK%@AE@% while using the %@AB@%NMAKE%@AE@% utility, try running ILINK%@NL@%
  16986.           from the shell (that is, directly from the operating-system%@NL@%
  16987.           prompt). Otherwise, do a full link.%@NL@%
  16988. %@NL@%
  16989. %@NL@%
  16990. %@CR:MCVc3300@%%@3@%%@AB@%C.3.3  ILINK Warning Messages%@AE@%%@EH@%%@NL@%
  16991. %@NL@%
  16992. %@CR:MCVcE294@%%@4@%%@AB@%L4201     fixup frame relative to an (as yet) undefined symbol - assuming%@AE@%%@EH@%%@NL@%
  16993.           %@AB@%ok%@AE@%%@NL@%
  16994. %@NL@%
  16995.           See documentation for %@AB@%LINK%@AE@% error messages L4001 and L4002.%@NL@%
  16996. %@NL@%
  16997. %@CR:MCVcE295@%%@4@%%@AB@%L4202     module contains TYPEDEFs - ignored%@AE@%%@EH@%%@NL@%
  16998. %@NL@%
  16999.           The %@AB@%.OBJ%@AE@% file contains type definitions. %@AB@%ILINK%@AE@% ignores these%@NL@%
  17000.           records.%@NL@%
  17001. %@NL@%
  17002. %@CR:MCVcE296@%%@4@%%@AB@%L4203     module contains BLKDEFs - ignored%@AE@%%@EH@%%@NL@%
  17003. %@NL@%
  17004.           The %@AB@%.OBJ%@AE@% file contains records no longer supported by Microsoft%@NL@%
  17005.           language compilers.%@NL@%
  17006. %@NL@%
  17007. %@CR:MCVcE297@%%@4@%%@AB@%L4204     old .EXE free information lost%@AE@%%@EH@%%@NL@%
  17008. %@NL@%
  17009.           The free list in the %@AB@%.EXE%@AE@% file has been corrupted. The free list%@NL@%
  17010.           represents "holes" in the %@AB@%EXE%@AE@% file made available when segments%@NL@%
  17011.           moved to new locations.%@NL@%
  17012. %@NL@%
  17013. %@CR:MCVcE298@%%@4@%%@AB@%L4205     file%@AE@% %@AI@%name%@AE@%%@AB@% has no useful contribution%@AE@%%@EH@%%@NL@%
  17014. %@NL@%
  17015.           The given module makes no contribution to any segment.%@NL@%
  17016. %@NL@%
  17017. %@CR:MCVcE299@%%@4@%%@AB@%L4206     main entry point moved%@AE@%%@EH@%%@NL@%
  17018. %@NL@%
  17019.           The program starting address changed. You may want to consider%@NL@%
  17020.           doing a full link.%@NL@%
  17021. %@NL@%
  17022. %@NL@%
  17023. %@CR:MCVc4000@%%@2@%%@AB@%C.4  LIB Error Messages%@AE@%%@EH@%%@NL@%
  17024. %@NL@%
  17025. %@CR:MCVc4001@%%@4@%Error messages generated by the Microsoft Library Manager, LIB, have one of%@EH@%
  17026. the following formats:%@NL@%
  17027. %@NL@%
  17028.      {%@AI@%filename%@AE@%| %@AS@%LIB%@AE@%} : %@AS@%fatal error U1%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  17029.      {%@AI@%filename%@AE@%| %@AS@%LIB%@AE@%} : %@AS@%nonfatal error U2%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  17030.      {%@AI@%filename%@AE@%| %@AS@%LIB%@AE@%} : %@AS@%warning U4%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  17031. %@NL@%
  17032. %@CR:MCVc4002@%%@4@%The message begins with the input-file name (%@AI@%filename%@AE@%), if one exists, or%@EH@%
  17033. with the name of the utility. If possible, %@AB@%LIB%@AE@% prints a warning and
  17034. continues operation. In some cases errors are fatal, and %@AB@%LIB%@AE@% terminates
  17035. processing. %@AB@%LIB%@AE@% may display the following error messages.%@NL@%
  17036. %@NL@%
  17037. %@NL@%
  17038. %@CR:MCVc4100@%%@3@%%@AB@%C.4.1  Fatal LIB Error Messages%@AE@%%@EH@%%@NL@%
  17039. %@NL@%
  17040. %@CR:MCVcE300@%%@4@%%@AB@%U1150     page size too small%@AE@%%@EH@%%@NL@%
  17041. %@NL@%
  17042.           The page size of an input library was too small, indicating an%@NL@%
  17043.           invalid input %@AB@%.LIB%@AE@% file.%@NL@%
  17044. %@NL@%
  17045. %@CR:MCVcE301@%%@4@%%@AB@%U1151     syntax error : illegal file specification%@AE@%%@EH@%%@NL@%
  17046. %@NL@%
  17047.           A command operator such as a minus sign (%@AB@%-%@AE@%) was given without a%@NL@%
  17048.           following module name.%@NL@%
  17049. %@NL@%
  17050. %@CR:MCVcE302@%%@4@%%@AB@%U1152     syntax error : option name missing%@AE@%%@EH@%%@NL@%
  17051. %@NL@%
  17052.           A forward slash (%@AB@%/%@AE@%) was given without an option after it.%@NL@%
  17053. %@NL@%
  17054. %@CR:MCVcE303@%%@4@%%@AB@%U1153     syntax error : option value missing%@AE@%%@EH@%%@NL@%
  17055. %@NL@%
  17056.           The %@AB@%/PAGESIZE%@AE@% option was given without a value following it.%@NL@%
  17057. %@NL@%
  17058. %@CR:MCVcE304@%%@4@%%@AB@%U1154     option unknown%@AE@%%@EH@%%@NL@%
  17059. %@NL@%
  17060.           An unknown option was given. Currently, %@AB@%LIB%@AE@% recognizes the%@NL@%
  17061.           %@AB@%/PAGESIZE%@AE@%, %@AB@%/NOIGNORECASE%@AE@%, and %@AB@%/IGNORECASE%@AE@% options.%@NL@%
  17062. %@NL@%
  17063. %@CR:MCVcE305@%%@4@%%@AB@%U1155     syntax error : illegal input%@AE@%%@EH@%%@NL@%
  17064. %@NL@%
  17065.           The given command did not follow correct %@AB@%LIB%@AE@% syntax as specified%@NL@%
  17066.           in Chapter 15%@BO:   a2cc3@%, "Managing Libraries with LIB."%@NL@%
  17067. %@NL@%
  17068. %@CR:MCVcE306@%%@4@%%@AB@%U1156     syntax error%@AE@%%@EH@%%@NL@%
  17069. %@NL@%
  17070.           The given command did not follow the correct %@AB@%LIB%@AE@% syntax as%@NL@%
  17071.           specified in Chapter 15%@BO:   a2cc3@%, "Managing Libraries with LIB."%@NL@%
  17072. %@NL@%
  17073. %@CR:MCVcE307@%%@4@%%@AB@%U1157     comma or new line missing%@AE@%%@EH@%%@NL@%
  17074. %@NL@%
  17075.           A comma or carriage return was expected in the command line but%@NL@%
  17076.           did not appear. This may indicate an incorrectly placed comma, as%@NL@%
  17077.           in the following line:%@NL@%
  17078. %@NL@%
  17079.              LIB math.lib,-mod1+mod2;%@NL@%
  17080. %@NL@%
  17081.           The line should have been entered as follows:%@NL@%
  17082. %@NL@%
  17083.              LIB math.lib -mod1+mod2;%@NL@%
  17084. %@NL@%
  17085. %@CR:MCVcE308@%%@4@%%@AB@%U1158     terminator missing%@AE@%%@EH@%%@NL@%
  17086. %@NL@%
  17087.           Either the response to the %@AS@%Output library%@AE@% prompt or the last line%@NL@%
  17088.           of the response file used to start %@AB@%LIB%@AE@% did not end with a carriage%@NL@%
  17089.           return.%@NL@%
  17090. %@NL@%
  17091. %@CR:MCVcE309@%%@4@%%@AB@%U1161     cannot rename old library%@AE@%%@EH@%%@NL@%
  17092. %@NL@%
  17093.           %@AB@%LIB%@AE@% could not rename the old library to have a %@AB@%.BAK%@AE@% extension%@NL@%
  17094.           because the %@AB@%.BAK%@AE@% version already existed with read only%@NL@%
  17095.           protection.%@NL@%
  17096. %@NL@%
  17097.           Change the protection on the old %@AB@%.BAK%@AE@% version.%@NL@%
  17098. %@NL@%
  17099. %@CR:MCVcE310@%%@4@%%@AB@%U1162     cannot reopen library%@AE@%%@EH@%%@NL@%
  17100. %@NL@%
  17101.           The old library could not be reopened after it was renamed to have%@NL@%
  17102.           a %@AB@%.BAK%@AE@% extension.%@NL@%
  17103. %@NL@%
  17104. %@CR:MCVcE311@%%@4@%%@AB@%U1163     error writing to cross-reference file%@AE@%%@EH@%%@NL@%
  17105. %@NL@%
  17106.           The disk or root directory was full.%@NL@%
  17107. %@NL@%
  17108.           Delete or move files to make space.%@NL@%
  17109. %@NL@%
  17110. %@CR:MCVcE312@%%@4@%%@AB@%U1170     too many symbols%@AE@%%@EH@%%@NL@%
  17111. %@NL@%
  17112.           More than 4,609 symbols appeared in the library file.%@NL@%
  17113. %@NL@%
  17114. %@CR:MCVcE313@%%@4@%%@AB@%U1171     insufficient memory%@AE@%%@EH@%%@NL@%
  17115. %@NL@%
  17116.           %@AB@%LIB%@AE@% did not have enough memory to run.%@NL@%
  17117. %@NL@%
  17118.           Remove any shells or resident programs and try again, or add more%@NL@%
  17119.           memory.%@NL@%
  17120. %@NL@%
  17121. %@CR:MCVcE314@%%@4@%%@AB@%U1172     no more virtual memory%@AE@%%@EH@%%@NL@%
  17122. %@NL@%
  17123.           Try using the %@AB@%/NOEXTDICTIONARY%@AE@%. The current library exceeds the%@NL@%
  17124.           512K byte limit imposed by %@AB@%LIB%@AE@% option. Try using the%@NL@%
  17125.           %@AB@%/NOEXITDICTIONARY%@AE@% or reduce the number of object modules.%@NL@%
  17126. %@NL@%
  17127. %@CR:MCVcE315@%%@4@%%@AB@%U1173     internal failure%@AE@%%@EH@%%@NL@%
  17128. %@NL@%
  17129.           Note the circumstances of the failure and notify Microsoft%@NL@%
  17130.           Corporation by following the directions in the Microsoft Product%@NL@%
  17131.           Assistance Request form at the back of one of your manuals.%@NL@%
  17132. %@NL@%
  17133. %@CR:MCVcE316@%%@4@%%@AB@%U1174     mark: not allocated%@AE@%%@EH@%%@NL@%
  17134. %@NL@%
  17135.           Note the circumstances of the failure and notify Microsoft%@NL@%
  17136.           Corporation by following the directions in the Microsoft Product%@NL@%
  17137.           Assistance Request form at the back of one of your manuals.%@NL@%
  17138. %@NL@%
  17139. %@CR:MCVcE317@%%@4@%%@AB@%U1175     free: not allocated%@AE@%%@EH@%%@NL@%
  17140. %@NL@%
  17141.           Note the circumstances of the error and notify Microsoft%@NL@%
  17142.           Corporation by following the directions in the Microsoft Product%@NL@%
  17143.           Assistance Request form at the back of one of your manuals.%@NL@%
  17144. %@NL@%
  17145. %@CR:MCVcE318@%%@4@%%@AB@%U1180     write to extract file failed%@AE@%%@EH@%%@NL@%
  17146. %@NL@%
  17147.           The disk or root directory was full.%@NL@%
  17148. %@NL@%
  17149.           Delete or move files to make space.%@NL@%
  17150. %@NL@%
  17151. %@CR:MCVcE319@%%@4@%%@AB@%U1181     write to library file failed%@AE@%%@EH@%%@NL@%
  17152. %@NL@%
  17153.           The disk or root directory was full.%@NL@%
  17154. %@NL@%
  17155.           Delete or move files to make space.%@NL@%
  17156. %@NL@%
  17157. %@CR:MCVcE320@%%@4@%%@AB@%U1182%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot create extract file%@AE@%%@EH@%%@NL@%
  17158. %@NL@%
  17159.           The disk or root directory was full, or the specified extract file%@NL@%
  17160.           already existed with read-only protection.%@NL@%
  17161. %@NL@%
  17162.           Make space on the disk or change the protection of the extract%@NL@%
  17163.           file.%@NL@%
  17164. %@NL@%
  17165. %@CR:MCVcE321@%%@4@%%@AB@%U1183     cannot open response file%@AE@%%@EH@%%@NL@%
  17166. %@NL@%
  17167.           The response file was not found.%@NL@%
  17168. %@NL@%
  17169. %@CR:MCVcE322@%%@4@%%@AB@%U1184     unexpected end-of-file on command input%@AE@%%@EH@%%@NL@%
  17170. %@NL@%
  17171.           An end-of-file character was received prematurely in response to a%@NL@%
  17172.           prompt.%@NL@%
  17173. %@NL@%
  17174. %@CR:MCVcE323@%%@4@%%@AB@%U1185     cannot create new library%@AE@%%@EH@%%@NL@%
  17175. %@NL@%
  17176.           The disk or root directory was full, or the library file already%@NL@%
  17177.           existed with read-only protection.%@NL@%
  17178. %@NL@%
  17179.           Make space on the disk or change the protection of the library%@NL@%
  17180.           file.%@NL@%
  17181. %@NL@%
  17182. %@CR:MCVcE324@%%@4@%%@AB@%U1186     error writing to new library%@AE@%%@EH@%%@NL@%
  17183. %@NL@%
  17184.           The disk or root directory was full.%@NL@%
  17185. %@NL@%
  17186.           Delete or move files to make space.%@NL@%
  17187. %@NL@%
  17188. %@CR:MCVcE325@%%@4@%%@AB@%U1187     cannot open VM.TMP%@AE@%%@EH@%%@NL@%
  17189. %@NL@%
  17190.           The disk or root directory was full.%@NL@%
  17191. %@NL@%
  17192.           Delete or move files to make space.%@NL@%
  17193. %@NL@%
  17194. %@CR:MCVcE326@%%@4@%%@AB@%U1188     cannot write to VM%@AE@%%@EH@%%@NL@%
  17195. %@NL@%
  17196.           The library manager cannot write to the virtual memory. Note the%@NL@%
  17197.           circumstances of the failure and notify Microsoft Corporation by%@NL@%
  17198.           following the directions in the Microsoft Product Assistance%@NL@%
  17199.           Request form at  the back of one of your manuals.%@NL@%
  17200. %@NL@%
  17201. %@CR:MCVcE327@%%@4@%%@AB@%U1189     cannot read from VM%@AE@%%@EH@%%@NL@%
  17202. %@NL@%
  17203.           The library manager cannot read the virtual memory. Note the%@NL@%
  17204.           circumstances of the error and notify Microsoft Corporation by%@NL@%
  17205.           following the directions in the Microsoft Product Assistance%@NL@%
  17206.           Request form at the back of one of your manuals.%@NL@%
  17207. %@NL@%
  17208. %@CR:MCVcE328@%%@4@%%@AB@%U1190     interrupted by user%@AE@%%@EH@%%@NL@%
  17209. %@NL@%
  17210.           You interrupted %@AB@%LIB%@AE@% during its operation, with CTRL+C or%@NL@%
  17211.           CTRL+BREAK.%@NL@%
  17212. %@NL@%
  17213. %@CR:MCVcE329@%%@4@%%@AB@%U1200%@AE@%     %@AI@%name%@AE@%%@AB@% : invalid library header%@AE@%%@EH@%%@NL@%
  17214. %@NL@%
  17215.           The input library file had an invalid format. It was either not a%@NL@%
  17216.           library file or it had been corrupted.%@NL@%
  17217. %@NL@%
  17218. %@CR:MCVcE330@%%@4@%%@AB@%U1203%@AE@%     %@AI@%name%@AE@%%@AB@% : invalid object module near%@AE@% %@AI@%location%@AE@%%@EH@%%@NL@%
  17219. %@NL@%
  17220.           The module specified by %@AI@%name%@AE@% was not a valid object module.%@NL@%
  17221. %@NL@%
  17222. %@NL@%
  17223. %@CR:MCVc4200@%%@3@%%@AB@%C.4.2  Nonfatal LIB Error Messages%@AE@%%@EH@%%@NL@%
  17224. %@NL@%
  17225. %@CR:MCVcE331@%%@4@%%@AB@%U2152%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot create listing%@AE@%%@EH@%%@NL@%
  17226. %@NL@%
  17227.           The directory or disk was full, or the cross-reference-listing%@NL@%
  17228.           file already existed with read-only protection.%@NL@%
  17229. %@NL@%
  17230.           Make space on the disk or change the protection of the%@NL@%
  17231.           cross-reference-listing file.%@NL@%
  17232. %@NL@%
  17233. %@CR:MCVcE332@%%@4@%%@AB@%U2155%@AE@%     %@AI@%modulename%@AE@%%@AB@% : module not in library; ignored%@AE@%%@EH@%%@NL@%
  17234. %@NL@%
  17235.           The specified module was not found in the input library.%@NL@%
  17236. %@NL@%
  17237. %@CR:MCVcE333@%%@4@%%@AB@%U2157%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot access file%@AE@%%@EH@%%@NL@%
  17238. %@NL@%
  17239.           %@AB@%LIB%@AE@% was unable to open the specified file.%@NL@%
  17240. %@NL@%
  17241. %@CR:MCVcE334@%%@4@%%@AB@%U2158%@AE@%     %@AI@%libraryname%@AE@%%@AB@% : invalid library header; file ignored%@AE@%%@EH@%%@NL@%
  17242. %@NL@%
  17243.           The input library had an incorrect format.%@NL@%
  17244. %@NL@%
  17245. %@CR:MCVcE335@%%@4@%%@AB@%U2159%@AE@%     %@AI@%filename%@AE@%%@AB@% : invalid format%@AE@% %@AI@%hexnumber%@AE@%%@AB@%; file ignored%@AE@%%@EH@%%@NL@%
  17246. %@NL@%
  17247.           The signature byte or word hexnumber of the given file was not one%@NL@%
  17248.           of the following recognized types: Microsoft library, Intel%@NL@%
  17249.           library, Microsoft object, or Xenix archive.%@NL@%
  17250. %@NL@%
  17251. %@NL@%
  17252. %@CR:MCVc4300@%%@3@%%@AB@%C.5.3  Warning LIB Error Messages%@AE@%%@EH@%%@NL@%
  17253. %@NL@%
  17254. %@CR:MCVcE336@%%@4@%%@AB@%U4150%@AE@%     %@AI@%modulename%@AE@%%@AB@% : module redefinition ignored%@AE@%%@EH@%%@NL@%
  17255. %@NL@%
  17256.           A module was specified to be added to a library but a module with%@NL@%
  17257.           the same name was already in the library, or a module with the%@NL@%
  17258.           same name was found more than once in the library.%@NL@%
  17259. %@NL@%
  17260. %@CR:MCVcE337@%%@4@%%@AB@%U4151%@AE@%     %@AI@%name%@AE@%%@AB@% : symbol defined in%@AE@% %@AI@%modulename%@AE@%%@AB@%, redefinition ignored%@AE@%%@EH@%%@NL@%
  17261. %@NL@%
  17262.           The specified symbol was defined in more than one module.%@NL@%
  17263. %@NL@%
  17264. %@CR:MCVcE338@%%@4@%%@AB@%U4153%@AE@%     %@AI@%number%@AE@%%@AB@% : page size too small; ignored%@AE@%%@EH@%%@NL@%
  17265. %@NL@%
  17266.           The value specified in the %@AB@%/PAGESIZE%@AE@% option was less than 16.%@NL@%
  17267. %@NL@%
  17268. %@CR:MCVcE339@%%@4@%%@AB@%U4155%@AE@%     %@AI@%modulename%@AE@%%@AB@% : module not in library%@AE@%%@EH@%%@NL@%
  17269. %@NL@%
  17270.           A module specified to be replaced does not already exist in the%@NL@%
  17271.           library. %@AB@%LIB%@AE@% adds the module anyway.%@NL@%
  17272. %@NL@%
  17273. %@CR:MCVcE340@%%@4@%%@AB@%U4156%@AE@%     %@AI@%libraryname%@AE@%%@AB@% : output-library specification ignored%@AE@%%@EH@%%@NL@%
  17274. %@NL@%
  17275.           An output library was specified in addition to a new library name.%@NL@%
  17276.           For example, specifying%@NL@%
  17277. %@NL@%
  17278.           LIB new.lib+one.obj,new.lst,new.lib%@NL@%
  17279. %@NL@%
  17280.           where %@AS@%new.lib%@AE@% does not already exist, causes this error.%@NL@%
  17281. %@NL@%
  17282. %@CR:MCVcE341@%%@4@%%@AB@%U4157     insufficient memory, extended dictionary not created%@AE@%%@EH@%%@NL@%
  17283. %@NL@%
  17284.           Insufficient memory prevented %@AB@%LIB%@AE@% from creating an extended%@NL@%
  17285.           dictionary. The library is still valid, but the linker will not be%@NL@%
  17286.           able to take advantage of the extended dictionary to speed%@NL@%
  17287.           linking.%@NL@%
  17288. %@NL@%
  17289. %@CR:MCVcE342@%%@4@%%@AB@%U4158     internal error, extended dictionary not created%@AE@%%@EH@%%@NL@%
  17290. %@NL@%
  17291.           An internal error prevented %@AB@%LIB%@AE@% from creating an extended%@NL@%
  17292.           dictionary. The library is still valid, but the linker will not be%@NL@%
  17293.           able to take advantage of the extended dictionary to speed%@NL@%
  17294.           linking.%@NL@%
  17295. %@NL@%
  17296. %@NL@%
  17297. %@CR:MCVc5000@%%@2@%%@AB@%C.5  NMAKE Error Messages%@AE@%%@EH@%%@NL@%
  17298. %@NL@%
  17299. %@CR:MCVc5001@%%@4@%Error messages from the NMAKE utility have one of the following formats:%@EH@%%@NL@%
  17300. %@NL@%
  17301.      {%@AI@%filename%@AE@% | %@AS@%NMAKE%@AE@%} : %@AS@%fatal error U1%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  17302.      {%@AI@%filename%@AE@% | %@AS@%NMAKE%@AE@%} : %@AS@%warning U4%@AE@%%@AI@%xxx%@AE@%: %@AI@%messagetext%@AE@%%@NL@%
  17303. %@NL@%
  17304. %@CR:MCVc5002@%%@4@%The message begins with the input-file name (%@AI@%filename%@AE@%) and line number, if%@EH@%
  17305. one exists, or with the name of the utility.%@NL@%
  17306. %@NL@%
  17307. %@CR:MCVc5003@%%@4@%NMAKE generates the following error messages.%@EH@%%@NL@%
  17308. %@NL@%
  17309. %@NL@%
  17310. %@CR:MCVc5100@%%@3@%%@AB@%C.5.1  Fatal NMAKE Error Messages%@AE@%%@EH@%%@NL@%
  17311. %@NL@%
  17312. %@CR:MCVcE343@%%@4@%%@AB@%U1000     syntax error: ')' missing in macro invocation%@AE@%%@EH@%%@NL@%
  17313. %@NL@%
  17314.           A left parenthesis (%@AS@%(%@AE@%) appeared without a matching right%@NL@%
  17315.           parenthesis (%@AS@%)%@AE@%) in a macro invocation. The correct form is%@NL@%
  17316.           $(%@AI@%name%@AE@%), or $%@AI@%n%@AE@% for one-character names.%@NL@%
  17317. %@NL@%
  17318. %@CR:MCVcE344@%%@4@%%@AB@%U1001     syntax error : illegal character '%@AE@%%@AI@%character%@AE@%%@AB@%' in macro%@AE@%%@EH@%%@NL@%
  17319. %@NL@%
  17320.           A nonalphanumeric character other than an underscore (%@AB@%_%@AE@%) appeared%@NL@%
  17321.           in a macro.%@NL@%
  17322. %@NL@%
  17323. %@CR:MCVcE345@%%@4@%%@AB@%U1002     syntax error : bad macro invocation '$'%@AE@%%@EH@%%@NL@%
  17324. %@NL@%
  17325.           A single dollar sign (%@AB@%$%@AE@%) appeared without a macro name associated%@NL@%
  17326.           with it. The correct form is $(%@AI@%name%@AE@%). To use a dollar sign in the%@NL@%
  17327.           file, type it twice or precede it with a caret (%@AB@%^%@AE@%).%@NL@%
  17328. %@NL@%
  17329. %@CR:MCVcE346@%%@4@%%@AB@%U1003     syntax error : '=' missing in macro%@AE@%%@EH@%%@NL@%
  17330. %@NL@%
  17331.           The equal sign (%@AB@%=%@AE@%) was missing in a macro definition. The correct%@NL@%
  17332.           form is '%@AI@%name%@AE@% = %@AI@%value%@AE@%'.%@NL@%
  17333. %@NL@%
  17334. %@CR:MCVcE347@%%@4@%%@AB@%U1004     syntax error : macro name missing%@AE@%%@EH@%%@NL@%
  17335. %@NL@%
  17336.           A macro invocation appeared without a name. The correct form is%@NL@%
  17337.           $(%@AI@%name%@AE@%).%@NL@%
  17338. %@NL@%
  17339. %@CR:MCVcE348@%%@4@%%@AB@%U1005     syntax error : text must follow ':' in macro%@AE@%%@EH@%%@NL@%
  17340. %@NL@%
  17341.           A string substitution was specified for a macro, but the string to%@NL@%
  17342.           be changed in the macro was not specified.%@NL@%
  17343. %@NL@%
  17344. %@CR:MCVcE349@%%@4@%%@AB@%U1016     syntax error : closing '"' missing%@AE@%%@EH@%%@NL@%
  17345. %@NL@%
  17346.           An opening double quotation mark (%@AB@%"%@AE@%) appeared without a closing%@NL@%
  17347.           double quotation mark.%@NL@%
  17348. %@NL@%
  17349. %@CR:MCVcE350@%%@4@%%@AB@%U1017     unknown directive '%@AE@%%@AI@%directive%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17350. %@NL@%
  17351.           The directive specified is not one of the recognized directives.%@NL@%
  17352. %@NL@%
  17353. %@CR:MCVcE351@%%@4@%%@AB@%U1018     directive and/or expression part missing%@AE@%%@EH@%%@NL@%
  17354. %@NL@%
  17355.           The directive is incompletely specified. The expression part is%@NL@%
  17356.           required.%@NL@%
  17357. %@NL@%
  17358. %@CR:MCVcE352@%%@4@%%@AB@%U1019     too many nested if blocks%@AE@%%@EH@%%@NL@%
  17359. %@NL@%
  17360.           Note the circumstances of the failure and notify Microsoft%@NL@%
  17361.           Corporation by following the directions in the Microsoft Product%@NL@%
  17362.           Assistance Request form at the back of one of your manuals.%@NL@%
  17363. %@NL@%
  17364. %@CR:MCVcE353@%%@4@%%@AB@%U1020     EOF found before next directive%@AE@%%@EH@%%@NL@%
  17365. %@NL@%
  17366.           A directive, such as %@AB@%!ENDIF%@AE@%, was missing.%@NL@%
  17367. %@NL@%
  17368. %@CR:MCVcE354@%%@4@%%@AB@%U1021     syntax error : else unexpected%@AE@%%@EH@%%@NL@%
  17369. %@NL@%
  17370.           An %@AB@%!ELSE%@AE@% directive was found that was not preceded by %@AB@%!IF%@AE@%, %@AB@%!IFDEF%@AE@%,%@NL@%
  17371.           or %@AB@%!IFNDEF%@AE@%, or was placed in a syntactically incorrect place.%@NL@%
  17372. %@NL@%
  17373. %@CR:MCVcE355@%%@4@%%@AB@%U1022     Missing terminating char for string/program invocation :%@AE@%%@EH@%%@NL@%
  17374.           '%@AI@%character%@AE@%'%@NL@%
  17375. %@NL@%
  17376.           The closing double quotation mark (%@AB@%"%@AE@%) in a string comparison in a%@NL@%
  17377.           directive was missing, or the closing bracket (%@AB@%]%@AE@%) in a program%@NL@%
  17378.           invocation in a directive was missing.%@NL@%
  17379. %@NL@%
  17380. %@CR:MCVcE356@%%@4@%%@AB@%U1023     syntax error present in expression%@AE@%%@EH@%%@NL@%
  17381. %@NL@%
  17382.           An expression is invalid. Check the allowed operators and operator%@NL@%
  17383.           precedence.%@NL@%
  17384. %@NL@%
  17385. %@CR:MCVcE357@%%@4@%%@AB@%U1024     illegal argument to !CMDSWITCHES%@AE@%%@EH@%%@NL@%
  17386. %@NL@%
  17387.           An unrecognized command switch was specified.%@NL@%
  17388. %@NL@%
  17389. %@CR:MCVcE358@%%@4@%%@AB@%U1031     file name missing%@AE@%%@EH@%%@NL@%
  17390. %@NL@%
  17391.           An include directive was found, but the name of the file to%@NL@%
  17392.           include was missing.%@NL@%
  17393. %@NL@%
  17394. %@CR:MCVcE359@%%@4@%%@AB@%U1033     syntax error : '%@AE@%%@AI@%string%@AE@%%@AB@%' unexpected%@AE@%%@EH@%%@NL@%
  17395. %@NL@%
  17396.           The specified string is not part of the valid syntax for a%@NL@%
  17397.           makefile.%@NL@%
  17398. %@NL@%
  17399. %@CR:MCVcE360@%%@4@%%@AB@%U1034     syntax error : separator missing%@AE@%%@EH@%%@NL@%
  17400. %@NL@%
  17401.           The colon (%@AB@%:%@AE@%) that separates target(s) and dependent(s) is%@NL@%
  17402.           missing.%@NL@%
  17403. %@NL@%
  17404. %@CR:MCVcE361@%%@4@%%@AB@%U1035     syntax error : expected separator or '='%@AE@%%@EH@%%@NL@%
  17405. %@NL@%
  17406.           Either a colon (%@AB@%:%@AE@%), implying a dependency line, or an equal sign%@NL@%
  17407.           (%@AB@%=%@AE@%), implying a macro definition, was expected.%@NL@%
  17408. %@NL@%
  17409. %@CR:MCVcE362@%%@4@%%@AB@%U1036     syntax error : too many names to left of '='%@AE@%%@EH@%%@NL@%
  17410. %@NL@%
  17411.           Only one string is allowed to the left of a macro definition.%@NL@%
  17412. %@NL@%
  17413. %@CR:MCVcE363@%%@4@%%@AB@%U1037     syntax error : target name missing%@AE@%%@EH@%%@NL@%
  17414. %@NL@%
  17415.           A colon (%@AB@%:%@AE@%) was found before a target name was found. At least one%@NL@%
  17416.           target is required.%@NL@%
  17417. %@NL@%
  17418. %@CR:MCVcE364@%%@4@%%@AB@%U1038     internal error : lexer%@AE@%%@EH@%%@NL@%
  17419. %@NL@%
  17420.           Note the circumstances of the failure and notify Microsoft%@NL@%
  17421.           Corporation by following the directions in the Microsoft Product%@NL@%
  17422.           Assistance Request form at the back of one of your manuals.%@NL@%
  17423. %@NL@%
  17424. %@CR:MCVcE365@%%@4@%%@AB@%U1039     internal error : parser%@AE@%%@EH@%%@NL@%
  17425. %@NL@%
  17426.           Note the circumstances of the failure and notify Microsoft%@NL@%
  17427.           Corporation by following the directions in the Microsoft Product%@NL@%
  17428.           Assistance Request form at the back of one of your manuals.%@NL@%
  17429. %@NL@%
  17430. %@CR:MCVcE366@%%@4@%%@AB@%U1040     internal error : macro-expansion%@AE@%%@EH@%%@NL@%
  17431. %@NL@%
  17432.           Note the circumstances of the failure and notify Microsoft%@NL@%
  17433.           Corporation by following the directions in the Microsoft Product%@NL@%
  17434.           Assistance Request form at the back of one of your manuals.%@NL@%
  17435. %@NL@%
  17436. %@CR:MCVcE367@%%@4@%%@AB@%U1041     internal error : target building%@AE@%%@EH@%%@NL@%
  17437. %@NL@%
  17438.           Note the circumstances of the failure and notify Microsoft%@NL@%
  17439.           Corporation by following the directions in the Microsoft Product%@NL@%
  17440.           Assistance Request form at the back of one of your manuals.%@NL@%
  17441. %@NL@%
  17442. %@CR:MCVcE368@%%@4@%%@AB@%U1042     internal error : expression stack overflow%@AE@%%@EH@%%@NL@%
  17443. %@NL@%
  17444.           Note the circumstances of the failure and notify Microsoft%@NL@%
  17445.           Corporation by following the directions in the Microsoft Product%@NL@%
  17446.           Assistance Request form at the back of one of your manuals.%@NL@%
  17447. %@NL@%
  17448. %@CR:MCVcE369@%%@4@%%@AB@%U1043     internal error : temp file limit exceeded%@AE@%%@EH@%%@NL@%
  17449. %@NL@%
  17450.           Note the circumstances of the failure and notify Microsoft%@NL@%
  17451.           Corporation by following  the directions in the Microsoft Product%@NL@%
  17452.           Assistance Request form at the back of one of your manuals.%@NL@%
  17453. %@NL@%
  17454. %@CR:MCVcE370@%%@4@%%@AB@%U1044     internal error : too many levels of recursion building a target%@AE@%%@EH@%%@NL@%
  17455. %@NL@%
  17456.           Note the circumstances of the failure and notify Microsoft%@NL@%
  17457.           Corporation by following the directions in the Microsoft Product%@NL@%
  17458.           Assistance Request form at the back of one of your manuals.%@NL@%
  17459. %@NL@%
  17460. %@CR:MCVcE371@%%@4@%%@AB@%U1050%@AE@%     %@AI@%user-specified text%@AE@%%@EH@%%@NL@%
  17461. %@NL@%
  17462.           The message specified with the %@AB@%!ERROR%@AE@% directive is displayed.%@NL@%
  17463. %@NL@%
  17464. %@CR:MCVcE372@%%@4@%%@AB@%U1051     '%@AE@%%@AI@%progname%@AE@%%@AB@%' usage : [-acdeinpqrst -f makefile -x stderrfile]%@AE@%%@EH@%%@NL@%
  17465.           %@AB@%[macrodefs] [targets]%@AE@%%@NL@%
  17466. %@NL@%
  17467.           An error was made trying to invoke %@AB@%NMAKE%@AE@%.%@NL@%
  17468. %@NL@%
  17469.           Use the specified form.%@NL@%
  17470. %@NL@%
  17471. %@CR:MCVcE373@%%@4@%%@AB@%U1052     out of memory%@AE@%%@EH@%%@NL@%
  17472. %@NL@%
  17473.           The program ran out of space in the far heap. Split the%@NL@%
  17474.           description into smaller and simpler pieces.%@NL@%
  17475. %@NL@%
  17476. %@CR:MCVcE374@%%@4@%%@AB@%U1053     file '%@AE@%%@AI@%filename%@AE@%%@AB@%' not found%@AE@%%@EH@%%@NL@%
  17477. %@NL@%
  17478.           The file was not found. The file name might not be properly%@NL@%
  17479.           specified in the makefile.%@NL@%
  17480. %@NL@%
  17481. %@CR:MCVcE375@%%@4@%%@AB@%U1054     file '%@AE@%%@AI@%filename%@AE@%%@AB@%' unreadable%@AE@%%@EH@%%@NL@%
  17482. %@NL@%
  17483.           The file cannot be read. The file might not have the appropriate%@NL@%
  17484.           attributes for reading.%@NL@%
  17485. %@NL@%
  17486. %@CR:MCVcE376@%%@4@%%@AB@%U1055     can't create response file '%@AE@%%@AI@%filename%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17487. %@NL@%
  17488.           The response file cannot be created.%@NL@%
  17489. %@NL@%
  17490. %@CR:MCVcE377@%%@4@%%@AB@%U1056     out of environment space%@AE@%%@EH@%%@NL@%
  17491. %@NL@%
  17492.           The environment space limit was reached.%@NL@%
  17493. %@NL@%
  17494.           Restart the program with a larger environment space.%@NL@%
  17495. %@NL@%
  17496. %@CR:MCVcE378@%%@4@%%@AB@%U1057     can't find command.com%@AE@%%@EH@%%@NL@%
  17497. %@NL@%
  17498.           The %@AB@%COMMAND.COM%@AE@% file could not be found.%@NL@%
  17499. %@NL@%
  17500. %@CR:MCVcE379@%%@4@%%@AB@%U1058     unlink of file '%@AE@%%@AI@%filename%@AE@%%@AB@%' failed%@AE@%%@EH@%%@NL@%
  17501. %@NL@%
  17502.           Unlink of the temporary response file failed.%@NL@%
  17503. %@NL@%
  17504. %@CR:MCVcE380@%%@4@%%@AB@%U1059     terminated by user%@AE@%%@EH@%%@NL@%
  17505. %@NL@%
  17506.           Execution of %@AB@%NMAKE%@AE@% aborted because you typed CTRL+C or CTRL+BREAK.%@NL@%
  17507. %@NL@%
  17508. %@CR:MCVcE381@%%@4@%%@AB@%U1070     cycle in macro definition '%@AE@%%@AI@%macroname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17509. %@NL@%
  17510.           A circular definition was detected in the macro definition%@NL@%
  17511.           specified. This is an invalid definition.%@NL@%
  17512. %@NL@%
  17513. %@CR:MCVcE382@%%@4@%%@AB@%U1071     cycle in dependency tree for target '%@AE@%%@AI@%targetname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17514. %@NL@%
  17515.           A circular dependency was detected in the dependency tree for the%@NL@%
  17516.           specified target. This is invalid.%@NL@%
  17517. %@NL@%
  17518. %@CR:MCVcE383@%%@4@%%@AB@%U1072     cycle in include files%@AE@% %@AI@%filenames%@AE@%%@EH@%%@NL@%
  17519. %@NL@%
  17520.           A circular inclusion was detected in the include files specified.%@NL@%
  17521.           That is, each file includes the other.%@NL@%
  17522. %@NL@%
  17523. %@CR:MCVcE384@%%@4@%%@AB@%U1073     don't know how to make '%@AE@%%@AI@%targetname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17524. %@NL@%
  17525.           The specified target does not exist and there are no commands to%@NL@%
  17526.           execute or inference rules given for it. Hence it cannot be built.%@NL@%
  17527. %@NL@%
  17528. %@CR:MCVcE385@%%@4@%%@AB@%U1074     macro definition too long%@AE@%%@EH@%%@NL@%
  17529. %@NL@%
  17530.           The macro definition is too long.%@NL@%
  17531. %@NL@%
  17532. %@CR:MCVcE386@%%@4@%%@AB@%U1075     string too long%@AE@%%@EH@%%@NL@%
  17533. %@NL@%
  17534.           The text string would overflow an internal buffer.%@NL@%
  17535. %@NL@%
  17536. %@CR:MCVcE387@%%@4@%%@AB@%U1076     name too long%@AE@%%@EH@%%@NL@%
  17537. %@NL@%
  17538.           The macro name, target name, or build-command name would overflow%@NL@%
  17539.           an internal buffer. Macro names may be at most 128 characters.%@NL@%
  17540. %@NL@%
  17541. %@CR:MCVcE388@%%@4@%%@AB@%U1077     '%@AE@%%@AI@%program%@AE@%%@AB@%' : return code%@AE@% %@AI@%value%@AE@%%@EH@%%@NL@%
  17542. %@NL@%
  17543.           The given program invoked from %@AB@%NMAKE%@AE@% failed, returning the error%@NL@%
  17544.           code %@AI@%value%@AE@%.%@NL@%
  17545. %@NL@%
  17546. %@CR:MCVcE389@%%@4@%%@AB@%U1078     constant overflow at '%@AE@%%@AI@%directive%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17547. %@NL@%
  17548.           A constant in %@AI@%directive%@AE@%'s expression was too big.%@NL@%
  17549. %@NL@%
  17550. %@CR:MCVcE390@%%@4@%%@AB@%U1079     illegal expression: divide by zero present%@AE@%%@EH@%%@NL@%
  17551. %@NL@%
  17552.           An expression tries to divide by zero.%@NL@%
  17553. %@NL@%
  17554. %@CR:MCVcE391@%%@4@%%@AB@%U1080     operator and/or operand out of place: usage illegal%@AE@%%@EH@%%@NL@%
  17555. %@NL@%
  17556.           The expression incorrectly uses an operator or operand.%@NL@%
  17557. %@NL@%
  17558.           Check the allowed set of operators and their precedence.%@NL@%
  17559. %@NL@%
  17560. %@CR:MCVcE392@%%@4@%%@AB@%U1081     '%@AE@%%@AI@%program%@AE@%%@AB@%' : program not found%@AE@%%@EH@%%@NL@%
  17561. %@NL@%
  17562.           %@AB@%NMAKE%@AE@% could not find the given program in order to run it.%@NL@%
  17563. %@NL@%
  17564.           Make sure that the program is in the current path and has the%@NL@%
  17565.           correct extension.%@NL@%
  17566. %@NL@%
  17567. %@CR:MCVcE393@%%@4@%%@AB@%U1082%@AE@%     %@AI@%command%@AE@%%@AB@% cannot execute command: out of memory%@AE@%%@EH@%%@NL@%
  17568.  
  17569. %@NL@%
  17570.           %@AB@%NMAKE%@AE@% cannot execute the given command because there is not enough%@NL@%
  17571.           memory. Free memory and run %@AB@%NMAKE%@AE@% again.%@NL@%
  17572. %@NL@%
  17573. %@CR:MCVcE394@%%@4@%%@AB@%U1085     can't mix implicit and explicit rules%@AE@%%@EH@%%@NL@%
  17574. %@NL@%
  17575.           A regular target was specified along with the target for a rule%@NL@%
  17576.           (which has the form .%@AI@%fromext%@AE@%.%@AI@%toext%@AE@%). This is invalid.%@NL@%
  17577. %@NL@%
  17578. %@CR:MCVcE395@%%@4@%%@AB@%U1086     inference rule can't have dependents%@AE@%%@EH@%%@NL@%
  17579. %@NL@%
  17580.           Dependents are not allowed when an inference rule is being%@NL@%
  17581.           defined.%@NL@%
  17582. %@NL@%
  17583. %@CR:MCVcE396@%%@4@%%@AB@%U1087     can't have : and :: dependents for same target%@AE@%%@EH@%%@NL@%
  17584. %@NL@%
  17585.           A target cannot have both a single-colon (%@AB@%:%@AE@%) and a double-colon%@NL@%
  17586.           (%@AB@%::%@AE@%) dependency.%@NL@%
  17587. %@NL@%
  17588. %@CR:MCVcE397@%%@4@%%@AB@%U1088     invalid separator on inference rules: '::'%@AE@%%@EH@%%@NL@%
  17589. %@NL@%
  17590.           Inference rules can use only a single-colon (%@AB@%:%@AE@%) separator.%@NL@%
  17591. %@NL@%
  17592. %@CR:MCVcE398@%%@4@%%@AB@%U1089     can't have build commands for pseudotarget '%@AE@%%@AI@%targetname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17593. %@NL@%
  17594.           Pseudotargets (for example, %@AB@%.PRECIOUS%@AE@%, .SUFFIXES) cannot have%@NL@%
  17595.           build commands specified.%@NL@%
  17596. %@NL@%
  17597. %@CR:MCVcE399@%%@4@%%@AB@%U1090     can't have dependents for pseudotarget '%@AE@%%@AI@%targetname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17598. %@NL@%
  17599.           The specified pseudotarget (for example, %@AB@%.SILENT%@AE@%, %@AB@%.IGNORE%@AE@%) cannot%@NL@%
  17600.           have a dependent.%@NL@%
  17601. %@NL@%
  17602. %@CR:MCVcE400@%%@4@%%@AB@%U1091     invalid suffixes in inference rule%@AE@%%@EH@%%@NL@%
  17603. %@NL@%
  17604.           The suffixes being used in the inference rule are invalid.%@NL@%
  17605. %@NL@%
  17606. %@CR:MCVcE401@%%@4@%%@AB@%U1092     too many names in rule%@AE@%%@EH@%%@NL@%
  17607. %@NL@%
  17608.           An inference rule cannot have more than one pair of extensions%@NL@%
  17609.           (.%@AI@%fromext%@AE@%.%@AI@%toext%@AE@%) as a target.%@NL@%
  17610. %@NL@%
  17611. %@CR:MCVcE402@%%@4@%%@AB@%U1093     can't mix special pseudotargets%@AE@%%@EH@%%@NL@%
  17612. %@NL@%
  17613.           It is illegal to list two or more pseudotargets together.%@NL@%
  17614. %@NL@%
  17615. %@NL@%
  17616. %@CR:MCVc5200@%%@3@%%@AB@%C.5.2  Warning NMAKE Error Messages%@AE@%%@EH@%%@NL@%
  17617. %@NL@%
  17618. %@CR:MCVcE403@%%@4@%%@AB@%U4011     command file can only be invoked from command line%@AE@%%@EH@%%@NL@%
  17619. %@NL@%
  17620.           A command file cannot be invoked from within another command file.%@NL@%
  17621.           Such an invocation is ignored.%@NL@%
  17622. %@NL@%
  17623. %@CR:MCVcE404@%%@4@%%@AB@%U4012     resetting value of special macro '%@AE@%%@AI@%macroname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17624. %@NL@%
  17625.           The value of a macro such as $(%@AB@%MAKE%@AE@%) was changed within a%@NL@%
  17626.           description file.%@NL@%
  17627. %@NL@%
  17628.           The name by which this program was invoked is not a tagged section%@NL@%
  17629.           in the %@AB@%TOOLS.INI%@AE@% file.%@NL@%
  17630. %@NL@%
  17631. %@CR:MCVcE405@%%@4@%%@AB@%U4015     no match found for wildcard '%@AE@%%@AI@%filename%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17632. %@NL@%
  17633.           There are no file names that match the specified target or%@NL@%
  17634.           dependent file with the wild-card characters asterisk (%@AB@%*%@AE@%) and%@NL@%
  17635.           question mark (%@AB@%?%@AE@%).%@NL@%
  17636. %@NL@%
  17637. %@CR:MCVcE406@%%@4@%%@AB@%U4016     too many rules for target '%@AE@%%@AI@%targetname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17638. %@NL@%
  17639.           Multiple blocks of build commands are specified for a target using%@NL@%
  17640.           single colons (%@AB@%:%@AE@%) as separators.%@NL@%
  17641. %@NL@%
  17642. %@CR:MCVcE407@%%@4@%%@AB@%U4017     ignoring rule%@AE@% %@AI@%rule%@AE@%%@AB@% (extension not in .SUFFIXES)%@AE@%%@EH@%%@NL@%
  17643. %@NL@%
  17644.           The rule was ignored because the suffix(es) in the rule are not%@NL@%
  17645.           listed in the %@AB@%.SUFFIXES%@AE@% list.%@NL@%
  17646. %@NL@%
  17647. %@CR:MCVcE408@%%@4@%%@AB@%U4018     special macro undefined '%@AE@%%@AI@%macroname%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17648. %@NL@%
  17649.           The special macro %@AI@%macroname%@AE@% is undefined.%@NL@%
  17650. %@NL@%
  17651. %@CR:MCVcE409@%%@4@%%@AB@%U4019     Filename '%@AE@%%@AI@%filename%@AE@%%@AB@%' too long; truncating to 8.3%@AE@%%@EH@%%@NL@%
  17652. %@NL@%
  17653.           The base name of the file has more than eight characters or the%@NL@%
  17654.           extension has more than three characters. %@AB@%NMAKE%@AE@% truncates the name%@NL@%
  17655.           to an eight-character base and a three-character extension.%@NL@%
  17656. %@NL@%
  17657. %@CR:MCVcE410@%%@4@%%@AB@%U4020     removed target '%@AE@%%@AI@%target%@AE@%%@AB@%'%@AE@%%@EH@%%@NL@%
  17658. %@NL@%
  17659.           Execution of %@AB@%NMAKE%@AE@% was interrupted while it was trying to build%@NL@%
  17660.           the given target, and therefore the target was incomplete. Because%@NL@%
  17661.           the target was not specified in the %@AB@%.PRECIOUS%@AE@% list, %@AB@%NMAKE%@AE@% has%@NL@%
  17662.           deleted it.%@NL@%
  17663. %@NL@%
  17664. %@NL@%
  17665. %@CR:MCVc6000@%%@2@%%@AB@%C.6  EXEMOD Error Messages%@AE@%%@EH@%%@NL@%
  17666. %@NL@%
  17667. %@CR:MCVc6001@%%@4@%Error messages from the Microsoft EXE File Header Utility, EXEMOD, have one%@EH@%
  17668. of the following formats:%@NL@%
  17669. %@NL@%
  17670.      {%@AI@%filename%@AE@%| %@AS@%EXEMOD%@AE@%} : %@AS@%fatal error U1%@AE@%%@AI@%xxx%@AE@%:%@AI@%messagetext%@AE@%%@NL@%
  17671.      {%@AI@%filename%@AE@%| %@AS@%EXEMOD%@AE@%} : %@AS@%warning U4%@AE@%%@AI@%xxx%@AE@%:%@AI@% messagetext%@AE@%%@NL@%
  17672. %@NL@%
  17673. %@CR:MCVc6002@%%@4@%The message begins with the input-file name (%@AI@%filename%@AE@%), if one exists, or%@EH@%
  17674. with the name of the utility. If possible, %@AB@%EXEMOD%@AE@% prints a warning and
  17675. continues operation. In some cases errors are fatal and %@AB@%EXEMOD%@AE@% terminates
  17676. processing.%@NL@%
  17677. %@NL@%
  17678. %@CR:MCVc6003@%%@4@%EXEMOD generates the following error messages:%@EH@%%@NL@%
  17679. %@NL@%
  17680. %@NL@%
  17681. %@CR:MCVc6100@%%@3@%%@AB@%C.6.1  Fatal EXEMOD Error Messages%@AE@%%@EH@%%@NL@%
  17682. %@NL@%
  17683. %@CR:MCVcE411@%%@4@%%@AB@%U1050     usage : exemod file [-/h] [-/stack n] [-/max n] [-/min n]%@AE@%%@EH@%%@NL@%
  17684. %@NL@%
  17685.           The %@AB@%EXEMOD%@AE@% command line was not specified properly.%@NL@%
  17686. %@NL@%
  17687.           Try again using the syntax shown. Note that the option indicator%@NL@%
  17688.           can be either a slash (%@AB@%/%@AE@%) or a hyphen (%@AB@%-%@AE@%). The single brackets%@NL@%
  17689.           (%@AB@%[ ]%@AE@%) in the error message indicate that your choice of the item%@NL@%
  17690.           within them is optional.%@NL@%
  17691. %@NL@%
  17692. %@CR:MCVcE412@%%@4@%%@AB@%U1051     invalid .EXE file : bad header%@AE@%%@EH@%%@NL@%
  17693. %@NL@%
  17694.           The specified input file is not an executable file or it has an%@NL@%
  17695.           invalid file header.%@NL@%
  17696. %@NL@%
  17697. %@CR:MCVcE413@%%@4@%%@AB@%U1052     invalid .EXE file : actual length less than reported%@AE@%%@EH@%%@NL@%
  17698. %@NL@%
  17699.           The second and third fields in the input-file header indicate a%@NL@%
  17700.           file size greater than the actual size.%@NL@%
  17701. %@NL@%
  17702. %@CR:MCVcE414@%%@4@%%@AB@%U1053     cannot change load-high program%@AE@%%@EH@%%@NL@%
  17703. %@NL@%
  17704.           When the minimum allocation value and the maximum allocation value%@NL@%
  17705.           are both 0, the file cannot be modified.%@NL@%
  17706. %@NL@%
  17707. %@CR:MCVcE415@%%@4@%%@AB@%U1054     file not .EXE%@AE@%%@EH@%%@NL@%
  17708. %@NL@%
  17709.           %@AB@%EXEMOD%@AE@% automatically appends the %@AB@%.EXE%@AE@% extension to any file name%@NL@%
  17710.           without an extension; in this case, no file with the given name%@NL@%
  17711.           and an %@AB@%.EXE%@AE@% extension could be found.%@NL@%
  17712. %@NL@%
  17713. %@CR:MCVcE416@%%@4@%%@AB@%U1055%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot find file%@AE@%%@EH@%%@NL@%
  17714. %@NL@%
  17715.           The file specified by %@AI@%filename%@AE@% could not be found.%@NL@%
  17716. %@NL@%
  17717. %@CR:MCVcE417@%%@4@%%@AB@%U1056%@AE@%     %@AI@%filename%@AE@%%@AB@% : permission denied%@AE@%%@EH@%%@NL@%
  17718. %@NL@%
  17719.           The file specified by %@AI@%filename%@AE@% was a read only file.%@NL@%
  17720. %@NL@%
  17721. %@NL@%
  17722. %@CR:MCVc6200@%%@3@%%@AB@%C.6.2  Warning EXEMOD Error Messages%@AE@%%@EH@%%@NL@%
  17723. %@NL@%
  17724. %@CR:MCVcE418@%%@4@%%@AB@%U4050     packed file%@AE@%%@EH@%%@NL@%
  17725. %@NL@%
  17726.           The given file was a packed file. This is a warning only.%@NL@%
  17727. %@NL@%
  17728. %@CR:MCVcE419@%%@4@%%@AB@%U4051     minimum allocation less than stack; correcting minimum%@AE@%%@EH@%%@NL@%
  17729. %@NL@%
  17730.           If the minimum allocation value is not enough to accommodate the%@NL@%
  17731.           stack (either the original stack request or the modified request),%@NL@%
  17732.           the minimum allocation value is adjusted. This is a warning%@NL@%
  17733.           message only; the modification is still performed.%@NL@%
  17734. %@NL@%
  17735. %@CR:MCVcE420@%%@4@%%@AB@%U4052     minimum allocation greater than maximum; correcting maximum%@AE@%%@EH@%%@NL@%
  17736. %@NL@%
  17737.           If the minimum allocation value is greater than the maximum%@NL@%
  17738.           allocation value, the maximum allocation value is adjusted. This%@NL@%
  17739.           is a warning message only; %@AB@%EXEMOD%@AE@% will still modify the file. The%@NL@%
  17740.           values shown if you ask for a display of DOS header values will be%@NL@%
  17741.           the values after the packed file is expanded.%@NL@%
  17742. %@NL@%
  17743. %@NL@%
  17744. %@CR:MCVc7000@%%@2@%%@AB@%C.7  SETENV Error Messages%@AE@%%@EH@%%@NL@%
  17745. %@NL@%
  17746. %@CR:MCVc7001@%%@4@%Messages generated by the Microsoft Environment Expansion Utility, SETENV,%@EH@%
  17747. have the following format:%@NL@%
  17748. %@NL@%
  17749.      {%@AI@%filename%@AE@% | %@AS@%SETENV%@AE@%} :%@AS@%fatal error U1%@AE@%%@AI@%xxx%@AE@%%@AS@%:%@AE@%%@AI@%messagetext%@AE@%%@NL@%
  17750. %@NL@%
  17751. %@CR:MCVc7002@%%@4@%The message begins with the input-file name (%@AI@%filename%@AE@%), if one exists, or%@EH@%
  17752. with the name of the utility.%@NL@%
  17753. %@NL@%
  17754. %@CR:MCVc7003@%%@4@%SETENV generates the following fatal error messages:%@EH@%%@NL@%
  17755. %@NL@%
  17756. %@CR:MCVcE421@%%@4@%%@AB@%U1080     usage : setenv <command.com> [envsize]%@AE@%%@EH@%%@NL@%
  17757. %@NL@%
  17758.           The command line was not specified properly. This usually%@NL@%
  17759.           indicates that the wrong number of arguments was given.%@NL@%
  17760. %@NL@%
  17761.           Try again with the syntax shown in the message.%@NL@%
  17762. %@NL@%
  17763. %@CR:MCVcE422@%%@4@%%@AB@%U1081     unrecognizable COMMAND.COM%@AE@%%@EH@%%@NL@%
  17764. %@NL@%
  17765.           The %@AB@%COMMAND.COM%@AE@% file was not one of the accepted versions (DOS%@NL@%
  17766.           Versions 2.0, 2.1, 2.11, 3.0, and 3.1).%@NL@%
  17767. %@NL@%
  17768. %@CR:MCVcE423@%%@4@%%@AB@%U1082     maximum for Version 3.1 : 992%@AE@%%@EH@%%@NL@%
  17769. %@NL@%
  17770.           You specified a file recognized as %@AB@%COMMAND.COM%@AE@% for IBM PC-DOS,%@NL@%
  17771.           Version 3.1, and gave an environment size greater than 992 bytes,%@NL@%
  17772.           the maximum allowed for that version.%@NL@%
  17773. %@NL@%
  17774. %@CR:MCVcE424@%%@4@%%@AB@%U1083     maximum environment size : 65520%@AE@%%@EH@%%@NL@%
  17775. %@NL@%
  17776.           The environment size specified was greater than 65,520 bytes, the%@NL@%
  17777.           maximum size allowed.%@NL@%
  17778. %@NL@%
  17779. %@CR:MCVcE425@%%@4@%%@AB@%U1084     minimum environment size : 160%@AE@%%@EH@%%@NL@%
  17780. %@NL@%
  17781.           The environment size specified was less than 160 bytes, the%@NL@%
  17782.           minimum size allowed.%@NL@%
  17783. %@NL@%
  17784. %@CR:MCVcE426@%%@4@%%@AB@%U1085%@AE@%     %@AI@%filename%@AE@%%@AB@% : cannot find file%@AE@%%@EH@%%@NL@%
  17785. %@NL@%
  17786.           The specified file was not found, perhaps because it was a%@NL@%
  17787.           directory or some other special file.%@NL@%
  17788. %@NL@%
  17789. %@CR:MCVcE427@%%@4@%%@AB@%U1086%@AE@%     %@AI@%filename%@AE@%%@AB@% : permission denied%@AE@%%@EH@%%@NL@%
  17790. %@NL@%
  17791.           The specified file was a read only file.%@NL@%
  17792. %@NL@%
  17793. %@CR:MCVcE428@%%@4@%%@AB@%U1087%@AE@%     %@AI@%filename%@AE@%%@AB@% : unknown error%@AE@%%@EH@%%@NL@%
  17794. %@NL@%
  17795.           An unknown system error occurred while the specified file was%@NL@%
  17796.           being read or written.%@NL@%
  17797. %@NL@%
  17798. %@NL@%
  17799. %@CR:MCVg0000@%%@1@%%@AB@%Glossary%@AE@%%@EH@%%@NL@%
  17800. ───────────────────────────────────────────────────────────────────────────%@NL@%
  17801. %@NL@%
  17802. %@CR:MCVgD001@%%@4@%%@AB@%8087 or 80287 coprocessor%@AE@%%@EH@%%@NL@%
  17803.   Intel hardware products that perform much faster math calculations than
  17804.   the main processor.%@NL@%
  17805. %@NL@%
  17806. %@CR:MCVgD002@%%@4@%%@AB@%adapter%@AE@%%@EH@%%@NL@%
  17807.   A term sometimes used to refer to printed-circuit cards that plug into a
  17808.   computer and control a device, such as a video display or a printer.%@NL@%
  17809. %@NL@%
  17810. %@CR:MCVgD003@%%@4@%%@AB@%address%@AE@%%@EH@%%@NL@%
  17811.   An expression that evaluates to a location in memory. Addresses can be
  17812.   given in the segment offset format. If the segment is not given, the
  17813.   default segment is assumed. The default segment is CS for commands related
  17814.   to code and DS for commands related to data.%@NL@%
  17815. %@NL@%
  17816. %@CR:MCVgD004@%%@4@%%@AB@%address range%@AE@%%@EH@%%@NL@%
  17817.   A range of memory bounded by two addresses. The range can be specified in
  17818.   the normal format by giving the starting and ending addresses (inclusive),
  17819.   or it can be specified in the object-range format by specifying the
  17820.   starting address followed first by the letter (uppercase or lowercase) and
  17821.   then by the number of objects in the range (0x100 L 10, for example,
  17822.   specifies the range from 0x100 to 0x109, inclusive).%@NL@%
  17823. %@NL@%
  17824. %@CR:MCVgD005@%%@4@%%@AB@%Applications Program Interface (API)%@AE@%%@EH@%%@NL@%
  17825.   The set of calls a program uses to obtain services from the operating
  17826.   system. The term API denotes a service interface, whatever its form.
  17827.   Generally used to refer to OS/2 system calls.%@NL@%
  17828. %@NL@%
  17829. %@CR:MCVgD006@%%@4@%%@AB@%argc%@AE@%%@EH@%%@NL@%
  17830.   The conventional name for the first argument to the main function in a C
  17831.   source program (an integer specifying how many arguments are passed to the
  17832.   program from the command line).%@NL@%
  17833. %@NL@%
  17834. %@CR:MCVgD007@%%@4@%%@AB@%argument%@AE@%%@EH@%%@NL@%
  17835.   A value passed to a function.%@NL@%
  17836. %@NL@%
  17837. %@CR:MCVgD008@%%@4@%%@AB@%argv%@AE@%%@EH@%%@NL@%
  17838.   The conventional name for the second argument to the main function in a C
  17839.   source program (a pointer to an array of strings). The first string is the
  17840.   program name and each following string is an argument passed to the
  17841.   program from the command line.%@NL@%
  17842. %@NL@%
  17843. %@CR:MCVgD009@%%@4@%%@AB@%array%@AE@%%@EH@%%@NL@%
  17844.   A set of elements with the same type.%@NL@%
  17845. %@NL@%
  17846. %@CR:MCVgD010@%%@4@%%@AB@%ASCII (American Standard Code for Information Interchange)%@AE@%%@EH@%%@NL@%
  17847.   A set of 256 codes that many computers use to represent letters, digits,
  17848.   special characters, and other symbols.  Only the first 128 of these codes
  17849.   are standardized; the remaining 128 are special characters defined by the
  17850.   computer manufacturer.%@NL@%
  17851. %@NL@%
  17852. %@CR:MCVgD011@%%@4@%%@AB@%assembly mode%@AE@%%@EH@%%@NL@%
  17853.   The mode in which the CodeView debugger displays assembly-language-
  17854.   instruction mnemonics to represent the code being executed.%@NL@%
  17855. %@NL@%
  17856. %@CR:MCVgD012@%%@4@%%@AB@%base name%@AE@%%@EH@%%@NL@%
  17857.   The part of a file name before the extension. For example, SAMPLE is the
  17858.   base name of the file SAMPLE.BAS.%@NL@%
  17859. %@NL@%
  17860. %@CR:MCVgD013@%%@4@%%@AB@%BASIC%@AE@%%@EH@%%@NL@%
  17861.   A programming language included with versions of DOS. BASIC is an acronym
  17862.   for Beginner's All-purpose Symbolic Instruction Code.%@NL@%
  17863. %@NL@%
  17864. %@CR:MCVgD014@%%@4@%%@AB@%Basic Input/Output System (BIOS)%@AE@%%@EH@%%@NL@%
  17865.   The code built into system memory that provides hardware interface
  17866.   routines for programs. You can trace into the BIOS with the CodeView
  17867.   debugger, using assembly mode.%@NL@%
  17868. %@NL@%
  17869. %@CR:MCVgD015@%%@4@%%@AB@%batch file%@AE@%%@EH@%%@NL@%
  17870.   A text file containing MS-DOS commands that can be invoked from the MS-DOS
  17871.   command line.%@NL@%
  17872. %@NL@%
  17873. %@CR:MCVgD016@%%@4@%%@AB@%breakpoint%@AE@%%@EH@%%@NL@%
  17874.   A specified address where program execution will be halted. The CodeView
  17875.   debugger interrupts execution whenever the program reaches an address
  17876.   where a breakpoint has been set. See also "watchpoint" and "tracepoint"
  17877.   for a description of conditional breakpoints.%@NL@%
  17878. %@NL@%
  17879. %@CR:MCVgD017@%%@4@%%@AB@%buffer%@AE@%%@EH@%%@NL@%
  17880.   An area in memory in which a copy of the file is kept and changed as you
  17881.   edit. This buffer is copied to disk when you do a save operation.%@NL@%
  17882. %@NL@%
  17883. %@CR:MCVgD018@%%@4@%%@AB@%call gate%@AE@%%@EH@%%@NL@%
  17884.   A special LDT or GDT entry that describes a subroutine entry point rather
  17885.   than a memory segment. A far call to a call gate selector will cause a
  17886.   transfer to the entry point specified in the call gate. This is a feature
  17887.   of the 80286/80386 hardware and is normally used to provide a transition
  17888.   from a lower privilege state to a higher one.%@NL@%
  17889. %@NL@%
  17890. %@CR:MCVgD019@%%@4@%%@AB@%CGA%@AE@%%@EH@%%@NL@%
  17891.   IBM's Color Graphics Adapter.%@NL@%
  17892. %@NL@%
  17893. %@CR:MCVgD020@%%@4@%%@AB@%character string%@AE@%%@EH@%%@NL@%
  17894.   A sequence of bytes treated as a set of ASCII letters or numbers.%@NL@%
  17895. %@NL@%
  17896. %@CR:MCVgD021@%%@4@%%@AB@%Child process%@AE@%%@EH@%%@NL@%
  17897.   A process created by another process (its parent process).%@NL@%
  17898. %@NL@%
  17899. %@CR:MCVgD022@%%@4@%%@AB@%click%@AE@%%@EH@%%@NL@%
  17900.   To press and release one of the mouse buttons while pointing the mouse at
  17901.   an object on the screen.%@NL@%
  17902. %@NL@%
  17903. %@CR:MCVgD023@%%@4@%%@AB@%Color Graphics Adapter (CGA)%@AE@%%@EH@%%@NL@%
  17904.   A video adapter capable of displaying text characters or graphics pixels.
  17905.   Color can also be displayed with the appropriate display monitor.%@NL@%
  17906. %@NL@%
  17907. %@CR:MCVgD024@%%@4@%%@AB@%command%@AE@%%@EH@%%@NL@%
  17908.   An instruction you use to control a computer program, such as DOS or an
  17909.   application program.%@NL@%
  17910. %@NL@%
  17911. %@CR:MCVgD025@%%@4@%%@AB@%command file%@AE@%%@EH@%%@NL@%
  17912.   A file that contains the program or instructions required to carry out a
  17913.   command. If the file's extension is COM or EXE, the command file contains
  17914.   machine instructions; if its extension is BAT, the command file is a batch
  17915.   file and contains DOS commands; if its extension is CMD, the command file
  17916.   contains OS/2 commands.%@NL@%
  17917. %@NL@%
  17918. %@CR:MCVgD026@%%@4@%%@AB@%compile%@AE@%%@EH@%%@NL@%
  17919.   The action performed to translate programming language statements to a
  17920.   form that can be executed by the computer.%@NL@%
  17921. %@NL@%
  17922. %@CR:MCVgD027@%%@4@%%@AB@%constant%@AE@%%@EH@%%@NL@%
  17923.   A value that does not change during program execution. A variable, on the
  17924.   other hand, is a value that can──and usually does──change during program
  17925.   execution.%@NL@%
  17926. %@NL@%
  17927. %@CR:MCVgD028@%%@4@%%@AB@%constant expression%@AE@%%@EH@%%@NL@%
  17928.   Any expression that evaluates to a constant and may involve integer
  17929.   constants, character constants, floating-point constants, enumeration
  17930.   constants, type casts to integral and floating-point types, and other
  17931.   constant expressions.%@NL@%
  17932. %@NL@%
  17933. %@CR:MCVgD029@%%@4@%%@AB@%CPU%@AE@%%@EH@%%@NL@%
  17934.   Central Processing Unit, or the main processor in a computer. For example,
  17935.   the CPU is an Intel 8088 in PCs and an 80286 in PC/ATs.%@NL@%
  17936. %@NL@%
  17937. %@CR:MCVgD030@%%@4@%%@AB@%Ctrl-C%@AE@%%@EH@%%@NL@%
  17938.   Same as CTRL-BREAK.%@NL@%
  17939. %@NL@%
  17940. %@CR:MCVgD031@%%@4@%%@AB@%Ctrl-S%@AE@%%@EH@%%@NL@%
  17941.   Same as CTRL-NUM LOCK.%@NL@%
  17942. %@NL@%
  17943. %@CR:MCVgD032@%%@4@%%@AB@%cursor%@AE@%%@EH@%%@NL@%
  17944.   The thin blinking line that represents the current location where the next
  17945.   character you type appears. The cursor automatically moves to the dialog
  17946.   window when you start entering a command.%@NL@%
  17947. %@NL@%
  17948. %@CR:MCVgD033@%%@4@%%@AB@%debugger%@AE@%%@EH@%%@NL@%
  17949.   A program that helps the programmer locate the source of problems found
  17950.   during runtime testing of a program.%@NL@%
  17951. %@NL@%
  17952. %@CR:MCVgD034@%%@4@%%@AB@%dialog box%@AE@%%@EH@%%@NL@%
  17953.   A box that appears when you choose a menu command that requires additional
  17954.   information.%@NL@%
  17955. %@NL@%
  17956. %@CR:MCVgD035@%%@4@%%@AB@%dialog commands%@AE@%%@EH@%%@NL@%
  17957.   Commands entered in the dialog window in window mode, or any command in
  17958.   sequential mode. Dialog commands consist of one- or two-character commands
  17959.   that can usually be followed by arguments.%@NL@%
  17960. %@NL@%
  17961. %@CR:MCVgD036@%%@4@%%@AB@%dialog window%@AE@%%@EH@%%@NL@%
  17962.   The window at the bottom of the CodeView screen where dialog commands can
  17963.   be entered and previously entered dialog commands can be reviewed.%@NL@%
  17964. %@NL@%
  17965. %@CR:MCVgD037@%%@4@%%@AB@%double precision%@AE@%%@EH@%%@NL@%
  17966.   A real (floating-point) value that occupies eight bytes of memory.
  17967.   Double-precision values are accurate to 15 or 16 digits.%@NL@%
  17968. %@NL@%
  17969. %@CR:MCVgD038@%%@4@%%@AB@%drag%@AE@%%@EH@%%@NL@%
  17970.   To point the mouse at an object on the screen, press a mouse button, and
  17971.   then move the mouse while holding the button down.%@NL@%
  17972. %@NL@%
  17973. %@CR:MCVgD039@%%@4@%%@AB@%dump%@AE@%%@EH@%%@NL@%
  17974.   Contents of memory displayed at a specified memory location. In the
  17975.   CodeView debugger, the size of the object to be displayed is specified
  17976.   with a type character from the following list: %@AB@%A%@AE@% (ASCII), %@AB@%B%@AE@% (Byte), %@AB@%I%@AE@%
  17977.   (Integer), %@AB@%U%@AE@% (Unsigned Integer), %@AB@%W%@AE@% (Word), %@AB@%D%@AE@% (Double Word), %@AB@%SP%@AE@% (Short
  17978.   Real), %@AB@%L%@AE@% (Long Real), or %@AB@%T%@AE@% (10-Byte Real).%@NL@%
  17979. %@NL@%
  17980. %@CR:MCVgD040@%%@4@%%@AB@%dynamic link%@AE@%%@EH@%%@NL@%
  17981.   A method of postponing the resolution of external references until
  17982.   loadtime or runtime. A dynamic link allows the called subroutines to be
  17983.   packaged, distributed, and maintained independently of their callers. OS/2
  17984.   extends the dynamic link mechanism to serve as the primary method by which
  17985.   all system and nonsystem services are obtained.%@NL@%
  17986. %@NL@%
  17987. %@CR:MCVgD041@%%@4@%%@AB@%dynamic-link library%@AE@%%@EH@%%@NL@%
  17988.   A file, in a special format, that contains the binary code for a group of
  17989.   dynamically linked subroutines.%@NL@%
  17990. %@NL@%
  17991. %@CR:MCVgD042@%%@4@%%@AB@%dynamic-link routine%@AE@%%@EH@%%@NL@%
  17992.   See "dynamic link."%@NL@%
  17993. %@NL@%
  17994. %@CR:MCVgD043@%%@4@%%@AB@%Enhanced graphics adapter (EGA)%@AE@%%@EH@%%@NL@%
  17995.   A video adapter capable of displaying in all the modes of the color
  17996.   graphics adapter (CGA) plus additional modes. The CodeView 43 option
  17997.   displays in the EGA's 43-line text mode.%@NL@%
  17998. %@NL@%
  17999. %@CR:MCVgD044@%%@4@%%@AB@%environment strings%@AE@%%@EH@%%@NL@%
  18000.   A series of user-definable and program-definable strings associated with
  18001.   each process. The initial values of environment strings are established by
  18002.   a process's parent.%@NL@%
  18003. %@NL@%
  18004. %@CR:MCVgD045@%%@4@%%@AB@%environment table%@AE@%%@EH@%%@NL@%
  18005.   The part of MS-DOS that stores environment variables and their values.%@NL@%
  18006. %@NL@%
  18007. %@CR:MCVgD046@%%@4@%%@AB@%environment variable%@AE@%%@EH@%%@NL@%
  18008.   A variable stored in the environment table that provides MS-DOS with
  18009.   information (where to find executable files and library files, where to
  18010.   create  temporary files, etc.).%@NL@%
  18011. %@NL@%
  18012. %@CR:MCVgD047@%%@4@%%@AB@%Esc%@AE@%%@EH@%%@NL@%
  18013.   Escape key.%@NL@%
  18014. %@NL@%
  18015. %@CR:MCVgD048@%%@4@%%@AB@%escape sequence%@AE@%%@EH@%%@NL@%
  18016.   A specific combination of a backslash (\) followed by a letter or
  18017.   combination of digits. The combination represents white-space and
  18018.   nongraphic characters within strings and character constants.%@NL@%
  18019. %@NL@%
  18020. %@CR:MCVgD049@%%@4@%%@AB@%executable file%@AE@%%@EH@%%@NL@%
  18021.   A file with an extension of .EXE, .COM, .BAT, or .CMD. Executable files
  18022.   can be run by typing the file name at the system prompt.%@NL@%
  18023. %@NL@%
  18024. %@CR:MCVgD050@%%@4@%%@AB@%executable program%@AE@%%@EH@%%@NL@%
  18025.   A file that contains executable program code. When the name of the file is
  18026.   typed at the system prompt, the statements in the file are executed.%@NL@%
  18027. %@NL@%
  18028. %@CR:MCVgD051@%%@4@%%@AB@%exit code%@AE@%%@EH@%%@NL@%
  18029.   A code returned by a program to MS-DOS indicating whether the program ran
  18030.   successfully.%@NL@%
  18031. %@NL@%
  18032. %@CR:MCVgD052@%%@4@%%@AB@%expression%@AE@%%@EH@%%@NL@%
  18033.   A combination of operands and operators that yields a single value.%@NL@%
  18034. %@NL@%
  18035. %@CR:MCVgD053@%%@4@%%@AB@%Family Applications Program Interface (Family API)%@AE@%%@EH@%%@NL@%
  18036.   A standard execution environment under MS-DOS versions 2.x and 3.x and
  18037.   OS/2. The programmer can use the Family API to create an application that
  18038.   uses a subset of OS/2 functions (but a superset of MS-DOS 3.x functions)
  18039.   and that runs in a binary-compatible fashion under MS-DOS versions 2.x and
  18040.   3.x and OS/2.%@NL@%
  18041. %@NL@%
  18042. %@CR:MCVgD054@%%@4@%%@AB@%far address%@AE@%%@EH@%%@NL@%
  18043.   A memory location specified by using a segment (location of a 64K block)
  18044.   and an offset from the beginning of the segment. Far addresses require
  18045.   four bytes──two for the segment and two for the offset. A far address is
  18046.   also known as a segmented address. See  "near address."%@NL@%
  18047. %@NL@%
  18048. %@CR:MCVgD055@%%@4@%%@AB@%file%@AE@%%@EH@%%@NL@%
  18049.   A named collection of information stored on a disk. The file usually
  18050.   contains either data or a program.%@NL@%
  18051. %@NL@%
  18052. %@CR:MCVgD056@%%@4@%%@AB@%flags%@AE@%%@EH@%%@NL@%
  18053.   A register that contains individual bits, each of which signals a
  18054.   condition that can be tested by a machine-level instruction. In other
  18055.   registers, the contents of the register are considered as a whole, while
  18056.   in the flags register only the individual bits have meaning. In the
  18057.   CodeView debugger, the current values of the most commonly used bits of
  18058.   the flags register are shown at the bottom of the register window. See
  18059.   "registers."%@NL@%
  18060. %@NL@%
  18061. %@CR:MCVgD057@%%@4@%%@AB@%flipping%@AE@%%@EH@%%@NL@%
  18062.   A screen-exchange method that uses the video pages of the CGA or EGA to
  18063.   store both the debugging and output screens. Video pages are areas of
  18064.   memory reserved for screen storage. When you request the other screen, the
  18065.   two video pages are exchanged. This method is faster than swapping──the
  18066.   other screen-exchange method──but it does not work with the MA or with
  18067.   programs that do graphics or use the video pages. See also "screen
  18068.   exchange" and "swapping."%@NL@%
  18069. %@NL@%
  18070. %@CR:MCVgD058@%%@4@%%@AB@%function%@AE@%%@EH@%%@NL@%
  18071.   A subroutine or procedure that returns a value.%@NL@%
  18072. %@NL@%
  18073. %@CR:MCVgD059@%%@4@%%@AB@%function call%@AE@%%@EH@%%@NL@%
  18074.   A call to a a subroutine that performs a specific action. In C (source
  18075.   mode), subroutines are called functions. In assembly language (assembly
  18076.   mode), subroutines are called procedures.%@NL@%
  18077. %@NL@%
  18078. %@CR:MCVgD060@%%@4@%%@AB@%global symbol%@AE@%%@EH@%%@NL@%
  18079.   A symbol that is available throughout the entire program. In the CodeView
  18080.   debugger, function names are always global symbols. See also "local
  18081.   symbol."%@NL@%
  18082. %@NL@%
  18083. %@CR:MCVgD061@%%@4@%%@AB@%global variable%@AE@%%@EH@%%@NL@%
  18084.   A variable that is available throughout a module.%@NL@%
  18085. %@NL@%
  18086. %@CR:MCVgD062@%%@4@%%@AB@%grandparent process%@AE@%%@EH@%%@NL@%
  18087.   The parent process of a process that created a process.%@NL@%
  18088. %@NL@%
  18089. %@CR:MCVgD063@%%@4@%%@AB@%hexadecimal%@AE@%%@EH@%%@NL@%
  18090.   The base-16 numbering system whose digits are 0 through F (the letters A
  18091.   through F represent the decimal numbers 10 through 15). Hexadecimal is
  18092.   often used in computer programming because it is easily converted to and
  18093.   from binary, the base-2 numbering system the computer itself uses.%@NL@%
  18094. %@NL@%
  18095. %@CR:MCVgD064@%%@4@%%@AB@%highlight%@AE@%%@EH@%%@NL@%
  18096.   A reverse-video area in a text box, window, or menu marking the current
  18097.   command chosen or text that has been selected for copying or deleting.%@NL@%
  18098. %@NL@%
  18099. %@CR:MCVgD065@%%@4@%%@AB@%I/O privilege mechanism%@AE@%%@EH@%%@NL@%
  18100.   A facility that allows a process to ask a device driver for direct access
  18101.   to the device's I/O ports and any dedicated or mapped memory locations it
  18102.   has. The I/O privilege mechanism can be used directly by an application or
  18103.   indirectly by a dynamic-link package.%@NL@%
  18104. %@NL@%
  18105. %@CR:MCVgD066@%%@4@%%@AB@%identifier%@AE@%%@EH@%%@NL@%
  18106.   A name that identifies a register or a location in memory. The terms
  18107.   identifier and symbol are used synonymously in CodeView documentation.%@NL@%
  18108. %@NL@%
  18109. %@CR:MCVgD067@%%@4@%%@AB@%IEEE format (Institute for Electrical and Electronic Engineers, Inc.)%@AE@%%@EH@%%@NL@%
  18110.   A method of representing floating-point numbers internally.%@NL@%
  18111. %@NL@%
  18112. %@CR:MCVgD068@%%@4@%%@AB@%include file%@AE@%%@EH@%%@NL@%
  18113.   A source file that is merged into a program with the %@AB@%$INCLUDE%@AE@% metacommand
  18114.   or the C %@AB@%#include%@AE@% directive.%@NL@%
  18115. %@NL@%
  18116. %@CR:MCVgD069@%%@4@%%@AB@%integer%@AE@%%@EH@%%@NL@%
  18117.   A whole number represented inside the machine as a 16-bit two's complement
  18118.   binary number. An integer has a range of -32,768 to +32,767. See "long
  18119.   integer."%@NL@%
  18120. %@NL@%
  18121. %@CR:MCVgD070@%%@4@%%@AB@%interrupt call%@AE@%%@EH@%%@NL@%
  18122.   A machine-level procedure that can be called to execute a BIOS, MS-DOS, or
  18123.   other function. You can trace into BIOS interrupts with the CodeView
  18124.   debugger, but not into the MS-DOS interrupt (0x21).%@NL@%
  18125. %@NL@%
  18126. %@CR:MCVgD071@%%@4@%%@AB@%label%@AE@%%@EH@%%@NL@%
  18127.   A symbol (identifier) representing an address in the code segment (CS)
  18128.   register. Labels in C programs can be either function names or labels for
  18129.   goto statements.%@NL@%
  18130. %@NL@%
  18131. %@CR:MCVgD072@%%@4@%%@AB@%link%@AE@%%@EH@%%@NL@%
  18132.   The step that the linker performs to produce an executable file. The link
  18133.   step resolves references to procedures or variables in other modules and
  18134.   creates a complete program ready for execution.%@NL@%
  18135. %@NL@%
  18136. %@CR:MCVgD073@%%@4@%%@AB@%linking%@AE@%%@EH@%%@NL@%
  18137.   The process in which the linker loads modules into memory, computes
  18138.   absolute offset addresses for routines  and variables in relocatable
  18139.   modules, and resolves all external references by searching the run-time
  18140.   library. After loading and linking, the linker saves the modules it has
  18141.   loaded into memory as a single executable file.%@NL@%
  18142. %@NL@%
  18143. %@CR:MCVgD074@%%@4@%%@AB@%local symbol%@AE@%%@EH@%%@NL@%
  18144.   A symbol that only has value within a particular function. A function
  18145.   argument or a variable declared as auto or static within a function can be
  18146.   a local symbol. See "global symbol."%@NL@%
  18147. %@NL@%
  18148. %@CR:MCVgD075@%%@4@%%@AB@%local variable%@AE@%%@EH@%%@NL@%
  18149.   A variable whose scope is confined to a particular unit of code, such as
  18150.   the module-level code, or a procedure within a module.%@NL@%
  18151. %@NL@%
  18152. %@CR:MCVgD076@%%@4@%%@AB@%long integer%@AE@%%@EH@%%@NL@%
  18153.   A whole number represented inside the machine by a 32-bit two's complement
  18154.   value. Long integers have a range of -2,147,483,648 to +2,147,483,647. See
  18155.   "integer."%@NL@%
  18156. %@NL@%
  18157. %@CR:MCVgD077@%%@4@%%@AB@%lvalue%@AE@%%@EH@%%@NL@%
  18158.   An expression (such as a variable name) that refers to a single memory
  18159.   location and is required as the left-hand operand of an assignment
  18160.   operation or the single operand of a unary operator. For example, %@AS@%X1%@AE@% is an
  18161.   lvalue, but %@AS@%X1+X2%@AE@% is not.%@NL@%
  18162. %@NL@%
  18163. %@CR:MCVgD078@%%@4@%%@AB@%machine code%@AE@%%@EH@%%@NL@%
  18164.   A series of binary numbers that a microprocessor executes as program
  18165.   instructions.%@NL@%
  18166. %@NL@%
  18167. %@CR:MCVgD079@%%@4@%%@AB@%macro%@AE@%%@EH@%%@NL@%
  18168.   A method for representing a long series of characters or statements with a
  18169.   symbol.  The macro is expanded by the C or MASM preprocessor.  C and MASM
  18170.   each have their own conventions for defining macros.%@NL@%
  18171. %@NL@%
  18172. %@CR:MCVgD080@%%@4@%%@AB@%math coprocessor%@AE@%%@EH@%%@NL@%
  18173.   An optional hardware component, such as an 8087 or  80287 chip, that
  18174.   improves the speed of arithmetic involving floating-point numbers.%@NL@%
  18175. %@NL@%
  18176. %@CR:MCVgD081@%%@4@%%@AB@%menu bar%@AE@%%@EH@%%@NL@%
  18177.   The bar at the top of the CodeView display containing menu titles and the
  18178.   titles Trace and Go.%@NL@%
  18179. %@NL@%
  18180. %@CR:MCVgD082@%%@4@%%@AB@%Microsoft binary format%@AE@%%@EH@%%@NL@%
  18181.   A method of representing floating-point numbers internally.%@NL@%
  18182. %@NL@%
  18183. %@CR:MCVgD083@%%@4@%%@AB@%module%@AE@%%@EH@%%@NL@%
  18184.   A discrete group of statements. Every program has at least one module (the
  18185.   main module). In most cases, each module corresponds to one source file.
  18186.   When you save a program containing multiple modules, each module is saved
  18187.   in a separate disk file.%@NL@%
  18188. %@NL@%
  18189. %@CR:MCVgD084@%%@4@%%@AB@%Monochrome Adapter (MA)%@AE@%%@EH@%%@NL@%
  18190.   A video adapter capable of displaying only in black and white. Most
  18191.   monochrome adapters display text only; individual graphics pixels cannot
  18192.   be displayed. The CodeView debugger recognizes monochrome adapters and
  18193.   automatically selects swapping as the screen-exchange mode.%@NL@%
  18194. %@NL@%
  18195. %@CR:MCVgD085@%%@4@%%@AB@%mouse%@AE@%%@EH@%%@NL@%
  18196.   A pointing device that fits under your hand and rolls in any direction on
  18197.   a flat surface. By moving the mouse, you can move the mouse pointer in a
  18198.   corresponding direction on the screen. See "pointer."%@NL@%
  18199. %@NL@%
  18200. %@CR:MCVgD086@%%@4@%%@AB@%mouse pointer%@AE@%%@EH@%%@NL@%
  18201.   The reverse-video square that moves to indicate the current position of
  18202.   the mouse. The mouse pointer only appears if a mouse is installed. To
  18203.   select an item with the mouse, move the mouse until the pointer rests on
  18204.   the item.%@NL@%
  18205. %@NL@%
  18206. %@CR:MCVgD087@%%@4@%%@AB@%multitasking operating system%@AE@%%@EH@%%@NL@%
  18207.   An operating system in which two or more programs/threads can execute
  18208.   simultaneously.%@NL@%
  18209. %@NL@%
  18210. %@CR:MCVgD088@%%@4@%%@AB@%NAN%@AE@%%@EH@%%@NL@%
  18211.   An acronym that stands for "not a number." The 8087 or 80287 coprocessor
  18212.   generates NANs when the result of an operation cannot be represented in
  18213.   the IEEE format. For example, if you try to add two positive numbers whose
  18214.   sum is larger than the maximum value supported by the data type, the
  18215.   coprocessor returns a NAN instead of the sum.%@NL@%
  18216. %@NL@%
  18217. %@CR:MCVgD089@%%@4@%%@AB@%near address%@AE@%%@EH@%%@NL@%
  18218.   A memory location specified by using only the offset from the start of the
  18219.   segment. A near address requires only two bytes. See "far address."%@NL@%
  18220. %@NL@%
  18221. %@CR:MCVgD090@%%@4@%%@AB@%null pointer%@AE@%%@EH@%%@NL@%
  18222.   A pointer to nothing, expressed as the integer value 0.%@NL@%
  18223. %@NL@%
  18224. %@CR:MCVgD091@%%@4@%%@AB@%object file%@AE@%%@EH@%%@NL@%
  18225.   A file (with the extension .OBJ) containing relocatable machine code
  18226.   produced by compiling a program and used by the linker to form an
  18227.   executable file.%@NL@%
  18228. %@NL@%
  18229. %@CR:MCVgD092@%%@4@%%@AB@%object module%@AE@%%@EH@%%@NL@%
  18230.   The contents of an object file after the file has been made part of a
  18231.   stand-alone library.%@NL@%
  18232. %@NL@%
  18233. %@CR:MCVgD093@%%@4@%%@AB@%object range%@AE@%%@EH@%%@NL@%
  18234.   See "address range."%@NL@%
  18235. %@NL@%
  18236. %@CR:MCVgD094@%%@4@%%@AB@%offset%@AE@%%@EH@%%@NL@%
  18237.   The number of bytes from the beginning of a segment in memory to a
  18238.   particular byte in that segment.%@NL@%
  18239. %@NL@%
  18240. %@CR:MCVgD095@%%@4@%%@AB@%output screen%@AE@%%@EH@%%@NL@%
  18241.   The screen where program output is shown. The Screen Exchange command (\),
  18242.   Output from the View menu, and the F4 key can be used to switch to this
  18243.   screen. The output screen is the same as it would be if you ran the
  18244.   debugged program outside of the CodeView debugger.%@NL@%
  18245. %@NL@%
  18246. %@CR:MCVgD096@%%@4@%%@AB@%parent process%@AE@%%@EH@%%@NL@%
  18247.   A process that creates another process, called the child process.%@NL@%
  18248. %@NL@%
  18249. %@CR:MCVgD097@%%@4@%%@AB@%PID (Process Identification Number)%@AE@%%@EH@%%@NL@%
  18250.   A unique code that OS/2 assigns to a process when the process is created.
  18251.   The PID may be any value except 0.%@NL@%
  18252. %@NL@%
  18253. %@CR:MCVgD098@%%@4@%%@AB@%pointer%@AE@%%@EH@%%@NL@%
  18254.   A variable containing the address of another variable. See "mouse
  18255.   pointer."%@NL@%
  18256. %@NL@%
  18257. %@CR:MCVgD099@%%@4@%%@AB@%popup menu%@AE@%%@EH@%%@NL@%
  18258.   A menu that pops up when you point the mouse cursor to the menu title and
  18259.   press a mouse button. In the CodeView debugger, popup menus also pop up
  18260.   when you press the ALT key and the first letter of the menu title at the
  18261.   same time. You can make a selection from the menu by dragging the
  18262.   highlight up or down with the mouse, by pressing the UP or DOWN direction
  18263.   key to move the highlight, or by pressing the ALT key and the first letter
  18264.   of the selection title at the same time.%@NL@%
  18265. %@NL@%
  18266. %@CR:MCVgD100@%%@4@%%@AB@%port%@AE@%%@EH@%%@NL@%
  18267.   The electrical connection through which the computer sends and receives
  18268.   data to and from devices or other computers.%@NL@%
  18269. %@NL@%
  18270. %@CR:MCVgD101@%%@4@%%@AB@%precedence%@AE@%%@EH@%%@NL@%
  18271.   The relative position of an operator in the hierarchy that determines the
  18272.   order in which expressions are evaluated.%@NL@%
  18273. %@NL@%
  18274. %@CR:MCVgD102@%%@4@%%@AB@%printf%@AE@%%@EH@%%@NL@%
  18275.   A function in the C standard library that prints formatted output
  18276.   according to instructions supplied with a type-specifier argument. The
  18277.   CodeView debugger uses a subset of the %@AB@%printf%@AE@% type specifiers to format
  18278.   expression values.%@NL@%
  18279. %@NL@%
  18280. %@CR:MCVgD103@%%@4@%%@AB@%privilege mode%@AE@%%@EH@%%@NL@%
  18281.   A special execution mode (also known as ring 0) supported by the
  18282.   80286/80386 hardware. Code executing in this mode can execute restricted
  18283.   instructions that are used to manipulate key system structures and tables.
  18284.   Only the OS/2 kernel and device drivers run in this mode.%@NL@%
  18285. %@NL@%
  18286. %@CR:MCVgD104@%%@4@%%@AB@%procedure%@AE@%%@EH@%%@NL@%
  18287.   A general term for a SUB or FUNCTION.%@NL@%
  18288. %@NL@%
  18289. %@CR:MCVgD105@%%@4@%%@AB@%procedure call%@AE@%%@EH@%%@NL@%
  18290.   A call to a subroutine that performs a specific action. In assembly
  18291.   language (assembly mode), subroutines are called procedures. In C (source
  18292.   mode), subroutines are called functions.%@NL@%
  18293. %@NL@%
  18294. %@CR:MCVgD106@%%@4@%%@AB@%process%@AE@%%@EH@%%@NL@%
  18295.   The executing instance of a binary file. In OS/2, the terms task and
  18296.   process are used interchangeably. A process is the unit of ownership, and
  18297.   processes own resources such as memory, open files, dynlink libraries, and
  18298.   semaphores.%@NL@%
  18299. %@NL@%
  18300. %@CR:MCVgD107@%%@4@%%@AB@%processor%@AE@%%@EH@%%@NL@%
  18301.   See "CPU."%@NL@%
  18302. %@NL@%
  18303. %@CR:MCVgD108@%%@4@%%@AB@%program step%@AE@%%@EH@%%@NL@%
  18304.   To trace the next source line in source mode or the next instruction in
  18305.   assembly mode. If the source line or instruction contains a function,
  18306.   procedure, or interrupt call, the call is executed to the end and the
  18307.   CodeView debugger is ready to execute the instruction after the call. See
  18308.   "trace."%@NL@%
  18309. %@NL@%
  18310. %@CR:MCVgD109@%%@4@%%@AB@%protected mode%@AE@%%@EH@%%@NL@%
  18311.   The operating mode of the 80286 or 80386 microprocessor that allows the
  18312.   operating system to use features that protect one application from another
  18313.   (also called protect mode). Protected mode in OS/2 supports multitasking
  18314.   and a whole range of special services not supported in DOS.%@NL@%
  18315. %@NL@%
  18316. %@CR:MCVgD110@%%@4@%%@AB@%radix%@AE@%%@EH@%%@NL@%
  18317.   The number system in which numbers are specified. In the CodeView
  18318.   debugger, numbers can be entered in three radixes: 8 (octal), 10
  18319.   (decimal), or 16 (hexadecimal). The default radix is 10.%@NL@%
  18320. %@NL@%
  18321. %@CR:MCVgD111@%%@4@%%@AB@%real mode%@AE@%%@EH@%%@NL@%
  18322.   The operating mode of the 80286 or 80386 microprocessor that runs programs
  18323.   designed for the 8086/8088 microprocessor. All programs for the DOS
  18324.   environment run in real mode.%@NL@%
  18325. %@NL@%
  18326. %@CR:MCVgD112@%%@4@%%@AB@%redirection%@AE@%%@EH@%%@NL@%
  18327.   To specify the device from which a program will receive input or to which
  18328.   it will send output. Normally program input comes from the keyboard, and
  18329.   program output goes to the screen. Redirection involves specifying a
  18330.   device (or file) other than the default device. In the MS-DOS operating
  18331.   system, input is redirected with the less-than symbol (<) and output is
  18332.   redirected with the greater-than symbol (>). The same symbols are used in
  18333.   the CodeView debugger to redirect input or output of the debugging
  18334.   session. In addition, the equal sign (=) can be used to redirect both
  18335.   input and output.%@NL@%
  18336. %@NL@%
  18337. %@CR:MCVgD113@%%@4@%%@AB@%register window%@AE@%%@EH@%%@NL@%
  18338.   The optional window in which the central processing unit (CPU) registers
  18339.   and the bits of the flag register are displayed.%@NL@%
  18340. %@NL@%
  18341. %@CR:MCVgD114@%%@4@%%@AB@%registers%@AE@%%@EH@%%@NL@%
  18342.   Special memory within the processor, where byte- or word-sized data can be
  18343.   stored during m