Hi!
Paul Davis wrote:
>
> 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 :)
Meanwhile, here's an example of a minimum dumb kernel module
(module.asm)
(source is based on example by mammon_ from APJ #8):
section .text
global init_module
global cleanup_module
global kernel_version
extern printk
init_module:
push dword str1
call printk
pop eax
xor eax,eax
ret
cleanup_module:
push dword str2
call printk
pop eax
ret
str1 db "init_module done",0xa,0
str2 db "cleanup_module done",0xa,0
kernel_version db "2.2.18",0
Small, huh? :)
> You seem to be under the same mistaken impression as many people that
> assembler is always quicker.
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...
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.
Well, it not MUST be written in assembler... if C would be easier, i
would
use C... but I thought that asm would be simplier/faster.
> Sometimes it is, sometimes it isn't.
Yes :]
> If you've never written a kernel module, or even a time sensitive
> program, its quite possible that the compiler will do a better than
> you :)
I would have to call function, make everything i want and finish, before
aprox. 22usec... would it be enough?
In uC I had timers, by which i could call an interput after demanded
time.
Is there something like this under linux?
> See "Linux Device Drivers" by Rubini, A., published by O'Reilly. (...)
I would really love to, but i have no ability to buy this :((((
There must be some online documentaion...?
Tanks!
CeDeROM/KSZAK
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel