fork download
  1. #include <reg52.h>
  2. sfr CKCON = 0x8F,
  3. void delay(unsined long);
  4. void main()
  5. {
  6. unsigned int j;
  7.  
  8. CKCON =0x01;
  9. P2 = 0x00;
  10. while(1)
  11. {
  12. }
  13. P2 = 0x01;
  14. delay (50000);
  15. P2 = 0x01;
  16. delay (50000);
  17. P2 = 0x02;
  18. delay (50000);
  19. P2 = 0x04;
  20. delay (50000);
  21. P2 = 0x08;
  22. delay (50000);
  23. P2 = 0x10;
  24. delay (50000);
  25. P2 = 0x20;
  26. delay (50000);
  27. P2 = 0x40;
  28. delay (50000);
  29. P2 = 0x80;
  30. delay (50000);
  31.  
  32.  
  33.  
  34. }
  35.  
  36. }
  37.  
  38. void delay(unsigned long i)
  39. {
  40. while(i >0){i--;}
  41. }
Success #stdin #stdout 0.02s 25952KB
stdin
Standard input is empty
stdout
#include <reg52.h>
	sfr CKCON = 0x8F,
	void delay(unsined long);
	void main()
	{
	unsigned int j;
	
	CKCON =0x01;
	P2 = 0x00;
	while(1)
	{
	}
		P2 = 0x01;
		delay (50000);
		P2 = 0x01;
		delay (50000);
		P2 = 0x02;
		delay (50000);
		P2 = 0x04;
		delay (50000);
		P2 = 0x08;
		delay (50000);
		P2 = 0x10;
		delay (50000);
		P2 = 0x20;
		delay (50000);
		P2 = 0x40;
		delay (50000);
		P2 = 0x80;
		delay (50000);
		
		
		
	}
	
	}
	
	void delay(unsigned long i)
	{
	while(i >0){i--;}
	}