Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Assembly language help


ghost's Avatar
0 0

Would learning assembly be useful for anything? If so i was wondering if anybody new a good tutorial for it. I've looked and haven't found any good ones, any suggestions would be greatly appreciated.


ghost's Avatar
0 0

Hey,

I would say no but i am not that experienced in Assembly but what i have done at college seemed rather pointless and miles of coding was needed to perform the simplest tasks. A more experienced member will be able to correct me if i am wrong.

But here is a tutorial i found

http://www.xs4all.nl/~smit/asm01001.htm

I just typed assembly language tutorial in this awsome website :P

Hope this helps atleaste a bit.

Relentless.


ghost's Avatar
0 0

You're wrong. :)

~T


ghost's Avatar
0 0

t metal risen could you expand a little bit? i also would like to know the benefits of knowing binary…


richohealey's Avatar
Python Ninja
0 0

as near as i can tell, ASM is useful for OS programing, app modding, and deompiling, and for doing small jobs REALLY fast.

catcha


ghost's Avatar
0 0

here's a very decent answer to your question.

<[private]@slb7.atl.mindspring.net> wrote: >How important is it nowadays to really learn asm programming? I don't mean >just scratch the surface like most university CSC curriculums do, but really >spend the time and energy to become an advanced assembly programmer?

>There was a post to this group a few weeks ago about job opportunities for >assembly programmers, and the general consensus of the replies seemed to >indicate that there are very few people actually doing assembly programming >as their main bread-and-butter jobs anymore. It seems as though areas which >were once considered the exclusive domain of assembly programming (operating >systems, BIOSes, etc.) are now done primarily in HLLs like C. Does this >mean that one no longer needs to write code that is as efficient as possible >because newer, faster hardware will always compensate for un-optimized code?

>What is the opinion of this group? Is the mastery of assembly language a >helpful skill, or merely a bragging right? Can a person be a master HLL >programmer without knowing much, if any, assembly language?

I work on a commercial OS that provides pretty good performance. I write almost entirely in C. However, my code tends to be better than that of some of my less experienced colleagues when it comes to performance for two simple reasons, I can do assembly by hand and I know how my compiler generates code. For example, which of the following is faster:

void * x;

x = malloc(1024); if (x == NULL) { return OUT_OF_MEMORY;

}

/* Do something with the allocated memory */

or:

void x; x = malloc(1024); if (x != NULL) { / Do something with the allocated memory */ }

else { return OUT_OF_MEMORY;

}

Most compilers (mine included) will generate the following as the conditial statement for each version:

cmp eax, 0 jnz PastConditional /* the return OUT_OF_MEMORY */

and:

cmp eax, 0 jz ElseCase

Intel x86 CPUs with a pipeline and branch prediction typically assume conditional jumps are not taken. As a result high level code that uses conditionals that are true for the case you'd expect to occur most frequently are a little faster than those that are true for the case you'd expect to occur least frequently. This happens because the most likely case being the true condition will result in fewer pipeline stalls due to branch mis-prediction.

Many high level programmers prefer the negative option conditionals because they avoid multi-level nesting in the source code, but their code is slower (it doesn't matter if CPUs are fast, wasted cycles are wasted time - making a 1GHz processor run like a 900MHz one is bad form).

Regards, David.


lukem_95's Avatar
Member
0 0

ASM is useful for writing programs that cannot be catered for by higher level languages, for example, OS's.

im not very experienced in Asm, but i also know that many viruses are written using it, as there are some functions neccessary that are not included in for example C.


ghost's Avatar
0 0

"Programming from the ground up" covers a whole bunch of assembler. Google for it, you can download it for free (and legal).


ghost's Avatar
0 0

@R3l3ntl3ss:

You must be shittin' me to say that ASSM is not useful or practical …

If you've ever ventured into the realm of:

  • Shellcoding & Memory Management
  • Reverse Code Engineering
  • OS Kernel Tweaking
  • Virii/Worm Coding
  • Hardware Control
  • Encryption/Steg

then, only, will you be able to swallow your words – one bit at a time.

Just because you've covered a bit of MOV and LEA op-codes doesn't mean that the power of ASSM is limited to moving/shifting data.

Stop lying, and contribute only when you have something factual and worthy to post. Otherwise, you're only "adding salt to the injury".


ghost's Avatar
0 0

R3l3ntl3ss wrote: A more experienced member will be able to correct me if i am wrong.

.

Lol you are wrong, asm is great to learn! and you will never think it was wasted time, it's the way forward, it's argumable easier to use that c/c++ and it can be used for say pic's I suggest though you do soemthing like get freebsd and nasm maybe, it helps with understanding stuff computers.

app cracking needs you to atleats understand basic asm, virus's and worms well the best ones the fastest sleekest are coded in ASM.


ghost's Avatar
0 0

Folk Theory wrote: t metal risen could you expand a little bit? i also would like to know the benefits of knowing binary…

knowing binary? o.O you mean machine code?