News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

New member with a question

Started by TheEFIGuy, October 05, 2015, 12:17:36 AM

Previous topic - Next topic

TheEFIGuy

Hi all, I've been wanting to learn programming for a while now and finally made my mind up on C++ and assembly. I've purchased a few beginner books on C++ but have yet to get any for assembly. Would the 7th edition of the "shell" book by Kip Irvine suffice or would I need to start elsewhere such as the Iczelion tuts?

jj2007

Art of Assembly might be a good choice, too - the first edition, not the second one.

Iczelion is OK once you get tired of console mode programming.

Check Masm32: What you absolutely must know to get started for some more hints.

Some people may tell you that assembler is not the right language to start with - too complex etc. It's actually the other way round: C++ is too complex for a starter. Assembler proggies may crash more often, but you can program with a very small set of commands. It's like playing with lego: a small variety of brick types is sufficient to build beautiful castles.

TheEFIGuy

Quote from: jj2007 on October 05, 2015, 04:22:03 AM
Art of Assembly might be a good choice, too - the first edition, not the second one. DONE! Found a used one on Amazon for ~$8
...
Check Masm32: What you absolutely must know to get started for some more hints. Downloaded and bookmarked!
...

I also grabbed a copy of Modern X86 Assembly Language Programming: 32-bit, 64-bit, SSE, and AVX by Daniel Kusswurm for a good price used. I'm going to keep an eye out for a cheaper copy of the "shell" book by Irvine.. ~$117 for a used copy is pretty steep for me at the moment..

rrr314159

$8 yes, $$117 forget it! Steal it instead. BTW two (or 3, 4) books is better than one IMHO, for learning any topic. It's very useful to get different slants on the same lesson. Concentrate on the one you're most comfortable with, but glance thru the others. Even the worst book has always given me some insight the others lacked.

Dunno if you've downloaded the masm32 package. See upper right corner of this page; better yet check this recent thread from a new member where we recommended the package; he also is interested in C++ and assembler. masm32 package has very useful tutorials and examples; even better, it will put you on the same page as most of us on this board.

Good luck & happy assembling ...
I am NaN ;)

hutch--

Josh,

I would not waste the money on Kip Irvine's book, its aimed at a different market, getting undergraduates through a simplified first course in assembler in a semester. You will do a lot better with Daniel Kusswurm's book as it is far more up to date. You will find bare C closer to assembler than the very high level parts of C++ and with practice you can write assembler object modules that can be linked into a C/C++ application, as long as you get the calling convention right.

When you are more familiar with how assembler and its modules hang together, you should download the Intel manuals from their web site as they are the best reference material available ranging from architecture to instruction sets and optimisation techniques. Just be aware that it can be hard going as they assume advanced knowledge of assembler coding.

herge


Good Morning:

Kip Irvine has trouble using a debugger, get one either Olly
or windbg from Microsoft. You are going to need one.

Regards Herge
Regards herge
Read "Slow Death by Rubber Duck"
for chemical Laughs.

TheEFIGuy

Thanks for all the hints everyone. I'm going to go the assembler route first. I do wonder (and ill search when I get home, currently on my slow a$$ blackberry) if I will be able to makeuse of visual studio ide for learning this stuff. Currently I've got a MSDN account through M$ bizspark program and hoped to put it all to good use

TheEFIGuy

Got home and got it set up a little bit further on the desktop, laptop is next after dinner.. This is the setup that I decided on for now. MASM32 + RadASM 3.X IDE from the forum. I felt comfortable with its layout and it assembled the sample from Masm32: What you absolutely must know to get started without a hitch. I also downloaded the windbg kit from Microsoft and installed it along side VS2013. I chose it over ollydbg as it appears that development on ollydbg has ceased and I'd like to learn on something that will be useful for a good while and as I also plan on moving to the VS IDE someday once learning C++ begins.. The books should be in tomorrow and looking to go from there once they arrive.

rrr314159

Keep up the good work ...! If you get bored browse the /masm32 directories - examples, macros, tutorial
I am NaN ;)

TheEFIGuy

Well the Amazon fairy came today, yay! One thing I wanted to ask about though was I got the first edition of Art of Assembly Language but it looks like it suggests using HLA also just as does the second edition... Haven't started reading any of them yet.. I got a few things around the house I need to get done first before "Mom" will let me play with my toys :lol:

rrr314159

Hi Joshua,

I've never bothered with HLA but the unanimous opinion of those who have is, don't. It's obsolete, didn't catch on, even Randy Hyde stopped pushing it. Also, for a beginner it just gets in the way; learn the basics first. HLA is an excellent effort, don't mean to imply otherwise, but not really viable any more. masm32 has a "Rarely Used Projects Page" where it's discussed. Also check out biterider's ObjAsm on the same page. After u get the basics of assembler down, such a project may be attractive, particularly given your interest in C++.

As long as we're talking about such things jj20007's MasmBasic provides many useful functions, and doesn't require a whole new approach: you're still doing regular assembler but calling his functions. For a beginner, this sort of thing can be very helpful for (among other things) printing out results. When playing with such instructions as bit-shift, or whatever - the "meat" - often you just want to see the results, without hassling (yet) with functions like crt_printf etc. This is the situation where a high-level print function like MasmBasic's "deb" comes in handy. Ultimately you need to know the details of how it works, but getting started, it's convenient to put those off. Still, for the time being, the simple "print" function (and related functions) found in masm32 macros.asm is good enough. In masm32 examples you can find how to use them.

Key point: don't get distracted by powerful "packages" that can do a lot of the grunt work for you, learn how to do it yourself (even if you do use those packages as, sort of, "trainer wheels"). Then, when your objective is no longer "learning" but "doing" you can effectively take advantage of the many man-hours already put into such packages.

It's also worth mentioning the "HLL" instructions built-in to your assembler, such as .if, .while, etc. Don't confuse that with either "HLA" or the generic term "HLL" referring to high-level languages like C++ etc (took me a long time to realize masm's "HLL" was a completely different thing!) These constructs are very useful for making clean, readable code; but again, I recommend, first learn to do it with traditional compare, branch, jump instructions; then use HLL as a convenient shortcut, according to your taste.

BTW that's my (perhaps, everybody's) favorite Hubble photo ... now get to work on that squeaky door-hinge :biggrin:
I am NaN ;)

dedndave

if you want to learn HLA, that's fine, but you won't be learning assember, really
it's great for those who want to get going without learning much

TheEFIGuy

Quote from: dedndave on October 11, 2015, 05:33:08 AM
if you want to learn HLA, that's fine, but you won't be learning assember, really
it's great for those who want to get going without learning much

no, I'd rather learn assembly.

CCurl

Quote from: herge on October 05, 2015, 04:30:50 PM

Good Morning:

Kip Irvine has trouble using a debugger, get one either Olly
or windbg from Microsoft. You are going to need one.

Regards Herge
FWIW, with Mr. Google's help, I figured out how to build and debug my assembler project in Visual Studio (2013). It has made my life 100x easier. If you have VS 2013, I can share with you what I did to get it going if you want. Let me know.

Zen

JOSHUA,
I have been programming with C++ (Visual Studio) and MASM assembly for years. I think this is optimal (and, the best of all worlds),...as most complex programs are written in  C++ (it is the precursor to both COM and the .NET Framework),...and, even though MASM assembly can be inconvenient,...it is excellent for a whole range of application problems.
I have a copy of Kip Irvine's book,...and, I would NOT recommend it. Most of it is obsolete (16-Bit code examples),...it's WAY overpriced,...and, it's inadequate for novice assembly programmers. You'd do alot better to read the source code for the examples that come with the MASM32 package, and use IntelĀ® 64 and IA-32 Architectures Software Developer Manuals for reference.