>> Linux runs on at least a dozen h/w platforms. AFAIK, no device driver
>> directly includes assembler, and if they do, they are unlikely to be
>> part of the mainstream kernel. They certainly wouldn't be part of
>> ALSA, I would hope.
>>
>
>a part of assembly-howto :)

 [ ... example elided ... ]

>Small, huh? :)

frankly, who cares?  the code you provided (1) doesn't do anything and
(2) wouldn't run on a Linux host using a PPC, Alpha, ARM or SPARC processor.

>I'm writting programs for microcontrollers in assmbler - te final code
>fits in about 2000 lines and takes about 2kB... I know how much would it
>take, if I wrote it in C or BASIC...

it would probably be almost exactly the same unless you were either a
very bad C programmer or an exceptionally good (and obscure) assembler
programmer. 

>I know how it looks from "very hardware" side / experience.
>C uses libc and some others... that takes time, so i think it's slower.

thats simply not true. C does not use libc unless *you* use it.

>use C... but I thought that asm would be simplier/faster.

very, very much more complex. and very likely not much faster.

besides, you seem to be completely forgetting the fact that very often
the instructions executed from *your* code are only a very small
fraction of the total executed by the kernel for any given operation.

>I would have to call function, make everything i want and finish, before
>aprox. 22usec... would it be enough?

depends on what you want to do. a function call typically adds between
6 and 12 instructions, even less if you use -fomit-frame-pointer, so
its hardly the problem. if you really believe that choosing C or
assembler will alter such things by amounts that matter, you've either
got way more experience with computers than i have, or way less :)

>In uC I had timers, by which i could call an interput after demanded
>time.
>Is there something like this under linux?

yes, but they don't have the resolution you would need. the fastest
system timer has a frequency of HZ, which is normally 100 in most x86
systems. there are ways to use the RTC to get higher timing, but they
are kludgy, involve a slightly longer code path, and require a patch
to the kernel.

--p

_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to