Wanna learn Assembly?

This is a discussion on Wanna learn Assembly? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; TK your one of those people who will just not take no for an answer arent you. Have you even ...

  1. #121
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175

    Angry

    TK your one of those people who will just not take no for an answer arent you. Have you even programmed before? Do you know anything about computers? Because from you posts it is not at all obvious! As i said before TK, if you intend to keep up this silly argument then go do some reading and show me some hard proof, though i wouldnt bother cause you just aint going to find any.

    Both i and Compuboy have explained in cystal clear terms just what assembly coding is all about, yet you still continue with you stuipid idea that high level languages are going to be faster than ASM. Even though Compuboy spelt out the fact that ASM is simply a representation of the binary instructions you still cant see that they are the same thing.

    Heres an example, my bootloader loads a bitmap from a floppy disk, prints it to the screen in mode 13h and does all the processer stuff needed to switch an intel processor into 32 bit mode, and how big is this file. Less than 1K! Now go do that in C (or any other high level language).

    Also, you dont take into acount that to people who dont know a programming language even VB looks total nonsence, Assembly is actually vey understandable one you have a firm grasp of the basic consepts.
    VC++ 6

  2. #122
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    He's trying to say that an interpreted language such as BASIC will run faster than a precompiled/assembled language such as Assembly!
    I already thought something like that. Virtual machines, interpreters. Well, if TK is talking about that, then he/she should do a little research on how the interpreter affects speed. If TK is correct, then I'll advice my boss to put BASIC interpreters in our devices.

  3. #123
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175
    I think what TK is on about is that code will be compiled to an intermedite stage between source and exicutible code. This code would then be compiled by the computer it was to run on, there fore it could take advantage of the specific processor features. This would increase the speed of a high level language but it would not make it faster than ASM as ,in general, processors havent changed by a great deal, they cant or else older code wouldnt run, including operating systems ect.
    VC++ 6

  4. #124
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    It is true that processors are designed in such a way that they can run older code. But on the other hand, new compilers are extended with instructions and facilities which makes it possible to let software run faster. If a compiler for a high level language supports the new instructions, then a compiled high level language program will be as fast as intermediate code which is compiled for the computer is runs on.

    But I don't believe that the intermediate language or bytecode will be faster than compiled code. Since during runtime the intermediate language or bytecode must be interpreted by a virtual machine. It can be fast, but than it must not be interpreted during runtime, but it must be compiled by the virtual machine or such to binary code before running.

    But note that this doesn't imply that the code is always faster than compiled or assembled code. It just implies that it can be as fast as code specifically written for that processor. And it is probably faster than a lot of code written for older processors, since it always uses the new features. So compiled or assembled code, especially when hand-optimized, for a certain processor will be fast and probably in a lot of cases even faster.

  5. #125
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Come on VB, Shiro, Compuboy, Fordy; you all know that the language of the future is gonna be Qbasic. With its amazing speed and power, it cannot be beaten.

    Now seriously, what do you all think TK stands for? Troll King maybe. It is obvious that this person is just trying to get you all ........ed off, so just ignore him/her.

  6. #126
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175
    Hehe i knew i kwew that name from somewhere, it all makes sence now.

    And Go-QBasic-Go!
    VC++ 6

  7. #127
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    Troll? Hmmm, I really need to do something on my English.

  8. #128
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711

    Getting a bit off-topic but...

    >Same answer as I always give - I dont have a go at their products......just them..... <

    Exactly. Microsoft's practices are quite different from their products (well, some of them at least like Win2K and Office). Why should I have to give up my work habits to attack them as a company? Just because I smoke weed doesn't mean I'm a hippy.

    Besides, we've all tried Linux...

    >But a compiler cannot reason like a human can.<

    Not yet, at least. Maybe that's what Dean is getting at?
    Last edited by Hillbillie; 06-26-2002 at 02:04 PM.

  9. #129
    Sayeh
    Guest
    I _had_ to step back in on this one at this point, particularly in regards to TK's remarks:

    > And I am saying that high level languages will be far
    > more efficient than ASM or compiled binary.

    Ahem. High-level languages don't compete with low-level languages-- compilers and assemblers _convert high-level language logic into low-level code-- that's what they do! There's no competition there. Why do you think you need a compiler anyway? Sheesh!!!!!!!

    > Code can be compiled intelligently, while you are
    > working.There is no reason why everything needs
    > to be compiled before hand, therefore high level

    No, what you are talking about is _interpreted code_, which is much slower than compiled.

    > language will be faster than binary executable code,
    > nevermind assembly.

    You are _so_ confused.

    ---

    Let's explain this so everybody can understand: here is a table which shows you what layers your language falls in:


    Java, BASIC, QBASIC (interpreted via a compiled runtime engine)
    c++,P++ (compiled, then assembled code)
    C,P (compiled, then assembled code)
    assembler (assembled code)
    binary/object code (at the chip level)

    binary is a representation of electrical signals. It is not a code. Assembler is a language that describes binary to you in a form you can understand. C and Pascal (and their ++ derivates)are languages that describe assembler to you in a form you can understand. Languages above these are interpreted.

    The closer you are to executing at the direct speed of the processor (on an 'instruction per cycle' or 'multiple instruction per cycle' basis), the faster you run.

    Everything you do reduces, one way or another, to binary.

    Stop confusing hardware execution with software logic.

    Most professional code houses write assembler (if they use it) at the lowest common chip-family denominator so that the program will run on all the processors of the same family. That is normal. Unless you are in an exceedingly unique situation, the speed gain in writing 8086 code on a 386 and writing 80386 code on a 386, would be _negligible_.

  10. #130
    _B-L-U-E_ Betazep's Avatar
    Join Date
    Aug 2001
    Posts
    1,412
    Sometimes assembly can be a beautiful thing...

    check out the Chromazone demo....

    http://grc.com/smgassembly.htm
    Blue

  11. #131
    TK
    Guest
    I am aware of how eveything works. That is why I say that binary is too slow. It will not be practical to use Assembly for high level programs because Assembly is hardware specific. Writing Assembly for approaching binary speed is ignorant unless you are a compiler or device driver writer. With programs of the future, you will be downloading code from different locations around the world and integrating it into your own programs. This will be done in an intermediate language using open standards. It is not impossible to be faster than binary code, because binary code has no intelligence. It can't make decisions, it's a one shot deal. That is completely wrong. You should not code that way because the limitations are obvious. It's also been done. There is no more to offer. If you are writing compilers for a specific OS than fine, otherwise learn how to program.

  12. #132
    In The Light
    Join Date
    Oct 2001
    Posts
    598
    howdy,
    hey after nine pages of this i want to jump in.
    aaaaa i'm 42 years old and i have written LOGO on a commodore 64, i was the best damn Basica coder around, why i even played hang man with joss.
    but none of this makes me as cool as guest.

    as far as ASM goes i would love to be an expert at it, but i'm not.
    but i can and will learn about it.

    M.R.
    I don't like you very much. Please post a lot less.
    Cheez
    *and then*
    No, I know you were joking. My point still stands.

  13. #133
    Registered User billholm's Avatar
    Join Date
    Apr 2002
    Posts
    225

    Talking

    Yah I'd really love to learn Assembly too! If I can trash my processor by just using C, I'm sure I can burn the whole damn thing if I know some Assembly hehehe
    All men are created equal. But some are more equal than others.

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

  14. #134
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Shiro, Troll is an internet slang term. It means the person lurks around, most of the time not signing in, and tries to ........ off everyone s/he can.

  15. #135
    Sayeh
    Guest
    Hey everyone, more humor from the resident comedian:

    TK writes:

    > I am aware of how eveything works.

    All at once? ** Impressive **. Even I don't know everything all at once.

    > That is why I say that binary is too slow

    Okay, let's see-- binary, actually being electrical impulses, is operating at near the speed of light, limited only by the processor clock speed... Hmmm. My new Dell can execute more than 2,530,000,000 instructions per second. That's _billions_, folks. Furthermore, it isn't just how fast assembly is that makes it so useful, it's the order in which the mnemonics are written. Many times, because a compiler doesn't really understand what you're trying to do, it may add an additional test for a loop or a variable value, that can be eliminated by inserting assembly yourself.

    > It will not be practical to use Assembly for high
    > level programs because Assembly is hardware specific.

    Actually, there are many people out there writing commercial applications fully in assembly. Many more people are using assembly snippets to assist where speed is critical. Games are an example of where assembly snippets are still used in many cases for performance gains.

    > Writing Assembly for approaching binary speed is ignorant

    No, it's very effecient And in fact, required in some cases not for performance, but just to get around limitations that some O/Ss have. Reclaiming handles for example.

    > unless you are a compiler or device driver writer. With

    No compilers today are written in assembler, and haven't been for 20 years. The compiler was _developed_ so that people wouldn't have to write in assembler all the time. Very few drivers are written in assembly, although they could be, very easily.

    > programs of the future, you will be downloading code
    > from different locations around the world and integrating
    > it into your own programs. This will be done in an
    > intermediate language using open standards.

    No, actually, this is a microsoft dream that will not come to pass. It is a licensing question really. But aside from that, technology has already been developed for lightspeed computers that will be so fast and so powerful that nothing we (or I) know about computers today will apply. In fact, these computers will be so fast, able to do trillions upon trillions of operations per second, that the computers themselves will have to write their own code.

    > It is not impossible to be faster than binary code

    Concerning today's computers, this is the only intelligent statement you've made.

    > because binary code has no intelligence. It can't
    > make decisions

    Actually no code has intelligence. That's called "logic" and that's the part the programmer imparts. If you want to know if assembly supports decision making, of course it does. Try these for example:

    BNE Brance Not Equal
    BLE Branch Less than
    BGE Branch Greater than
    BEQ Branch Equal

    And there are more. These are just the simple tests.

    ----

    And finally, what makes our comedian's arguments so ludicrous is the fact that all programs, no matter what language they are written in, are reduced to binary for the specific processor family they are to be run on. This includes, assembled, compiled, and interpreted languages.

    Stop speaking about computers of the future-- the future doesn't exist. It isn't here yet. I could "what if" and "I think X will happen" myself to any conclusion I desired, but I prefer to deal with today's tangible facts.

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, 12: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21