Пример #1
0
void display( char one, char two) {
   display_segs(one);
   output_high(PIN_A0);
   wait();
   output_low(PIN_A0);
   display_segs(two);
   output_high(PIN_A1);
   wait();
   output_low(PIN_A1);
}
Пример #2
0
void far megatek_update()
{
int save_which_cseg;

	if(update_level > 0)
		return;

	update_level++;

	if((ins_matrix_flag == 't') || (a_visibility_switched_to_on() == 't'))
	{
		my_size_chars(0);
		clear_my_listing();
		save_which_cseg = which_cseg;


			if(rotate_mode == 'm')
			{ 
		        	if(curser_displayed == 't')
				{

					save_my_x = my_x;
					save_my_y = my_y;
	
					my_x = old_x;
					my_y = -old_y;

					save_line_type = line_type;
					my_dash_enable(0);

					draw_mode(3);

					interp_my_sub6();

					draw_mode(0);
/*					scolr(save_color);
					line_type = save_line_type;
					sltyp(line_type);
*/
					my_x = save_my_x;
					my_y = save_my_y;

				}
			}


		if(num_pages == 2)
			which_page = !which_page;

	     if(num_pages == 2)
	     {
		if(rotate_mode == 'a')
		{
			my_set_viewport(headers_segs[which_cseg].clip_x_lower,
				headers_segs[which_cseg].clip_y_lower,
				headers_segs[which_cseg].clip_x_upper,
				headers_segs[which_cseg].clip_y_upper,
				  which_page);

			my_lock_viewport();
			my_wrmask(which_page);
			clear_page(which_page);
		}
		
		if(rotate_mode == 'm')
		{
			my_set_viewport(-2048,-2048,2048,2048,which_page);  
			my_lock_viewport();
			my_wrmask(which_page);
			clear_page(which_page);
			my_rdmask(which_page);
			my_scroll(which_page);
		}
	    }
	    else
	    {
		my_set_viewport(-2048,-2048,2048,2048,which_page);
		my_lock_viewport();
		my_rdmask(which_page);
		my_wrmask(which_page);
		clear_page(which_page);
	    }



		        	if(curser_displayed == 't')
				{

					save_my_x = my_x;
					save_my_y = my_y;
	
					my_x = old_x;
					my_y = -old_y;

					save_line_type = line_type;
					my_dash_enable(0);

					draw_mode(3);

					interp_my_sub6();

					draw_mode(0);
/*					scolr(save_color);
					line_type = save_line_type;
					sltyp(line_type);
*/
					my_x = save_my_x;
					my_y = save_my_y;

				}


		
			
	    display_segs();

	    if(num_pages == 2)
	    {
		if(rotate_mode == 'a')
		{
			my_rdmask(which_page);
			my_scroll(which_page);
		}
	    }
	    else
	    {
		my_rdmask(which_page);
		my_scroll(which_page);
	    }


		which_redis = 3;
	
		ins_matrix_flag = 'f';

		which_cseg = save_which_cseg;
	}


	update_level--;
}
Пример #3
0
void far matrix_update()
{
int save_which_cseg,my_pause,save_x_origin,save_y_origin,save_z_origin;



        if(ins_matrix_flag == 'f')
                button1 = 'f';

	if(ins_matrix_flag == 't') 
	{
	    a_visibility_switched_to_on();
	    clear_my_listing();
	    my_size_chars(0);

            save_which_cseg = which_cseg;

			if(rotate_mode == 'm')
			{ 
		        	if(curser_displayed == 't')
				{

					save_my_x = my_x;
					save_my_y = my_y;
	
					my_x = old_x;
					my_y = -old_y;

					save_line_type = line_type;
					my_dash_enable(0);

					draw_mode(3);

					interp_my_sub6();

					draw_mode(0);
/*					scolr(save_color);
					line_type = save_line_type;
					sltyp(line_type);
*/
					my_x = save_my_x;
					my_y = save_my_y;

				}
			}

           if((rotate_mode == 'a') && (num_pages == 2))
 	         which_page = !which_page;


            if(num_pages == 2)
            {
                if(rotate_mode == 'a')
                {
	         	my_set_viewport(headers_segs[which_cseg].save_x_lower_clip,
			      headers_segs[which_cseg].save_y_lower_clip,
			      headers_segs[which_cseg].save_x_upper_clip,
			      headers_segs[which_cseg].save_y_upper_clip,
				which_page);

	         	my_lock_viewport();
			my_wrmask(which_page);
	        	clear_page(which_page);
                }

                if(rotate_mode == 'm')
                {

	         	my_set_viewport(headers_segs[which_cseg].save_x_lower_clip,
			      headers_segs[which_cseg].save_y_lower_clip,
			      headers_segs[which_cseg].save_x_upper_clip,
			      headers_segs[which_cseg].save_y_upper_clip,
				which_page);

	         	my_lock_viewport();
			my_wrmask(which_page);
	        	clear_page(which_page);
			my_rdmask(which_page);
		        my_scroll(which_page);

                }
           
            }
            else
            {
                my_set_viewport(-2048,-2048,2048,2048,which_page);
                my_lock_viewport();
		my_rdmask(which_page);
		my_wrmask(which_page);
                clear_page(which_page);
	    }


				if(curser_displayed == 't')
				{

					save_my_x = my_x;
					save_my_y = my_y;
	
					my_x = old_x;
					my_y = -old_y;

					save_line_type = line_type;
					my_dash_enable(0);
				/*	scolr(0x0f);*/
					draw_mode(3);

					interp_my_sub6();

					draw_mode(0);
					my_color(save_color);
					line_type = save_line_type;
					my_dash_enable(line_type);

					my_x = save_my_x;
					my_y = save_my_y;

				}


			

	    display_segs();


            if(num_pages == 2)
            {
                if(rotate_mode == 'a')
                {
			my_rdmask(which_page);
		        my_scroll(which_page);
                }
            }
            else
	    {
		my_rdmask(which_page);
                my_scroll(which_page);
	    }


		which_redis = 3;
	

		ins_matrix_flag = 'f';
                button1 = 'f';

             which_cseg = save_which_cseg;
        }

}