include	clib.inc
include	mouse.inc
include	conio.inc

DPROC	tupdtime
	test	console,CON_UTIME
	jz	tupdtime_end
	mov	ax,2C00h
	int	21h
	cmp	dh,cs:_sec
	jz	tupdtime_end
	mov	cs:_sec,dh
  ifdef __MOUSE__
	call	mousehide
  endif
	mov	ax,_scrseg
	mov	es,ax
	mov	bx,144
	mov	al,ch
	call	@wcputnum
	mov	al,':'
	mov	es:[bx+4],al
	mov	es:[bx+10],al
	cmp	ah,'0'
	jnz	tupdtime_min
	mov	byte ptr es:[bx],' '
    tupdtime_min:
	mov	bx,150
	mov	al,cl
	call	@wcputnum
	mov	bx,156
	mov	al,dh
	call	@wcputnum
  ifdef __MOUSE__
	call	mouseshow
  endif
    tupdtime_end:
	ret
_sec	db 	61
PEND	tupdtime

	END
