Debug Win32 Assembler with vc6 debugger source code

Source: Internet
Author: User

Debug Win32 Assembler with vc6 debugger source code

 

Using a good debugger is undoubtedly crucial to learning Win32 Assembly. I prefer the powerful debugging environment of VC rather than makefile files.
Programming Environment: vc6.0 and masm32v8

The method is as follows:
1. Use vc6 to create an empty project, such as test (Win32 console, Win32 application, etc ).
2. copy the files in the assembly project to the directory of the new project (hello. ASM, hello. RC), and add these files to the project *. add ASM to source files and Set *. add RC to resource files ).
3. Configure the IDE:
(1), tools/option... Add a path D:/masm32/include in/paths (include files). Assume that your masm32v8 is installed on D:/masm32.
(2) Open Project Settings, click *. ASM file selection (custom build ),
Command: ml/C/COFF/Zi/fo $ (targetdir)/$ (inputname). OBJ $ (inputpath)
Add $ (targetdir)/$ (inputname). OBJ to the output.
Select Settings for: Win32 debug and Win32 release, and add the above two.
(32.16.pdf copy ml.exe and ML. Err from win32asmto C:/program files/Microsoft Visual Studio/vc98/bin

5. Click compile of VC to run the program.
Now you can use the VC debugger to debug the assembler at the source code level. You can set breakpoints to view variables, memory, registers, and so on, when a syntax error occurs in MASM, you can double-click the error row in the output window to locate the specified row in the program.

In order not to generate a large pre-compiled header file XXXX. PCH in the debug and release directories, select

"Do not use the pre-compiled Header", in fact, the current computer can quickly compile C code without the pre-compiled header.

In fact, I just want to tell you how to set the environment of vc6.0 for Mixed Programming of C and masm32. For the specific debug operation method, if you have used vc6.0 to debug C/C ++,

Asm32 will be debugged, and the methods are uniform,

 

I feel much better than using makefile, and the resource compilation/editor is also quite useful. I still don't understand the problem: Resource compilation/Editor of vc6.0 does not support hexadecimal resource ID,

I have to use a 10-digit system. I have two solutions: one is to change the ID in the resource file *. RC to a 10-digit system;

The second is to directly use the RC file in the old Luo book, but do not open and edit it in vc6.0. can someone tell me how to use the hexadecimal ID in the resource editor of vc6.0? Maybe this is very simple. I didn't go into it.

The debugging method I mentioned is source code debug of vc6.0, which can be changed and tuned like debugging C source code. You will see it during tracking, debug window will be in C source code later,

It will be very convenient in the ASM source code later!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.