diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/avremu/test-suite/sum-rec.c')
-rw-r--r-- | Master/texmf-dist/source/latex/avremu/test-suite/sum-rec.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/avremu/test-suite/sum-rec.c b/Master/texmf-dist/source/latex/avremu/test-suite/sum-rec.c new file mode 100644 index 00000000000..0fa00fc6bc2 --- /dev/null +++ b/Master/texmf-dist/source/latex/avremu/test-suite/sum-rec.c @@ -0,0 +1,23 @@ +#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: +*/ |