Keep in mind that assembly is machine dependant. The tutorial assumes an Intel/PC config.
BTW, assembly is really easy once you wrap your head around it. There are only about 10 commands/functions. (It makes it hard to write complex algorithms though.)
md
Posted: Fri Dec 16, 2005 1:20 pm Post subject: (No subject)
codemage wrote:
BTW, assembly is really easy once you wrap your head around it. There are only about 10 commands/functions. (It makes it hard to write complex algorithms though.)
There are over 300 seperate instructions in x86 machine language (ie. assembler); there are over 10 on all other platforms too, 10 instructions isn't enough to do anything.
codemage
Posted: Fri Dec 16, 2005 1:57 pm Post subject: (No subject)
I need to start being more verbose.
...there are only about 10 commands/instructions that you will need to recognize and/or use for the overwhelming majority of code.
You're pretty much either:
setting registers or addresses
moving stuff between registers or addresses
comparing registers
doing jumps
doing basic logic/arithmetic
I think the concepts behind assembly are easier than other languages.
It's just harder to write code because it's so low-level (it takes forever to code the most mundane tasks).
MysticVegeta
Posted: Sat Dec 17, 2005 11:40 am Post subject: (No subject)
I know I saw a program in assembly to square a number. the code was so long i was like wtf?
md
Posted: Sat Dec 17, 2005 1:03 pm Post subject: (No subject)
MysticVegeta wrote:
I know I saw a program in assembly to square a number. the code was so long i was like wtf?
MIPS:
lhi $1, 0
llo $1, 10
multu $1, $1
mflo $2
Loads "10" into a register, squares it, loads the result into register 2.
Martin
Posted: Sat Dec 17, 2005 10:48 pm Post subject: (No subject)
Assembly is really easy. It's just tedious as hell.
wtd
Posted: Sat Dec 17, 2005 11:19 pm Post subject: (No subject)
Martin wrote:
Assembly is really easy. It's just tedious as hell.
Which is why most assemblers have some kind of syntax support for procedures and structs and such. But eventually you're just coding in a proprietary almost-C.