	page	,132
; AT hhmm
;	Wait until hh:mm.
;
cseg	segment	public 'code'
	assume	cs:cseg,ds:cseg

	org	80h
	dw	?		; length (5) and initial space
hhi	db	?
hlo	db	?
mhi	db	?
mlo	db	?

	org	100h
AT	proc	far
	mov	cl,10		; set up for multiplies
	mov	al,hhi		; get hours in bh
	and	al,0FFh-'0'
	mul	cl
	mov	bh,al
	mov	al,hlo
	and	al,0FFh-'0'
	add	bh,al
	mov	al,mhi		; get minutes in bl
	and	al,0FFh-'0'
	mul	cl
	mov	bl,al
	mov	al,mlo
	and	al,0FFh-'0'
	add	bl,al
	mov	athm,bx

loop:	mov	ah,2Ch		; get time
	int	21h		; ch,cl= h,m; dh,dl= s,c
	cmp	ch,ath
	jne	loop
	cmp	cl,atm
	jl	loop
	int	20h		; exit

	even
athm	dw	?
	org	$-2
atm	db	?
ath	db	?

AT	endp
cseg	ends
	end	AT
