; This proc requires in the DATASEG definition of:  clock    equ  es:6ch
; It takes one parameter which is how many times 0.055 seconds for delay.
; If the parameter is 2, it will cause a delay of 0.11 sec.
;-----------------------------------------------------------------------------------------------------
proc          delay1                       ; delays execution by parameter X 1/18th of a second
              push bp
              mov  bp,sp 
              xor  cx,cx
              mov  cx,[bp+4]               ;delay amount as parameter
              mov  ax,40h
              mov  es,ax                                                                        
tick:         mov  ax,[clock]
notick:       cmp  ax,[clock]              ; Wait for a clock tic
              je   notick               
              loop tick 
              pop  bp
              ret  2           
endp          delay1
;----------------------------------------------------------------------------------------------------