1 extern void putc(unsigned char c);
7 asm volatile("mrc 5, 0, %0, c1, c1, 1" : "=r"(c));
12 void puts(unsigned char *s)
18 void puthex(unsigned int x)
20 unsigned char *hex = "0123456789ABCDEF";
23 for (i = 7; i >= 0; i--)
24 putc(hex[(x >> (i * 4)) & 0xF]);
30 #include "corecurse.c"
31 #include "miniblarg.c"
43 if (fact(10) != 3628800)
54 extern int ldm_bonehead();
60 ".globl ldm_bonehead\n"
75 "mov r2, #0x00002F00;"
76 "orr r2, r2, #0x000000E0;"
77 "mov r1, #0x0000004C;"
79 "stmdb sp!, {fp, ip, lr, pc};"
80 "mov r0, #0x00880000;"
81 "ldmia sp, {fp, sp, pc};"
94 int x = ldm_bonehead();
98 puts("FAIL: result was ");
107 volatile int *p = 0x80010000;
114 puts("[cache flush] ");
115 p[0x1000] = 0x00000000;
124 struct tests tlist[] = {
125 {"ldm pc/mul", ldm_tester},
128 {"cellularram", cellularram},
130 {"miniblarg", testmain},
131 {"corecurse", corecurse},
138 puts("Testbench running\n");
140 for (t = tlist; t->name; t++)
147 puts("Done! Echoing characters.\n");