어셈블러가 포함된 음악 - pulseaudio의 /dev/dsp?
-
20-12-2019 - |
문제
나는 "음악"을 만들거나 이 어셈블러 프로그램을 사용하여 약간의 "경고음"을 출력하고 싶습니다.
플레이.s:
datei:
.ascii "/dev/dsp"
.globl play
play:
movl $5, %eax
movl $datei, %ebx
movl $1, %ecx
int $0x80
pushl %eax
movl %eax, %ebx
movl $4, %eax
movl 12(%esp), %ecx
movl 8(%esp), %edx
int $0x80
음악.s:
.globl _start
#.lcomm buffer, 100
buffer:
.byte 0,255,0,255,0,255,0,255,0,255
.byte 0,255,0,255,0,255,0,255,0,255
.byte 0,255,0,255,0,255,0,255,0,255
.byte 0,255,0,255,0,255,0,255,0,255
.byte 0,255,0,255,0,255,0,255,0,255
.byte 0,255,0,255,0,255,0,255,0,255
.byte 0,255,0,255,0,255,0,255,0,255
.byte 0,255,0,255,0,255,0,255,0,255
.byte 0,255,0,255,0,255,0,255,0,255
.byte 0,255,0,255,0,255,0,255,0,255
_start:
pushl $buffer
pushl $100
loop:
call play
jmp loop
movl $1, %eax
movl $0, %ebx
int $128
나는 다음을 사용하여 두 가지를 모두 조립했습니다.
music.s -o music.o 로 play.s -o play.o로
둘 다 다음과 연결되었습니다.
ld play.o 음악.o -o 음악
그런데 "/dev/dsp" 파일이 없다고 등록했습니다. 그렇다면 pulseaudio에 /dev/dsp와 유사한 것이 있습니까?
제휴하지 않습니다 StackOverflow