我想制作“音乐”或者更好的只是输出一点“嘟嘟”这个汇编程序:
play.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
music.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
我用以下两者组装:
as music.s -o music.o as play.s -o play.o
并将其与:
联系起来播放.o music.o -o music
但后来我注册了我没有“/ dev / dsp”文件。 那么在pulseaudio中是否与/ dev / dsp类似?