Results 1 to 10 of 39

Thread: assembly -- where would you begin

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Location
    pennslyvania
    Beans
    122
    Distro
    Ubuntu 10.10 Maverick Meerkat

    assembly -- where would you begin

    I want to learn enough assembly to be able to ask intelligent questions about assembly. As a hobby programmer I have found that I can be more productive at my day job since I have learned to write a little C++ over the last year.

    Now I find that there are certain problems that I really don't understand because I have no understanding of real low level programming.

    So I want to learn to write in assembly and to do some basic exercises.

    Where would you begin?

  2. #2
    Join Date
    Jan 2011
    Beans
    3

    Re: assembly -- where would you begin

    Hm.

    i would start reading this:
    http://en.wikipedia.org/wiki/Assembly_language

    a quick search on the net also brought up this:
    http://www.freebyte.com/programming/assembler/

    and this:
    http://asm.sourceforge.net/

    i.n.g.o.
    Last edited by i.n.g.o.; January 21st, 2011 at 03:41 PM.

  3. #3
    Join Date
    Mar 2009
    Location
    pennslyvania
    Beans
    122
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: assembly -- where would you begin

    The reason I want to learn assembly is because I do not really understand the errors messages my complier sends me sometimes. I do not understand segment faults, stack overflow and memory addresses are Greek to me.

    I just want to learn enough to ask questions and find answers.

  4. #4
    hakermania's Avatar
    hakermania is offline Τώρα ξέρεις τι γράφω εδώ!
    Join Date
    Aug 2009
    Location
    Greece
    Beans
    1,705
    Distro
    Ubuntu Development Release

    Wink Re: assembly -- where would you begin

    Quote Originally Posted by audit View Post
    I do not understand segment faults, stack overflow and memory addresses are Greek to me.
    Έλα ρε φιλαράκι, μην μιλάς Για ελληνικά τώρα... Μίλα για κινέζικα καλύτερα... Τέλοσπαντων, το καταπίνω....

    Anyway, I think you should try to Debug your program. See the segmentation fault and search for null pointers etc

  5. #5
    Join Date
    Jan 2008
    Beans
    1,532

    Re: assembly -- where would you begin

    I learned by just taking some C programs (NOT C++ ones), compiling them with the -S flag and poking through the generated assembly. Figure out what is going on, try to make changes to the program at the asm level. Look stuff up that doesn't make sense etc. Then again I already knew MIPS and Sparc assembly pretty well from school, so it was easier to pick up x86.

    It's good to know how assembly works, but not really worth it to master that skill imho.

  6. #6
    Join Date
    Jun 2009
    Location
    Alabama
    Beans
    2,232

    Thumbs up Re: assembly -- where would you begin

    I agree that you are better prepared if you know assembler. I used to program IBM 370 and 390 mainframes in assembler, mainly because I hated COBOL. I learned a ton about how the computers actually worked. Especially one time after a production VSAM catalog maintence program used all its memory in the middle of the night and I had to learn how to add memory by doing GETMAIN's and FREEMAIN's.

    Ah, the 80's....

    Tim
    Cyberpower PC, Core i5 2500 3.3 gHz, 8GB DDR3, ATI 6770 1GB, Samsung BX 2440 LED 1080p, 1 TB SATA III, 2 TB SATA III, Siduction Linux 64-bit

  7. #7
    Join Date
    Mar 2009
    Location
    pennslyvania
    Beans
    122
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: assembly -- where would you begin

    How would I decide what assembler to use? Are there any good books? Are web tutorials good enough? Does the operating system I use make a difference? Does the computer I use make a difference?

  8. #8
    Join Date
    May 2009
    Beans
    522

    Re: assembly -- where would you begin

    Quote Originally Posted by audit View Post
    Does the operating system I use make a difference? Does the computer I use make a difference?
    Assembly is processor specific. If your computer is x86 based, you'll be writing x86 assembly. If your computer is SPARC based, you'll be writing SPARC assembly. If your processor is z80 based, you'll be writing z80 assembly.

    That being said, x86 is probably the dominant processor family in personal computers, so chances are you can natively run x86 assembly.

    In my personal life, I didn't truly grasp Assembly until I received formal classroom instruction, but your experience may vary.

  9. #9
    Join Date
    Jan 2008
    Beans
    1,532

    Re: assembly -- where would you begin

    Quote Originally Posted by audit View Post
    How would I decide what assembler to use?
    The GNU assembler is as good as any and is probably already installed.

    Quote Originally Posted by audit View Post
    Does the operating system I use make a difference?
    Yes.

    Quote Originally Posted by audit View Post
    Does the computer I use make a difference?
    Not unless you use something unusual like an PowerPC Mac or a Sparc machine.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •