Results 1 to 5 of 5

Thread: Assembly/Machine Code

  1. #1
    Elite Member Norm's Avatar
    Join Date
    Mar 2001
    Posts
    14,133

    Post

    .
    Last edited by Norm; 07-09-01 at 09:52 AM.

  2. #2
    Advanced Member g-c0de's Avatar
    Join Date
    Feb 2001
    Posts
    834

    Post

    where do i learn this assembly/machine code programming language from?

  3. #3
    Member Megabyte63's Avatar
    Join Date
    Jun 2000
    Location
    Houston,Texas,USA
    Posts
    92

    Post

    I'm learning it now at school and it is pretty hard to grasp. We use Debug which I have learned to hate. It helps if you understand the higher level languages and memory and microprocessor architecture. It takes us hours to write the most simple programs. I can do some fairly large and complex programming in VB or C/C++ but assembly is tough. It's correct you have to write every single action and keep up with every single mem/reg location numbers. To make it worse for me is the text book I have is a "what is" rather than a "how to" book. My advice is if you really want to learn assembly get a good text book that has a lot of examples and explains everything to where YOU understand it. It is a very good skill to have if you are in the technology field or plan to be.

    Megabyte63

  4. #4
    Member Megabyte63's Avatar
    Join Date
    Jun 2000
    Location
    Houston,Texas,USA
    Posts
    92

    Post

    Hey Stu, I,m in the process of learning assembly and from what I understand, It is mostly useful when there is a lack of hardware or the hardware needed is impractical. For example, if I'm designing a circuit and I need a special chip that either doesnt exist, too expensive and or for some other reason undesired. I can get around the lack of circuitry by useing assembly.
    Another good use is, as Norm has pointed out, making programs run faster because less resources are used. If a c+ program had a particular function that is either a memory hog or utilizes a lot of circuitry then assembly may be a solution.
    I have the impression Norm and you know all this much more than I do. I'm still in the fog with stuff. I thought I would say it for those that are unfamiliar with the other uses the the code.

  5. #5
    Regular Member
    Join Date
    Aug 1999
    Posts
    341

    Post

    There is a pretty big down side to assembler that I haven't seen mentioned here--portability. Assembly is tied directly to the CPU architecture. Meaning that, if I write a program in assembler for an i386 machine, it will not work on a Sparc and Alpha machine for instance. Which may or may not concern you, depending on your application's goal.

    However, if I write a program in ANSI/ISO C/C++ (for instance) it will run on any machine that it is compiled on.

    Granted, assembler gets you better performance. But, in the grand scheme of things, to write something in assembler instead of C/C++ (or some other high level language) just to gain 100 nanoseconds is a waste of time. Unless your program is an OS, a compiler, embedded software/firmware, or critical (i.e. 100 nanoseconds longer and someone might die; like programming tactical weapon systems, or aerospace software, etc.) you'll probably never need, or want, to use assembler.

    I'm not saying learning assembler is a waste of time, because I used it extensively at my previous job. It is a good thing to know, if not to use, but to understand how programs actually interact with the system. But, for 98% of the programs that most programmers write, coding in assembler is overkill...

Bookmarks

Posting Permissions

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