Should i learn asm




















Euhemerus 7-Jul I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. Stephen Hawking. Daniel Joubert Jun Copy Code. Adrabi Abderrahim Jun JoseMenendez Jun Jm www. Go to top. Layout: fixed fluid. Software Developer bytepushers.

United States. First Prev Next. Assembly Language for a Beginner Mur 7-Apr Which is the best or a efficient resource to learn Assembly Language on a windows platform.

Member Just to know what you are doing. Programming in any mid- or high- level language has a lot of secrets eg, what is an int in 32 bits or 64 bits? A pointer, then? And when one tries some arithmetics on those? All those are hidden in a C program, for example, and checked during compilation, but in assembly only syntactic is checked and one does it by himself and is responsible for it. On the other hand, compilers put a lot of rubbish in the way, in the ignorance of the programmer. What I want to say at the end: - A bad programming language is no worth to the best programmer - A bad programmer is no worth to the best programming language - No programmer can program a computer that don't knows Having said those, assembly is THE programming language for a long-term, long-lasting, long-serving, fast-working application, BUT done from knowledgeable ones.

I put in one or two syntactic errors that no checker like a compiler will find. Lee Wang Hao. Assembly is far from dead. One other reason for learning assembly language is to understand how a buffer overflow vulnerability works.

See this article here on wikipedia. At the same time, with the proliferation of mobile devices shows, this kind of attacks happen not only on Wintel x86 but to ARM based smartphones like iOS, Android and Windows Phone.

To attack a target computer system the hackers often stoop so low-level pun semi intended to gain r00t. Online video course for x86 assembly Member 8-Oct Hey, I recorded an online video course for x86 assembly paid and exercises Open source. It only assumes that you know how to add numbers. In base In the end of the course you will be able to write fully working x86 assembly programs on the Fasm assembler over the Windows operation system. My vote of 5 Josef Manurung Dec Josef Manurung.

The is the only language that gives you the most knowledge you will ever need to know about programming. Assembly language. In the 's assembly language was the way I went. I designed a cad program that was , lines.

Assembler taught me to be tidy with my code and make it readable as trying to go back over something uncommented is a nightmare. Assembler also taught me about programming detail like writing directly to the video card hardware. These days you cant do that in assembler as Win7 will kick up a fuss and not allow it. Few Queries popchecker Sep I think I found this article on a right time. I know a few high level languages which I learned myself.

But in case of assembly language, I think I am going to fail. I couldn't gain more than writing few lines to print something on a DOS console. Can you please suggest me a good assembler, book, operating environment and debug tool for a beginner?

Re: Few Queries buddy. Thanks for reading and leaving feedback. Just hang in there, if you practice, you will learn. You do have to write a lot of code to do very little, however, this is because you are spoon feeding the processor it's instructions. You gain an understanding of how your machine works.

I hope this helps. Thanks again. It would have been even more interesting if the author of the article could have stated the size of the executable for programs that produced an executable. Thanks a lot for the resource and comment. Assembly is not as widely used in PC programs as it is in embedded systems. The author has not stated this fact to the readers. How are virtual functions implemented anyway? How do large structures get returned, does the calling function offer a space for them or vice-versa?

Then there are special assembly languages for graphics hardware, although shader languages went high-level a few years ago, anything which lets you think about a problem a different way is good. To me the question is how much assembly do you need to know? I don't think you have to know assembly like a programming language, that is I don't believe that everyone should be able to write a program in assembly, but on the other hand, being able to read it and understand what it actually means which might require more knowledge of the architecture than the assembler is enough.

I for sure cannot write assembly i. It's worthwhile to learn lots of different languages, from lots of different paradigms. As assembly is at the root well, close to the root of all languages, I for one say that it is worthwhile to learn assembly. Then again, it's worthwhile to learn a functional programming language, logic programming, scripting languages, math-based languages. You only have so much time, so you do have to pick and choose.

Depend of which programming level you wish to reach. If you need to work with debuggers then YES. If you need to know how compilers works then YES. Do you have any use for it in what you plan to do?

In a more general sense, yes, I'd say in my opinion is well worth learning asm something like x86 or arm , how well it serves you depends on what you programming and how your debugging it. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Is it worthwile to learn assembly language? Asked 10 years, 4 months ago. Active 4 years, 3 months ago. Viewed 86k times. Improve this question. ApprenticeHacker ApprenticeHacker You mean it isn't cross-platform?!! For example: worldofspectrum. Ok, so there is a different assembly language for every processor???!!!!!!!!!!!!!!!!!!!!!!!!!

It's fascinating how the computer actually works, and I feel intellectually richer for having learned it. It was also very fun to play with at the time. However, today's compilers are better at generating assembly than almost anyone on almost any piece of code. Unless you're writing a compiler or checking that your compiler is doing the right thing, you are probably wasting your time by learning it.

For example: should I use stack or heap variables? In almost all cases, however, I think that these choices should be made based on code readability rather than computational time savings. My humble suggestion is to focus on skills that really matter: software design, algorithm analysis, and problem solving.

With experience developing big projects, your intuition will improve, which increases your value much more than knowing assembly in my opinion.

You should be familiar with one level 'deeper' in the system that you are working at. Skipping too far down in one go isn't bad, but may not be as helpful as one would desire. A programmer in a high level language should learn a lower level language C is an excellent option. You don't need to go all the way to assembly to have an appreciation of what goes on under the covers when you tell the computer to instantiate an object, or create a hash table, or a set - but you should be able to code them.

For a java programmer, learning some C would help you with memory management, passing arguments. Writing some of the extensive java library in C would go a ways to understanding when to use what implementation of Set do you want a hash?

Taken to the next level A C programmer should have some familiarity with assembly, and assembly types oft found in embedded systems shops would likely do well with understanding things at the level of gates. Those who work with gates should know some quantum physics. And those quantum physicists, well, they are still trying to figure out what the next abstraction is.

It is a real added value to your programming skills. I would even go further to say that you should not dive to assembly before understanding how unmanaged languages work. It is almost a mandatory reading. You should learn assembly if you want to go even further down. You want to know how exactly each and every construct of the language is created. It is informative but it is a whole lot different level complexity. If you know a language well, you should have at least basic knowledge of the technology one level of abstraction lower.

When things go wrong, knowledge of the underlying mechanics makes it far easier to debug strange problems, and naturally write more efficient code. To answer your question in this case, knowledge of assembly really wouldn't help an experienced Python developer it's too many steps down in abstraction - anything done in Python would result in many many assembly instructions. Similarly, if you are using CoffeScript then it's very useful to know Javascript.

This idea also works outside of programming languages - if you are using Assembly, it's a good idea to be familiar with how the underlying hardware functions. If you are a web-designer, it's a good idea to know how the web-application is implemented. If you are a car mechanic, it's a good idea to have some knowledge of some physics.

Write a small c program, and disassemble the output. That's all. However, be prepared for a greater or lesser degree of "housekeeping" code that is added for the benefit of the Operating System. Assembly helps you understand what's going on under the hood because it deals directly with memory, processor registers and the like.

If you really want to go bare-metal without all of the complexity of an operating system complicating things, try programming an Arduino in assembly language. There is no definitive answer, since programmers are not all of a type. Do you NEED to know what lurks underneath? If so, then learn it. If it will have no practical benefit to you, then why bother? Does one need a mechanic's level of knowledge just to drive a car?

Does a mechanic need an engineer's level of knowledge, just to work on a car? This is a serious analogy. A mechanic can be a very good, productive mechanic without diving to engineer depth understand of the vehicles he maintains. Same for music. Do you really to plumb the complexities of melody, harmony and rhythm to be a good singer or player?

Some exceptionally talented musicians can't read a lick of sheet music, let alone tell you the difference between Dorian and Lydian modes. If you want to, fine, but no, you don't need to. If you are a web developer, assembly has no practical use that I can think of.

If you are in embedded systems or something really specially, then it might be necessary, but if it were, you'd know it. The problem is that with a high-level, far-away-from-the-hardware language like C or Python you don't really appreciate the fact that every move you make turns into hundreds if not thousands of machine instructions, and you don't tend to comprehend how a few lines of a high-level language can cause vast amounts of storage to be accessed and modified.

It's not so much that you need to know precisely what is going on "beneath the covers", but you need to have an appreciation for the scope of what's happening, and a general conception of the types of things that occur. My answer to this question has evolved relatively recently. The existing answers cover what I would have said in the past.

Actually, this is still covered by the top answer - the "appreciate the constructs in higher-level programming" point, but it's a special-case that I think is worth mentioning According to this Jeff Atwood blog post , which references a study, understanding assignment is a key issue in understanding programming.

Learner programmers either understand that the notation just represents steps that the computer follows, and reasons by the steps, or else gets perpetually confused by misleading analogies to mathematical equations etc. That really is just the steps.

Then when you learn to translate that to an assignment statement You don't need an misleading analogy to a mathematical equation - you already have a correct mental model to map it to. I learned assembler as my second language, the first being Commodore Basic, and I hadn't really learned much of that at the time - partly because there was so little to learn, but also because assembler just seemed so much more interesting back then.

Partly the times, partly because I was a 14 year old geek. I don't recommend doing what I did, but I wonder if studying a few very simple examples in a very simple assembler language might be a worthwhile preliminary to learning higher-level languages. Unless you are a compiler writer, or need something highly optimized like data processing algorithm , learning assembly coding will provide you no benefits.

Writing and maintaining code written in assembly is very difficult, therefore even if you know assembler language very well, you shouldn't use it, unless there are no other ways. Writing in assembly would not give you magic increase of speed as due to amount of details register allocation etc.

Additionally with modern read - designed after 's processors assembly will not give you sufficient number of details to know what is going on that is - on most processors. Why understand processor? It might give you much more understanding what's going on. Let's say you write matrix multiplication in naive way:. It may be 'good enough' for your purpose if it is 4x4 matrix it might be compiled to vector instructions anyway. However there are quite important programs when you compile massive arrays - how to optimize them?

However you can reverse tho lines and magically gain performance why? I leave it as 'homework' - IIRC depending on various factors for large matrices it can be even 10x. That said - there are working on compilers being able to do it graphite for gcc and Polly for anything using LLVM. They are even capable of transforming it into sorry - I'm writing blocking from memory :.

To summarise - knowing basics of an assembly allows you to dig into various 'details' from processor design which would allow you to write faster programs. However I would not start with x86 as they tend to be quite complicated possibly ARM too - knowing what is a register etc. Normally it's VERY important for debugging purposes.



0コメント

  • 1000 / 1000