There's probably some way to dump the four registers repeatedly into a file that I don't know about. In the meantime, you might want to do something like this.
//global variablesunsigned char ATDBuf[1000];unsigned short ATDBufIndex = 0;//routine to take snapshot of ATD registersunsigned char ATDSnapshot(void){ if(ATDBufIndex + 3 < sizeof(ATDBuf)){ ATDBuf[ATDBufIndex++] = ATDDR0L; ATDBuf[ATDBufIndex++] = ATDDR1L; ATDBuf[ATDBufIndex++] = ATDDR2L; ATDBuf[ATDBufIndex++] = ATDDR3L; return 1; } return 0;}
So you can record the registers in real time in memory.