View Full Version : Assembly/Machine Code

04-06-01, 01:12 PM

04-06-01, 05:43 PM
where do i learn this assembly/machine code programming language from?

04-08-01, 03:38 AM
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.


04-15-01, 01:53 PM
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.

04-16-01, 12:44 AM
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...