flat assembler
Message board for the users of flat assembler.
Index
> Linux > Manipulating internal speaker |
Author |
|
DarkLight 21 Feb 2009, 16:19
How to manipulate(turn on/off) the internal speaker of PC in the Linux?
|
|||
21 Feb 2009, 16:19 |
|
Endre 22 Feb 2009, 12:46
For programming internal speaker see e.g. this document.
|
|||
22 Feb 2009, 12:46 |
|
DarkLight 23 Feb 2009, 14:57
Sorry. But that document is not for assembler.
|
|||
23 Feb 2009, 14:57 |
|
Dex4u 24 Feb 2009, 17:38
Maybe not what you want, but you could just as easy use the sound driver
http://asm.sourceforge.net/articles/audio.html |
|||
24 Feb 2009, 17:38 |
|
Coddy41 24 Feb 2009, 23:17
That does look good... I'm going to print it, and read when the power goes out
|
|||
24 Feb 2009, 23:17 |
|
DarkLight 25 Feb 2009, 09:59
I am new in assembler(consequently also in Linux assembler ). I decided to learn assembler two weeks ago(do not laugh ) and because I like GNU/Linux I also want to learn it for Linux... But all books those I have found written for MS DOS and Windows(mostly for DOS with TASM or MASM syntax). In order to don't lose expensive time I decided to learn assembler simultaneously both for DOS(Windows) and for Linux. I have chosen one good book for me and started to port all examples from DOS(with TASM syntax) to Linux(with FASM syntax)... But one example shows how to manipulate internal speaker in MS DOS and I don't found any article that shows it for Linux. So I decided to get help from one of the bigest forums in the internet...
About article given by Dex4u: I think that it is good article(unfortunately not for ALSA) and may be I use it in the future. Thank you. |
|||
25 Feb 2009, 09:59 |
|
Endre 27 Feb 2009, 10:01
What system do you have? I mean, 32-bit or 64-bit?
|
|||
27 Feb 2009, 10:01 |
|
DarkLight 28 Feb 2009, 09:13
intel p4 32bit
opensuse 11.0 Linux kernel updated to 2.6.28 |
|||
28 Feb 2009, 09:13 |
|
DJ Mauretto 28 Feb 2009, 14:38
Hello,
you can try with functin 101 ( SYS_IOPERM) to set Input/Output permission,then use standard internal speaker port (Low Level), i don't know if there are prepackage system function for that. _________________ Nil Volentibus Arduum |
|||
28 Feb 2009, 14:38 |
|
Endre 28 Feb 2009, 20:44
DarkLight, I created a little code which demonstrates you how to drive internal speaker on linux. Since fasm's preprocessing capabilities are rather inconvenient for this task I wrote everything for gnu assembler (don't be afraid in intel syntax). I hope it does not disturb you despite the fact that we're just here on the fasm forum. Of course you can translate the code into fasm syntax if you wish, but in this case you have to look up each constant in the header files and to define them manually in your fasm source. Theorethically you can even debug this snippet if you compile it with '-g' as stated in the comment. You must run the program with root privilegies, otherwise you will get an error message about your missing rights.
|
|||||||||||
28 Feb 2009, 20:44 |
|
DarkLight 01 Mar 2009, 18:21
Thank you very much !
I never forget your goodness to me. |
|||
01 Mar 2009, 18:21 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.