Wednesday, January 25, 2012

AT&T assembly homework

How to write assembly under Linux.

http://asm.sourceforge.net/intro/

-- nasm

foo : no name, fill with your own name here.

GCC inline asm:
http://ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
for homework 1
http://cs.njit.edu/~sohna/cs680/hw1.html

Introduction to UNIX assembly programming
http://asm.sourceforge.net/intro/hello.html

lea (AT&T assembly)
Load-effective-address

Intel Pentium Instruction Set Reference (Basic Architecture Overview)
http://faydoc.tripod.com/cpu/

Trick:
Using lea instruction to compute certain products.
The trick is to use the scaled index addressing modes.
http://webster.cs.ucr.edu/AoA/Windows/HTML/IntegerArithmetic3.html
What is scaled index addressing modes.
Addressing modes:
http://en.wikipedia.org/wiki/Addressing_mode
scaled addressing modes:
http://en.wikipedia.org/wiki/Addressing_mode#Scaled

No comments:

Post a Comment