blob: eae519222c45aefa56733da0406240a3494c4c8b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include <nds.h>
#include "core.h"
void debug_stacks(Bedrock *br) {
u8 i;
printf("\nP:0x%04x I:0x%02x", PC, MEM[PC]);
printf("\nW:");
for (i=0; i<WST.p; i++) {
printf("%02x ", WST.mem[i]);
}
printf("\nR:");
for (i=0; i<RST.p; i++) {
printf("%02x ", RST.mem[i]);
}
printf("\n");
}
void debug_assert(Bedrock *br) {
if (WST.mem[0] == 0xff && WST.p == 1 && RST.p == 0) {
printf(".");
} else {
printf("X");
}
}
|