示例#1
0
/* ARGSUSED */
void
dis_named_function(dis_func_t *func, int type, void *data)
{
	callback_arg_t *ca = data;

	dis_data(ca->ca_tgt, ca->ca_handle, dis_function_addr(func),
	    dis_function_data(func), dis_function_size(func));
}
示例#2
0
void string_LCD(unsigned char *str)
{
	int i;
	
	for(i=0;str[i]!='\0';i++) 
	{	dis_data(str[i]);
	 	
  	}
	return 0;
	}
示例#3
0
void LCD_number(unsigned int value)
{	dis_cmd(0x04);//for decrementing the cursor position
	unsigned int a=0;
	while(value!=0)
	{	a=value%10;
		dis_data(a+48);
		value=value/10;
	}
	dis_cmd(0x06);// for again incrementing the cursor position
}
示例#4
0
void LCD_print (char *input)
{
	unsigned char i=0;
	
	while (input[i]!=0)
	{
		dis_data(input[i]);
		i++;
	}
}
示例#5
0
void LCD_write_string_custom(char addr,char *data0)
{
        int jj = 0;
        dis_cmd(addr);
	_delay_ms(20);
	while(data0[jj]!='\0')
	{
		dis_data(data0[jj]);
		_delay_ms(5);
		jj++;
	}
}
示例#6
0
void LCD_write_string_line1(char *data0)
{
        int jj = 0;
        dis_cmd(0x80);
	_delay_ms(20);
	while(data0[jj]!='\0')
	{
		dis_data(data0[jj]);
		_delay_ms(5);
		jj++;
	}
}
示例#7
0
void LCD_write_string_line2(char *data1)
{
        int i=0;
	dis_cmd(0xC0);
        _delay_ms(20);
	i=0;
	while(data1[i]!='\0')
	{
		dis_data(data1[i]);
		_delay_ms(5);
		i++;
	}
        
}
示例#8
0
/*
 * Disassemble a section implicitly specified as part of a file.  This function
 * is called for all sections when no other flags are specified.  We ignore any
 * data sections, and print out only those sections containing text.
 */
void
dis_text_section(dis_tgt_t *tgt, dis_scn_t *scn, void *data)
{
	dis_handle_t *dhp = data;

	/* ignore data sections */
	if (!dis_section_istext(scn))
		return;

	if (!g_quiet)
		(void) printf("\nsection %s\n", dis_section_name(scn));

	dis_data(tgt, dhp, dis_section_addr(scn), dis_section_data(scn),
	    dis_section_size(scn));
}
示例#9
0
void LCD_write_string(char LINE_INDEX,char addr,char *data0)
{
	if (LINE_INDEX == 1)
	{
		addr = addr + 0x80;
	}
	else
	{
		addr = addr + 0xC0;
	}
        int jj = 0;
        dis_cmd(addr);
	_delay_ms(20);
	while(data0[jj]!='\0')
	{
		dis_data(data0[jj]);
		_delay_ms(5);
		jj++;
	}
}
示例#10
0
/*
 * Disassemble a section explicitly named with -s, -d, or -D.  The 'type'
 * argument contains the type of argument given.  Pass the data onto the
 * appropriate helper routine.
 */
void
dis_named_section(dis_scn_t *scn, int type, void *data)
{
	callback_arg_t *ca = data;

	if (!g_quiet)
		(void) printf("\nsection %s\n", dis_section_name(scn));

	switch (type) {
	case DIS_DATA_RELATIVE:
		dump_data(0, dis_section_data(scn), dis_section_size(scn));
		break;
	case DIS_DATA_ABSOLUTE:
		dump_data(dis_section_addr(scn), dis_section_data(scn),
		    dis_section_size(scn));
		break;
	case DIS_TEXT:
		dis_data(ca->ca_tgt, ca->ca_handle, dis_section_addr(scn),
		    dis_section_data(scn), dis_section_size(scn));
		break;
	}
}