How did you learn Assembly?

YuckTheFankeesYuckTheFankees Posts: 1,281Member ■■■■■□□□□□
Over the past week I've been reading a couple of malware books and you definitely need to learn and understand assembly. These are the resources I have found already.

* Security Tube
* VTC assembly video
* Paul Carter's free assembly guide

For those who know assembly, what material did you use to learn it?

Comments

  • paul78paul78 Posts: 3,016Member ■■■■■■■■■■
    I learned assembly using books on 6502 and VAX11 assembly a long time ago before the Internet. Not the easiest way but it worked for me. One way I would recommend to start - plus it can be a lot of fun, is to learn Redcode assembly using a Corewars MARS simulator. Its a game where you write a program that battles another program. Your program is basically a virus trying to gain control of the memory space and kill the opposing program. See http://en.wikipedia.org/wike/core_war for more info.
  • YuckTheFankeesYuckTheFankees Posts: 1,281Member ■■■■■□□□□□
    Do you need to know C or C++ that well to understand ASM?
  • paul78paul78 Posts: 3,016Member ■■■■■■■■■■
    Do you need to know C or C++ that well to understand ASM?
    Understanding C can help. But object-oriented languages like C++ and Java will have concepts which will not apply. Similarly - high-level functional languages like Lisp, Haskell, and F # will not be relevant.
  • JDMurrayJDMurray Certification Invigilator Surf City, USAPosts: 11,497Admin Admin
    There are many good old (1980's-90's) books on Intel assembly language programming. I've managed to collect a lot of them over the decades. I assume they are also available in places like Scrib. No Starch Press has very good books on assembly, disassembly, debugging, and reverse engineering.

    Stay with assembly projects that teach how to work with the computer's hardware, file system, and processes in memory, and not so much about writing apps with GUIs. It might be best to start learning assembly language by first learning OllyDbg.

    And have a look at: Art of Assembly Language Programming and HLA by Randall Hyde

    Do you need to know C or C++ that well to understand ASM?
    It's the other way around. Knowing assembly will help you understand what C/C++ are doing under the hood.
  • paul78paul78 Posts: 3,016Member ■■■■■■■■■■
    JDMurray wrote: »
    Oh wow - great link. Thanks - there was a copy of 6502 Assembly. Brings back memories. But makes me feel old.
  • YuckTheFankeesYuckTheFankees Posts: 1,281Member ■■■■■□□□□□
    I've looked at Art of Assembly Language Programming and HLA by Randall Hyde multiple times on amazon but a lot the reviews say HLA is different from x86 assembly language, so I'm a little caution about buying the book. More than a few people were saying what he teaches doesn't really apply to x86 or the commands might be different?

    I've had the Practical Malware Analysis book for about a week now, and it's the main reason why I want to learn assembly in more depth. They have a section about assembly but it's confusing.

    I wanted to buy the IDA Pro book but I thought I should learn assembly more in depth before purchasing it. But could the book help with my assembly studies?

    I will definitely download Ollydbg and start working with it.
  • cknapp78cknapp78 Posts: 213Member ■■■■□□□□□□
    Ugh....Assembly programming. I am having a bad flashback to my Programming courses 17 years ago....getting constipated just thinking about it.
  • YuckTheFankeesYuckTheFankees Posts: 1,281Member ■■■■■□□□□□
    cknapp78 wrote: »
    Ugh....Assembly programming. I am having a bad flashback to my Programming courses 17 years ago....getting constipated just thinking about it.

    lol Awesome cknapp78!
  • JDMurrayJDMurray Certification Invigilator Surf City, USAPosts: 11,497Admin Admin
    HLA is different from x86 assembly language
    You will come across the phrase "macro assembler" which is an assembler that includes a library of pre-written assembly routines (i.e., macros) that saves you time from writing code and speeds up your development. The problem is that these macros are usually not portable between different vendor's assemblers. High Level Assembly (HLA) is one of these macro systems.

    Two macro assemblers are Microsoft Macro Assembler (MASM) and Netwide Assembler (NASM).
  • YuckTheFankeesYuckTheFankees Posts: 1,281Member ■■■■■□□□□□
    JDMurray wrote: »
    You will come across the phrase "macro assembler" which is an assembler that includes a library of pre-written assembly routines (i.e., macros) that saves you time from writing code and speeds up your development. The problem is that these macros are usually not portable between different vendor's assemblers. High Level Assembly (HLA) is one of these macro systems.

    Two macro assemblers are Microsoft Macro Assembler (MASM) and Netwide Assembler (NASM).

    What are the pros and cons to learning HLA first?
  • JDMurrayJDMurray Certification Invigilator Surf City, USAPosts: 11,497Admin Admin
    HLA was specifically designed to help people learn assembly easier, so that's probably the pro. Once you are comfortable with HLA, you can then move on to learning assembly without the macros. The only con I can think of is if you need to learn pure assembly immediately, or if you need to learn an assembly language for other than the Intel x86 processor.

    If I found the need to get back into Intel assy programming (after a 20-year absence), I would give HLA a tumble first.
  • YuckTheFankeesYuckTheFankees Posts: 1,281Member ■■■■■□□□□□
    What would be your suggestion if I want to learn pure assembly immediately?
  • AlexNguyenAlexNguyen Posts: 359Member
    paul78 wrote: »
    I learned assembly using books on 6502 and VAX11 assembly a long time ago before the Internet. Not the easiest way but it worked for me.

    Been there too. Done that.
    Knowledge has no value if it is not shared.
    Knowledge can cure ignorance, but intelligence cannot cure stupidity.
  • JDMurrayJDMurray Certification Invigilator Surf City, USAPosts: 11,497Admin Admin
    What would be your suggestion if I want to learn pure assembly immediately?
    Then don't use HLA or macro assemblers.
  • YuckTheFankeesYuckTheFankees Posts: 1,281Member ■■■■■□□□□□
    Will do, thank you. I didn't realize how many assembly videos are on youtube.
  • ChooseLifeChooseLife Posts: 941Member ■■■■■■■□□□
    How did you learn Assembly?
    I was 15, young and stupid icon_razz.gif

    Seriously though, learning assembly was a great experience, and it helped better understand so many other areas of computing... High-level programming languages, specifically C started making much more sense... Improved understanding of OS architecture and interaction with hardware, application security (buffer overflows, shellcodes..), et cetera et cetera...

    As for the materials, I used a combination of old books for solid theory and recent ones for coverage of modern CPU's and their features.. Of course, with the pace technologies advance those "recent books" are completely irrelevant nowadays, but the general approach may still work.
    “You don’t become great by trying to be great. You become great by wanting to do something, and then doing it so hard that you become great in the process.” (c) xkcd #896

    GetCertified4Less
    - discounted vouchers for certs
  • YuckTheFankeesYuckTheFankees Posts: 1,281Member ■■■■■□□□□□
    After using my google a little bit more, I've found some good resources.

    The Art of Assembly Language Programming (one of the best sites I have found)

    Dave4Slash's Channel - YouTube He has about 14 ish video's on assembly language. He might be a little hard to understand at times..but the videos will still help newbies.

    *** If you search assembly language on youtube, you'll find a lot more helpful videos.

    PC Assembly Language He has a `90 page tutorial about assembly

    Online software tutorials, training CDs, Photoshop Tutorials, Dreamweaver Tutorials, Apple Tutorials from vtc.com search assembly
Sign In or Register to comment.