PDA

View Full Version : I wasnt sure where to post this-



toast
05-20-2006, 06:51 PM
I need advice-
Is learning assembly better and more useful than c++?
And which should I learn first?

Thanx!
~T

Ezekiel
05-20-2006, 07:29 PM
I need advice-
Is learning assembly better and more useful than c++?
And which should I learn first?

Thanx!
~T

They are both useful, and necessary to learn. But it is logical to learn c/c++ before ASM, as you progress from high level languages to low level languages. It is not really possible to learn a language like ASM without first gaining a fundamental understanding of computers through a higher level language like c++; and no one learns ASM before other languages. The order of learning languages I s***est would be:

Simple scripting (HTML, javascript)
More complex scripting (PHP, Perl, Python)
Programming (c, c++)
Low level programming (ASM)

Of course there are many other programming languages, but those were just examples of the order I would advise you to learn them in. But remember, you need to learn both to gain a good knowledge of computers, each is useful in different ways.

ickyb0d
05-21-2006, 05:32 AM
I need advice-
Is learning assembly better and more useful than c++?
And which should I learn first?

Thanx!
~T



learning c++ would probably be more useful. but what made you decide on c++ in the first place? assembly is a general term for basically 'machine code.' assembly is also dependent on what type of platform (in most cases a microprocessor) you're programming (motorola, intel, atmel...). most of those microprocessors are also going to require some special hardware to program them as well. if you're just learning, i'd say go for c++ or one of the scripting languages mike listed... pick up a beginners book and have at it!

Ezekiel
05-21-2006, 09:58 AM
learning c++ would probably be more useful. but what made you decide on c++ in the first place? assembly is a general term for basically 'machine code.' assembly is also dependent on what type of platform (in most cases a microprocessor) you're programming (motorola, intel, atmel...). most of those microprocessors are also going to require some special hardware to program them as well. if you're just learning, i'd say go for c++ or one of the scripting languages mike listed... pick up a beginners book and have at it!

I think in this context, we are talking about x86 assembly programming (for normal PCs). This can be done without any additional hardware; all you need is a program to convert the human-readable assembly language into real machine code.

You should not even be thinking about learning assembly before you know a good language like c++. A lot of people don't ever learn assembly (because it's not specifically needed); everything can be done in a higher level language. But assembly is useful if you want to:


Get *very* small executable sizes.

Learn more about processors.

Crack software protection.

Understand executable formats.

Write a bootstrap loader, OS, etc.

toast
05-21-2006, 05:04 PM
Thanx you two. I like the sound of assembly... I know that its a clean(as in "powerful") lingo so why not? Its all good though!

:) Toast

Ezekiel
05-22-2006, 12:11 PM
Thanx you two. I like the sound of assembly... I know that its a clean(as in "powerful") lingo so why not? Its all good though!

:) Toast

If you don't already know a language such as c++, then learning assembly will be almost impossible. Assembly is only useful to learn after other languages, you can't go directly to it without previous programming experience.

toast
05-22-2006, 04:51 PM
Nothing is impossible.
But I do have experience.
No problemo!

:)

ickyb0d
05-23-2006, 01:43 AM
Nothing is impossible.
But I do have experience.
No problemo!

:)


experience in what? knowing that would probably help people in advising you.

in assembly you deal with a lot more hardware (as i said before). This includes allocating memory and storing variables and data in paticular registers (based on the processor type... amd, intel, ppc...). The good thing about a higher up language is the compiler does all of this for you (for the most part). This is why it's always a good choice to start with a higher up language.

out of curiosity... why did you choose c++ vs assembly in the first place? as opposed to something like java, c# or something? seems like most introductory courses (and tutorials) are being taught in those nowadays.

Ezekiel
05-23-2006, 12:22 PM
experience in what? knowing that would probably help people in advising you.

in assembly you deal with a lot more hardware (as i said before). This includes allocating memory and storing variables and data in paticular registers (based on the processor type... amd, intel, ppc...). The good thing about a higher up language is the compiler does all of this for you (for the most part). This is why it's always a good choice to start with a higher up language.

out of curiosity... why did you choose c++ vs assembly in the first place? as opposed to something like java, c# or something? seems like most introductory courses (and tutorials) are being taught in those nowadays.

C# is crap, and I strongly advise people not to learn it. I think people learn C++ because it is probably the most widely used "real" language (VB doesn't count), and therefore will have the most support, tutorials, etc. And then after that, they learn x86 assembly to gain a better understanding of how computers work, and other benefits such as smaller executable sizes. Sure, it's easier to go learn a very simplified language such as VB, but it doesn't really teach you anything useful.

ickyb0d
05-29-2006, 07:01 AM
C# is crap, and I strongly advise people not to learn it. I think people learn C++ because it is probably the most widely used "real" language (VB doesn't count), and therefore will have the most support, tutorials, etc. And then after that, they learn x86 assembly to gain a better understanding of how computers work, and other benefits such as smaller executable sizes. Sure, it's easier to go learn a very simplified language such as VB, but it doesn't really teach you anything useful.

yeah, i've never really used c#... java is probably the closest i've come. as of late i'm mainly doing everything in perl. out of curiosity, i assume (that you assume?) that people are using windows systems on here? and not any *nix OS's? I guess under windows.... c++ really would be the programming language of choice. for beginners... heh, it's what i started with.

also... although it's good to understand x86 assembly... do executable sizes really matter that much? especially if you're using a full fledged dedicated computer? i could see executable size mattering if you're putting an application on a device that has very limited space (maybe cell phone... or some other mobile device), but with a PC it's probably not that big of a deal.

Ezekiel
05-29-2006, 07:34 AM
yeah, i've never really used c#... java is probably the closest i've come. as of late i'm mainly doing everything in perl. out of curiosity, i assume (that you assume?) that people are using windows systems on here? and not any *nix OS's? I guess under windows.... c++ really would be the programming language of choice. for beginners... heh, it's what i started with.

also... although it's good to understand x86 assembly... do executable sizes really matter that much? especially if you're using a full fledged dedicated computer? i could see executable size mattering if you're putting an application on a device that has very limited space (maybe cell phone... or some other mobile device), but with a PC it's probably not that big of a deal.

I'm actually running dual boot with winXP and suse *0.0. But I doubt that many of the people on this forum use anything other than windows. And on whatever OS you are programming for (windows, linux, etc), I think c++ is a good language to learn; it's not windows-specific like VB, and will be useful to know, wherever you use it.

Although small executable sizes are a benefit, it really doesn't matter so much on computers now, apart from in a few circumstances. For example, downloading a >*mb file on dialup will be real slow, especially when the code could have been reduced to something like 80kb when using assembly. When I use dev-c++, even with only one header file included, it still manages to make the executable 500kb. Also, trojans (specifically trojan downloaders) are best made in assembly, so to reduce download time, make spreading quicker, etc.

toast
05-29-2006, 10:19 AM
Well, when I wasnt looking you two were off in a tangent...
But thanks to the both of you- it was great. Im going to kick butt this summer.

:)