Thread: Wanna learn Assembly?

  1. #91
    TK
    Guest
    And to add one more comment.

    Speed gained from assembly language programming could be insiginficant because the new model that they are begining to work with, will allow programms to download an compile code while the program is being used rather than all at once as well as being able to determine features of the OS and selectively compiling code based on information about the architecture. They are experimenting with this on the .net framework. This could potentially blow away assembly language and C optimization speed. It has other implications as well. Far from being utilized widely, we will probably see more of this type of benefit from programming at a higher level in the future.

  2. #92
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175
    I dont really understand what your saying TK, but C will never be faster than pure ASM.
    VC++ 6

  3. #93
    Unregistered
    Guest
    High level programs like Java and .net IL could potentially be much faster than ASM.

  4. #94
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175
    You honestly think these high level languages are going to be faster than ASM? Heck Microsoft was behind the .net framework i can believe you think it might be as fast as ASM. The problem with high level languages is they have to deal with every possible use for each function, assembly just does what the computer can do. If you dont believe me use memcopy in VC++ then use the debugger to see just what junk they have shoved in beside the small amout of code needed to do this opperation.

    could potentially be much faster than ASM
    And by definition that makes no sence what so ever, ASM is about a half inch away from the Hex codes the computer sees, this makes it impossible (not unlikely, impossible) for any high level language to be faster than (fairly well writen) ASM.

    As for the buzz word used alot in this thread - portibility - how many people in here use a processor which is not based on the origional 8086 instruction set? Not bloody meany thats how many. Guess what, any ASM program i write will work on these computers, and with minor changes (sometimes less than with C) will run on any OS. The only other type of processor i can think of is the ones used in Macs and well, needless to say i dont want to develop for the Mac (who would?).

    Anyway im going to bed now, but heres a challenge for you americans who - for some strange reason - stay awake all night. Try to learn some basic ASM, you never know, you might even like it!
    VC++ 6

  5. #95
    S­énior Member
    Join Date
    Jan 2002
    Posts
    982
    quote:
    --------------------------------------------------------------------------------
    could potentially be much faster than ASM
    --------------------------------------------------------------------------------



    And by definition that makes no sence what so ever, ASM is about a half inch away from the Hex codes the computer sees, this makes it impossible (not unlikely, impossible) for any high level language to be faster than (fairly well writen) ASM.
    While this is true, portabiliy isn't just about crossing platforms but also about future portability. A hard coded asm executable will always remain the same. The theory is, if you were to upgrade your processor the runtime for the higher level language could re-compile the intermediate code to take advantage of the newer processors features. This could potentially make the program run faster than your original hard coded exe that didn't take advantage of the newer features/instructions.

    However, you could always re-do your asm program to make it faster again, if you had the time and willingness to re-distribute.

  6. #96
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    VBprogrammer, he doesn't mean pound for pound C or any other high-level language will be faster, just that on newer technology it has the ability to run faster because it was made specifically for that technology, whereas assembly was made for a previous platform.

    It's sort of like how 16-bit programs run slower on 32-bit architecture than they do on 16-bit architecture.

  7. #97
    TK
    Guest
    When you use a middleware component for example the .net framework, you have artificial intelligence to work with, an example is metadata, it isn't exactly going to change the world, however it is a beginning. A framework doesn't have to compile all at one shot, instead it can make decisions about when to compile, and what to compile and what not to compile. This will lead eventually to high level language running faster than assembly language or even binary. Your computer will be making decisions, it won't just simply process without consideration of anything.

  8. #98
    Registered User billholm's Avatar
    Join Date
    Apr 2002
    Posts
    225

    Question

    Hey guys what's .net? It's the first time I heard of that.
    All men are created equal. But some are more equal than others.

    Visit me at http://www.angelfire.com/my/billholm

  9. #99
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175
    Hillbillie i wouldnt dispute the fact that new technology will allow C and other languages to exicute faster, what i dispute is his assumption that they will be faster than assembly. I think you would agree that this is extreamly (to the point of imposibility) unlikey.

    Your computer will be making decisions, it won't just simply process without consideration of anything.
    For a computer to do this at a level where it was approaching the that level of a skilled assembly programmer would take more processing power than the code which is actually doing the 'work'. I can tell you that it is IMPOSSIBLE for code to make conventional programs exicute faster than it can work with 'binary'. Please research this further if you intend to continue this silly argument.
    VC++ 6

  10. #100
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    any ASM program i write will work on these computers
    That is only true if you write 8086 assembly. If you use the instruction set of later processors you can't run that code on a 8086, it would mean that you have to make routines by yourself which perform the operations for which the later processors have just one single instruction. Those kind of assembly programs are slow. And then an optimizing C compiler is very valuable.

    Your computer will be making decisions, it won't just simply process without consideration of anything.
    You mean the computer makes such decisions during running the program? That would make the software very slow. But perhaps you mean that this all is done before the program runs. Then it could as fast, maybe faster. But I don't know about that. But isn't the .NET framework in some way the same as J2EE? If I remember well, the .NET framework has a Runtime, which is comparable to the JVM. The JVM is known to be slow, if the .NET framework isn't, how did they solve that?

  11. #101
    Registered User Compuboy's Avatar
    Join Date
    Apr 2002
    Posts
    16

    ASM

      Oh, for goodness' sake! It's obvious that nothing will ever run faster than Assembly Language. That's just a rediculous statement!

      For example, if someone simply told you that they wanted you to make a lasagne, you would have to run around, trying to find ingredients that you think might be useful. After that, you would have to guess how to put them all together. You would end up with something like a lasagne, but it may never quite be how the person wanted it.

      Now, if the person told you exactly what ingredients he wanted in his lasagne and gave you the exact recipe, you would be guaranteed to get it exactly right, just how he wanted it.

      I'm sure you can see what I'm getting at, the first case is a higher-level language like C and the second case is ASM. Regarless of what you do to improve the processor's "cooking" and "ingredient choosing" talents, it will never, ever do things better than if you tell it exactly what to do.

      The only problem, as has been stated, is that the specific ingredients may not be available one day. Also, the recipe that this guy gives you might not come out right on your cooker.

      I think that ASM will always have a place with computers, regarless of how they evolve, simply because the ASM solution is invariably the fastest solution. That will always be an attractive feature for a programmer.

  12. #102
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175
    Nice way of putting it Compuboy! Only...Now im starving.
    VC++ 6

  13. #103
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    >I think that ASM will always have a place with computers,
    >regarless of how they evolve, simply because the ASM solution
    >is invariably the fastest solution. That will always be an
    >attractive feature for a programmer.

    I don't think speed is the most important thing. Current PC processors are very fast and new kinds of processors are much faster. So I think a optimizing C/C++ compiler will do a very good job. But the most important thing is that there things which you can't do in a high-level language, like interfacing directly with the hardware.

  14. #104
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175
    You telling me Shiro that you have never been annoyed by a silly program that takes all day to do the silliest task? And anyway about 7 replies up you'll find people who believe that there high level language will one day be faster than assembly, thats who both me and compuboy where replying to.
    VC++ 6

  15. #105
    S­énior Member
    Join Date
    Jan 2002
    Posts
    982
    > But the most important thing is that there things which you can't do in a high-level language, like interfacing directly with the hardware.<

    This statement is false.

    >I think that ASM will always have a place with computers, regarless of how they evolve, simply because the ASM solution is invariably the fastest solution.<

    Of course it will, I don't think anyone has argued that it won't. In fact doing a qiuck skim of the thread, I can't find a post where anybody is seriously oposed to learning some form of assembly (for educational purposes if nothing else). Although quite a few have decided that pointing out that asm is probably in the majority of cases not the best solution is some form of blasphemy.

    An overwhelming majority of programmers (in their jobs) will never be involved in something that requires assembly, because the overwhelming majority of programmers will never write a program that sends men or trash to another planet let alone something like an o/s or even device drivers (I suspect in a few years a large proportion programmers may never use something as low level as C).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. wanna learn all about network programming
    By manav in forum Networking/Device Communication
    Replies: 3
    Last Post: 03-24-2008, 01:45 AM
  2. Assembly question
    By linucksrox in forum Tech Board
    Replies: 13
    Last Post: 04-08-2007, 06:41 PM
  3. Assembly....
    By Victor in forum Linux Programming
    Replies: 8
    Last Post: 12-28-2004, 01:46 AM
  4. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 01:11 PM
  5. Wanna Learn...
    By Timer in forum Windows Programming
    Replies: 12
    Last Post: 07-19-2002, 01:33 PM