Hi guys, im thinking of learning assembly language and i hope to start learning from one book. which of the following 2 books would you recommend to learn from.

1- http://www.amazon.com/Assembly-Language-Step-Step-Duntemann/dp/0471578142/ref=sr_1_3?ie=UTF8&s=books&qid=1256916120&sr=1-3

2-the original (Dos version) the art of assembly language

i dont mind learning Dos first (16bit) then move to Iczelion's tutorials to learn windows(32bit).

with the assembler, can i use Radasm & masm in win xp pro/win 7 to work through the examples of the above books? or do i need to setup a virtual pc with Dos on it?

if you have any other suggestion on how i should go about learning asm, or any other matrials other than the one i sugested, please let me know.

i thank you in advance for the help
Posted on 2009-10-30 10:30:28 by ozi
Do you have any particular reason to want to learn asm in DOS? IMHO it's a waste of time for a beginner. Start with win32 and THEN, if you still feel like learning DOS, go for it.
Posted on 2009-10-30 12:20:56 by ti_mo_n
I agree with ti_mo_n, assembly language programming is more complex under 16-bit DOS than under 32-bit Windows. Windows abstracts hardware and provide rich API for programmer, while DOS gives you full control over machine (and million ways to crash it while learning).

Jeff's book is Linux-oriented, AFAIK. Examples are for NASM. Nevertheless, he's good writer and his book will help you to get overall picture.

If you want to learn assembly language to write programs for Win32, do yourself a favor: acquire MSDN Library. With Visual Studio Express from Microsoft site, for example.

Intel/AMD architecture references are the "must have". Even if you don't understand any single word in them now. They're not too technical when you catch the basics.

Do you have experience of programming in other languages? Most C compilers provide some way to embed assembly language snippets in regular C program. With Visual Studio at hand, you can start to write assembly language code almost instantly, within familiar environment.
Posted on 2009-10-30 13:40:03 by baldr
Jeff Duntemann's Third Edition is Linux-based, almost entirely. The Second Edition covers DOS, but in Nasm syntax. If you could find a used copy of the First Edition, that's Masm/dos, unless I'm mistaken.

For your purposes, the 16-bit AoA is probably a better bet (and free!), although I much prefer the "approach" in Step by Step. Try it. If Randy's "teaching style" matches your "learning style", you're all set. If not, try something else. There's an online "book" here... but not really "complete". Another one that won't cost you anything to look at...

32-bit programming is "easier" in many ways, but the "hardware abstraction" and the "rich API" won't get you as close to the CPU. Almost like being in BASIC! :)

Best,
Frank

Posted on 2009-10-30 14:46:36 by fbkotler

32-bit programming is "easier" in many ways, but the "hardware abstraction" and the "rich API" won't get you as close to the CPU. Almost like being in BASIC! :)


It's hard to feel that you achieve anything if your program can't output some results in any form. Without "hardware abstraction" and "rich API" you have to reinvent the wheel for text/graphic/sound/file I/O, and in 32-bit protected mode it's not for beginner.


Assembly
You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot. After thatís done, you pull the trigger, the gun beeps several times, then crashes.
Posted on 2009-10-30 17:29:41 by baldr

It's hard to feel that you achieve anything if your program can't output some results in any form. Without "hardware abstraction" and "rich API" you have to reinvent the wheel for text/graphic/sound/file I/O, and in 32-bit protected mode it's not for beginner.


Which is why a person might want to start with 16-bit code!


After thatís done, you pull the trigger, the gun beeps several times, then crashes.


Something wrong with your program, then. Don't blame the "bitness" for that!

What's your recommendation for a 32-bit book? 32-bit AoA?

Best,
Frank

Posted on 2009-10-30 18:58:44 by fbkotler
Thank you guys for the response.

i want start with Dos because all the basic materials I've seen start with Dos then gradually move up. i also like to get an understanding on how things work on a deep level.  all the win32 assembly tuts i tried assume prior knowledge of assembly.

frank, i don't mind the style of both authors and i think i can learn from both books, but im not sure which one will give me a good basic understanding. i just skimped through both books and i felt that AoA explains things deeper than Jeff Duntemann's book (first edition), but i could be wrong as i didnt spend enough time reading them.
i have a pdf copy of AoA (the Dos version) and im just using someone's copy of Jeff Duntemann's book, so i wanted to decide before i end up buying it.

i have previously done a bit of c and jave programming and i did well in both of them, specially in c. I eventually would like to learn c/c++, reverse engineering, rootkits , kernel programing, melware and virus analysis....basically i'd like to develop a good knowledge in the field of security.

next year i'll be starting a computer security bachelors degree and i just like to start a head, because i have the time.

any other inputs or suggestions, now that i clarified my situation further?? i still would like to see more opinions on those books.
Posted on 2009-10-31 03:35:48 by ozi
ozi,

If you really do have time, read Intel SDM/AMD APM. Vast amount of knowledge about architecture you're about to program can never be bad asset.

Being fluent at C-speak, you may take the path of inline asm. Compile your C program with /FAcs (Configuration Properties | C/C++ | Output Files | Assembler Output=Assembly, Machine Code and Source), examine it, understand it, improve it with hand-written __asm code. In Release configuration.

fbkotler,

Are you trying to say that not being able to write 32-bit PM drivers for one's hardware is a good reason to resort to 16-bit programming? Hardware won't change if one do that. ;-)

Best books on 32-bit x86 programming are Intel SDM/AMD APM. Best buy for Win32 programming is MSDN Library. I mean books as a source of information, not tutorials.
Posted on 2009-10-31 08:40:10 by baldr