For Programmers: Free Programming Magazines  


Home > Archive > A86 Assembler > August 2006 > General Use of ASM









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author General Use of ASM
sleeper

2006-08-24, 6:57 pm

hello everyone,

I am starting to learn ASM, and I was just curious what do most people
use ASM for? Is there a particular market that requires ASM
programming skills? I wanted to learn a lot about drivers, and my
friend suggested that I learn ASM to help me debug device drivers.. is
he accurate?

Thanks

Jack Klein

2006-08-24, 9:56 pm

On 24 Aug 2006 14:24:01 -0700, "sleeper" <spamtrap@crayne.org> wrote
in comp.lang.asm.x86:

> hello everyone,
>
> I am starting to learn ASM, and I was just curious what do most people
> use ASM for? Is there a particular market that requires ASM
> programming skills? I wanted to learn a lot about drivers, and my
> friend suggested that I learn ASM to help me debug device drivers.. is
> he accurate?
>
> Thanks


No matter what processor, operating system, and high-level language
you use, there are just some things that can't be done any other way.

For example, say you are writing the task switching part of a
scheduler. It must preserve the entire context of a preempted task
(registers, stack, flags, etc.), and then load the entire context of
the new task that will start running. It is just not possible to do
this in a standard high level language, not even a system programming
language like C.

In other cases, there are special processor instructions, like MMX and
SSE on Pentiums, MAC operations on DSPs, and others, that can greatly
speed up certain expensive calculations. In some cases, some
compilers provide some ways to access some of these processor
features, but even with the best compiler you can use all of them if
you write some code in assembly.

Some people, including many of the regular posters here, use as much
assembly language as they can. For the most part, on Windows based
PCs, this is a personal preference and a matter of pride that they can
do what most other programmers cannot.

I can appreciate their skill, even if I don't really share their
opinion. These days I write as little assembly language and as much
high level language as possible. I would say that there is very
little job market for programming general purpose Windows GUI
applications strictly in assembly language.

As for whether you need assembly language skills to debug device
drivers, that depends to a great extent on the operating system the
drivers are for and the tools you use.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~.../FAQ-acllc.html

Alexei A. Frounze

2006-08-24, 9:56 pm

sleeper wrote:
> hello everyone,
>
> I am starting to learn ASM, and I was just curious what do most people
> use ASM for? Is there a particular market that requires ASM
> programming skills? I wanted to learn a lot about drivers, and my
> friend suggested that I learn ASM to help me debug device drivers.. is
> he accurate?


Sometimes you need asm just to debug or understand exactly what the CPU is
doing. And that doesn't have anything to do with drivers in particular.

And then there're things that you normally don't learn as part of C or some
other HLL and they're very CPU-specific and asm-related. For example,
synchronization between several CPUs. One needs to know about the
appropriate locking operations/instructions...

And if you're interested in the markets/uses, those are (off the top of my
head): OS kernel development, low-level code optimizations, CPU/PC
virtualization.

Alex

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com