new testing program

This commit is contained in:
Byron Lathi
2022-03-17 15:05:37 -05:00
parent bbba99d099
commit 7619c7c54f

View File

@@ -5,22 +5,21 @@
#include "uart.h" #include "uart.h"
int main() { int main() {
uint8_t* test; int i;
uint8_t i; char s[16];
s[15] = 0;
test = (uint8_t*)0x5000;
clrscr(); clrscr();
cprintf("Hello, world!\n");
for (test = (uint8_t*)0x4000; test < (uint8_t*)0x5000; test++) { while (1) {
for (i = 0; i < 64; i++) { cscanf("%15s", s);
*test = i; cprintf("\n");
if (*test != i) for (i = 0; i < 16; i++)
cprintf("Failed to read/write %x to %x\n", i, test); cprintf("s[%d]=%c ", i, s[i]);
cprintf("\n");
cprintf("Read string: %s\n", s);
} }
}
cprintf("Done! no SDRAM errors!\n");
return 0; return 0;
} }