PDA

View Full Version : assembly books


EscapeCharacter
10-17-2002, 03:02 AM
could anyone recommend a good general assembly book(i know assembly is different for each processor), im looking for something that explains like what the different registers are and what they are for and techniques and stuff like that.

Strike
10-17-2002, 03:22 AM
Randall Hyde's "The Art of Assembly" (assuming you mean x86, because "what different registers are" is arch specific)

You can find it online for free at various places. If all else fails, I have a soft copy you can download if you wish (it's like 1300 pages though).

EscapeCharacter
10-17-2002, 03:52 AM
im really looking for something that will explain everything in detail, most of the tutorials ive found have basically said push this pop that and then link with ld and run it and see what happens but dont really go into detail about whats going like what pop and push do, thats what im looking for. does art of assembly go into that much detail?

Strike
10-17-2002, 09:04 AM
Well, it's hard to be 1300 pages long and not go into quite a bit of detail :)

kmj
10-17-2002, 12:24 PM
Esc: you may consider getting a computer architecture book, rather than an assembler book.. That may be more what you're looking for.. Dunno.

stuka
10-17-2002, 12:42 PM
The AoA book is QUITE thorough - it talks about computer architecture, which is what you really want to know.

Strike
10-17-2002, 12:48 PM
Here's my copy (NOT ANYMORE!) - http://www.google.com

Be warned, it's 11MB.

Strike
10-17-2002, 12:52 PM
Oops, it's 1500+ pages, not 1300 :)

EscapeCharacter
10-17-2002, 04:50 PM
Originally posted by Strike
Here's my copy - http://strike.homelinux.org/~ddipaolo/aoa.pdf

Be warned, it's 11MB.

broadband roxorz :)
thanks man

Strike
10-17-2002, 05:05 PM
Originally posted by EscapeCharacter
broadband roxorz :)
thanks man
No problem, deleting link from post (and deleting symlink to file).

sedarious
10-18-2002, 11:56 AM
I would recommend the AoA http://webster.cs.ucr.edu/Page_asm/ArtOfAsm.html. Unfortunatly, this tutorial starts going away from traditional assembler and uses a lot of some standard library. My suggestion is to take what you can and then grab yourself a good reference for interrupts and memory locations. Nortons Guide to x86 Assembly is a good source, though slightly outdated.

EscapeCharacter
10-18-2002, 12:55 PM
ive noticed in aoa that it uses something called HLA(high level asm) and i was wondering if this was the standard now cause almost all the assembly ive seen before looks nothing like hla(which looks more like c than anything else)

Strike
10-18-2002, 01:29 PM
nah, the HLA is his own library stuff
I wish he didn't use it either, but it does allow you to do things much more simply. Older versions of the book didn't use it.

stuka
10-18-2002, 01:36 PM
Strike: I agree, that HLA ain't so cool - the version I have uses a library (UCR Standard library), but apart from that sticks to normal stuff...

EscapeCharacter
10-18-2002, 01:40 PM
should i try to find something that sticks to basic asm and just stay away from hla for now?

sedarious
10-18-2002, 01:41 PM
The older version (16bit DOS) uses URC for some stuff near the end but covers most things well. The 32bit Win32 uses HLA up the wazoo. From what I remember, the HLA isn't his work - its from somewhere else.

sedarious
10-18-2002, 01:46 PM
HLA isn't standard x86 asm. Neither are the MASM pseudocode things (if else etc). "Real" asm supports only the opcodes you can find in your cpu (move, add, subtract, multiply, divide, load, store, jump, compare, test and interrupt are the basics). Each of these basic commands have multiple variations. There is no If command or While commands in asm.

edit: also in the basics are shift, rotate, input, output, and, or, xor and not.

stuka
10-18-2002, 01:53 PM
Well, I would...since what you said you want to to learn is what's really going on. If I had a better connection, I'd put my copy up for you...but it is friggin' huge!

EscapeCharacter
10-18-2002, 02:08 PM
no need i found another pretty descent looking tutorial (http://www.drpaulcarter.com/pcasm/) and im also gonna get Assembly Language Step-by-step: Programming with DOS and Linux by Jeff Duntemann

Strike
10-18-2002, 02:49 PM
A computer architecture book might be a better choice if you are learning assembly to learn how basic processors work instead of learning assembly as a means to a programming end. The only computer arch book I've read/owned is for MIPS though

kmj
10-18-2002, 02:53 PM
MIPS is the best way to start anyway, since it's RISC. :) Don't get into VAX or intel stuff unless you want a headache.

sedarious
10-18-2002, 03:29 PM
Actually, going from MIPS to x86 is a biatch since you are limited to 4 GPU's in x86 language - not to mention opcodes that only support 2 parameters. MIPS is a bit nicer to learn.

Strike
10-18-2002, 03:39 PM
http://www.amazon.com/exec/obidos/ASIN/1558604286/qid=1034966242/sr=2-2/ref=sr_2_2/102-9150852-5497700

This is the book I used (and still have, but want to keep, sorry) to learn MIPS stuff. It's really good, has nice explanations, nice diagrams .. overall really good textbook. It's called "Computer Organization and Design: The Hardware/Software Interface"

EscapeCharacter
10-18-2002, 03:55 PM
Originally posted by Strike
http://www.amazon.com/exec/obidos/ASIN/1558604286/qid=1034966242/sr=2-2/ref=sr_2_2/102-9150852-5497700

This is the book I used (and still have, but want to keep, sorry) to learn MIPS stuff. It's really good, has nice explanations, nice diagrams .. overall really good textbook. It's called "Computer Organization and Design: The Hardware/Software Interface"

if i were to get this book wouldnt i have to practice the stuff on a MIPS machine? all i have are x86s

jamessan
10-18-2002, 04:55 PM
Computer Organization and Design (http://www.amazon.com/exec/obidos/tg/detail/-/1558604286/qid=1034970763/sr=1-9/ref=sr_1_9/104-5822541-4360752?v=glance) is an awesome book for learning about assembly. It focuses on MIPS, but the general ideas on how the computer works and the relation to assembly is still good to learn.

Strike
10-18-2002, 05:56 PM
Originally posted by EscapeCharacter
if i were to get this book wouldnt i have to practice the stuff on a MIPS machine? all i have are x86s

You can use "spim" (and its cousin, xspim), which is a MIPS machine emulator.

silk.odyssey
01-25-2004, 09:38 PM
nah, the HLA is his own library stuff
I wish he didn't use it either, but it does allow you to do things
much more simply. Older versions of the book didn't use it.


You mean the HLA standard library. The standard library is separate from
HLA. By that I mean you don't have to use it and you can write pure
asm programs with HLA.


Strike: I agree, that HLA ain't so cool - the version I have uses a
library (UCR Standard library), but apart from that sticks to normal
stuff...


The main difference between HLA and masm ( that the 16 bit version uses )
is the syntax. HLA can do everything the other 32 bit assemblers can.


should i try to find something that sticks to basic asm and just
stay away from hla for now?


You can but you will not find anything more detailed than AOA32.
It starts out being using a lot of HLL control structures and library
routines but it tells you how the routines are implemented in pure assemly
later on. You also learn how to implement the high level control
structures in pure assembly.


The older version (16bit DOS) uses URC for some stuff near the end
but covers most things well. The 32bit Win32 uses HLA up the wazoo.
From what I remember, the HLA isn't his work - its from somewhere else.


HLA is in fact written by Randall Hyde. It's the name of the product
and the type of product. He should have chosen a better name. :)


HLA isn't standard x86 asm.


HLA has extensions to "standard asm" but it can be used to write
pure assembly programs.

More info at http://webster.cs.ucr.edu