View Full Version : Learning Assembly
Burke
January 5th, 2006, 11:29 PM
This seems like the kind of thing that would have been posted before, but I searched and could not find it, so here I am. ;)
I'm about to embark on a most likely painful quest to learn assembly. I have extremely little knowledge on the subject and was wondering if anyone has a favourite book or online resource on the subject that they would like to share to get me started.
Any help would be greatly appreciated.
cwaldbieser
January 5th, 2006, 11:48 PM
This seems like the kind of thing that would have been posted before, but I searched and could not find it, so here I am. ;)
I'm about to embark on a most likely painful quest to learn assembly. I have extremely little knowledge on the subject and was wondering if anyone has a favourite book or online resource on the subject that they would like to share to get me started.
Any help would be greatly appreciated.
Just to clarify, do you want to learn it for x86?
Burke
January 5th, 2006, 11:49 PM
That's the plan.
csowm5je
January 6th, 2006, 12:04 AM
Programming from the Ground Up
introduction to programming using Linux assembly language.
http://www.cafepress.com/bartlettpublish.8640017
http://www.amazon.com/gp/product/0975283847/002-9987578-3756020?n=283155
Burke
January 6th, 2006, 12:18 AM
Awesome. Thanks very much. I will definitely pick up a copy of that. As a bonus, its within that magical limit of 500 pages which determines whether or not I finish a book :)
kudu
January 6th, 2006, 12:19 AM
Programming from the Ground Up
introduction to programming using Linux assembly language.
http://www.cafepress.com/bartlettpublish.8640017
http://www.amazon.com/gp/product/0975283847/002-9987578-3756020?n=283155
Great book for Linux assembly programming. There's also HLA - The Art of Assembly Language. Google it.
In fact...Google Linux Assembly and a bunch of sources you shall find, including tutorials.
kudu...out
csowm5je
February 13th, 2006, 09:19 PM
http://download.savannah.gnu.org/releases/pgubook/ProgrammingGroundUp-1-0-booksize.pdf
orlox
February 13th, 2006, 10:02 PM
check this site
http://asm.sourceforge.net/
DarkW0lf
March 31st, 2006, 10:01 PM
The HLA links are:
http://webster.cs.ucr.edu/
http://www.geocities.com/kahlinor/HLA.html
Sevag has some great utilities that make setting up/using HLA much easier.
sharperguy
April 1st, 2006, 10:45 AM
Love Programming from the ground up and would have recommended tit had i not been too late. BTW anyone know an emulator-thing which will let me write code in "assembly language" exept it is coded the same way as on BBC computers (cant remember which processor they use) ie it dosnt actually assemble the code but converts it as HLL's do exept the code looks just like that type of assembly.
Reason: I will have to learn it for advanced higher computing and i though t would help to know it before hand (since im already learning i686 assembly for the fun of it out of the abouve ebook).
LordHunter317
April 1st, 2006, 11:20 AM
I think the better question is why do you want to learn x86 assembly?
If you want to learn assembly, don't learn x86 assembly. Really. It's simply retarded and a headache to deal with.
Unfortunately, it's all I know so I can't recommend any other books, but I would do some research.
sharperguy
April 1st, 2006, 12:14 PM
maybea because x86 is the only system acessable?
supirman
April 2nd, 2006, 08:01 AM
x86 assembly isn't too bad after you get familiar with it. One thing that can be confusing is the assembler syntax -- especially when viewing different tutorials. I prefer the AT&T style (which the GNU assembler uses), which is of the form: op src, dest. Plus I like how registered are prefixed with %, immediate operands with $, etc.
Now if you want to see ugly, mix real mode and protected mode assembly. Dealing with the segment:offset addressing, setting up a proper gdt, mixing 16 and 32 bit code, etc is a pain, but I found it fun. I was given the task of writing a custom x86 bootloader for my company's new products so I had to deal with all of this. As I said, it was a pain, but luckily I'm a massochist :)
BTW, if you ever wanted to write your own bootloader (mostly for learning purposes) I'd recommend setting up an emulator, such as Bochs. Bochs has support for using it's internal debugger, or for interfacing with gdb. Stepping line by line through your code is a great tool, especially when new to assembly. When deveoping the bootloader for our new product, there was no way to know if anything was happening correctly, so having Bochs was invaluable. It does have a shortcoming at this point, in that it doesn't support P6 instructions, such as cmovcc and it will just die if it comes across one.
Assembly can very fun, so good luck!
Azrael
April 2nd, 2006, 09:21 AM
If you want to learn assembly, don't learn x86 assembly. Really. It's simply retarded and a headache to deal with.
********. I, for one, find it quite logical and straightforward to deal with.
rplantz
April 2nd, 2006, 11:34 AM
********. I, for one, find it quite logical and straightforward to deal with.
I've been working with assembly language for over 40 years on many machines, including z80, Data General Nova/Eclipse, DEC PDP-11, 680xx, PPC, IBM Series/1, i86, Itanium, etc. Projects range from a CT scanner to a shipping container handling system. And I've taught the class at the university level for over 20 years.
The best (most honest) remark I've heard about which assembly language is best came in the middle 1970s when I asked a friend about the Data General Nova compared to the DEC PDP-11. He first discussed the differences in the assembly languages. (We would now probably call the Nova RISC and the PDP-11 CISC.) He said that you could solve a problem with fewer lines of code on the PDP-11, but both machines took about the same amount of time. Then he said that he preferred the Nova and added that was probably because he had written much more code for it and was more used to it.
I always remember his remarks whenever I see discussions about which language is better.
Gustav
April 2nd, 2006, 12:04 PM
I learned assembler on a calculator that run on a z80 processor (Ti-83). And I have programmed some on a Motorola 68000.
The basic measurement for how fun it is to program assembler on a special processor is - how limited the language is (the more limited, the more fun).
In a school-project I and two others built a computer. In that we built our own processor with our own assembler language. The output was a TV-screen (we only had one instruction to write a pixel at a time at the screen) and the input was two TAC2 joystics. That was great to program on :)
Azrael
April 2nd, 2006, 12:22 PM
edited due to latent indifference
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.