1 extern void putc(unsigned char c);
3 void puts(unsigned char *s)
9 void puthex(unsigned int x)
11 unsigned char *hex = "0123456789ABCDEF";
14 for (i = 7; i >= 0; i--)
15 putc(hex[(x >> (i * 4)) & 0xF]);
21 #include "corecurse.c"
33 if (fact(10) != 3628800)
44 extern int ldm_bonehead();
47 ".globl ldm_bonehead\n"
62 "ldr r2, =0x00002FE0;"
63 "ldr r1, =0x0000004C;"
65 "stmdb sp!, {fp, ip, lr, pc};"
66 "mov r0, #0x00880000;"
67 "ldmia sp, {fp, sp, pc};"
75 int x = ldm_bonehead();
78 puts("FAIL: result was ");
85 struct tests tlist[] = {
86 {"ldm pc/mul", ldm_tester},
90 {"corecurse", corecurse},
97 puts("Testbench running\n");
99 for (t = tlist; t->name; t++)