Re: I'd like to learn asm...




Herbert Kleebauer wrote:
"A. Ecoffet" wrote:

Julienne Walker wrote :

I would recommend not restricting yourself just to NASM. There are far
more tutorials/books written for MASM or TASM, and aside from minor
syntactical details, the concepts are identical.

What book for exemple ?

You will need three books:

1. A book about the instruction set of the processor (a few hundred
pages)

There is only one book you should use: The CPU manual from
the manufacturer (Intel or AMD). You can download it from
Intel's website or order a printed version (don't know if
it is still free of charge).

Intel software developer's manual vol 2a: 744 pages
Intel software developer's manual vol 2b: 548 pages

That's a bit more than "a few hundred pages" mind you.
Yes, I know that you recommend using the obsolete 386 version as a
guide. But why should someone give up the 486+ instructions? Gee, if
keeping the manual small is such a good idea, why not just use the 8088
manual?

The bottom line is that the manufacturer's documentation, while
invaluable, usually contains *far* too much information of a highly
detailed nature. This is why trade books on assembly language
programming sell so well -- they skip discussing unimportant
instructions and concentrate on explaining how to use common
instructions to actually *accomplish* something.




2. A book about the OS interface.

If you are using Windows, best use Microsoft's online
documentation at msdn.com. But this is much more than a few
hundred pages of documentation like the CPU documentation,
so better start with assembly programming using the DOS
interface (which is also available in Windows).

Actually, the definitive reference on Windows (Petzold's "Programming
Windows") is on the order of the same size (1,500 pages) as the Intel
documentation. So your assertion that it is much larger than the CPU
manuals isn't exactly true. And like the CPU manufacturer's data, most
of the information in Petzold's book (or MSDN on-line, if you prefer)
is of little interest to someone learning assembly language.

Now the *Linux* system information is documented much more concisely.
But still, learning assembly language doesn't require someone to learn
the entire OS API. In fact, with little more than a few console I/O
routines, you can effectively learn assembly language under *any* OS.
So why waste time learning *anything* about an OS as obsolete as DOS?
After all, learning the comparable Windows or Linux API calls that do
the same thing as the DOS API is no more work than learning DOS. And in
the end, you've learned something that you can continue to use rather
than wasting your time learning an obsolete OS' API. And most trade
books on assembly language provide just such knowledge.

Of course, you can also bypass the OS's native interface completely and
make calls to a standardized library. This could be the C standard
library (e.g., portable across OSes) or something like the HLA standard
library (portable across Windows and Linux).



3. A book about the assembler you use (a few dozen of pages)

This documentation should be part of the assembler distribution.

If the assembler's documentation is only a few dozen pages, then it is
either grossly underdocumented or has so few features that people
should run, not walk, away from the product.
Cheers,
Randy Hyde

.



Relevant Pages

  • Re: Executable enty points incorrectly documented
    ... I was speaking about Windows SDK not MSDN Library entirely, but even if Windows SDK conatins C/C++ documentation I believe that main/WinMain belong to C/C++ documentation rather than Windows API documentation. ... It's correct about the default entry point names used by the linker and also correct about what those entry points call and because this is the ...
    (microsoft.public.win32.programmer.kernel)
  • Re: ping Purl Gurl? Beginner Level Perl
    ... This is a good short one page article on perl core buffering, ... a lot of documentation amounted to nothing ... more than tirades about how bad Windows is as an operating system. ...
    (alt.usage.english)
  • Re: installing freebsd on windows
    ... windows vista runs well too on overmuscled hardware. ... Why do I have to Google the info? ... So you're trying to say that all local documentation is useless ... recommending that I do business with them again? ...
    (freebsd-questions)
  • Re: Programming PowerPC on Mac
    ... The documentation about how to program Windows with assembly language was, ... Linux and X and such with LuxAsm...because, over on Linux, it's the same ... There's nothing "official" only what ordinary developers (like ...
    (alt.lang.asm)
  • Re: A Friendly review of "Windows Programming in Assemble Language" chapter 7
    ... This introductory to Win32 API, ... you should have read AoA first before proceeding to this Windows ... so was "Art of Assembly Language" along ... Rene keeps saying Randy's an "expert" in selling himself...well, ...
    (alt.lang.asm)