Results 1 to 13 of 13

Thread: Is Assembly worth it?

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2004
    Location
    Puerto Rico
    Posts
    43

    Question Is Assembly worth it?

    Currently I am a VB programmer... I was thinking about exploring ASM, but I need to know, is it worth my time? Would you recomend a VB programmer to switch to ASM?

  2. #2
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322

    Re: Is Assembly worth it?

    Quote Originally Posted by Oblivion02
    Currently I am a VB programmer... I was thinking about exploring ASM, but I need to know, is it worth my time? Would you recomend a VB programmer to switch to ASM?
    Of course it is, every college in the world requires computer science majors to learn asm. They do that because you'll never know "why" until you learn asm.

    Ignore the people who say no, they probably have never written a line of asm in thier life.
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Is Assembly worth it?

    You probably wont use ASM often (if ever after you've learnt it), but there is no question that it helps you write better/more efficient code. I only used it briefly when I was at school, but it is still helping my code about 10-15 years later.

    VB hides so much from you that you cant see where some issues (mainly speed related) arise. Each VB command converts into multiple ASM statements, and it is useful to see what is effectively going on "behind the scenes".

  4. #4
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Re: Is Assembly worth it?

    Quote Originally Posted by Maven
    Ignore the people who say no, they probably have never written a line of asm in thier life.
    True

    I took one look at an asm tutorial and ran back to my beloved vb and c++
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

  5. #5
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322

    Re: Is Assembly worth it?

    Quote Originally Posted by ice_531
    True

    I took one look at an asm tutorial and ran back to my beloved vb and c++
    LOL don't let the syntax scare you off. ASM is very straight forward after you get the idea of it.
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Is Assembly worth it?

    I learned it on the IBM 370, which is called BAL. It helped greatly, seeing how everything breaks down into little pieces, which are put together to make more powerful instructions possible.

  7. #7
    New Member
    Join Date
    Dec 2004
    Posts
    6

    Re: Is Assembly worth it?

    MASM is so awesome, you should definetly learn it. And the syntax is not really that difficult. The only real challenge is learning how to use the registers effectively.

    This is coming from someone that first learned VB, then C++. Even though it's one of the last languages I have learnt, it's still my favorite.

    In ASM you are 'free' so to say. Even C++ does some default processing that you don't know about until you get into MASM32.

    ASM is also alot faster than any langauge, not to mention it can generate a executable with a output of around 2kb-3kb.

    See, Assembly is like the last thing left, next to the raw code that the processing unit understands.

    Here's how it basically works when a program written in another langauge executes.

    1) C++,VB,etc is broken down into ASM code
    2)The Processing unit can understand ASM and it's OPCODES,etc, so
    the ASM is then translated into raw code.
    3)Now the code is raw code

    That's why ASM can generate such small executables, and why it's syntax seems a little foreign.

    Anyone that programs should learn ASM.

  8. #8
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Is Assembly worth it?

    It all about "generation of the language"

    Here's a quick quote from the net.

    Some examples of generation languages:

    2nd GL, assembler

    3rd GL, FORTRAN, C, C++

    4th GL, MATLAB, Mathcad

    5th GL, Labview, MATLAB Stimulant

    The higher the GL:

    More structure is built into the language
    Easier implementation
    Less skill needed of implementers (users can create program, less dependence on programmer)
    Less typing (built in functions)
    More limited you are by the built in functions, but generally can go to a lower GL and write a routine that you need for the more specialized capabilities
    Less control over bit manipulation
    Quicker learning of GL
    4th & 5th (and some 3rd) GL's keep track of data structure (will tell you if you get your data types mixed up)
    More graphical


    The lower the GL:

    More instructions you will have to write
    More capabilities you can create (however YOU have to CREATE them)
    You can program the more complicated (unique) parts of your system
    Since each generation layers on top of the prior generation, the only way to remove the "magic" is to learn the lower layer. Knowing a bit (no pun intended) about "NOR GATES" allows you to understand the chip level. Having an ASM understanding allows you to realize what the higher level languages do. Understanding 3GL allows you to create your own 4GL and 5GL syntax - that's when commercial development becomes truly efficient.

    Seems like the early projects talked about in the VB forums is the "calculator". Implementing this in a 3GL is silly (efficiency wise) but smart UI wise. In my opinion VB is really a 3.5GL language - maybe even higher.

    Back in my salad days I developed an "equation processor" - this would take database fields, and using my own home-grown version of RPN, evaluate a mathematical formula upon them. We eventually made it real RPN - added more than +,-,/,* capabilities and eventually put it into assembler. At that point it was a true object compiler/execution run-time.

    Coding it in mainframe BASIC first was in a way a prototype, and then doing it in assembler made it quite real.

    I believe my first mainframe ASM program was a routine to "swap" the case of a sentence from UPPERCASE to PROPERCASE - but do it in place, as opposed to moving it from one string space to another. Back in those days speed was a true issue, so using memory properly could be a real boost.

  9. #9
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Is Assembly worth it?

    Learning ASM is something like learning Latin. You probably won't use it much, but if you are familiar with it, you understand what other languages are doing better.

    One exception to that would be C++, where you can readily look at the ASM generated, which helps with debugging. Probably wouldn't be of much use for .NET, though.
    My usual boring signature: Nothing

  10. #10
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: Is Assembly worth it?

    I have to echo that. It is great to know for debuggin, and optimization of C++, so you can see why one solutiuon is faster then an other and so on.


    But in real life today it is more or less only used in building the first steps in an operating systems, and for some math oddities in a game. Not much more then that. So if you don't need that, then it is more or less a waste of time to take a deep step into it. The C++ compilers are so powerfull these days that you have to be REALY good in ASM to beat it.

    So my advice would be. Better to be realy good in a higer level langauge then ASM, then use a lot of time to learn it.


    ØØ

  11. #11
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322

    Re: Is Assembly worth it?

    Quote Originally Posted by Ambid
    ASM is also alot faster than any langauge
    That's almost a myth actually. The proper way to say it would be "Can be made faster then any other language". It takes a lot of work to optimize code in asm, some algorithms more then others. You usually end up doing some binary math to really speed up algorithms.
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

  12. #12
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: Is Assembly worth it?

    And if you are still not covinced. Here is my exprediment trying to speed up the C++ function sqrt(). Enjoy the reading....


    http://vbforums.com/showthread.php?t...highlight=sqrt

  13. #13
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322

    Re: Is Assembly worth it?

    Quote Originally Posted by NoteMe
    And if you are still not covinced. Here is my exprediment trying to speed up the C++ function sqrt(). Enjoy the reading....


    http://vbforums.com/showthread.php?t...highlight=sqrt

    Here is a good one:
    http://www.azillionmonkeys.com/qed/sqroot.html
    Last edited by Maven; Jan 24th, 2005 at 12:22 PM.
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width