Discover the best of the web!
Learn more about Digg by taking the tour.
Learning Assembly Language Programming
webster.cs.ucr.edu — Good resource page for learning Assembly.
- 1508 diggs
- digg it
- JeanYves, on 10/12/2007, -4/+13Thanks for posting this:)
I'm actually gathering tutorials on programming languages for further usage.- Robotsu, on 10/12/2007, -2/+29linkedList1 said, "If you're starting to learn you should start high level ;)"
I disagree. Working with a basic 8-bit microprocessor in assembly teaches you amazing amounts about how computer internals work. I would say starting at that level, then working up to C is an excellent way to learn. - chedabob, on 10/12/2007, -7/+6Could have done with this a few weeks back when I did assembly at college. Walked in one morning, tutor handed me a sheet of paper with assembly code on it, and I wanted to kill myself.
Surprisingly, the one person in my group that struggles with C# is the best at using ASM. Needless to say, we all copied his code XD - Markie1006, on 10/12/2007, -0/+8So you learned nothing?
Assembly is good for learning the nitty gritty of what goes on under the hood, and makes you a much more efficient coder with high level languages. - Zippo, on 10/12/2007, -3/+4Oh dear Science, not Assembly. This brings back bad memories of Computer Science class in University...
exams with writing out entire programs on paper with pencil. *shudder* - Mirag3, on 10/12/2007, -4/+141994 called, they want their webdesign back.
- posure, on 10/12/2007, -0/+5@linkedList
Starting with high level languages is a bad idea. People should start with at least C or C++ so that they have a better idea of what is happening underneath the language (ASM would be good too, but not entirely necessary). Also, C++ knowledge is required for many jobs out there. I have many friends who go to schools that teach Java/C# as the primary language and all of them are having an extremely difficult time trying to learn C++ simply because they started with high level languages. Not that Java and C# are bad languages, its just much easier to move from C/C++ to Java/C# than the other way around.
Also, ASM is pretty fun. Its a pain in the ass but it is very rewarding. We programmed robots back in college, it was pretty sweet. - Kaglan, on 10/12/2007, -0/+2(On whether to start with high level or low level languages.)
I think it would depend very much on why you are learning to program. If you're learning to program "as a tool only," for example as a non-computer-science professional like a physicist or an analyst, learning high-level techniques directly probably makes more sense. Computer scientists can focus on their specialty (compiler design and optimization, for example), and you can focus on yours (whatever your area of business or research happens to be).
I had a teacher in a "programming for engineers class" who emphasized that we should use standard library methods and data structures whenever possible, because although it might be possible for us to write something better, it wasn't very likely, and it would be a waste of our time and physics/engineering skills -- time and skills which should instead be dedicated to writing more or better physics into the model. The argument makes sense to me. Of course, he was intimately involved with c++ standard library development, so maybe he was a little biased :-). - amikael9999, on 10/12/2007, -0/+0Good one! Find more here:
http://freecomputerbooks.com/langAssemblyBooksIndex.html
- Robotsu, on 10/12/2007, -2/+29linkedList1 said, "If you're starting to learn you should start high level ;)"
- Koloss, on 10/12/2007, -0/+8Another good resource for all masochistic programmers out there:
http://www.muppetlabs.com/~breadbox/bf/- mercurysquad, on 10/12/2007, -0/+7And for the really twisted programmers out there who have "seen it all", I recommend this:
http://www.dangermouse.net/esoteric/
Also don't forget to Google for the Juliet programming language! - mbiesz, on 10/12/2007, -0/+1@mercurysquad: Lots of hidden gems! My favorite is the Mondrian-inspired "Piet":
http://www.dangermouse.net/esoteric/piet/samples.html - Werrismys, on 10/12/2007, -2/+17>++++++[<++++++++++>-]<++++++.>++++[<++++++++++>-]<++++++++.>
+[<---------->-]<-------.++++++++.+++++.--------.>+[<++++++++++>-]
<+++++.>+[<---------->-]<--------.++++++++.>+++++++[<---------->-]
<-----.>++++++++[<++++++++++>-]<++.+++.---------.-------.>+
[<++++++++++>-]<++++.>++++++++[<---------->-]<--.>++[<---------->-]<---.
***** source for a program that prints out '***** rules!' - FlunkedFlank, on 10/12/2007, -0/+5Even better than bf:
http://compsoc.dur.ac.uk/whitespace/ - GMorgan, on 10/12/2007, -0/+4Meh Malbolge rules.
http://en.wikipedia.org/wiki/Malbolge
- mercurysquad, on 10/12/2007, -0/+7And for the really twisted programmers out there who have "seen it all", I recommend this:
- JonForTheWin, on 10/12/2007, -0/+1Thank you! =)
- safiire, on 10/12/2007, -1/+23However irrelevant some people might think assembly language programming is, knowing what is going on at this level has done nothing but help me.
Good link, thanks. I like seeing these sorts of things on Digg.- bpapa, on 10/12/2007, -2/+7Indeed, this is somehow just a bit more interesting than Office Max and USB mem sticks.
- hbweb500, on 10/12/2007, -0/+4Some people may think ASM is irrelevant, but, like you said, it gives you a deeper understanding of programming.
Plus, some platforms, like TI calculators, only offer Assembly programming. I remember the days of codings 1000s of lines of assembly, and how much more prepared I was for learning new languages because of my experience in low level.
- mustafap, on 10/12/2007, -9/+510 links to other resources on the web. TEN. Plus one religious link. And that is worthy of digging?
Try
google assembly language programming tutorial
You will get more than ten, and no religious links. - delabs, on 10/12/2007, -16/+1I blogged your tutorial and book here. http://hyperembedded.blogspot.com/ , happy new year.
- scooterMX, on 10/12/2007, -2/+3I blogged your blog post about this other post about this tutorial, you can read it here: www.areyouanidiot.ofcourseiam.org
happy (please go get a) life.
- scooterMX, on 10/12/2007, -2/+3I blogged your blog post about this other post about this tutorial, you can read it here: www.areyouanidiot.ofcourseiam.org
- 2tomato, on 10/12/2007, -0/+7Assembly is good. It seems useless at a firtst sight, especially if you're coding for a x86 processor (there's no need to use it on a normal PC nowadays). but if you'll be working on different systems (such as pxa-type handled processor or big industrial devices for automatic controls) all that not-very-meaningful assembly will be gold.
- rockrapdude, on 10/12/2007, -0/+5actually there are uses for assembly today.you can write drivers in asm.you can write trainers for games in asm.there are a lot of uses for it.and snes and nes games were writen in it.ps2 graphics too
- dftz, on 10/12/2007, -0/+1nice compiler with alot of examples
http://www.emu8086.com/ - itsaghost, on 10/12/2007, -15/+1damn gooks and chop stick men
only a real nerd will use c++ - thingylab, on 10/12/2007, -0/+10The article should more appropriately be named "Learning x86 assembly", as opposed to PowerPC assembly, or PIC assembly. (Well, I think. The site isn't even very clear about that.)
Just as a reminder, an assembly is very much tied to the underlying platform, and intel x86 isn't the only one out there.- Nitron, on 10/12/2007, -0/+1I personally enjoy 6502 and ARM assembly languages the most. 68k is alright and although Alpha is really cool, it's a bit of a pain.
- noseeme, on 10/12/2007, -0/+5Quick tip:
Think like a computer. :) - CodeWarriorK, on 10/12/2007, -1/+2This is also a good page to start with assembler programming.
http://www.lrr.in.tum.de/~jasmin/
It contains some very good tutorials and a nice program to test them.
Here is the sourceforge-page of the project:
http://sourceforge.net/projects/tum-jasmin/ - Rayor, on 10/12/2007, -3/+4I've never used Assembly before but I do know on of my favorite programs, zSNES, was written in it.
- ArmchairAthlete, on 10/12/2007, -1/+2And C too... gotta love zsnes.
- swazooe, on 10/12/2007, -0/+2http://www.xs4all.nl/~smit/asm01001.htm
that seems easier to follow. - ArmchairAthlete, on 10/12/2007, -0/+4What I've seen/done with assembly in school is interesting, and it gives you a better understanding of how a computer works with no "magic" making things work. Close to the metal so to speak. But it isn't for those who haven't coded before, and few will use it for much besides learning. Keep in mind it will be tedious to do pretty much anything.
The LC-3 wasn't a real machine but simulated and simpler to work with.- deadbaby, on 10/12/2007, -0/+5Yep that's exactly why I sat down and learned it when I was about 14. I can't write a lick of ASM these days but knowing how things work at the lowest levels helped me understand computer architecture in general. Everyone with interest in computers should read this tutorial.
- jschrab, on 10/12/2007, -0/+4Learning assembly on old architectures can be a very humbling experience. After a summer of 6502 coding on my C64, my respect for game developers on that machine rose to a high level. 16-bit math was ... a pain ("I just wanna add two dumb numbers together!") But in a strange puzzle-solving way, it was a fun thing to do.
Now the wizards that did their games for the Atari 2600 - they weren't human. Couldn't have been. Alien intelligence. Had to be.- albybum, on 10/12/2007, -0/+2Most Super NES games were written in Assembly as well. I believe ASM was pretty common for Playstation games as well. When I started learning 16 bit ASM, it boggled my mind how anyone (even teams of developers) could actually have the time to write something that complex in Assembly.
ASM really gave me a strong appreciation of what compilers for higher level languages actually do to make our lives easier.
- albybum, on 10/12/2007, -0/+2Most Super NES games were written in Assembly as well. I believe ASM was pretty common for Playstation games as well. When I started learning 16 bit ASM, it boggled my mind how anyone (even teams of developers) could actually have the time to write something that complex in Assembly.
- Geekazoid, on 10/12/2007, -0/+5I don't think Assembly is as useless as some people think it is. at the career fair at my college NVidia has us take an Assembly test before talking to them.
- dwhitbeck, on 10/12/2007, -1/+0Learn assembly on a 6800, 6809 or 6811 rather than x86. The special purpose registers were put on the x86 by engineers trying to emulate mainframe hardware. They complicate assembly programming with no real gain. I have written a maze program, a line editor and a 4 voice polyphonic music generator including a note editor in 6809 assembly. I gained more fundamental knowledge from those efforts than all of the higher level programming I have done. BTW, has anyone ever programmed a TI58 or TI59 calculator?
- Erkan, on 10/12/2007, -5/+3wow, its 1989 again?
- albybum, on 10/12/2007, -1/+6That interface on your cell phone wasn't exactly written in C# :)
Assembly is still common in game development, drivers, and for embedded applications.
- albybum, on 10/12/2007, -1/+6That interface on your cell phone wasn't exactly written in C# :)
- headzoo, on 10/12/2007, -0/+2Try the book Assembly Language Step by Step. Great resource for learning how a computer works at the bit level (and learning assembly). It's an old book, and deals with 386 CPUs, but it's written well, and it's easy to follow. So it's a good baby step for getting into assembly.
- 0nova, on 10/12/2007, -0/+3I agree with Erkan...
While there are no doubts as to how fundamental the knowledge of this language is so essential if anybody needs to really understand, what I have seen is that most people these days go straight up to Java to start their earning careers. And I have seen people who are atleast 3-4 years old in programming and don't know about hex. But the point is that for most of them there simple isnt enough monetary reasons to code in assembly. And in places where you really need assembly to get over a few performance pitfalls, no amount of tutorials can benefit a newbie, experience with it will just not be enough.
all in all, it's 10-15 years late. - KoderOne, on 10/12/2007, -1/+1Wow, people are still doing this? I mean, on MC6800 ok, but x86? How ***** many registers... you have to be some kind of half-god to be able to write a complex program with this.
- stalky14, on 10/12/2007, -1/+2I think the Intel architecture is pretty much solely responsible for the popularity of C. Intel chose such a non-intuitive way of doing so many things (target THEN source?!). If Motorola had won the 90's, I think things would be a lot different. (PPC doesn't count. Ever seen a PPC programming manual? RISC, my ass!)
- stalky14, on 10/12/2007, -1/+2I think the Intel architecture is pretty much solely responsible for the popularity of C. Intel chose such a non-intuitive way of doing so many things (target THEN source?!). If Motorola had won the 90's, I think things would be a lot different. (PPC doesn't count. Ever seen a PPC programming manual? RISC, my ass!)
- glue, on 10/12/2007, -2/+0I tried using RadASM. It came as a bunch of zip files with no install. I still haven't gotten it working. The whole thing is a pain in the ass. Why would anybody bother?
- digid, on 10/12/2007, -0/+2I think a good resource for understand assembly is by using SPIM(http://www.cs.wisc.edu/~larus/spim.html)
It is a MIPS emulator which you can write assembly programs for. The great thing about it is that its easy to monitor how the registers are changing. - bengrine, on 10/12/2007, -0/+1http://www.sandpile.org/
- morninglorii, on 10/12/2007, -0/+3One of my favorite things about learning assembly language was going back and doing OO afterwards, for two reasons.
1. Rules that used to seem "arbitrary" make a lot more sense now. I understand exactly what's going on when I make an array, when I make a method/function, when I convert an integer to a float (or vice versa), and tons of other things. Sure, I could still program without knowing, but knowing makes me feel more confident in my programming decisions, instead of the "Hmm... this uses less lines of code, maybe it will be faster" instinct I used to go by.
2. It makes you appreciate it more. It's like driving a car for the first few years of your license-possessing life, then switching to a unicycle for a year, then getting your car back. It's amazing how it feels to do something as simple as convert numbers to different bases and print them out in C++/Java after killing yourself trying to get it right in Assembly (ESPECIALLY if you try to implement the backspace key!) - AngryBoy, on 10/12/2007, -0/+4If you're using the GNU compiler, you can use the -S flag to have gcc spit out assembly language instead of compiled code. It's a great way to learn how the compiler does optimizations and such.
- ellisgl, on 10/12/2007, -0/+2I've read the AoA - but it left a lot to desire..
- Stewage, on 10/12/2007, -0/+2Isn't Steve Gibson's Spinrite coded in Assembly?
- johnnyhay, on 10/12/2007, -0/+1Thanks for the link.
Also see, www.eecs.harvard.edu/~ellard/Courses/cs50-asm.pdf - dwhitbeck, on 10/12/2007, -0/+0There are still millions of 8 bit processors in use, Atmels etc. Who knows what all they are used in, toys, instruments, thermostats? Check out Randall Hyde, http://webster.cs.ucr.edu/
- xlar54, on 10/12/2007, -0/+1Ive been learning 6502 "just because". It does give you more insight to how things operate, but its not really practical anymore. If you want to do "low" level programming that is practical, why not mess around with learning byte code like MSIL? Then you can write your favorite language for the .NET / MONO platform.
- solarpowered, on 10/12/2007, -1/+1This is exactly the wrong direction to go in....
Assembler for ordinary apps is a blinding waste of time.... life is too short.
In a practical way, assembler is of little use.
(Exceptions: micro-controllers, drivers) - dwhitbeck, on 10/12/2007, -0/+0micro-controllers - billions of em.
- BadBoyNDSU, on 10/12/2007, -0/+0-Groan- Where was this digg last semester?
- Ulvund, on 10/12/2007, -0/+0If you are new to assembly languages you might want to consider starting with SPARC.
It's has a simple instruction set. - erikuma, on 10/12/2007, -0/+1Nice assembly programming sources! Good grief! I digg this:)
- mlw4428, on 10/12/2007, -0/+0If you're a C.S. major learning assembly is a must. Learning how a cpu works along with memory helps you to write better code. It may not help you learn a HLL but you'll be far more likely to write more efficient code after learning assembly than by using just HLLs all your life. But then again that's just my opinion.
- BlackAdderIII, on 10/12/2007, -0/+1Nice and useful, programmers getting an understanding of assembly language is good for all of programmer-kind.
- consoleguru, on 02/22/2008, -0/+0I learned assembler when I was a lad, I think its great to start out at the beginning then go on to all this scripting nonsense.
Digg is coming to a city (and computer) near you! Check out all the details on our