Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C by Thomas Messmer ( 14 years ago )
void outint( int val )
{
uchar d, i;
uchar zero;
uint uval = val;
if( val < 0 ){
uval = -val;
//uart_putc( '-' );
//lcd_putc( '-' );
}
zero = 1;
i = 4;
do{
i--;
for( d = '0'; uval >= pgm_read_word(&TEST;[i]); uval -= pgm_read_word(&TEST;[i]) ){
d++;
zero = 0;
}
if( zero == 0 ){
uart_putc( d );
//lcd_putc( d );
}
}while( i );
uart_putc( (uchar)uval + '0' );
//lcd_putc( (uchar)uval + '0' );
}
Revise this Paste
Children: 42963