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};"
78 int x = ldm_bonehead();
82 puts("FAIL: result was ");
89 struct tests tlist[] = {
90 {"ldm pc/mul", ldm_tester},
94 {"corecurse", corecurse},
101 puts("Testbench running\n");
103 for (t = tlist; t->name; t++)