The MASM Forum Archive 2004 to 2012

Specialised Projects => Compiler Based Assembler => Assembler With Microsoft Visual C => Topic started by: GregL on May 19, 2005, 04:54:21 AM

Title: View MASM ASCIIZ Strings in Visual Studio Debugger
Post by: GregL on May 19, 2005, 04:54:21 AM
This is something I discovered once before and had forgotten. I just discovered how to do it again. I thought I would pass it along.

To view an ASCIIZ string from a MASM program in the Visual Studio debugger Watch window:

Use the string name as follows:

&szString,s

  or, the following will display the address of the string and then the string:

&szString


The "&" means "address of". String names in C represent the address of the string. Not so in MASM.

You can also use a pointer to the string as follows:

pszString,s

    or, for the address and the string:

pszString


If you just use the name of the string it will only display the first character. It was driving me nuts, I knew there was a way. The documentation on this isn't very clear, it's for C/C++.  :8)



Title: Re: View MASM ASCIIZ Strings in Visual Studio Debugger
Post by: Vortex on May 19, 2005, 08:01:31 AM
Hi Greg,

Thanks for the technical info :U