• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

Assembly a good language?

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More

View previous topic :: View next topic  
Author Message
vx
Just Arrived
Just Arrived


Joined: 27 Oct 2006
Posts: 0
Location: norway

Offline

PostPosted: Thu Jan 11, 2007 7:13 pm    Post subject: Assembly a good language? Reply with quote

Hello

People say to me that assembly is totally out of date language and that it is not usefull at all in this days.
They say that I should use time and effort of learning a different language like C# etc


Is assembly worth time and effort of learning it, and what is it used to in many cases.
Are ther much limits of what you can create with it?

Do I have anvantage of assembly skills and what can I do with them?
Back to top
View user's profile Send private message MSN Messenger
capi
SF Senior Mod
SF Senior Mod


Joined: 21 Sep 2003
Posts: 16777097
Location: Portugal

Offline

PostPosted: Thu Jan 11, 2007 7:59 pm    Post subject: Re: Assembly a good language? Reply with quote

vx wrote:
People say to me that assembly is totally out of date language and that it is not usefull at all in this days.
They say that I should use time and effort of learning a different language like C# etc


Is assembly worth time and effort of learning it, and what is it used to in many cases.
Are ther much limits of what you can create with it?

Do I have anvantage of assembly skills and what can I do with them?

Don't believe such lies and disinformation!

Assembly language is most definitely not out of date - nor can it be, any more than physics can be out of date.

Contrary to what the OOP (Java, C#, etc.) zealots would have you believe, a computer language is a tool. Like English or Spanish, a computer language is used to convey information in a given way, to a given set of receivers. Each language has its own syntax and semantics, of course; more importantly, different types of languages can be more oriented toward different objectives, or different types of information to convey.

Assembly language is a low level language. The programmer speaks to the machine at a lower level, and this has its benefits and drawbacks, like any other programming language, depending on what you intend to do.

If you want to create a program to do regular expression string handling and stuff like that, you're probably better off using a language which has those concepts built-in, such as Python or Perl (or at least for that part of the program's functionality). However, if you want to do things that the higher language doesn't let you do easily or without much hacking, you can use a lower level language such as assembly or C to do it yourself. More fine-grained control.

So, what would be the quintessential playing ground where you mess with assembly? Easy examples would be operating systems work (mostly for the machine-dependent parts, the bulk of the work would usually be done in C), any situations where you want to make use of hardware-specific features (hardware drivers would be the obvious example, but also things like game development, for example; what are shaders if not GPU assembly? Wink), basically anywhere where you want fine-grained control, either for reasons of performance (taking advantage of the hardware's features to do exactly what you want, not some generalized version on some library) or for reasons of necessity (because what you want to do involves hardware-specific stuff by definition, such as certain OS constructs, or because you're doing something that involves heavy calculation and want to have the results back before you turn 80).

This is all of course not to mention the obvious things such as the very fun fields of CPU design (where you work at an even lower level of course, but eventually need to design a set of asm instructions for anyone to be able to use the CPU), code generation (compilers, linkers), reverse engineering (taking unknown executables and figuring out what they do by looking at the assembly instructions inside them), exploit finding (we've never seen an exploit found for a program for which source isn't available, have we? Twisted Evil), cracking, etc.

In short: assembly is a language, like any other. Depending on the situation and on your purpose, it can be the best (or only) tool for the job, or it can be extreme overkill. You use assembly when you want to code the performance-intensive parts of a game's physics engine. You use assembly when you want to code the shaders on your 3D game (yes, GPU assembly, there's more kinds of assembly than just Intel x86). You use a Bash script when you want to find all the files ending in .foobar and rename them according to date.

Now, if you're looking for a good general purpose language to start learning with, my recommendation would always be C. Oh, there will be a dozen posts below this repeating the same stuff you already heard about assembly, that C is outdated, that it's "hard to use", that it "lacks builtin features" or whatever. My answer to the OOP zealots is two fold: First, C, like assembly, is a language, used to convey information, just as Java is, just as Lisp is, each with its own benefits and drawbacks. Second, like it or not, C is the English of the computer languages: it has simple syntax and semantics, you can use it for anything, most general-purpose languages derive from it in terms of syntax and way of thinking, and it's simply the language that you can count basically everyone knows. As for builtin features... Yeah, maybe in Chinese you can use one word to say the same thing that you need a whole sentence in English, but that does that mean Chinese is easier, more practical, or more "useful"? (if one could even measure the usefulness of a language) Same thing for Java/C#/VB and C.
Back to top
View user's profile Send private message
vx
Just Arrived
Just Arrived


Joined: 27 Oct 2006
Posts: 0
Location: norway

Offline

PostPosted: Mon Feb 12, 2007 4:56 pm    Post subject: Re: Assembly a good language? Reply with quote

Thanks I really appreciate it Wink
Back to top
View user's profile Send private message MSN Messenger
zornedge
Just Arrived
Just Arrived


Joined: 27 Aug 2003
Posts: 0


Offline

PostPosted: Mon Apr 02, 2007 4:51 pm    Post subject: Reply with quote

I believe Assembly is not worth your time if you do not plan to enter programming at a system-level design. If you're going to focus on applications development, OOP programming (such as C... wait, isnt' that more sequential? I myself use C# and C++ and Java) should be a main focus. If you want to go into computer engineering/systems engineering, creating data constructs and the likes... then Assembly might be worth learning.

edit: just noticed the date. Wow... this forum isn't that active at all, hahah. Oh well.
Back to top
View user's profile Send private message
capi
SF Senior Mod
SF Senior Mod


Joined: 21 Sep 2003
Posts: 16777097
Location: Portugal

Offline

PostPosted: Mon Apr 23, 2007 1:42 am    Post subject: Reply with quote

zornedge wrote:
I believe Assembly is not worth your time if you do not plan to enter programming at a system-level design.

As I said, that is not necessarily true. There is a very strong place for assembly in the critical path of performance-critical applications such as physics engines or 3D modelling. Also, compiler design is obviously very closely related to assembly (think code generation...). And reverse engineering, and exploit finding, and software cracking, etc. Or simply for the sake of the added knowledge itself.

zornedge wrote:
If you're going to focus on applications development, OOP programming (such as C... wait, isnt' that more sequential? I myself use C# and C++ and Java)

C is most definitely not an object-oriented programming language! It is a procedural, imperative language, and very much proud of it, too Wink
Back to top
View user's profile Send private message
zeedo
SF Reviewer
SF Reviewer


Joined: 01 Sep 2004
Posts: 24
Location: Scotland

Offline

PostPosted: Mon Apr 23, 2007 3:32 pm    Post subject: Reply with quote

I'd listen to capi. Knowing assembly language *can* be useful depending on what you want to do with it.

A number of security related jobs absolutely require an understanding of ASM for example. Anyone working in malware detection or in vulnerability research would have requirements for ASM as would programmers working on embedded systems, which is apparently the fastest growing market for programmers.

It really is horses for courses but knowing ASM does provide a better understanding of how programs actually work.

Most of the code I write is in C# but most of the code I read is in ASM.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register