LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 07-07-2008, 06:44 PM   #1
theunixwizard
Member
 
Registered: Feb 2008
Distribution: Ubuntu,Fedora,PC-BSD,FreeBSD
Posts: 116

Rep: Reputation: 15
What are some good resources to learn assembly Language?


Does anybody know where some good resources to learn Assembly.
The reason that I want to learn it is that I want to learn more about
the undercore of a Computer. Also if I want to write a device driver.
Also any type of expirence is a good think. I googled "Learning Assembly" and I didn't find anything good. Any Ideas



Thanks for the help


John
 
Old 07-07-2008, 06:50 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
If you already know a compiled language like C or C++, why not try "gcc -S" and study the assembly language output? That's definitely a good way to go.

For whatever it's worth, I've found this book helpful:

Professional Assembly Language, Richard Blum
ISBN 0764579010

IMHO .. PSM
 
Old 07-14-2008, 10:26 AM   #3
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
Quote:
Originally Posted by theunixwizard View Post
Does anybody know where some good resources to learn Assembly.
The reason that I want to learn it is that I want to learn more about
the undercore of a Computer. Also if I want to write a device driver.
Also any type of expirence is a good think. I googled "Learning Assembly" and I didn't find anything good. Any Ideas



Thanks for the help


John

You have to read books. Search online for old ones, because I dont think they come out anymore. On Usenet, there is a group: comp.lang.asm.x86 and one called I think alt.lang.asm which have discussion.
There are still I think lots of websites on assembly, including doing assembly lang on Linux.
 
Old 07-14-2008, 01:54 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Search google for them, there's plenty of books out there:
http://webster.cs.ucr.edu/AoA/Linux/index.html
http://www.freeprogrammingresources.com/assembly.html
http://drpaulcarter.com/pcasm/
http://asm.sourceforge.net/
 
Old 07-14-2008, 03:40 PM   #5
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by theunixwizard View Post
Any Ideas
Once I saw book called "the art of assembly language". It was 1360+ pages or something and seemed to cover almost everything about assembler. Unfortunately I don't know neither book's ISBN nor it's author (I saw it as a pdf, probably pirated and without front cover and author information). I recommend to search for that one.
 
Old 07-14-2008, 05:59 PM   #6
FranDango
Member
 
Registered: Jun 2008
Posts: 101

Rep: Reputation: 15
Try to get some older books on game programming. Assembly was pretty much a must during the 90's for game programming, so these books give a relatively easy introduction and very visible examples. SAMS has had a few good books under this topic.

Assembly is different for each processor, so it's difficult to find a "one size fits all" reference book. For a rather academic approach I would suggest the old assembly books of Adam Osborne.

Linux Archive

Last edited by FranDango; 09-20-2008 at 04:59 AM.
 
Old 07-14-2008, 07:44 PM   #7
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by FranDango View Post
Try to get some older books on game programming.
Using old books forever is not good. You'll get basics, but older books (especially written in 90s) won't cover SSE, SSE2, MMX, and other newer technologies. CPU industry goes forward, so it makes sense to keep your knowledge up-to-date.
 
Old 07-15-2008, 03:07 AM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by ErV View Post
Once I saw book called "the art of assembly language". It was 1360+ pages or something and seemed to cover almost everything about assembler. Unfortunately I don't know neither book's ISBN nor it's author (I saw it as a pdf, probably pirated and without front cover and author information). I recommend to search for that one.
Wasn't it this one that I linked up above, it's not pirated, it's genuinely free
http://webster.cs.ucr.edu/AoA/Linux/index.html
 
Old 07-15-2008, 07:57 AM   #9
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by H_TeXMeX_H View Post
Wasn't it this one that I linked up above, it's not pirated, it's genuinely free
http://webster.cs.ucr.edu/AoA/Linux/index.html
Looks like the book I was talking about was an older edition of that one. I was talking about this (finally found it, but that's not pdf). Looks like author is "Randall Hyde" and it's not as new as I thought.
 
Old 07-15-2008, 05:45 PM   #10
lupinix
LQ Newbie
 
Registered: May 2008
Location: Nievern (Germany)
Distribution: Slackware, Bluewhite64
Posts: 22

Rep: Reputation: 15
I started learning x86 assembler, too. The book "the art of assembly" looks a little bit strange, because the author is talking about HLA (High Level Assembler). The assembler code isn't the one, I know from other tutorials and from school, it another type of code.
Is there a good book for learning x86 assembler with intel or at&t syntax?

Best Regards
Christian
 
Old 07-15-2008, 08:59 PM   #11
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by lupinix View Post
I started learning x86 assembler, too. The book "the art of assembly" looks a little bit strange, because the author is talking about HLA (High Level Assembler).
The link I've provided doesn't mention HLA.
 
Old 07-15-2008, 09:53 PM   #12
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
If I recall correctly, Intel had some tutorials. Unfortunately you will also need a copy of the specific x86 manual which describes the code set. Many operations are actually left unused by most operating systems and compilers. At any rate, you can practise writing and assembling the code, and invoking your code by linking to a C program. Keep in mind that while running an OS like Linux, you are in a low privilege mode and there are many instructions which you can't execute. Of course you can always fire up something like 'qemu' to execute the code you're playing with. You can also look at the GNU Assembler documentation.

The current models of Pentium etc are very complex so I'm not sure where best to start - maybe a simpler CPU like the ancient 8085 (and you can use simulators) and when your skills have improved you can move onto the x86 class? Unfortunately the assembly syntax changes although many concepts remain (code segment, data segment, etc). An x86 has numerous features not present in something like the 8085 - Floating Point Unit, virtual memory (part of the memory management unit), "hyperthread execution unit", multimedia extensions, etc etc.

The Apple2e emulator + BigMac are also a great tool set to play with; the 6502 is a very simple CPU. I have no idea how to (legally) obtain a copy of BigMac and the APple2e ROM images though, unless you still have your own copy from last century. My only complaint is that the emulator works very well - even assembling with BigMac takes forever! (Need a "full speed" option so BigMac compiles in seconds rather than minutes.)
 
Old 07-16-2008, 08:17 AM   #13
lupinix
LQ Newbie
 
Registered: May 2008
Location: Nievern (Germany)
Distribution: Slackware, Bluewhite64
Posts: 22

Rep: Reputation: 15
Quote:
Originally Posted by ErV View Post
The link I've provided doesn't mention HLA.
Oh, thank you, I looked at the Linux 32 Bit Version of the book. (http://webster.cs.ucr.edu/AoA/Linux/index.html)

@pinniped
An emulator is a great idea to learn assembly with simple processors. I started with 8086/8088 assembly, because I realized, that the current processors are complex. I'll take a look at processors like the 8085.
Thank you for the great tipps!

Best Regards
Christian
 
Old 07-16-2008, 09:57 AM   #14
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
my suggestion is to start with a rudimentary processor (wdc65c02) and learn how to translate from assembly to machine language (and back to assembly) then move to a processor with more registers (m68k).
 
Old 07-17-2008, 10:15 AM   #15
komodo
Member
 
Registered: Jun 2008
Distribution: linux from scratch, Arch linux
Posts: 39

Rep: Reputation: 15
programming from the ground up is a really good introduction to asm for linux: http://download.savannah.gnu.org/rel...oundUp-0-9.pdf

I like it a lot (actually better for a first intro than Art of Assembly, since that books goes into much detail from the very beginning. I would do PGU first, and AoA later)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need resources to learn snort adam_blackice Linux - Security 4 12-25-2007 12:35 AM
Tell Me Good Book In Layman Language 2 Learn Fedora MY_INSATIBLE_THIRST Linux - Newbie 3 10-02-2006 10:18 AM
resources to learn command line smgregory Linux - General 4 08-01-2006 02:54 PM
Is Python a good language to learn for a newbie to programming? prophet621 Programming 2 05-19-2003 03:48 PM
SPARC assembly language jclark00001 Programming 3 02-26-2003 08:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 04:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration