You are not logged in.

#1 2010-04-02 05:50:50

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

question on assembly

I recently bought a book to help me learn assembly, but it was published in 1992 and uses DOS (TASM or MASM I presume?). My question is, is it worth reading that to understand assembly and then find an online tutorial that is geared toward NASM?

Offline

#2 2010-04-02 13:21:55

Hohoho
Member
Registered: 2007-06-23
Posts: 222

Re: question on assembly

NASM syntax follows the Intel convention as does TASM/MASM, so it won't be hard to make the switch.
DOS environment is 16bit and 16bit x86 assembly is pretty simple and might be a good starting point, though it would be better if you found a more recent book, because you'll be working in the so called "real" mode with 16bit assembly, using the old segmentation system, and all of that is deprecated.

In my book, any assembly is better than no assembly smile

Offline

#3 2010-04-02 16:55:27

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: question on assembly

I'd say it depends on your reasoning for learning assembly. If you're learning for the sake of learning, then MASM/TASM is fine. If you're learning to do anything real with it, then learn GAS syntax. This is what gcc uses. It's different in  that the operands are reversed ("ins src, dst" instead of "ins dst, src") but the syntax itself is fairly similar.

The Art of Assembly Language is supposed to be a decent tutorial, though I haven't had time to get around to reading it myself (yet).

Offline

#4 2010-04-02 18:00:59

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: question on assembly

Thanks guys. I am actually learning it to assist somebody I know with a kernel written in assembly (x86 of course). However, that person uses TASM on DOS, so I wanted to know if it would be a problem, especially considering the book uses DOS as well, and I obviously use linux with NASM (I hate GAS)

The Art of Assembly Language is supposed to be a decent tutorial, though I haven't had time to get around to reading it myself (yet).

Thanks! I'll have a look around that.

Last edited by cesura (2010-04-02 18:04:10)

Offline

#5 2010-04-05 13:11:16

Rorschach
Member
From: Ankh-Morpork
Registered: 2008-11-07
Posts: 143

Re: question on assembly

First don't use GAS but NASM as already suggested. AT&T-Syntax just sucks imo...
Second don't use The Art of Assembly Language because it uses highlevel assembly what you don't want to learn for sure! If you already know assembly you may take a look at highlevel-assembly because it's no real language but just uses lots of macros to make assembly coding easier but I don't think you will learn the concept of assembly with it.

I would suggest get your self a copy of the intel instruction reference for your cpu, learn the basics about using syscalls and memory-managment and your halfway through wink

http://www.intel.com/products/processor/manuals/ (Instruction Reference)
http://www.cin.ufpe.br/~if817/arquivos/ … index.html (Small NASM and assembly introduction)
http://asm.sourceforge.net/resources.html#projects (Assembler example programs to read the source and learn from it)

Some forums with skilled assembly-folks to ask questions:
* http://www.woodmann.com/forum/
* http://community.reverse-engineering.net/


have phun smile

Offline

Board footer

Powered by FluxBB