coinop

Can someone with experience give me their opinion on this learning plan. The most important question is about the book of choice, if you have used it before.

I'm looking to learn Intel assembly language. My choice as a beginner is this book -> Assembly Language for x86 Processors (6th Edition) by Kip R. Irvine. I'm not new to programming, but I am new to asm.

I looked through the table of contents of several books including that one on Amazon. Many books refer to using Visual Studio. I'm not interested in Visual Studio at all, but would like to use NASM. Of course, I would not be here if I did not consider MASM, but my question mostly is not about which assembler is better. My question is about adaptation if you are starting out. The book recommends Visual Studio and uses MASM, but notes NASM also.

How complex is it to adapt to NASM from a MASM perspective. This might be a broad question, but I'm more concerned about the complexity of this book as a single lesson plan. Should I get this book? or is there another approach to this.

As a side note, after NASM, I would like to try to work with Flat Assembler. These assemblers are available for Linux as well, which is important to me. I don't want to tackle the GNU assembler, because from looking at various references, it is the most "different" of the main stream assemblers.

Anyone with advice or recommendation based on experience with this book, is much appreciated. I'm just starting out.

Can someone with experience give me their opinion on this learning plan. The most important question is about the book of choice, if you have used it before.

I'm looking to learn Intel assembly language. My choice as a beginner is this book -> Assembly Language for x86 Processors (6th Edition) by Kip R. Irvine. I'm not new to programming, but I am new to asm.

I wouldn't prefer that book to learn assembly language. There are better alternatives.

I looked through the table of contents of several books including that one on Amazon. Many books refer to using Visual Studio. I'm not interested in Visual Studio at all, but would like to use NASM. Of course, I would not be here if I did not consider MASM, but my question mostly is not about which assembler is better. My question is about adaptation if you are starting out. The book recommends Visual Studio and uses MASM, but notes NASM also.

If you prefer NASM or YASM you should check Paul Carter's site. It's a good starting point for 32 bit programming under Windows or Linux. You'll need NASM and GCC.

As a side note, after NASM, I would like to try to work with Flat Assembler. These assemblers are available for Linux as well, which is important to me. I don't want to tackle the GNU assembler, because from looking at various references, it is the most "different" of the main stream assemblers.

Yes, NASM and YASM are available under Linux, BSD, and MacOS too. I've no experiencees with Flat assembler. NASM and YASM have a slidely other syntax compared with MASM. That has advantages but also disadvantages. You could try to install the MASM32 package; it's worth a try and has a broad set of tutorials and examples for your needs. Most of the material is useable with jWasm, which is a nearly 100% MASM clone, which you can use under Linux, too. Another alternative would be SolAsm.

It is fairly complex. It's usually no problem ... if you are familiar with both Nasm and Masm ( but even then, there are not just differences in syntax, but differences in capabilities, which sometimes makes it very hard to find the equivalent code for the "other" assembler ).

Quote

As a side note, after NASM, I would like to try to work with Flat Assembler. These assemblers are available for Linux as well, which is important to me. I don't want to tackle the GNU assembler, because from looking at various references, it is the most "different" of the main stream assemblers.

For Linux, NASM is the better choice - because it has full support for position-independent code ( at least in theory - I haven't seen a good example in Nasm yet! ).

COINOP, Hi. We get alot of questions about Kip Irvine's, "Assembly Language for x86 Processors". I bought the Fifth Edition myself and used it as a reference while learning Assembly Language programming. Large portions of his book are obsolete (all the 16-bit stuff, which won't run on any Windows operating system above XP). Also, he creates a library of routines that is mostly incompatible with the libraries and code examples that come with the MASM package. His code examples are overly simplistic to the point of being almost useless,...and, it is generally quite confusing for beginners when they try to integrate code examples derived from the more stable and reliable MASM package. It is best avoided.

coinop

I have some experience in C, but I have not yet done system level programming.

I did try http://www.drpaulcarter.com and the pc assembly tutorial last night, and I have to say, it's an excellent introduction so I will try to complete it. I'm glad that the last response was about the book I was interested in. I decided to skip the book.

I came up with a couple of new questions -

Is there a good text, that is up to date that I can use as a reference with the paul carter tutorial?

Also, I understand the Intel manuals are available as well as the AMD manuals. Which volumes should I have in my library at a minimum.

I did try http://www.drpaulcarter.com and the pc assembly tutorial last night, and I have to say, it's an excellent introduction so I will try to complete it. I'm glad that the last response was about the book I was interested in. I decided to skip the book.

yes, Paul Carter's book is an excellent introduction; I'm using it to teach my students. There are some missing points, for example the SIMD programming technique, but that's okay for starters.

Is there a good text, that is up to date that I can use as a reference with the paul carter tutorial?

Also, I understand the Intel manuals are available as well as the AMD manuals. Which volumes should I have in my library at a minimum.

Carter has a lot of text and explanations in the book. But the vendor manuals from Intel and AMD are a good supplement. You should download all for instruction reference. That's enough for a few months, I think.

coinop

Gunther, I think that's the best route for now. Paul Carters book and the Intel manuals.

btw Gunther - you mentioned you had students. What level of school are you teaching at? Since you mentioned a SIMD programming technique (I'm not familiar with this yet); is this something current that is very important to schools? or as you mentioned maybe not critical for starters.

The OS you wish to work on will be the main decider of what tools you use to develop with, if you are aiming at Linux then NASM, JWASM or GAS using Intel notation are probably the best choices. If you are targetting a Windows platform, you have the choices of MASM and compatibles (JWASM), FASM and NASM. TASM is just too old. Of this choice the best support and range of code examples is in MASM and compatible assemblers, FASM is an excellent assembler and very powerful once you know how to use it but it does not have the support base of MASM. NASM is also a well written powerful assembler but it is more pointed at cross platform compatibility that ease of use.

As far as instructions to learn, always start with the basic components, MOV, ADD, SUB, CMP, TEST, ROL/R, etc .... as these common instructions do the lion share of the work. SIMD instructions are specialised and targetted at streaming multimedia data and while they are often used for other purposes, you really need to know the basic stuff first. Get used to the complex addressing modes "mov eax, [ecx+edx*4+64]" style notation and the instruction component order "mov eax, 1234" means move the immediate value of 1234 into the EAX register.

It is a lot to learn but its a ton of fun once you get the swing of it and there is real pace and power in mastering this style of code.

btw Gunther - you mentioned you had students. What level of school are you teaching at?

I've two jobs since 4 years. First I'm teaching mathematics, physics and computer science at a university in Berlin. My second job is a real teacher job at a high school in the Brandenburg area (mostly mathematics for scholars of the last school grade).

Since you mentioned a SIMD programming technique (I'm not familiar with this yet); is this something current that is very important to schools? or as you mentioned maybe not critical for starters.

SIMD stands for Single Instruction Multiple Data. It comes from the main frame vector computers and was introduced first with Apple's AltiVec followed by Intel's MMX technology. But I stay with Hutch: first things first. You'll have to learn the basic components, the different addressing schemes, how to program an alternative, loop etc. etc. That's all described well by Paul Carter. Moreover, he shows the usage of the old floating point unit and how to combine high level languages, like C, with assembly language. If that's done, you can go forward to the fancy SIMD instructions.

If you should have any questions (and I'm sure you will), post your code here and a lot of skilled programmers will help you. That's for sure.