Re: Asm


[Prev][Next][Index][Thread]

Re: Asm



In article <19970624.120455.3366.2.bike17@juno.com> SLOT STER <bike17@JUNO.COM>
writes:
>Date: Tue, 24 Jun 1997 12:04:52 -0400
>From: SLOT STER <bike17@JUNO.COM>
>Subject: Asm

>What makes Asm so much better than regular programming? What are the
>advantages vs. disadvatages?

The only language a CPU understands is assembly language. When programming
somthing in assembly, you _directly_ command the processor to do that. In any
other langagues, each instruction is translated by the compiler into many
assembly instructions. Since a compiler doesn't have human intelligens, it uses
a lot of unnecessary stuff which makes programs bigger and slower (especially
the latter).

For example, in all highlevel languages (basic,pascal,c/c++ etc) there is one
single instruction to display a line of text on the screen. If you would
convert that instruction into assembly, it would require _MANY_ instructions.
Read the first char from the string. Check somewhere how that char looks like
Put out each pixel in that char on the screen. Go to the next char in the
string etc. If you had to write all those tiresome instructions in every
program, asm programs would be quite big. However, in the ROM memory
of the calculator, those instructions are already done, so we just have to
use those.

ASM Advantages:
 * FAST since you communicated directyl with the processor
 * SMALL since you don't use a lot of bullshit code
 * Nothing is impossible in asm :)

ASM Disadvantages:
 * Quite hard to learn if you're used to basic...
 * Assembly language is primitive. MANY instructions are required to do
   stuff that seems simple.
 * The program is very easy caught in an endless loop, or destroys vital
   parts of the calcs memory = crash

Jimmy Merdell <mja@algonet.se>
http://www.algonet.se/~mja
Jimmy Merdell <mja@algonet.se>
http://www.algonet.se/~mja


References: