?? sound1.asm
字號:
data segment
a1 db 'hello!',0dh,0ah,'$'
data ends
code segment
assume cs:code,ds:data
start:mov ax,data
mov ds,ax
mov dx,offset a1
mov ah,09h
int 21h
mov cx,10
XOR BX,BX
MOV BL,0FFH
sing: call sound
loop sing
mov ah,4ch
int 21h
;---------sound-------
sound proc near
push ax
push bx
push cx
mov al,0b6h
out 43h,al
MOV AX,1983
out 42h,al
mov al,ah
out 42h,al
in al,61h ;read PB
mov ah,al
OR al,00000011B ;開發聲器
out 61h,al
wait1: SUB CX,CX ;置CX=65536
delay: loop delay
dec BL
jnz wait1
mov al,ah
out 61h,al
pop cx
pop bx
pop ax
ret
sound endp
code ends
end start
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -