Author Topic: Learning assembly - Have some questions.  (Read 5387 times)

Offline georgelappies

  • Jr. Member
  • *
  • Posts: 12
Learning assembly - Have some questions.
« on: April 28, 2012, 05:37:58 PM »
Hi all

I am learning assembly but have to admit it is one tough cookie to crack. It is difficult to find good tutorials on the net to be used by rookies. I came accross the pdf files for a book called "The art of assembly language programming" it is a very detailed work and I am benefiting from it.

The only problem is that it is written for MASM, now if one doesn't MASM or NASM yet it is not possible to tell what will work in NASM. I had a look at the NASM documentation but for someone starting assembly it is not enlightening.

Is it "safe" to use these pdf's? Should I look somewhere else for tutorial matter? Any advice and or help will be much appreciated.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Learning assembly - Have some questions.
« Reply #1 on: April 28, 2012, 07:38:57 PM »
Well... ("that's a deep subject")... You've apparently got the 16-bit version of AoA. The 32-bit version uses HLA, which is "something completely different" - Masm is bad enough. :)

You can definitely "read" AoA and "use" Nasm, but it will require some mental "translation" from Masm syntax to Nasm syntax. This isn't particularly difficult, but introduces some "extra" complications and as you know, a beginner doesn't need any "extra" complication!

If you want to learn DOS programming, AoA is a good source of information. This is a fairly "easy" way to start, but DOS is really getting pretty "obsolete" at this point. It still "works" - if your OS supports it or you've got an emulator - but learning the details of DOS may not be the best use of your time. I'm pretty "DOS friendly", and I don't think it's a bad place to start, but I wouldn't spend too much time on it... "Graduate" to 32-bit code as soon as you're "ready" - it's actually easier in a lot of ways, but you'll need to deal with the OS more (DOS will let you "bypass" the OS more easily).

If (when) you get to a specific question about how to make something from AoA work with Nasm (it will, I assure you!), re-reading that section of the Manual may help, or ask here. I "used to have" quite a bit of experience translating Masm to Nasm, but my memory is slip-sliding away...

For 32-bit code - in Nasm syntax - you could look at Dr. Paul Carter's work - http://www.drpaulcarter.com It's not as "extensive" as AoA, but won't require any "translation". No reason not to use "both"!

We welcome your questions, in any case!

Best,
Frank




Offline georgelappies

  • Jr. Member
  • *
  • Posts: 12
Re: Learning assembly - Have some questions.
« Reply #2 on: April 28, 2012, 08:00:07 PM »
Frank

Thanks for your thorough explanation and friendly welcome. Having lurked on the forum a while now it is always a pleasure coming across one of your replies.

I actually use Kubuntu myself, the reason I need to get to grips with DOS assembly is that one of the subjects I am taking currently as part of my B.Sc Comp Science degree is computer architecture which encompasses assembly language programming. Referring to one of your comments in another post where you mentioned the way the boss / teacher wants it is the right way is the main reason for me having to do it in DOS.

Personally I would have been thrilled at the possibility of doing it in Linux but the university I attend unfortunately sold their soul to the devil and is a "beneficiary" of a Microsoft sponsored deal.

It is also a correspondence university which means that I am about 200 km away from the nearest lecturer, hence the need to rely on self study methods.

I had a look at Dr. Paul Carter's work and it does indeed look promising. The problem though is that he uses c for the parts that is hard and difficult to do in assembly the input of characters, converting them to integer, float etc. and then converting it back all back to ASCII for printing on the screen.

Thanks for this invite

Quote
We welcome your questions, in any case!

I will most definitely take you up on it :)

Kind regards,

George