Or maybe I'm a "completely ignorant asshat". Always read the comments but there has been a lot of waves made over Qt since Nokia went kamikaze (IMO going Win on phones is suicide)
I got bummed out too when I first heard the about Micro$oft/Nokia deal, but...I'd ween myself off Qt right the fuck now if I were you.
Not to burst your bubble but a lot of that stuff is from Nokia that just went Microsoft. And honestly, MeeGo was always a piece of shit.
Then again, Swing made me hate Java forever. What a shitty fucking framework.
#include <reg51.h>
void main (void)
{
unsigned x;
unsigned y;
unsigned a;
unsigned b;
unsigned c;
unsigned d;
a=0x01;
b=0x02;
c=0x04;
d=0x08;
TMOD=0x20;
TH1=0xFD;
SCON=0x50;
while(1)
{
while(x!=0)
{
x=P1;
}
while(y=0)
{
y=0;
x=P1;
if (x==0x01)
{
TR1=1;
SBUF=a;
while(TI==0);
TI=0;
y=y++;
}
else if (x==0x02)
{
TR1=1;
SBUF=b;
while(TI==0);
TI=0;
y=y++;
}
else if (x==0x04)
{
TR1=1;
SBUF=c;
while(TI==0);
TI=0;
y=y++;
}
else if (x==0x08)
{
TR1=1;
SBUF=d;
while(TI==0);
TI=0;
y=y++;
}
}
}
}
Code:#include <reg51.h> void main (void) { unsigned x; unsigned y; unsigned a; unsigned b; unsigned c; unsigned d; a=0x01; b=0x02; c=0x04; d=0x08; TMOD=0x20; TH1=0xFD; SCON=0x50; while(1) { while(x!=0) { x=P1; } while(y=0) { y=0; x=P1; if (x==0x01) { TR1=1; SBUF=a; while(TI==0); TI=0; y=y++; } else if (x==0x02) { TR1=1; SBUF=b; while(TI==0); TI=0; y=y++; } else if (x==0x04) { TR1=1; SBUF=c; while(TI==0); TI=0; y=y++; } else if (x==0x08) { TR1=1; SBUF=d; while(TI==0); TI=0; y=y++; } } } }
[B]#include <stdio.h>[/B]
#include <reg51.h>
void main (void)
{
unsigned x;
unsigned y;
unsigned a;
unsigned b;
unsigned c;
unsigned d;
a=0x01;
b=0x02;
c=0x04;
d=0x08;
TMOD=0x20;
TH1=0xFD;
SCON=0x50;
while(1)
{
[B]y=0;[/B] /* this is made 0 when the code repeats and y=y++ from the previous functions, its just a clearing function */
[B]while(y==0)[/B]
{
x=P1; /* make the value of x equal the value of Port 1 */
if (x==0x01)
{
TR1=1; /* turn on the timer */
SBUF=a; /* send the variable a to the Serial Buffer */
while(TI==0); /* wait for the done bit */
TI=0; /* clear the done bit */
y=y++; /* increment y by one to leave the while function*/
}
else if (x==0x02)
{
TR1=1;
SBUF=b;
while(TI==0);
TI=0;
y=y++;
}
else if (x==0x04)
{
TR1=1;
SBUF=c;
while(TI==0);
TI=0;
y=y++;
}
else if (x==0x08)
{
TR1=1;
SBUF=d;
while(TI==0);
TI=0;
y=y++;
}
}
while(x!=0)
{
x=P1;
}
}
}
int timer(void){
/*blah blah blah blah timer assembly code*/
return(1);
}
win = timer(); /*this activates the timer*/
if(win != 1){
/*we have a problem, the timer wasn't started sucessfully*/
do_something_to_stop_program_breaking();
}