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"
22 #include "miniblarg.c"
34 if (fact(10) != 3628800)
45 extern int ldm_bonehead();
51 ".globl ldm_bonehead\n"
66 "mov r2, #0x00002F00;"
67 "orr r2, r2, #0x000000E0;"
68 "mov r1, #0x0000004C;"
70 "stmdb sp!, {fp, ip, lr, pc};"
71 "mov r0, #0x00880000;"
72 "ldmia sp, {fp, sp, pc};"
85 int x = ldm_bonehead();
89 puts("FAIL: result was ");
96 struct tests tlist[] = {
97 {"ldm pc/mul", ldm_tester},
101 {"miniblarg", testmain},
102 {"corecurse", corecurse},
109 puts("Testbench running\n");
111 for (t = tlist; t->name; t++)