flat assembler
Message board for the users of flat assembler.

Index > Main > Newbie Questions

Author
Thread Post new topic Reply to topic
Randy



Joined: 14 Jan 2004
Posts: 3
Location: Baton Rouge, LA
Randy
Hello all. I am new to assembly language programming, don't know any yet, but am hoping to learn soon. I know a few other languages to a degree . . . Bourne shell scripting, COBOL, some C, some Perl, etc. So I have a few questions about assembly in general. I have heard that assembly is very difficult to learn, particularly if you plan to teach it to yourself as I plan to. Is this true? Does it really take that much more work than any other language or it this just bias?

Also, I am used to programming on Intel processors. Does this mean that the assembly code will not change whether I am running it on Linux, FreeBSD, or Windows? I use all three operating systems. It is my understadning that assembly language is not protable, but to me this means that you cannot use the same language on different processors. Since all three of the above operating systems can run on the same processor, then should the assembly code have to change (assuming you are using the same assembler to assemble the code)?

And are there any recommended books or web sites that can help me with this? I have ordered a copy of "Assembly Language Step-by-step: Programming with DOS and Linux" by Jeff Duntemann but haven't received it yet? is this a good book? And also, I have noticed that there seems to be an emphasis put on programming assembly in DOS, but DOS is obsolete isn't it? Why the emphasis on using an obsolete operating system unless it is intended only for instructional purposes.

Thanks in advance.
Post 16 Jan 2004, 14:43
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Quote:
I have heard that assembly is very difficult to learn, particularly if you plan to teach it to yourself as I plan to. Is this true?

No Wink. Assembly is quite easy to learn, especially when you already know some HLL. You only need to understood some basics, like registers. Good book and internet is all what you need to learn ASM.

Quote:
It is my understadning that assembly language is not protable, but to me this means that you cannot use the same language on different processors. Since all three of the above operating systems can run on the same processor, then should the assembly code have to change (assuming you are using the same assembler to assemble the code)?

Code written in assembly will work on any x86 compatybile processor, so you can write applications that will work on all systems that you mentioned, but you would need to write some interface files that would deal with OS-specyfic stuff, like file system. It may be a bit difficult, but it isn't impossible. FASM itself can work in Windows, DOS, and Linux, and it uses almost the same code for all of those platforms.

Quote:
Why the emphasis on using an obsolete operating system (...)

Just because assembly programming for DOS is MUCH easier (at least in the beginning) than for example for Windows. This is bacause DOS is quite simple OS, and it allows you to focus on learning "assembly programming", not "Windows programming".

Quote:
And are there any recommended books or web sites that can help me with this?

I recommend to try 'Art of Assembly Language" by Randy Hyde, a very good on-line book: http://webster.cs.ucr.edu/AoA.html. And just try to google for "assembly programming" Wink.

regards,
Decard
Post 16 Jan 2004, 15:16
View user's profile Send private message Visit poster's website Reply with quote
Randy



Joined: 14 Jan 2004
Posts: 3
Location: Baton Rouge, LA
Randy
Thanks for the quick reply. I had avoided buying Hyde's book, because at Amazon, I read some criticism that it used a high level wrapper that made the code look more like an HLL than an assembler. Anyway, thanks for the clarification on things. When I get the book, I'll start reading it and try to go through the exercises. I don't have a pure DOS box, but do have an emulator on Linux/FreeBSD, and at any rate slapping DOS 6 on an extra partition wouldn't be that much of a problem if necessary. Thanks for the tips, I'll let you know how it goes.

Randy
Post 16 Jan 2004, 15:25
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger Reply with quote
Randall Hyde



Joined: 03 Dec 2003
Posts: 57
Randall Hyde
Randy wrote:
Thanks for the quick reply. I had avoided buying Hyde's book, because at Amazon, I read some criticism that it used a high level wrapper that made the code look more like an HLL than an assembler. Anyway, thanks for the clarification on things. When I get the book, I'll start reading it and try to go through the exercises. I don't have a pure DOS box, but do have an emulator on Linux/FreeBSD, and at any rate slapping DOS 6 on an extra partition wouldn't be that much of a problem if necessary. Thanks for the tips, I'll let you know how it goes.

Randy


Actually, read it for free on Webster and make up your own mind.
http://webster.cs.ucr.edu

As for HLA being a "wrapper". Well, people have their own ideas of what "true assembly" really is, but HLA provides all the same machine instructions that you'll find with FASM, MASM, NASM, Gas, etc. So it will not prevent you in any way from learning or writing assembly language programs.

Personally, I advise staying away from DOS. Though the OS is simpler, you *still* have to learn the API. And every minute you spend learning the DOS API, even though it's simpler than Linux, is one minute of your life wasted unless you intend to work on 16-bit DOS applications in the future.

One nice thing about AoA, that your reviewer missed, is the fact that it is OS independent. HLA provides a set of library routines that are ported between Windows and Linux. So you can learn assembly language programming without the hassels of struggling with OS APIs (in assembly) at the same time.

And the HLA Standard Library is callable from FASM (and other assemblers). So once you learn assembly with AoA, you could still call those library routines should you choose to switch to another assembler (i.e., your time investment spent learning those functions is preserved).

Reviews, of course, are almost always problematic. Just about every review I've seen of AoA, good or bad, has been written by someone who hasn't gotten much beyond the first couple of chapters in the book prior to writing the review. Pretty hard to describe what the book is all about on that basis Smile
Cheers,
Randy Hyde
Post 16 Jan 2004, 17:57
View user's profile Send private message Visit poster's website Reply with quote
gorshing



Joined: 27 Jul 2003
Posts: 72
Location: Okla, US
gorshing
Read Randall Hyde's book and also Dr Paul Carters Assembly Tutorial www.drpaulcarter.com

There is another tutorial on this board that Privalov wrote, search for that.

_________________
gorshing
Post 16 Jan 2004, 18:30
View user's profile Send private message Visit poster's website Reply with quote
Randy



Joined: 14 Jan 2004
Posts: 3
Location: Baton Rouge, LA
Randy
Randall Hyde wrote:
Randy wrote:
Thanks for the quick reply. I had avoided buying Hyde's book, because at Amazon, I read some criticism that it used a high level wrapper that made the code look more like an HLL than an assembler. Anyway, thanks for the clarification on things. When I get the book, I'll start reading it and try to go through the exercises. I don't have a pure DOS box, but do have an emulator on Linux/FreeBSD, and at any rate slapping DOS 6 on an extra partition wouldn't be that much of a problem if necessary. Thanks for the tips, I'll let you know how it goes.

Randy


Actually, read it for free on Webster and make up your own mind.
http://webster.cs.ucr.edu

As for HLA being a "wrapper". Well, people have their own ideas of what "true assembly" really is, but HLA provides all the same machine instructions that you'll find with FASM, MASM, NASM, Gas, etc. So it will not prevent you in any way from learning or writing assembly language programs.

Personally, I advise staying away from DOS. Though the OS is simpler, you *still* have to learn the API. And every minute you spend learning the DOS API, even though it's simpler than Linux, is one minute of your life wasted unless you intend to work on 16-bit DOS applications in the future.

One nice thing about AoA, that your reviewer missed, is the fact that it is OS independent. HLA provides a set of library routines that are ported between Windows and Linux. So you can learn assembly language programming without the hassels of struggling with OS APIs (in assembly) at the same time.

And the HLA Standard Library is callable from FASM (and other assemblers). So once you learn assembly with AoA, you could still call those library routines should you choose to switch to another assembler (i.e., your time investment spent learning those functions is preserved).

Reviews, of course, are almost always problematic. Just about every review I've seen of AoA, good or bad, has been written by someone who hasn't gotten much beyond the first couple of chapters in the book prior to writing the review. Pretty hard to describe what the book is all about on that basis Smile
Cheers,
Randy Hyde


I have been looking at your book on the net for a while now, and just saw the newest version of it advertised in O'Reilly's catalog that I got in yesterday, although I haven't tried any exercises from it yet as I haven't had the time to actually sit down and seriosuly read it. I assumed the wrapper may have been used for OS independence, but didn't know enough about it to decide one way or another. I just didn't want something that would hide the real machine instructions away from me just to make things easier. At any rate, when learning something new, I usually use several books rather than just one, and I prefer reading things on paper actually so I'll probably get yours as well. But thanks for the advice.

I only have a vague idea of what an API is, and I generally prefer Unix to Windows so was thinking of focusing more of my time in that area than with Windows . . .

Thanks for the advice everyone. And I'll do my best to get through the whole book before offering any criticisms, positive or negative. Smile
Post 16 Jan 2004, 19:32
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger Reply with quote
gorshing



Joined: 27 Jul 2003
Posts: 72
Location: Okla, US
gorshing
Privalov's tutorial is http://board.flatassembler.net/topic.php?t=118

Dr Carter's tutorial is in NASM, but the syntax is similar and he also covers other topics that I haven't found elsewhere.

_________________
gorshing
Post 16 Jan 2004, 22:14
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.