Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.7 KiB

  1. /* Disasm.h - definitions for Don's Tiny Disassembler */
  2. typedef unsigned long dword;
  3. typedef unsigned short word;
  4. typedef unsigned char byte;
  5. extern word memOp; /* actual operation performed */
  6. extern char *memName[]; /* name corresponding to memOp */
  7. enum { memNOP, memRead, memWrite, memRMW, memSegReg, memSegMem};
  8. extern word memSeg; /* value of segment of memory address */
  9. extern dword memLinear, /* offset of operand */
  10. memLinear2;
  11. extern word memSeg2, /* duplicate of above if dual mem op */
  12. memSize2, memOp2,
  13. memDouble; /* true if two-mem-operand instruction */
  14. extern word memSize; /* bytes of memory of operation */
  15. enum { MemByte=1, MemWord=2, MemDWord=4, MemQWord=8, MemTword=10,
  16. Adr4, Adr6=6};
  17. enum { memNoSeg, memES, memCS, memSS, memDS, memFS, memGS};
  18. enum {strCX=1, strSI=2, strDI=4, segDS=8, segES=16, segFS=32, segGS=64};
  19. extern word gpSafe, /* 1 if may continue instruction */
  20. gpRegs, /* regs which instruction modifies as side effect */
  21. gpStack; /* amount stack is changed by */
  22. /* DisAsm86 is my nifty 80x86 disassembler (even handles 32 bit code) */
  23. /* Given current CS:IP, it disassembles the instruction, and returns */
  24. /* the number of code bytes used, and a pointer to a static array of */
  25. /* chars holding the disassembly. It also sets up a bunch of global */
  26. /* vars indicating what memory operations occurred, to aid in decoding */
  27. /* the fault type. */
  28. extern char *DisAsm86(byte far *cp, int *len);
  29. /* Same as DisAsm86, but assumes 32 bit code and data */
  30. extern char *DisAsm386(byte far *cp, int *len);
  31. extern char hexData[];
  32. #if !defined(MS_DOS)
  33. #define sprintf wsprintf
  34. #define vsprintf wvsprintf
  35. #define FP void far *
  36. #else
  37. #define FP void *
  38. #endif