}\r
}\r
\r
-#define REGIDUMP_HEX\r
+//#define REGIDUMP_HEX\r
#define REGIDUMP_DUMPFLAGS\r
//#define REGIDUMP_USE_CAPS //uncomment to use the assembly\r
//regester dump~\r
#ifndef REGIDUMP_HEX\r
// printf(" ip=%04u\n\n", _IP);\r
// printf(" cf=%04u\npf=%04u\naf=%04u\nzf=%04u\nsf=%04u\ntf=%04u\nif=%04u\ndf=%04u\nof=%04u\n", _CF, _PF, _AF, _ZF, _SF, _TF, _IF, _DF, _OF);\r
+\r
+ printf("cflag: "BYTE_TO_BINARY_PATTERN""BYTE_TO_BINARY_PATTERN"\n", BYTE_TO_BINARY(_cflag>>8), BYTE_TO_BINARY(_cflag));\r
#else\r
// printf(" ip=%04x\n\n", _IP);\r
// printf(" cf=%04x\npf=%04x\naf=%04x\nzf=%04x\nsf=%04x\ntf=%04x\nif=%04x\ndf=%04x\nof=%04x\n", _CF, _PF, _AF, _ZF, _SF, _TF, _IF, _DF, _OF);\r
- printf("cflag: "BYTE_TO_BINARY_PATTERN""BYTE_TO_BINARY_PATTERN"\n", BYTE_TO_BINARY(_cflag>>8), BYTE_TO_BINARY(_cflag));\r
-// printf("cflag: %s\n",(_cflag));\r
+ printf("cflag: %016x\n",(_cflag));\r
#endif\r
- printf("dx: "NIBBLE_TO_BINARY_PATTERN""NIBBLE_TO_BINARY_PATTERN"\n", NIBBLE_TO_BINARY(_dx>>4), NIBBLE_TO_BINARY(_dx));\r
- printf("dx: "BYTE_TO_BINARY_PATTERN""BYTE_TO_BINARY_PATTERN"\n", BYTE_TO_BINARY(_dx>>8), BYTE_TO_BINARY(_dx));\r
+ printf("testing\n");\r
+// printf("dx: "NIBBLE_TO_BINARY_PATTERN""NIBBLE_TO_BINARY_PATTERN"\n", NIBBLE_TO_BINARY(_dx>>4), NIBBLE_TO_BINARY(_dx));\r
+// printf("dx: "BYTE_TO_BINARY_PATTERN""BYTE_TO_BINARY_PATTERN"\n", BYTE_TO_BINARY(_dx>>8), BYTE_TO_BINARY(_dx));\r
printf("dx: "WORD_TO_BINARY_PATTERN"\n", WORD_TO_BINARY(_dx));\r
printf(" ---------------------------------------\n");\r
#endif\r
//For multi-byte types\r
//printf("m: "BYTE_TO_BINARY_PATTERN" "BYTE_TO_BINARY_PATTERN"\n", BYTE_TO_BINARY(m>>8), BYTE_TO_BINARY(m));\r
#define BYTE_TO_BINARY_PATTERN "%c%c%c%c%c%c%c%c"\r
-#define BYTE_TO_BINARY(byte) \\r
- (byte & 0x80 ? '1' : '0'), \\r
- (byte & 0x40 ? '1' : '0'), \\r
- (byte & 0x20 ? '1' : '0'), \\r
- (byte & 0x10 ? '1' : '0'), \\r
- (byte & 0x08 ? '1' : '0'), \\r
- (byte & 0x04 ? '1' : '0'), \\r
- (byte & 0x02 ? '1' : '0'), \\r
+#define BYTE_TO_BINARY(byte) \\r
+ (byte & 0x80 ? '1' : '0'), \\r
+ (byte & 0x40 ? '1' : '0'), \\r
+ (byte & 0x20 ? '1' : '0'), \\r
+ (byte & 0x10 ? '1' : '0'), \\r
+ (byte & 0x08 ? '1' : '0'), \\r
+ (byte & 0x04 ? '1' : '0'), \\r
+ (byte & 0x02 ? '1' : '0'), \\r
(byte & 0x01 ? '1' : '0')\r
\r
#define WORD_TO_BINARY_PATTERN "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"\r
-#define WORD_TO_BINARY(word) \\r
- (word & 0x8000 ? '1' : '0'), \\r
- (word & 0x4000 ? '1' : '0'), \\r
- (word & 0x2000 ? '1' : '0'), \\r
- (word & 0x1000 ? '1' : '0'), \\r
- (word & 0x0800 ? '1' : '0'), \\r
- (word & 0x0400 ? '1' : '0'), \\r
- (word & 0x0200 ? '1' : '0'), \\r
- (word & 0x0100 ? '1' : '0'), \\r
- (word & 0x0080 ? '1' : '0'), \\r
- (word & 0x0040 ? '1' : '0'), \\r
- (word & 0x0020 ? '1' : '0'), \\r
- (word & 0x0010 ? '1' : '0'), \\r
- (word & 0x0008 ? '1' : '0'), \\r
- (word & 0x0004 ? '1' : '0'), \\r
- (word & 0x0002 ? '1' : '0'), \\r
+#define WORD_TO_BINARY(word) \\r
+ (word & 0x8000 ? '1' : '0'), \\r
+ (word & 0x4000 ? '1' : '0'), \\r
+ (word & 0x2000 ? '1' : '0'), \\r
+ (word & 0x1000 ? '1' : '0'), \\r
+ (word & 0x0800 ? '1' : '0'), \\r
+ (word & 0x0400 ? '1' : '0'), \\r
+ (word & 0x0200 ? '1' : '0'), \\r
+ (word & 0x0100 ? '1' : '0'), \\r
+ (word & 0x0080 ? '1' : '0'), \\r
+ (word & 0x0040 ? '1' : '0'), \\r
+ (word & 0x0020 ? '1' : '0'), \\r
+ (word & 0x0010 ? '1' : '0'), \\r
+ (word & 0x0008 ? '1' : '0'), \\r
+ (word & 0x0004 ? '1' : '0'), \\r
+ (word & 0x0002 ? '1' : '0'), \\r
(word & 0x0001 ? '1' : '0')\r
\r
#define NIBBLE_TO_BINARY_PATTERN "%c%c%c%c"\r
-#define NIBBLE_TO_BINARY(nibble) \\r
- (nibble & 0x08 ? '1' : '0'), \\r
- (nibble & 0x04 ? '1' : '0'), \\r
- (nibble & 0x02 ? '1' : '0'), \\r
+#define NIBBLE_TO_BINARY(nibble) \\r
+ (nibble & 0x08 ? '1' : '0'), \\r
+ (nibble & 0x04 ? '1' : '0'), \\r
+ (nibble & 0x02 ? '1' : '0'), \\r
(nibble & 0x01 ? '1' : '0')\r
\r
#define BOOLEAN_TO_BINARY_PATTERN "%c"\r
-#define BOOLEAN_TO_BINARY(boolean) \\r
+#define BOOLEAN_TO_BINARY(boolean) \\r
(boolean & 0x01 ? '1' : '0')\r
\r
#define PRINT_OPAQUE_STRUCT(p) print_mem((p), sizeof(*(p)))\r