![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programming Guru
![]() |
Would somebody please mind explaining to me what assembly is like?
When I'm done with Python, assembly sounds like my kind of language.
But what is it like? Like which languages does it relate to, and what kind of skill sets does it require? And what kind of things is it generally used to program? Thanks for any help. |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
It mainly relates to imperative languages like C or Python (minus the OOP.) It requires the same skills as other programming languages, namely math, logic, and problem-solving skills. It's generally used to program things that need extremely great speed. Because humans can optimize code to be as fast as possible much better than compilers can, programming in ASM is basically required for maximum speed.
Hope this helps.
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials. --WilliamSChips on Slashdot |
|
|
|
|
|
#3 |
|
Programming Guru
![]() |
Hmm, so basically I'd only want this language if I was looking to make an application of great power and flexibility to what the user gives it? Say a music composer program like Finale 2004 could be made quite efficiently in Assembly?
When I turn over programming into a hobby that's probably the first program I'll want to make (a music notation program). Feel free to correct me. And thanks for your help. ![]() |
|
|
|
|
|
#4 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Assembly is not well suited for general purpose things. It translates directly to machine code, making it even lower level than C. In C, you call a function without batting an eye. In assembly, you have to push all your parameters in reverse order, make the call, and perhaps adjust the stack. Just the tip of the iceberg. Assembly gives you a speed boost, which in some rare cases you might actually need, and gives you access to some low-level stuff you couldn't do in C. When Assembly becomes actually useful is writing an OS. Most C/C++ compilers allow you to write inline assembly. This makes it convenient, as you can embed asm into certain functions to perform certain tasks but retain the flexibility of the higher level language. And assembly is by no means portable. x86 assembly differs from PPC assembly, etc. So basically it would be a good idea to stick with higher level languages like C, C++, Python, .Net, Java, or any of the many others. Hope that helps.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#5 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
Anything that the computer can do, quite literally can be done with assembly. This is not true of Python. I just want to point that out.
I don't know what Finale 2004 is, but anything can be made quite efficiently in assembly language. The problem is that assembly language is much harder and more time-consuming to both read and write. A big use of assembly is writing an application in C or C++ and then using the __asm keyword to insert assembly. That way you can write a certain bit of code that needs to run extremely fast in assembly, while using the high-level features of the language everywhere else. Hope this helps.
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials. --WilliamSChips on Slashdot |
|
|
|
|
|
#6 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Quote:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
|
#7 | |
|
Newbie
|
Quote:
__________________
Vulnerant omnes, ultima necat. |
|
|
|
|
|
|
#8 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
What's your point? I'm saying what assembly is used for in the real world, not what so-so coders can do with assembly. Of course anyone using assembly for real has to be good at it.
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials. --WilliamSChips on Slashdot |
|
|
|
|
|
#9 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
His point is that micros today aren't anything like they used to be. The processing power has come from more than increasing the clock rate. For example, because of the slow access to memory (speed of light has been a consideration since frequencies were in the neighborhood of 30 MHz or so -- the characteristic impedance of circuit traces is a definite factor), as much code (data as well) as possible is put on-chip in the cache. A branch at the wrong time can invalidate what's on tap to execute and result in waits while additional instructions are fetched. Today's processors can be doing more than one thing at once, also, so long as it's reasonably predictable what they ought to be doing (and useful, I might add). It is so far from being a mere matter of footprint or the number of clock cycles per a given instruction that it isn't even funny.
Your statement that "anything the computer can do, quite literally can be done in assembler" is a given. Assembler is a mnemonic representation of the actual op codes and operands (machine code) that directly (or through microcode) control the hardware gating signals that implement the logic. All programming languages ultimately emit machine code whether it is via compilation, interpretation, or translation/interpretation by a VM/byte code mechanism. The subset of programmers who can deal with the complexities of all that in an effective manner is small indeed.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#10 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
Yes I know it's a given for you, the guy with 35 years of experience or whatever. I was just pointing out how it contrasted with Python, that's all.
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials. --WilliamSChips on Slashdot |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|