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

first:  cli                     ; disable interrupts
        mov bx,1000

start:  mov cx,bx
begin:  in al,97                ; input port status byte
        mov b[hold],al          ; save port status byte
        mov al,79
        out 97,al               ; send signal to sound port
        mov dx,cx

rest:   dec dx                  ; first pause loop
        jnz rest
        mov al,b[hold]          ; restore port status byte
        out 97,al               ; ouput port status byte
        mov dx,cx

pause:  dec dx                  ; second pause loop
        jnz pause
        sub cx,100
        jnbe begin              ; loop first cycle
        sub bx,4
        jnbe start              ; loop second cycle
        sti                     ; enable interrupts
        int 020h                ; exit routine

hold:   db 0                    ; initial port status

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