Last active
January 8, 2022 17:25
-
-
Save mofosyne/59f3fd7911b74cfcc993a85f3744364b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This allows you to easily monitor change to registers that you care about | |
#define PRINTREG(X, MSG) printf("%15s = %08lX : %s\r\n", (char*) #X, (long unsigned) X, (char*) MSG); | |
#define PRINTREG_MON(X, MSG) \ | |
{\ | |
static int count = 0;\ | |
static long unsigned prev = 0;\ | |
if (!count) \ | |
{ printf("%4d: %40s = %08lX : %s", (int) count, (char*) #X, (long unsigned) X, (char*) MSG); count++;}\ | |
else if (prev != X) \ | |
{ printf("%4d: %40s = (%08lX --> %08lX) : %s", (int) count, (char*) #X, (long unsigned) prev, (long unsigned) X, (char*) MSG); count++;}\ | |
prev = X;\ | |
} |
Author
mofosyne
commented
Jan 8, 2020
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment