;this program waits for user input. if the user presses '1' it outputs a string, if '2' it exits .model small .stack 100h .data doHz = 2280 pause dw ? pause1 dw ? .code init: mov ax,@data ;initialize data sector mov ds,ax mov ax,3 ;initialize video mode: text int 10h mov ax,doHz out 42h,al ;set sound to DO mov al,ah out 42h,al in al,61h OR al,00000011 ;set 61h port to output sound out 61h,al call wait1 fin: mov ah,4ch ;return control to OS int 21h ;******************* wait1: mov pause,0ffffh agn1: mov pause1,0ffffh agn2: dec pause1 jnz agn2 dec pause jnz agn1 ret end