#use eziolp31.lib
#use vdriver.lib

main() {
	struct tm t;
	int sec;

	rtcInit();	
	t.tm_year = 97;
	t.tm_mon = 11;
	t.tm_mday = 3;
	t.tm_wday = 1;
	t.tm_hour = 11;
	t.tm_min = 00;
	sec = t.tm_sec = 00;
	tm_wr(&t);
	
	VdInit();

	while (1) {
		tm_rd(&t);
		if (sec != t.tm_sec) {
			sec = t.tm_sec;
			printf("%d-%d-%d %d:%d:%d\n",
				t.tm_year,t.tm_mon,t.tm_mday,t.tm_hour,t.tm_min,t.tm_sec);
		}
	}
}