Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What do professionals use?

2 views
Skip to first unread message

NadCixelsyd

unread,
Apr 14, 2010, 2:48:55 PM4/14/10
to
In another thread written about a year ago, Tim Roberts wrote,

" ... There aren't any books about writing MASM code for 32-bit
Windows, because no one writes production Win32 code in MASM. ...
Professionals do not write 32-bit programs in assembler. Knowing MASM
is very useful for debugging tricky apps, and figuring out how to
optmize, but even as a professional driver writer, I write a very,
very small amount of MASM. ..." (end quote)

Like the OP in that thread, I want to learn Wintel assembly language.

What did Tim mean by, "no one writes production Win32 code in MASM"?
Do professionals use MASM to write things other than WIN32 code, -OR-
do professionals write Win32 code in something other than MASM?

And along the same (if not identical) thought: Does "Professionals do
not write 32-bit programs in assembler" mean (A) Professionals to not
write 32-bit code at all, or (B) when a professional does write 32-bit
code, they use something other than assembler?

If MASM is not the assembler of highest use, what is?

da...@nowhere.net

unread,
Apr 14, 2010, 7:35:03 PM4/14/10
to
Almost no one uses assembler anymore to write code. Most of us use
our knowledge of assembly to debug code written in another language,
usually C. Some graphics and game companies use assembly in critical
routines. Complier writers use assembly since they must generate
machine code. A 'few' routines in parts of operating systems may be
in assembly. Boot records are written in assembly.

Most people use assembly, but don't write any. It is useful to change
a 0xCC to a 0x90 to eliminate a breakpoint that is being triggered
when you don't want it without a recompile.

P.S. There is no Wintel assembly language. Microsoft wrote MASM
targeted for the 16-bit world. They followed on with MASM 32-bit and
even have a 64-bit assembler for AMD64 chips. They also ship an Intel
assembler for ia64 with the WDK.

James Harris

unread,
Apr 15, 2010, 6:43:30 AM4/15/10
to
On 14 Apr, 19:48, NadCixelsyd <nadcixel...@aol.com> wrote:
> In another thread written about a year ago, Tim Roberts wrote,
>
> " ...   There aren't any books about writing MASM code for 32-bit
> Windows, because no one writes production Win32 code in MASM. ...
> Professionals do not write 32-bit programs in assembler.  Knowing MASM
> is very useful for debugging tricky apps, and figuring out how to
> optmize, but even as a professional driver writer, I write a very,
> very small amount of MASM. ..."  (end quote)
>
> Like the OP in that thread, I want to learn Wintel assembly language.

I know what you mean: Intel/AMD assembly language under a Windows
environment.

I wrote a couple of primers to help get started with Win32 programming
in assembler and they are available on the web

http://codewiki.wikispaces.com/winpopup.nasm
http://codewiki.wikispaces.com/winstdout.nasm

The first pops up a GUI messagebox. The second doesn't use any GUI
features, only the standard file descriptors as a console application.

You should be able to find other asm Win32 guides on the web to take
you further.

>
> What did Tim mean by, "no one writes production Win32 code in MASM"?
> Do professionals use MASM to write things other than WIN32 code, -OR-
> do professionals write Win32 code in something other than MASM?

I can't say what Tim meant but few people write assembler of any sort
these days. It is for good reasons but it's a pity. Received wisdom is
that HLL development is faster and safer and in general that's
absolutely true. But take a look at these two sets of code snippets.
Both change the endianness of a value of different widths - i.e. 16-
bit, 32-bit etc. One is written in C and the other in assembly.

http://codewiki.wikispaces.com/endianness_changing.c
http://codewiki.wikispaces.com/endianness_changing.nasm

Now I ask you, which is better?


> And along the same (if not identical) thought: Does "Professionals do
> not write 32-bit programs in assembler" mean (A) Professionals to not
> write 32-bit code at all, or (B) when a professional does write 32-bit
> code, they use something other than assembler?
>
> If MASM is not the assembler of highest use, what is?

There is an assembler called HLA which, I believe, merges assembler
with high-level constructs and works well in a Windows environment but
I haven't used it. For a number of reasons I normally use Nasm. For
example, it has good support for 16-bit, 32-bit and 64-bit code. No
need for separate assemblers.

James

Tim Roberts

unread,
Apr 16, 2010, 3:12:39 AM4/16/10
to
NadCixelsyd <nadci...@aol.com> wrote:
>
>In another thread written about a year ago, Tim Roberts wrote,

It's interesting that our words never die.

>And along the same (if not identical) thought: Does "Professionals do
>not write 32-bit programs in assembler" mean (A) Professionals to not
>write 32-bit code at all, or (B) when a professional does write 32-bit
>code, they use something other than assembler?

As the other two replies said, when professionals write 32-bit code (or
64-bit code), they use something other than assembler.

Now, if you're programming in C or C++, I think it is essential to
understand MASM, if for no other reason then debugging. You often need to
need to debug things where you have to use the disassembly view. But no
one writes full applications in assembler any more (except toys).

In languges like C#, you are one additional step removed from assembler, so
perhaps it's not so essential.

>If MASM is not the assembler of highest use, what is?

For Windows, MASM is the most common assembler. For Linux, gas is probably
the most common assembler, but nasm is also very common.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

James Harris

unread,
Apr 16, 2010, 12:31:13 PM4/16/10
to
On 16 Apr, 08:12, Tim Roberts <t...@probo.com> wrote:

...

> As the other two replies said, when professionals write 32-bit code (or
> 64-bit code), they use something other than assembler.

...

> But no
> one writes full applications in assembler any more (except toys).

That has some truth but it probably overstates the case, and the
reference to toys is perhaps inaccurately dismissive. Sometimes the
greatest speed can only be achieved by writing in assembler.

To the OP, there is a community of assembler users you might want to
know about. Check out these newsgroups, in descending order of
aptness,

comp.lang.asm.x86
alt.lang.asm
alt.os.development
comp.lang.misc
comp.compilers

There are many web sites you can read, manuals in nauseating detail,
and loads of books available at low prices. Inner Loops by Rick Booth
is an older book you may not otherwise think of buying but it can be
helpful in learning to program well in assembler.

James

Mint

unread,
Apr 19, 2010, 7:31:40 PM4/19/10
to
On Apr 16, 11:31 am, James Harris <james.harri...@googlemail.com>
wrote:

And there these 2 excellent assembly sites.

Many professionals are there to.

http://www.asmcommunity.net
http://www.masm32.com

Andy

0 new messages