TOOLKIT\ZAP.ASM  ·  ASM  ·  1 KB  ·  1988-09-01  ·  from PersonalComputing_Sep-1988
;==================================================================
; ZAP           Version 1.2     by Colin J Smith (c) 1988
;
; A program to produce a white noise sound - gradually decreasing
;
; SYNTAX:
;               None
;
;==================================================================

first:  cli                     ; disable interrupts
        mov cx,02ffh

begin:  in al,97                ; save initial port status
        mov b[hold],al          ; save status byte
        mov al,79
        out 97,al               ; output to port
        mov dx,cx
        add dx,0fd00h

pause:  inc dx                  ; pause loop
        jnz pause
        mov al,b[hold]          ; restore port status byte
        out 97,al               ; output to port
        dec cx
        jnz begin
        sti                     ; enable interrupts
        int 020h                ; exit routine

hold:   db 0                    ; byte to hold initial port status

;=====================================================================