fork download
  1. char volatile one [ ] ="00000000.00000000.00000000";
  2. inline void T0H(int n) {
  3. asm volatile(
  4. ".rept %[3] \n\t"
  5. "nop \n\t"
  6. ".endr \n\t"
  7. :
  8. :[ncycles] "I" (n)
  9. );
  10. }
  11. inline void T1H(int n) {
  12. asm volatile(
  13. ".rept %[9] \n\t"
  14. "nop \n\t"
  15. ".endr \n\t"
  16. :
  17. :[ncycles] "I" (n)
  18. );
  19. }
  20. inline void TLD(int n) {
  21. asm volatile(
  22. ".rept %[7] \n\t"
  23. "nop \n\t"
  24. ".endr \n\t"
  25. :
  26. :[ncycles] "I" (n)
  27. );
  28. }
  29. inline void TLL(int n) {
  30. asm volatile(
  31. ".rept %[96] \n\t"
  32. "nop \n\t"
  33. ".endr \n\t"
  34. :
  35. :[ncycles] "I" (n)
  36. );
  37. }
  38. void setup()
  39. {
  40. DDRD = B00010000;
  41. for(int i = 0;i < 4;i++)
  42. {
  43. for(int i = 0; i < 27; i++)
  44. {
  45. if(one[i] == '1')
  46. {
  47. PORTD = B00010000;
  48. T1H();
  49. PORTD = B00000000;
  50. TLD();
  51. }
  52. if(one[i] == '0')
  53. {
  54. PORTD = B00010000;
  55. T0H();
  56. PORTD = B00000000;
  57. TLD();
  58. }
  59. }
  60. TLL();
  61. }
  62. }
  63. void loop() {
  64. // put your main code here, to run repeatedly:
  65. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void T0H(int)’:
prog.cpp:9:2: error: undefined named operand ‘3’
 );
  ^
prog.cpp: In function ‘void T1H(int)’:
prog.cpp:18:2: error: undefined named operand ‘9’
 );
  ^
prog.cpp: In function ‘void TLD(int)’:
prog.cpp:27:2: error: undefined named operand ‘7’
 );
  ^
prog.cpp: In function ‘void TLL(int)’:
prog.cpp:36:2: error: undefined named operand ‘96’
 );
  ^
prog.cpp: In function ‘void setup()’:
prog.cpp:40:1: error: ‘DDRD’ was not declared in this scope
 DDRD = B00010000;
 ^~~~
prog.cpp:40:8: error: ‘B00010000’ was not declared in this scope
 DDRD = B00010000;
        ^~~~~~~~~
prog.cpp:47:1: error: ‘PORTD’ was not declared in this scope
 PORTD = B00010000;
 ^~~~~
prog.cpp:48:5: error: too few arguments to function ‘void T1H(int)’
 T1H();
     ^
prog.cpp:11:13: note: declared here
 inline void T1H(int n) {
             ^~~
prog.cpp:49:9: error: ‘B00000000’ was not declared in this scope
 PORTD = B00000000;
         ^~~~~~~~~
prog.cpp:50:5: error: too few arguments to function ‘void TLD(int)’
 TLD();
     ^
prog.cpp:20:13: note: declared here
 inline void TLD(int n) {
             ^~~
prog.cpp:54:1: error: ‘PORTD’ was not declared in this scope
 PORTD = B00010000;
 ^~~~~
prog.cpp:55:5: error: too few arguments to function ‘void T0H(int)’
 T0H();
     ^
prog.cpp:2:13: note: declared here
 inline void T0H(int n) {
             ^~~
prog.cpp:56:9: error: ‘B00000000’ was not declared in this scope
 PORTD = B00000000;
         ^~~~~~~~~
prog.cpp:57:5: error: too few arguments to function ‘void TLD(int)’
 TLD();
     ^
prog.cpp:20:13: note: declared here
 inline void TLD(int n) {
             ^~~
prog.cpp:60:5: error: too few arguments to function ‘void TLL(int)’
 TLL();
     ^
prog.cpp:29:13: note: declared here
 inline void TLL(int n) {
             ^~~
stdout
Standard output is empty