Beep Sound - Assembly Language - MASM

Program:

.model tiny
.code
.startup
        mov bx,2000
        mov ax,34dch
        mov dx,12h
        div bx
        out 42h,al
        mov al,ah
        out 42h,al

        in al,61h
        or al,03h
        out 61h,al


        mov dx,0fffh
back:
        mov cx,0ffffh
same:
        loop same
        dec dx
        jnz back

        in al,61h
        xor al,03h
        out 61h,al

.exit
end

4 comments:

Related Posts Plugin for WordPress, Blogger...