News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Assembler problems

Started by ahsat, April 01, 2024, 11:13:53 AM

Previous topic - Next topic

ahsat

The 32 bit assembler that comes with Visual Studio 2022 seem to have problems with the MASM32 SDK.

If I assemble with the assembler that comes with the SDK, all is well as demonstrated below:
d:\masm32\AnyBase32>D:\masm32\bin\ml.exe /c /coff AnyBase.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

 Assembling: AnyBase.asm

***********
ASCII build
***********

If I assemble with the one that comes with Visual Stufio 2022, I get this:D:\masm32\AnyBase32>ml.exe /c /coff AnyBase.asm
Microsoft (R) Macro Assembler Version 14.39.33522.0
Copyright (C) Microsoft Corporation.  All rights reserved.

 Assembling: AnyBase.asm

***********
ASCII build
***********

\masm32\include\windows.inc(24749) : error A2042:statement too complex
\masm32\include\winextra.inc(11052) : error A2026:constant expected
\masm32\include\winextra.inc(11053) : error A2026:constant expected

Does anyone know what is wrong?

I want to use the debugger in Visual Studio, and I don't know how to make it use the assembler that comes with the MASM32 SDK.

jj2007

Quote from: ahsat on April 01, 2024, 11:13:53 AMDoes anyone know what is wrong?

Quote from: jj2007 on August 29, 2017, 08:25:15 PMIt seems that ML 14.0 is unusable for serious work

Use UAsm and OllyDbg. Don't waste time with that behemoth of Visual Crap.

NoCforMe

Use the MASM32 assembler, not the VC mess as JJ posted.

Microsoft (R) Macro Assembler Version 6.14.8444

is the one that works for me. (32-bit)
Assembly language programming should be fun. That's why I do it.

ahsat

Quote from: jj2007 on April 01, 2024, 11:42:14 AMUse UAsm and OllyDbg. Don't waste time with that behemoth of Visual Crap.
How would you do that with the Visual Studio debugger. As best I know, Visual Studio stuff insists on using the MS assembler.

Do you possibly know how to configure Visual Studio to use a different assembler?

ahsat

Quote from: NoCforMe on April 01, 2024, 11:51:49 AMMicrosoft (R) Macro Assembler Version 6.14.8444
How do I use that with the Visual Studio debugger?

sinsi

The VS debugger doesn't care about how an EXE was produced, as long as you have a PDB file it will open any Windows EXE. You could probably use the MASM32 version of ML, there should be an option somewhere (Projet Properties I think).

jj2007

Quote from: ahsat on April 01, 2024, 12:44:13 PM
QuoteUse UAsm and OllyDbg. Don't waste time with that behemoth of Visual Crap.
How would you do that with the Visual Studio debugger. As best I know, Visual Studio stuff insists on using the MS assembler.

Simple answer: don't use the VS debugger. Generations of coders have fallen in love with OllyDbg, and there are good reasons for that. Just open your executable in OllyDbg.exe, then
- hit F7 to advance one instruction
- hit F8 to advance one instruction without diving into a call whatever
- hit F9 to run the code until it hits a problem or an int 3 instruction that you inserted in an interesting location.

NoCforMe

How does the VS debugger compare to Olly? Any features that Olly doesn't have?
Assembly language programming should be fun. That's why I do it.

C3

Quote from: ahsat on April 01, 2024, 12:44:13 PM
Quote from: jj2007 on April 01, 2024, 11:42:14 AMUse UAsm and OllyDbg. Don't waste time with that behemoth of Visual Crap.
How would you do that with the Visual Studio debugger. As best I know, Visual Studio stuff insists on using the MS assembler.

Do you possibly know how to configure Visual Studio to use a different assembler?

With the Visual Studio use the Assembler that comes in Visual C++ workload. You can use both 32-bit and 64-bit tools that are included with that. Also its very nice debugger what is in the Visual Studio.

There are frequent upgrades for Visual Studio about once a month. Also its very handy to search missing pieces from C/C++ headers that ins't already in Hutch's SDK.

If you are up-to something else, like UASM and OllyDbg/x64dbg you might want to do what JJ said. Its a choise of two different "workloads".

C3

Quote from: NoCforMe on April 01, 2024, 08:31:06 PMHow does the VS debugger compare to Olly? Any features that Olly doesn't have?

It's not that hard to check whats in the VS Debugger(?). Can't remember all differences, I haven't used Olly or x64dbg, x32dbg for a while. I have also forgotten tools like GDB etc. where isnt a GUI to use.

jj2007

Quote from: C3 on April 01, 2024, 10:56:15 PMCan't remember all differences

Can you remember at least one difference that would make it better than Olly?

C3

Quote from: jj2007 on April 01, 2024, 11:13:06 PM
Quote from: C3 on April 01, 2024, 10:56:15 PMCan't remember all differences

Can you remember at least one difference that would make it better than Olly?


Integration with MS other tools, C/C++,VB,.NET. Get's all symbols when needed in debugging those and MS libraries. Also when I have to pick up some new skills and translate them to MASM its giving me some advantage. Like I'm currently doing with GDI+.

Heres the proof, I had used it more than once.

20/07/2014  17:10           115,034 Disasm201.zip
12/07/2005  21:41         1,116,546 odbg110.zip
18/07/2010  21:04         1,266,059 odbg200.zip
24/11/2016  01:43         6,965,278 odbg201.zip
08/10/2011  12:33         2,328,395 odbg201d.zip

ahsat

Quote from: jj2007 on April 01, 2024, 07:22:44 PMGenerations of coders have fallen in love with OllyDbg
I have never heard of OllyDbg, but I will sure give it a try. I have never like Microsoft tools very much. They are always overly complicated and controlling.

I keep telling you guys, I am very much out of date with my knowledge of modern development tools.

ahsat

Quote from: NoCforMe on April 01, 2024, 08:31:06 PMAny features that Olly doesn't have?
I don't know. I have never tried OllyDbg or heard of it until just now. I have only used VS for a few days. I certainly will give OllyDbg a try. Usually almost anything is better than Microsoft tools.

ahsat

Quote from: C3 on April 01, 2024, 10:56:15 PMIt's not that hard to check whats in the VS Debugger(?)
Be sure to read the original post and the last line of the first post in this thread. I would be fine with the assembler that comes with VS if it worked.