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

DPROC	tupddate
	test	console,CON_UDATE
	jz	tupddate_end
	mov	ax,2A00h
	int	21h
	cmp	dl,cs:_day
	jz	tupddate_end
	mov	cs:_day,dl
  ifdef __MOUSE__
	call	mousehide
  endif
	mov	ax,_scrseg
	mov	es,ax
	mov	bx,126
	mov	al,dl
	call	@wcputnum
	mov	al,'.'
	mov	es:[bx+4],al
	mov	es:[bx+10],al
	cmp	ah,'0'
	jnz	tupddate_mnd
	mov	byte ptr es:[bx],' '
    tupddate_mnd:
	mov	bx,132
	mov	al,dh
	call	@wcputnum
	mov	bx,138
	sub	cx,2000
	mov	al,cl
	call	@wcputnum
  ifdef __MOUSE__
	call	mouseshow
  endif
    tupddate_end:
	ret
_day	db 	33
PEND	tupddate

	END
