RT 帮我看看应该怎样修改
desg segment
music_freq dw 262 ;C
dw 294 ;D
dw 330 ;E
dw 349 ;F
dw 392 ;G
dw 440 ;A
dw 494 ;B
dw 523 ;C
music_note db 1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1
desg ends
cseg segment
assume cs:cseg,ds:desg
start:
mov ax,desg ;initialize DS
mov ds,ax
mov cx,16
mov si,offset music_note
sound:mov bx,offset music_freq
mov
mov di,[bx][si]
mov bx,5000
call gensound ;ip
inc si
loop sound
exit:
mov ah,4ch ;演奏完毕后,退出程序
int 21h
;给定频率BX和节奏DI,最简单的发声子程序
gensound proc
push ax
push bx
push cx
push dx
push di
mov al,0b6h
out 43h,al
mov dx,12h
mov ax,533h*896
div di
out 42h,al
mov al,ah
out 42h,al
in al,61h
mov ah,al
or al,3
out 61h,al
wait1: mov cx,28010
delay: loop delay
dec bx
jnz wait1
mov al,ah
out 61h,al
pop di
pop dx
pop cx
pop bx
pop ax
ret
gensound endp
cseg ends