1
0
mirror of synced 2024-11-24 05:54:23 +01:00
avremu/source/test-suite/sum-rec.c
Christian Dietrich 8d320f3744 Use TDS Layout
2014-10-09 15:20:20 +02:00

24 lines
290 B
C

#include <avr/io.h>
char sum(char n) {
if (n <= 1) {
return n;
}
return n + sum(n-1);
}
int main() {
UDR = sum(4);
asm volatile ("break");
}
/*
check-name: Complex Memory Operations
check-start:
\avr@instr@stepn{1000}
\avr@test@REG{r24}{00001010}
check-end:
*/