Moveto_d

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
void cMoveto_d(signed int y, signed int x)
{
	VIA_port_a = y;			// y pos to dac
	VIA_cntl = (int)0xce;	// disable zero, disable all blank
	VIA_port_b = 0;			// mux enable, dac to -> integrator y (and x)
	VIA_shift_reg = 0;		// all output is BLANK
	VIA_port_b++;			// mux disable, dac only to x
	VIA_port_a = x;			// dac -> x
	VIA_t1_cnt_hi=0;		// start timer
	while ((VIA_int_flags & 0x40) == 0); // wait till timer finishes
}