MASM documentation

Has anyone ever encountered the documentation for MASM. Not the useless garbage in the
MSDN, but real documentation. THe kind that gives the syntax of identifiers, for example,
or explains what options are available with the OPTIONS directive (not just a list of
them, but the actual explanations)? Or the syntax of a string, or of an initializer?
I'm reverse-engineering some of this as I am designing a course in x86 assembly code
(really! Turns out people need to *read* it), but I'd be happier if I found real
documentation somewhere.
The last time I wrote assembler it was for a device driver in MS-DOS, in 1989. But
apparently some things never go away, such as the need to know it, but nobody teaches it
any longer.
joe
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:g24rf5hvuo3qbgjmj6kmrefapvsc8gdice@4ax.com...
> Has anyone ever encountered the documentation for MASM. Not the useless
> garbage in the
> MSDN, but real documentation. THe kind that gives the syntax of
> identifiers, for example,
> or explains what options are available with the OPTIONS directive (not
> just a list of
> them, but the actual explanations)? Or the syntax of a string, or of an
> initializer?
>
I suggest you download MASM from your MSDN subscription because it comes
with a set of .doc files describing all kinds of stuff. But if you are
using Word 2003/2007, these ancient files are blocked by default, and I had
to edit the registry in order to get the modern Word to open them (something
about security....) Security by feature removal, yeah, that's the ticket!
:-O
-- David

0

David

11/13/2009 6:25:03 PM

"David Ching" <dc@remove-this.dcsoft.com> wrote in message
news:%23%233tf6IZKHA.2160@TK2MSFTNGP02.phx.gbl...
> I suggest you download MASM from your MSDN subscription because it comes
> with a set of .doc files describing all kinds of stuff. But if you are
> using Word 2003/2007, these ancient files are blocked by default, and I
> had to edit the registry in order to get the modern Word to open them
> (something about security....) Security by feature removal, yeah, that's
> the ticket!
Will wordpad open them???
-Pete

0

Pete

11/13/2009 7:16:12 PM

"Pete Delgado" <Peter.Delgado@NoSpam.com> wrote in message
news:uCgtEXJZKHA.1336@TK2MSFTNGP06.phx.gbl...
>
> Will wordpad open them???
>
The Wordpad coming with Win 7 says "Can't load files" (yes, that is 2
spaces between "load" and "files").
-- David

0

David

11/13/2009 7:50:42 PM

On Fri, 13 Nov 2009 12:03:27 -0500, Joseph M. Newcomer
<newcomer@flounder.com> wrote:
>Has anyone ever encountered the documentation for MASM. Not the useless garbage in the
>MSDN, but real documentation. THe kind that gives the syntax of identifiers, for example,
>or explains what options are available with the OPTIONS directive (not just a list of
>them, but the actual explanations)? Or the syntax of a string, or of an initializer?
>
>I'm reverse-engineering some of this as I am designing a course in x86 assembly code
>(really! Turns out people need to *read* it), but I'd be happier if I found real
>documentation somewhere.
>
>The last time I wrote assembler it was for a device driver in MS-DOS, in 1989. But
>apparently some things never go away, such as the need to know it, but nobody teaches it
>any longer.
> joe
>Joseph M. Newcomer [MVP]
>email: newcomer@flounder.com
>Web: http://www.flounder.com
>MVP Tips: http://www.flounder.com/mvp_tips.htm
The documentation for MASM from Microsoft was always rather poor IMHO,
compared to their documentation effort on the C/C++ front. The hard
copy manuals that came with MASM 5.1 and 6 were all about the tools
like ilink and dumpbin and not about MASM commands or ML itself.
Nothing existed online at the time and the help files in the MASM 6.11
package are MS-DOS help files. Most of the "help" available at the
time was in the form of sample files, IIRC. The MASM CLI was
"documented" in the "ml /h" command. I recall the /Zi switch was the
command to make MASM generate a CodeView debuggable binary.
The documentation might be improved in the MASM 8.0 package.
I encourage you to check out MASM32, a freeware development system
built around the Microsoft MASM package. http://www.masm32.com/
The masm32 package is intriguing because of it's "invoke" operator, a
tool that allows Windows API functions to be called in one line macros
and their return codes to be recovered in another line.
As for strings, I don't know any way MASM did it other than
..data
MyString db "This is a string",0
and this has obvious deficiencies with respect to Unicode. As I recall
the MASM 5/6 documentation also had sections on interfacing to BASIC
and FORTRAN code. I have not tested what would happen if you did
MyString dd "This is a string",0 instead.
I'm not sure what you mean by initializer in this context. A variable
was either initialized or not and syntax was the same:
..data
align 4
x DWORD 10 ; initialized
y DWORD ? ; uninitialized
An uninitialized point structure would be:
POINT STRUCT
x DWORD ?
y DWORD ?
POINT ENDS
All MASM versions were backward compatible with older versions so an
8.0 MASM would still be capable of generating Win16 code.
I always had the feeling that MASM was one of those tools that was
provided by Microsoft as an afterthought "Oh, you need an assembler?
Yeah, we have one, here it is. Have fun."
The MASM 8.0 package was provided as an addend to the VS 2005 package
and I don't know if the VS IDE has carnal knowledge of the CLI of MASM
but it would seem so.

0

Geoff

11/13/2009 10:38:38 PM

"files"? that your problem, you are trying to open more than 1 file. :o)
AliR.
"David Ching" <dc@remove-this.dcsoft.com> wrote in message
news:eEi1WqJZKHA.5852@TK2MSFTNGP05.phx.gbl...
> "Pete Delgado" <Peter.Delgado@NoSpam.com> wrote in message
> news:uCgtEXJZKHA.1336@TK2MSFTNGP06.phx.gbl...
>>
>> Will wordpad open them???
>>
>
> The Wordpad coming with Win 7 says "Can't load files" (yes, that is 2
> spaces between "load" and "files").
>
> -- David

0

AliR

11/13/2009 10:46:04 PM

"AliR" <AliR@online.nospam> wrote in message
news:ORgjXMLZKHA.4932@TK2MSFTNGP02.phx.gbl...
> "files"? that your problem, you are trying to open more than 1 file. :o)
>
I only specified one file (short filename too) so perhaps they have a
problem with the parser as well as their English syntax. ;)
-- David

0

David

11/13/2009 11:03:22 PM

On Fri, 13 Nov 2009 12:03:27 -0500, Joseph M. Newcomer
<newcomer@flounder.com> wrote:
>Has anyone ever encountered the documentation for MASM. Not the useless garbage in the
>MSDN, but real documentation. THe kind that gives the syntax of identifiers, for example,
>or explains what options are available with the OPTIONS directive (not just a list of
>them, but the actual explanations)? Or the syntax of a string, or of an initializer?
>
>I'm reverse-engineering some of this as I am designing a course in x86 assembly code
>(really! Turns out people need to *read* it), but I'd be happier if I found real
>documentation somewhere.
>
>The last time I wrote assembler it was for a device driver in MS-DOS, in 1989. But
>apparently some things never go away, such as the need to know it, but nobody teaches it
>any longer.
> joe
>Joseph M. Newcomer [MVP]
>email: newcomer@flounder.com
>Web: http://www.flounder.com
>MVP Tips: http://www.flounder.com/mvp_tips.htm
Found through Bing.
http://www.freebookzone.com/fetch.php?bkcls=pl_asm&bkidx=21
http://www.freebookzone.com/fetch.php?bkcls=pl_asm&bkidx=20
Click on the zip icon for an archive of .doc files.

0

Geoff

11/13/2009 11:43:32 PM

It is surprising how horribly bad the documentation is.
I'm constrained to using MASM for external reasons.
name DWORD 30 DUP (1)
initializes 30 DWORDs to the value 1. I keep discovering these things by reading the MASM
listings produced by the compiler, and that triggers memories of what I used to do twenty
years ago.
I have the DDK MASM package, and its documents suck.
The command line switches are actually defined in the documentation. Nothing else of
value is defined.
MASM doesn't support Unicode, and I even have a slide that points this out; it has to be
hello DB 'H', 00h, 'E', 00h, 'L', 00h, 'L', 00h, 'O', 00h, 00h, 00h
I can see why companies are having problems finding people who can program in assembler.
When you can't learn how something works, you won't use it.
But now they're paying the price: people who need super-high-performance and want to use
the fancy MMX/XMM/etc instructions can't figure out how to use them or write them;
security companies can't get people who can reverese-engineer viruses, etc. And some of
these people need to write code that doesn't run with a C-stack or use the normal stack
while doing virus intercepts and cleanup. The number of us who used to earn our livings
writing huge systems in assembly code (250K lines) is dwindling...
I don't really believe in writing more that tiny subroutines in assembler, but what I seem
to take for granted--how to write assembly code--is apparently becoming a lost art.
Also, it turns out, compiler writers need to know how to program in machine code so they
can write code-generation components. I found someone who was writing a "compiler" for
XXXX-to-x86, where XXXX is the binary executable format for a long-dead computer (I can't
say more, such as who, but emulation is becoming a Big Deal all of a sudden, as long-lost
dusty-deck binaries are being sought out to do things like data reduction on massive
datasets (multi-GB). So opportunity is not just knocking; it is trying to break my door
down.
I thought writing a course in using MASM would be easy. It probably would be, if there
were any documentation. Right now, I have to run experiments. Sad, really. The syntax
of an identifier is apparently a Microsoft Corporate Secret.
joe
On Fri, 13 Nov 2009 14:38:38 -0800, Geoff <geoff@invalid.invalid> wrote:
>On Fri, 13 Nov 2009 12:03:27 -0500, Joseph M. Newcomer
><newcomer@flounder.com> wrote:
>
>>Has anyone ever encountered the documentation for MASM. Not the useless garbage in the
>>MSDN, but real documentation. THe kind that gives the syntax of identifiers, for example,
>>or explains what options are available with the OPTIONS directive (not just a list of
>>them, but the actual explanations)? Or the syntax of a string, or of an initializer?
>>
>>I'm reverse-engineering some of this as I am designing a course in x86 assembly code
>>(really! Turns out people need to *read* it), but I'd be happier if I found real
>>documentation somewhere.
>>
>>The last time I wrote assembler it was for a device driver in MS-DOS, in 1989. But
>>apparently some things never go away, such as the need to know it, but nobody teaches it
>>any longer.
>> joe
>>Joseph M. Newcomer [MVP]
>>email: newcomer@flounder.com
>>Web: http://www.flounder.com
>>MVP Tips: http://www.flounder.com/mvp_tips.htm
>
>The documentation for MASM from Microsoft was always rather poor IMHO,
>compared to their documentation effort on the C/C++ front. The hard
>copy manuals that came with MASM 5.1 and 6 were all about the tools
>like ilink and dumpbin and not about MASM commands or ML itself.
>Nothing existed online at the time and the help files in the MASM 6.11
>package are MS-DOS help files. Most of the "help" available at the
>time was in the form of sample files, IIRC. The MASM CLI was
>"documented" in the "ml /h" command. I recall the /Zi switch was the
>command to make MASM generate a CodeView debuggable binary.
>
>The documentation might be improved in the MASM 8.0 package.
>
>I encourage you to check out MASM32, a freeware development system
>built around the Microsoft MASM package. http://www.masm32.com/
>The masm32 package is intriguing because of it's "invoke" operator, a
>tool that allows Windows API functions to be called in one line macros
>and their return codes to be recovered in another line.
>
>As for strings, I don't know any way MASM did it other than
>
>.data
>MyString db "This is a string",0
>
>and this has obvious deficiencies with respect to Unicode. As I recall
>the MASM 5/6 documentation also had sections on interfacing to BASIC
>and FORTRAN code. I have not tested what would happen if you did
>MyString dd "This is a string",0 instead.
>
>I'm not sure what you mean by initializer in this context. A variable
>was either initialized or not and syntax was the same:
>
>.data
> align 4
> x DWORD 10 ; initialized
> y DWORD ? ; uninitialized
>
>An uninitialized point structure would be:
>
> POINT STRUCT
> x DWORD ?
> y DWORD ?
> POINT ENDS
>
>All MASM versions were backward compatible with older versions so an
>8.0 MASM would still be capable of generating Win16 code.
>
>I always had the feeling that MASM was one of those tools that was
>provided by Microsoft as an afterthought "Oh, you need an assembler?
>Yeah, we have one, here it is. Have fun."
>
>The MASM 8.0 package was provided as an addend to the VS 2005 package
>and I don't know if the VS IDE has carnal knowledge of the CLI of MASM
>but it would seem so.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

0

Joseph

11/14/2009 4:33:56 AM

"Joseph M. Newcomer" <newcomer@flounder.com> wrote...
>
> Has anyone ever encountered the documentation for MASM.
You don't mention the version. Besides the masm32 site well pointed
already, for some v6.1x links see for example..
http://doc.ddart.net/asm/Microsoft_MASM_Programmers_Guide_v6.1/
http://webster.cs.ucr.edu/AsmTools/MASM/
http://web.sau.edu/LillisKevinM/csci240/masmdocs/
Yes, I do realize the age of v6.1x (the manuals talk at length about 16b
segmentation and TSRs among others) yet surprisingly much still applies.
Liviu

0

Liviu

11/14/2009 4:39:51 AM

On Fri, 13 Nov 2009 23:33:56 -0500, Joseph M. Newcomer
<newcomer@flounder.com> wrote:
>It is surprising how horribly bad the documentation is.
I dug around my bookshelves and finally came up with the MASM book I
got with my original Windows SDK. (the big blue and white box)
Title: Microsoft Macro Assembler 5.1 Programmer's Guide
Copyright: 1987
Document number: 410610014-500-R00-0787
467 pages.
No bar code, the back has the MS Redmond address and is marked
1287 Part No. 01506
This was my only reference for it for years. You might find a copy of
it on amazon.com. The online copies I cited in my other post actually
get to the nitty gritty a bit more succinctly in the 6.11
documentation and they are more relevant today.

0

Geoff

11/14/2009 6:49:01 AM

> name DWORD 30 DUP (1)
....
> The syntax
> of an identifier is apparently a Microsoft Corporate Secret.
I would not expect to find this in the masm documents.
Isn't this part of the Intel assembly language spec?
All the options, and . directives (like .486, .code, .model flat),
yes, that would be the assembler.
Same for tricks like @@: to automatically generate label names.
Anyway, you might have a point with the value of someone who
knows assembly.
With at bit of luck I might be able to land some well payed job
later one, something like the Y2K boom for the Cobol guys :-D
--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email

0

Mihai

11/14/2009 6:49:19 AM

Hmm, I just dicovered that my trust-worthy masm 5.10
(and link 5.01) that I keep carying around does not
work on Win 7 64 bit.
I need to find a newer version.
It's ok, it's only 20 years old (1988).
It it would have been some Apple stuff I would
have had to change it every 2 years :-)
--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email

0

Mihai

11/14/2009 6:53:16 AM

"Geoff" <geoff@invalid.invalid> ha scritto nel messaggio
news:3kjsf5pv7sdqhc6a15a0vii6vdcr50qdhk@4ax.com...
> I dug around my bookshelves and finally came up with the MASM book I
> got with my original Windows SDK. (the big blue and white box)
>
> Title: Microsoft Macro Assembler 5.1 Programmer's Guide
> Copyright: 1987
So back in the days the Windows SDK was made not only by header files but
also by paper-based documentation and books?
Giovanni

0

Giovanni

11/14/2009 12:30:25 PM

"Joseph M. Newcomer" <newcomer@flounder.com> ha scritto nel messaggio
news:mebsf590t5c7h1q5ugnnobdnb0024i8udj@4ax.com...
> It is surprising how horribly bad the documentation is.
> MASM doesn't support Unicode, and I even have a slide that points this
> out; it has to be
>
> hello DB 'H', 00h, 'E', 00h, 'L', 00h, 'L', 00h, 'O', 00h, 00h, 00h
>
> I can see why companies are having problems finding people who can program
> in assembler.
> When you can't learn how something works, you won't use it.
Probably when MASM was developed Unicode did not exist?
(I've never used this MASM, I don't know. I just used Devpac Assembler for
Motorola MC68000 on Commodore Amiga).
> But now they're paying the price: people who need super-high-performance
> and want to use
> the fancy MMX/XMM/etc instructions can't figure out how to use them or
> write them;
I have no idea of the assembly of the new Intel CPUs, but I read somewhere
that writing *hand-coded* optimized assembly code is hard these days (it's
not like the age of 80286 or Motorola 68000), and optimizing C++ compilers
do a better job than humans in producing optimized assembly code.
>The number of us who used to earn our livings
> writing huge systems in assembly code (250K lines) is dwindling...
Wow... Writing 250K lines of assembly code must be a titanic work (leaving
apart debugging...!).
> I don't really believe in writing more that tiny subroutines in assembler,
> but what I seem
> to take for granted--how to write assembly code--is apparently becoming a
> lost art.
As is COM programming :)
> I thought writing a course in using MASM would be easy. It probably would
> be, if there
> were any documentation. Right now, I have to run experiments.
Have fun :)
Giovanni

0

Giovanni

11/14/2009 12:41:15 PM

>So back in the days the Windows SDK was made not only by header files but
>also by paper-based documentation and books?
Yep, a bookshelf full - something you could peruse in the reading room
and discover some useful API that you weren't aware of :)
Dave

0

David

11/14/2009 12:56:06 PM

http://www.intel.com/products/processor/manuals/index.htm
http://www.intel.com/Assets/PDF/manual/253666.pdf
http://www.intel.com/Assets/PDF/manual/253667.pdf
Mihai N. wrote:
>> name DWORD 30 DUP (1)
> ...
>> The syntax
>> of an identifier is apparently a Microsoft Corporate Secret.
>
> I would not expect to find this in the masm documents.
>
> Isn't this part of the Intel assembly language spec?
>
> All the options, and . directives (like .486, .code, .model flat),
> yes, that would be the assembler.
> Same for tricks like @@: to automatically generate label names.
>
>
> Anyway, you might have a point with the value of someone who
> knows assembly.
> With at bit of luck I might be able to land some well payed job
> later one, something like the Y2K boom for the Cobol guys :-D
>
>

0

BobF

11/14/2009 1:30:00 PM

"Joseph M. Newcomer" <newcomer@flounder.com> ha scritto nel messaggio
news:mebsf590t5c7h1q5ugnnobdnb0024i8udj@4ax.com...
> It is surprising how horribly bad the documentation is.
[...]
> I thought writing a course in using MASM would be easy. It probably would
> be, if there
> were any documentation. Right now, I have to run experiments.
Joe: I'm not sure if this helps, but I found the Art of Assembly Language
book freely available online:
http://webster.cs.ucr.edu/AoA/DOS/pdf/0_AoAPDF.html
And there is a chapter about MASM here:
http://webster.cs.ucr.edu/AoA/DOS/pdf/ch08.pdf
Giovanni

0

Giovanni

11/14/2009 3:07:30 PM

I almost certainly have one in my basement, but this week I am nearly immobilized by pain
(did something to tear a ligament in my leg) so walking downstairs to find it...and
standing while I dug around in the old boxes...wasn't really an option. Maybe after I get
back next week (I'm off for a week of teaching tomorrow) I'll be able to go down and get
it.
joe
On Fri, 13 Nov 2009 22:49:01 -0800, Geoff <geoff@invalid.invalid> wrote:
>On Fri, 13 Nov 2009 23:33:56 -0500, Joseph M. Newcomer
><newcomer@flounder.com> wrote:
>
>>It is surprising how horribly bad the documentation is.
>
>I dug around my bookshelves and finally came up with the MASM book I
>got with my original Windows SDK. (the big blue and white box)
>
>Title: Microsoft Macro Assembler 5.1 Programmer's Guide
>Copyright: 1987
>Document number: 410610014-500-R00-0787
>467 pages.
>
>No bar code, the back has the MS Redmond address and is marked
>1287 Part No. 01506
>
>This was my only reference for it for years. You might find a copy of
>it on amazon.com. The online copies I cited in my other post actually
>get to the nitty gritty a bit more succinctly in the 6.11
>documentation and they are more relevant today.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

0

Joseph

11/14/2009 3:14:34 PM

When MASM was developed, computers barely existed. We had to walk barefoot through the
snow to get our listings...
joe
On Sat, 14 Nov 2009 13:41:15 +0100, "Giovanni Dicanio"
<giovanniDOTdicanio@REMOVEMEgmail.com> wrote:
>"Joseph M. Newcomer" <newcomer@flounder.com> ha scritto nel messaggio
>news:mebsf590t5c7h1q5ugnnobdnb0024i8udj@4ax.com...
>
>> It is surprising how horribly bad the documentation is.
>> MASM doesn't support Unicode, and I even have a slide that points this
>> out; it has to be
>>
>> hello DB 'H', 00h, 'E', 00h, 'L', 00h, 'L', 00h, 'O', 00h, 00h, 00h
>>
>> I can see why companies are having problems finding people who can program
>> in assembler.
>> When you can't learn how something works, you won't use it.
>
>Probably when MASM was developed Unicode did not exist?
>(I've never used this MASM, I don't know. I just used Devpac Assembler for
>Motorola MC68000 on Commodore Amiga).
>
>
>> But now they're paying the price: people who need super-high-performance
>> and want to use
>> the fancy MMX/XMM/etc instructions can't figure out how to use them or
>> write them;
>
>I have no idea of the assembly of the new Intel CPUs, but I read somewhere
>that writing *hand-coded* optimized assembly code is hard these days (it's
>not like the age of 80286 or Motorola 68000), and optimizing C++ compilers
>do a better job than humans in producing optimized assembly code.
>
>
>>The number of us who used to earn our livings
>> writing huge systems in assembly code (250K lines) is dwindling...
>
>Wow... Writing 250K lines of assembly code must be a titanic work (leaving
>apart debugging...!).
>
>
>> I don't really believe in writing more that tiny subroutines in assembler,
>> but what I seem
>> to take for granted--how to write assembly code--is apparently becoming a
>> lost art.
>
>As is COM programming :)
>
>
>> I thought writing a course in using MASM would be easy. It probably would
>> be, if there
>> were any documentation. Right now, I have to run experiments.
>
>Have fun :)
>
>
>Giovanni
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

0

Joseph

11/14/2009 3:16:04 PM

I've had that happen to me as well, but since I've upgraded to Office 2007 I
haven't had any problems (except installing VS 2008 SP1 which won't work
with the Web Designer installed so I had to rename that folder and remove
some registry entries). I'll never get that 5 hours back it took me to
finally get programs to compile on my notebook and run on my desktop with
the same versioning. Although, to be fair, I learned a lot about manifest
and winsxs in the process.
You'd think some of the testing would have included trying a few "other"
products from the same company to ensure that they all play together well.
Tom
"David Ching" <dc@remove-this.dcsoft.com> wrote in message
news:%23%233tf6IZKHA.2160@TK2MSFTNGP02.phx.gbl...
> "Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
> news:g24rf5hvuo3qbgjmj6kmrefapvsc8gdice@4ax.com...
>> Has anyone ever encountered the documentation for MASM. Not the useless
>> garbage in the
>> MSDN, but real documentation. THe kind that gives the syntax of
>> identifiers, for example,
>> or explains what options are available with the OPTIONS directive (not
>> just a list of
>> them, but the actual explanations)? Or the syntax of a string, or of an
>> initializer?
>>
>
> I suggest you download MASM from your MSDN subscription because it comes
> with a set of .doc files describing all kinds of stuff. But if you are
> using Word 2003/2007, these ancient files are blocked by default, and I
> had to edit the registry in order to get the modern Word to open them
> (something about security....) Security by feature removal, yeah, that's
> the ticket! :-O
>
> -- David

0

Tom

11/14/2009 3:17:25 PM

But, I can read any documents at all now that I have Office 2007 installed.
Tom
"David Ching" <dc@remove-this.dcsoft.com> wrote in message
news:%23%233tf6IZKHA.2160@TK2MSFTNGP02.phx.gbl...
> "Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
> news:g24rf5hvuo3qbgjmj6kmrefapvsc8gdice@4ax.com...
>> Has anyone ever encountered the documentation for MASM. Not the useless
>> garbage in the
>> MSDN, but real documentation. THe kind that gives the syntax of
>> identifiers, for example,
>> or explains what options are available with the OPTIONS directive (not
>> just a list of
>> them, but the actual explanations)? Or the syntax of a string, or of an
>> initializer?
>>
>
> I suggest you download MASM from your MSDN subscription because it comes
> with a set of .doc files describing all kinds of stuff. But if you are
> using Word 2003/2007, these ancient files are blocked by default, and I
> had to edit the registry in order to get the modern Word to open them
> (something about security....) Security by feature removal, yeah, that's
> the ticket! :-O
>
> -- David

0

Tom

11/14/2009 3:17:49 PM

Yes, there is something strangely unsatisfying about taking your notebook
computer to the "reading room".
Tom
"David Lowndes" <DavidL@example.invalid> wrote in message
news:83atf51aah74l12um7j2t34u2mg2qod0u9@4ax.com...
> >So back in the days the Windows SDK was made not only by header files but
>>also by paper-based documentation and books?
>
> Yep, a bookshelf full - something you could peruse in the reading room
> and discover some useful API that you weren't aware of :)
>
> Dave

0

Tom

11/14/2009 3:18:55 PM

On Sat, 14 Nov 2009 10:16:04 -0500, Joseph M. Newcomer
<newcomer@flounder.com> wrote:
>When MASM was developed, computers barely existed. We had to walk barefoot through the
>snow to get our listings...
Up hill, both ways.
I still have my 286 machine with a Z80 ICE for cross development.
Monochrome CRT.

0

Geoff

11/14/2009 3:46:26 PM

"Tom Serface" <tserface@msn.com> ha scritto nel messaggio
news:ulIPi2TZKHA.736@TK2MSFTNGP06.phx.gbl...
> But, I can read any documents at all now that I have Office 2007
> installed.
Tom: at least tin my experience, with Office 2007 I can't open the MASM docs
"out of the box" (the registry hack cited by David is required).
G

0

Giovanni

11/14/2009 9:05:13 PM

Thanks all. Some links were useful, some were not. There is no documentation for
anything important; a couple of the links were fictional works about what assemblers might
do someway, but using the constructs in a real program causes the assembler to crash
(Microsoft wants to legitimize the use of this word by guaranteeing that no one will ever
again be able to deduce what "crash" means, by hiding all useful information).
But it got me further than I had been before. Today's problem: how to use a struct
declaration when the pointer to the structure base is in a register.
The construct
mov eax, [ecx].StructureName.field
causes the assembler to "stop working", whatever that now means. (It probably means the
code has never been tested...syntax errors should not cause programs to take internal
failures that terminate their execution...)
Anyway, I'm off the net for a week, teaching in Columbia MD all next week.
(By the way, the documentation on STRUCT is, to put it mildly, totally useless, but at
least the documentation is largely self-consistent in that regard, being almost uniformly
totally useless)
joe
On Fri, 13 Nov 2009 12:03:27 -0500, Joseph M. Newcomer <newcomer@flounder.com> wrote:
>Has anyone ever encountered the documentation for MASM. Not the useless garbage in the
>MSDN, but real documentation. THe kind that gives the syntax of identifiers, for example,
>or explains what options are available with the OPTIONS directive (not just a list of
>them, but the actual explanations)? Or the syntax of a string, or of an initializer?
>
>I'm reverse-engineering some of this as I am designing a course in x86 assembly code
>(really! Turns out people need to *read* it), but I'd be happier if I found real
>documentation somewhere.
>
>The last time I wrote assembler it was for a device driver in MS-DOS, in 1989. But
>apparently some things never go away, such as the need to know it, but nobody teaches it
>any longer.
> joe
>Joseph M. Newcomer [MVP]
>email: newcomer@flounder.com
>Web: http://www.flounder.com
>MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

0

Joseph

11/15/2009 3:56:38 AM

"Joseph M. Newcomer" <newcomer@flounder.com> wrote...
>
> [...] Today's problem: how to use a struct declaration
> when the pointer to the structure base is in a register.
>
> The construct
> mov eax, [ecx].StructureName.field
>
> causes the assembler to "stop working" [...]
That construct works with v6.15 as documented. What version are you
using, and what's the full context, including the ml.exe command line?
Liviu

0

Liviu

11/15/2009 5:09:54 AM

>> We had to walk barefoot through the snow to get our listings...
> Up hill, both ways.
And carrying the PC and the CRT on the back.
:-)
--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email

0

Mihai

11/15/2009 7:45:50 AM

"Mihai N." <nmihai_year_2000@yahoo.com> ha scritto nel messaggio
news:Xns9CC3F1BF9B8B2MihaiN@207.46.248.16...
>>> We had to walk barefoot through the snow to get our listings...
>
>> Up hill, both ways.
>
> And carrying the PC and the CRT on the back.
> :-)
:-))
G

0

Giovanni

11/15/2009 9:56:19 AM

MASM 9.00,
Source file:
title
..686
..model flat
option casemap:none
Triple struct
x dd ?
y dd ?
z dd ?
Triple ends
_TEXT segment
_fetchZ proc
$t=4
_fetchZ endp
mov eax,$t[esp]
mov eax, offset [eax].Triple.z
ret
_TEXT ends
end
========
Command line (from build log)
========
ml.exe /c /Fo"Debug\fetcher.obj" /W3 /Zi /errorReport:prompt /Ta.\fetcher.asm
>------ Build started: Project: structExample, Configuration: Debug Win32 ------
1>Assembling...
1> Assembling: .\fetcher.asm
1>MASM : fatal error A1016: Internal error
1>Project : error PRJ0019: A tool returned an error code from "Assembling..."
========
It is called by a program of the form:
#include "Triple.h" // which defines typedef struct { int x; int y; int z; } Triple;
extern "C" int fetchZ(Triple & t);
int fetchZ0(Triple & t)
{
return t.z;
}
int _tmain(int argc, _TCHAR* argv[])
{
Triple t={1, 2, 3};
int z0 = fetchZ0(t);
_tprintf(_T("z0=%d\n"), z0);
int z = fetchZ(t);
_tprintf(_T("z=%d\n"), z);
return 0;
}
This is a trivial example that is supposed to demonstrate how structures
are accessed from an assembly code program; I've run through several variations of
the syntax trying to get it to not crash (and Vista doesn't disclose what "crash" means,
eternal damnation to the paternalistic idiot who thought we should be protected from
knowing
the truth). This was the latest.
The next example will be how to access a field in a array of objects. Then we will work
backwards
to C code showing what the C compiler does, using the C++ subroutine shown above, then
discuss H2INC, etc.
The idea is to show patterns of assembly code and patterns of the C compiler; among other
things,
it helps figure out whether a compiler or an assembly programmer wrote the code.
But programs should not fail if there is a syntax error. Apparently adding the word
"offset" (left over from a previous attempt) causes the error. I removed it, and it
worked. Comes from programming on painkillers.
joe
On Sat, 14 Nov 2009 23:09:54 -0600, "Liviu" <lab2k1@gmail.c0m> wrote:
>
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote...
>>
>> [...] Today's problem: how to use a struct declaration
>> when the pointer to the structure base is in a register.
>>
>> The construct
>> mov eax, [ecx].StructureName.field
>>
>> causes the assembler to "stop working" [...]
>
>That construct works with v6.15 as documented. What version are you
>using, and what's the full context, including the ml.exe command line?
>
>Liviu
>
>
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

"Joseph M. Newcomer" <newcomer@flounder.com> wrote...
> MASM 9.00,
>[...]
> mov eax, offset [eax].Triple.z
>[...]
> Apparently adding the word "offset" (left over from a previous
> attempt) causes the error. I removed it, and it worked.
FWIW v6.15 terminates with the same A1016 on the (wrong) construct
above, but has the decency to at least log the exact line number.
> But programs should not fail if there is a syntax error.
MS agrees ;-) but hasn't fixed it, yet. Looks like the root bug was
reported (and acknowledged) for more than a year now.
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=356393
Liviu
P.S. Giovanni is right about the misplaced 'endp' though that happens to
not matter in this case (loosely speaking, it's more about source
organization and label scoping than actual code generation).

0

Liviu

11/16/2009 12:11:20 AM

PC... dang I had to carry a mainframe.
Tom
"Giovanni Dicanio" <giovanniDOTdicanio@REMOVEMEgmail.com> wrote in message
news:uC1GjndZKHA.5544@TK2MSFTNGP02.phx.gbl...
> "Mihai N." <nmihai_year_2000@yahoo.com> ha scritto nel messaggio
> news:Xns9CC3F1BF9B8B2MihaiN@207.46.248.16...
>>>> We had to walk barefoot through the snow to get our listings...
>>
>>> Up hill, both ways.
>>
>> And carrying the PC and the CRT on the back.
>> :-)
>
> :-))
>
> G
>
>

0

Tom

11/16/2009 4:05:26 PM

I confess that I haven't read any MASM documents in a log time so that could
well be true.
Tom
"Giovanni Dicanio" <giovanniDOTdicanio@REMOVEMEgmail.com> wrote in message
news:uqJGw4WZKHA.2184@TK2MSFTNGP04.phx.gbl...
> "Tom Serface" <tserface@msn.com> ha scritto nel messaggio
> news:ulIPi2TZKHA.736@TK2MSFTNGP06.phx.gbl...
>
>> But, I can read any documents at all now that I have Office 2007
>> installed.
>
> Tom: at least tin my experience, with Office 2007 I can't open the MASM
> docs "out of the box" (the registry hack cited by David is required).
>
> G
>
>
>

0

Tom

11/16/2009 4:06:06 PM

On Mon, 16 Nov 2009 08:05:26 -0800, "Tom Serface" <tserface@msn.com>
wrote:
>
>"Giovanni Dicanio" <giovanniDOTdicanio@REMOVEMEgmail.com> wrote in message
>news:uC1GjndZKHA.5544@TK2MSFTNGP02.phx.gbl...
>> "Mihai N." <nmihai_year_2000@yahoo.com> ha scritto nel messaggio
>> news:Xns9CC3F1BF9B8B2MihaiN@207.46.248.16...
>>>>> We had to walk barefoot through the snow to get our listings...
>>>
>>>> Up hill, both ways.
>>>
>>> And carrying the PC and the CRT on the back.
>>> :-)
>>
>> :-))
>>
>> G
>>
>>
>
>PC... dang I had to carry a mainframe.
>
>Tom
We had to roll ours on a cart. The wheels bogged down in the snow and
I kept stepping on the cables. :)

0

Geoff

11/16/2009 4:37:10 PM

The missing endp was the result of a misplaced copy operation.
Too bad errors that crash products can't be fixed in a timely fashion. Says something
about dedication to quality...
joe
On Sun, 15 Nov 2009 18:11:20 -0600, "Liviu" <lab2k1@gmail.c0m> wrote:
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote...
>> MASM 9.00,
>>[...]
>> mov eax, offset [eax].Triple.z
>>[...]
>> Apparently adding the word "offset" (left over from a previous
>> attempt) causes the error. I removed it, and it worked.
>
>FWIW v6.15 terminates with the same A1016 on the (wrong) construct
>above, but has the decency to at least log the exact line number.
>
>> But programs should not fail if there is a syntax error.
>
>MS agrees ;-) but hasn't fixed it, yet. Looks like the root bug was
>reported (and acknowledged) for more than a year now.
>http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=356393
>
>Liviu
>
>P.S. Giovanni is right about the misplaced 'endp' though that happens to
>not matter in this case (loosely speaking, it's more about source
>organization and label scoping than actual code generation).
>
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

0

Joseph

11/22/2009 3:06:09 AM

Reply:

Similar Artilces:

MASM documentationHas anyone ever encountered the documentation for MASM. Not the useless garbage in the
MSDN, but real documentation. THe kind that gives the syntax of identifiers, for example,
or explains what options are available with the OPTIONS directive (not just a list of
them, but the actual explanations)? Or the syntax of a string, or of an initializer?
I'm reverse-engineering some of this as I am designing a course in x86 assembly code
(really! Turns out people need to *read* it), but I'd be happier if I found real
documentation somewhere.
The last time I wrote assembler it was...

request for a solution on shared documentsdear team,
I work for an organisation that has more than 50 branches countrywide and
more than 80 sales force.
I need to collect sales data on a daily basis from every sales person.
I have designed a standard excel templete uniform to all sales persons
in it, is the daily sales targets vs actual sales.....
How can the sales team access it and update their sales records?
Saul,
If you put the workbook on a server that is available to all locations then
anyone can access it. Doing it this way only one person at a time can have it
open for editing.
You could also consider 'S...

Print documentsI know that print funciton will be available in the
application for each type of file.
My question is, can I print a file(any type, e.g. word,
bmp, html, etc) in program?
No printer dialog should be prompted.
Can this be done?
...

Word Documents DefaultWhenever I open a Word document the default size is 191%. How do I change
the default to 100%?
On Fri, 5 Feb 2010 13:33:02 -0800, DPS <DPS@discussions.microsoft.com>
wrote:
>Whenever I open a Word document the default size is 191%. How do I change
>the default to 100%?
See http://www.word.mvps.org/FAQs/General/SaveViewAndZoom.htm
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
...

attaching documentsI am trying to figure out how to attaching a document
without having it appear as an icon in the body of the
message. I want it to appear as a file name in a field
under the subject. I used to be able to do this.
Send the message in HTML or Plain Text format, instead of Rich Text format.
--
Jocelyn Fiorello
MVP - Outlook
*** Messages sent to my e-mail address will NOT be answered -- please
reply only to the newsgroup to preserve the message thread. ***
In news:030801c3bf58$bc799de0$a301280a@phx.gbl,
beth.thompson@thomson.com wrote:
> I am trying to figure out how to attaching a d...

redirect my documentsThis is a multi-part message in MIME format.
------=_NextPart_000_0075_01C60228.32B5F210
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
How can I change the folder when my user want to insert an attachment?? =
I would like to use an especific folder.. can I to do this??
thks,
Jane
------=_NextPart_000_0075_01C60228.32B5F210
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
&l...

Retrieve document that was closed as Document 1?I had a three page Word document still titled as Document 1 that I accidently
closed before remembering I wanted to keep the first page. I had not saved
the document before closing so if I select a Word document again I will get
Document 1 but it will be blank. Is there any way I can retrieve this
document?
Frank C.
If you didn't save it there's nothing to recover.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web s...

Open documents in new windowI recently uninstalled an add-in (Office Tab), and since then all instances
of Word 2007 (on XP SP3) open in the same window, rather than in new
windows, which is my preference. I'm pretty sure I remember having to change
it to the "open in new window" for the default setting a couple of years ago
when I first started using 2007, but can't seem to find out how that is
done. Any help would be greatly appreciated.
David
uncheck the Windows in Taskbar in the View dialog under office menu under the
Microsoft Office Button.
Hope this helps
DeanH
&quo...

Why do I get a blank page when trying to print Avery Document 516.I have the labels ready to go. Using Microsoft Word. When I try to print
the labels, I get a blank page. I tried two printers, HP and Brother. Same
thing with both. Any suggestions?
Check the font formatting. Make sure that it is not hidden.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"bburkesj" <bburkesj@discussions.microsoft.com> wrote in message
news:B881C096-C3F6-475B-B00A-F75C2DED0D73@microsoft.c...

Microsoft DocumentationHi,
I came across this
http://www.microsoft.com/downloads/details.aspx?familyid=64966E88-1377-4D1A-BE86-AB77014495F4&displaylang=en#top
page which is the Technical Overview of DirectAccess.
Is their like a central link that one can go to and find other technical
overviews of other products which maybe of interest?
Thanks
"biren" <biren@discussions.microsoft.com> wrote in message
news:75543666-0178-4559-9D60-01E16B1E3428@microsoft.com...
> Hi,
>
> I came across this
>
> http://www.microsoft.com/downloads/details.aspx?familyid=64966...

open the document instead of the inquiry windowWhen adding a PO to a service call, we click the PO number and it opens the
PO inquiry screen. We need it to open the actual PO/document screen so the
addresses can be modified as needed, etc. Is there a setting somewhere in GP
to allow this?
...

Changing the Zoom to open a document in 100%When I open a particular document on my computer it
automatically shows it at 100% Zoom. However, my boss has
a problem showing the document on his computer at less
than 100%. He would like to change it so that he does not
have to adjust it at 100% every time he opens the
document. Can you tell me how this could be done?
Do you really want the zoom changed to 100% or do you want it so that he can see
the same columns as you see?
If you want to set the zoom to 100%, you can do something like this in your
auto_open (or workbook_open) code:
Option Explicit
Sub auto_open()
Dim wks ...

Saving an Excel document after moving additional worksheets to itI have a 'master' spreadsheet that I would like to add additional tabs to.
I'm not having any problems moving the worksheets into the document but when
I try to save the file its not happening. I have tried renaming the file,
saving to a pen drive but nothing seems to be working. I seem to be able to
save the first worksheet but then reopening and saving additional worksheets
without success. Would anyone have any idea why I am unable to save the
file.....thanks
...

Move pages from document to document?This is a multi-part message in MIME format.
------=_NextPart_000_0397_01C7D5D9.22350CB0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I am relatively new to this software. I can't seem to find how to move a =
page from one document to another.
Any help appreciated.
Shmuel
------=_NextPart_000_0397_01C7D5D9.22350CB0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<MET...

Where is documentation of VBA Chart properties and methods?Where can I find documentation listing all of the Excel VBA Chart properties
and methods? An internet site, or a good book maybe? Thanks.
Never mind. I realized that the Excel VBA help file was not installed.
Sorry about the dumb questions.
"Hmmm..." <blahbla@blahl.com> wrote in message
news:1wDRa.106421$Io.9109532@newsread2.prod.itd.earthlink.net...
> Where can I find documentation listing all of the Excel VBA Chart
properties
> and methods? An internet site, or a good book maybe? Thanks.
>
>
...

Move a document from an offline printer queue to an online queue?Running under Vista Home Premium SP2.
I have three printers installed: One online that I want to use, one offline
that I use only occasionally, and one at my dad's house that I use when I
use my PC on his network. The online printer is the default, of course.
I'm not sure how I did it, but I have a few documents that went to the wrong
printer queues. Assume for the sake of argument that I can't reprint those
documents. Is there a way I can transfer them from the wrong queues to the
online printer?
I'm smart enough not to consciously select a different prin...

How to dsiplay Word Document inside a control in WinForms ApplicatCan I display word document in Windows Form Panel Control or any other
control ?
Here objective is not display word document as seperate application but show
the word document inside the windows Form.
Thanks,
--Israr
Hi,
I think we can do this using OLE control(VB).
Thanks,
Senthil. S
--
senthilkumarabi
...

My documentsHello all,
Vaguely I remember the is a global (windows) variable which points to the
'My Documents' path. Because users may change the default path C:\My
Documents, I can not use that path to save a file from Access.
Can someone help me out.
Thx,
Ludovic
Open a command prompt, and type:
set
Use Environ() in your code.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Vsn" <vsn at hotmail> wrote in message
news:eqcTzkZ1HHA.5992@TK2M...

How to change document templateHow it is possible to change internal documentation template for "reports"
in UML software section???
I want to add there me own template
...

scanning handwriten document into editable digital documentJust like voicve recognition software that converts voice
text into editable digital document, searching for
software that will do some akin, but instead of being
voice data its handwritten document to be scanned into
editable text document.
Juan E. Jimenez
itsi@prtc.net
San Juan, Puerto Rico
...

Full bleed formatting documentHow can I shrink the margins on a document already created in Publisher? I
would like to create one version of the document formated for a full bleed
print and one with a smaller margin than already exists. How can I do this?
No full bleed printer connected my computer.
Create a bleed for your publication
http://office.microsoft.com/en-us/publisher/HP051236331033.aspx?pid=CH010001571033
--
Mary Sauer MSFT MVP
http://office.microsoft.com/
http://msauer.mvps.org/
news://msnews.microsoft.com
"MarySue" <MarySue@discussions.microsoft.com> wrote in message
news:8A18253E-A5...

desktop and my documents (folder redirection)Hello,
I have win2k3 with pgo and i have configured one pc (Win XP) with folder
redirection (desktop et my documents). I haven't connected to my network for
1 week and i have a problem in disk with this pc (WinXP) but i can access to
disk data.
The problem is i can't find my data in my desktop and in my documents.
can you help me where can i find my data in my desktop and my documents?
Thank you.
...

how to send documents from document imaging to word?I would like to scan a document into Word to use as template. I scan it into
Document Imaging, run OCR and then in tools I select "send to word". it goes
to Word, but the scale of the document is too big and can't be used. What
settings am I missing so that document looks the same as it does in Document
Imaging.
...

upload a document with photos?I am trying to attach a word document that has three photos in it. It is only
one page but it is taking 3-4 minutes to download. I need to do this a lot
faster, is there a way to speed up the download of the document?
1. Zip the document to make the file smaller.
2. Use a graphics program (such as www.irfanview.com) to crop and reduce the
resolution of the pictures so they contain fewer bytes, before inserting
them into the document.
3. Pay more to get a faster internet connection.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be ...

document not saved/read-onlyHi,
I am setting up an intrant using iis 5 and am being driven mad by saving
excel files.
I have posted before but the problem has now changed as after configuring
url scan when a user tries to save an excel file they either get the
'document not saved' or the cannot save file read-only' error message.
I have looked at permissions, the isur account and checked the space on the
target drive.
Any clues would be gratefully received!
TIA
Sarah
FWIW I am not a server person, but have seen problems like thi
mentioned and solved by disabling server file caching. This ca
evident...