Author Topic: Assembly, the best language?  (Read 2108 times)

0 Members and 1 Guest are viewing this topic.

Offline Mellow

  • Knight
  • **
  • Posts: 151
  • Cookies: -24
    • View Profile
Assembly, the best language?
« on: July 01, 2011, 11:44:05 pm »
I've heard its the closest you can get to talking to a computer but humanely understandable. Any info?

Offline Tsar

  • Peasant
  • *
  • Posts: 126
  • Cookies: 10
  • turing-recognizable
    • View Profile
Re: Assembly, the best language?
« Reply #1 on: July 02, 2011, 12:25:16 am »
There is no "best" language.

Assembly is essentially putting the binary that the CPU reads line by line into single line instructions that are more easily read for humans.

Compilers for other languages will convert instructions given to them into multiple lines of assembly and then the assembly is turned into binary and linked up to necessary libraries.

It is good for optimization, but not if you are doing a big project, you can also use Assembly within some languages to optimize certain parts of a program.

Trade offs are that it is extremely tedious to work with and even adding two numbers together which would be one line in a higher language would be multiple lines long in assembly and you will have to deal with where the values are stored and more. It is also useful to know when trying to reverse a program (given the binary of an executable, find out what it does by getting the assembly).
« Last Edit: July 02, 2011, 12:25:52 am by Tsar »

iMorg

  • Guest
Re: Assembly, the best language?
« Reply #2 on: July 02, 2011, 01:23:26 am »
Today the only real reasons to learn assembly are

A) Writing Device Drivers
B) Reversing software

Other than that all the performance gain can easily be made in C since compilers optimize C code down to an assembly form before fully compiling.

Offline Mellow

  • Knight
  • **
  • Posts: 151
  • Cookies: -24
    • View Profile
Re: Assembly, the best language?
« Reply #3 on: July 02, 2011, 04:02:52 am »
Today the only real reasons to learn assembly are

A) Writing Device Drivers
B) Reversing software

Other than that all the performance gain can easily be made in C since compilers optimize C code down to an assembly form before fully compiling.

So your saying assembly is basically useless? I've heard it was faster than other languages..

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Assembly, the best language?
« Reply #4 on: July 02, 2011, 10:26:24 am »
It is useless for a regular coder. Very useful for reverse engineers and malware analysts.

Offline Azura

  • /dev/null
  • *
  • Posts: 8
  • Cookies: 0
  • I'm Immortal!
    • View Profile
Re: Assembly, the best language?
« Reply #5 on: July 02, 2011, 03:05:31 pm »
You can generally optimize assembly slightly more than other languages (if you are good at it, otherwise, chances are you'll make it less optimized, not knowing what you are doing) but unless you have a really performance heavy section of your program or you want to reduce the size of your executable (+ the reasons other posters posted) you are better off learning something like c/c++.

Learning assembly is quite useful though, as it helps you understand what your compiler is really doing under the hood and even if you don't use assembly often it can help you optimize your higher level language code.
« Last Edit: July 02, 2011, 03:09:38 pm by Sada »

Offline xzid

  • Knight
  • **
  • Posts: 329
  • Cookies: 41
    • View Profile
Re: Assembly, the best language?
« Reply #6 on: July 23, 2011, 03:05:11 am »
I code gas/nasm, and I sometimes use it to code stuff... Pain in the ass. Hard to debug logic errors. Write shellcode/reading binaries.