diff options
Diffstat (limited to 'tests/debug.c')
-rw-r--r-- | tests/debug.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/debug.c b/tests/debug.c new file mode 100644 index 0000000..2cad88f --- /dev/null +++ b/tests/debug.c @@ -0,0 +1,27 @@ +#include <stdio.h> + +char c = 'x'; + +void print_row(int length) +{ + for (int x=0; x<length; x++) { + printf("%c", c); + } + printf("\n"); +} + +int main() +{ + volatile int i = 42; + const char *text = "constant\n"; + int threshold = 7; + + // Wait for the debugger to get us out of this loop. + while (i) + ; + + printf("%s", text); + for (int y=0; y < 10; y++) { + print_row(y); + } +} |