[ale] why not asm

Irv Mullins irvm at ellijay.com
Wed Dec 19 23:19:30 EST 2001


On Wednesday 19 December 2001 11:04 pm, you wrote:
> why dont people use asembly more often? supposedly its
> about as easy to code asembly as it is c, supposedly
> the processors have different coding for asm but cant
> they agree and or os just be slightly coded
> differently for diff procs?

Not just slightly different - completely different code is needed 
for different processors, and for the same processor but different 
os. For example, input and output instructions are completely 
different for DOS, Linux, and Windows on the same pentium pc.

C code comes with libraries that hide most of these differences, 
that's why people would rather use C than assembler. Most other 
programming languages do an even better job of hiding the differences, 
but many are only written for one or two platforms, while C is available 
for just about anything.

Further, some jobs, like disk i/o and file management are extremely 
simple in C (or any higher level language) but can get complex in 
assembly. Most people prefer conveniences like type checking,
bounds checking, meaningful error messages, etc. which you don't 
get with assembler. A good programming language might warn you:
of an "attempt to access the 14th element of a 12 element array",  
while the same mistake in assembler might reformat your drive.

Regards,
Irv


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list