21,459
社区成员
发帖
与我相关
我的任务
分享
assume cs:code
code segment
start:
in al,43h
mov dx,04a9h
call sound
out 43h,al
mov al,bl
out 61h,al
int 21h
mov ax,4c00h
sound:
push ax
push dx
mov ax,0b6h
out 43h,al
mov ax,dx
out 42h,al
mov al,ah
out 42h,al
or bl,00000011b
mov al,bl
out 61h,al
call delay
pop dx
pop ax
ret
delay:
mov ah,0
int 1ah
add dx,182
mov bx,dx
s: int 1ah
cmp dx,bx
jne s
in al,61h
and al,11111100b
out 61h,al
ret
code ends
end start