If you are looking for a way to debug your assembly programs written with MASM32, you might be interested in using the CodeView debugger. CodeView is a text-based debugger that allows you to step through your code line by line, inspect registers, memory, variables, and watch expressions. CodeView was originally developed by Microsoft for DOS and Windows 3.x, but it can also be used with MASM32 on modern Windows systems.
In this article, we will show you how to download CodeView debugger for MASM32 15 and how to use it with the MASM editor. We will also give you some tips and tricks for using CodeView effectively.
Downloading CodeView Debugger For MASM32 15
The first step is to download the CodeView debugger executable file (CV.EXE) from a reliable source. One such source is the University of Hawaii website[^1^], where you can find a link to download CV.EXE along with some instructions on how to use it. Alternatively, you can use this direct link[^2^] to download CV.EXE from the same website.
Once you have downloaded CV.EXE, you need to copy it to your MASM32 installation directory (usually C:\\\\MASM32). This will allow you to run CodeView from the MASM editor without specifying the full path.
Using CodeView Debugger With MASM Editor
The next step is to use the MASM editor to create a batch file that will compile, link, and debug your assembly program with CodeView. The MASM editor is a simple text editor that comes with the MASM32 SDK and has some useful features for writing and running assembly code.
To create the batch file, open your assembly source code file (.asm) with the MASM editor and use the Script menu option to select Create EXE makeit.bat. This will generate a file called makeit.bat in the same directory as your source code file. This file contains commands to assemble and link your program with debug information and then run it with CodeView.
You can edit this file to add or modify some options for the compiler (ml) and linker (link) commands. For example, you can add /Zi /Zd /Zf options to ml to generate more debug information, /FR option to generate browse information, /Fm option to generate a map file, /Fl option to generate an assembled code listing, and /W3 option to generate warnings. You can also add /DEBUG /DEBUGTYPE:CV options to link to enable debugging with CodeView[^3^].
After editing the batch file, save it and run it by double-clicking on it or by using the Run menu option in the MASM editor. This will open a command prompt window where you will see the output of the compiler and linker commands. If there are no errors, CodeView will start automatically and load your program.
Tips and Tricks For Using CodeView Debugger
CodeView is a powerful debugger that has many features and commands that can help you find and fix bugs in your assembly code. Here are some basic tips and tricks for using CodeView effectively:
Use F8 (Trace) key to step through your code line by line, including tracing into called functions and procedures.
Use F10 (Step) key to step over called functions and procedures without tracing into them.
Use F4 (Switch) key to switch between the debugger screen and the output screen.
Use F5 (Go) key to run your program until a breakpoint or an error occurs.
Use Ctrl-F5 (Restart) key to restart your program from the beginning.
Use Ctrl-Break (Stop) key to stop your program execution at any point.
Use Data menu option to add watch expressions for variables, registers, memory locations, or expressions that you want to monitor.
Use Windows menu option to open or close different windows such as Source, Register, Memory, Watch, Command, etc.
Use Windows Arrange menu option to arrange the windows in a ec8f644aee