summaryrefslogtreecommitdiffstats
path: root/public/sdk/inc/disasm.h
diff options
context:
space:
mode:
authorAdam <you@example.com>2020-05-17 05:51:50 +0200
committerAdam <you@example.com>2020-05-17 05:51:50 +0200
commite611b132f9b8abe35b362e5870b74bce94a1e58e (patch)
treea5781d2ec0e085eeca33cf350cf878f2efea6fe5 /public/sdk/inc/disasm.h
downloadNT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip
Diffstat (limited to 'public/sdk/inc/disasm.h')
-rw-r--r--public/sdk/inc/disasm.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/public/sdk/inc/disasm.h b/public/sdk/inc/disasm.h
new file mode 100644
index 000000000..c13e7f8cb
--- /dev/null
+++ b/public/sdk/inc/disasm.h
@@ -0,0 +1,50 @@
+/***********************************************************************
+* Microsoft Lego
+*
+* Microsoft Confidential. Copyright 1994 Microsoft Corporation.
+*
+* Component:
+*
+* File: dis.h
+*
+* File Comments:
+*
+*
+***********************************************************************/
+
+#include <stddef.h>
+
+// ------------------------------------------------------------
+// Architecture types
+// ------------------------------------------------------------
+
+enum ARCHT
+{
+ archtX8616, // Intel x86 (16 bit mode)
+ archtX86, // Intel x86 (32 bit mode)
+ archtMips, // MIPS R4x00
+ archtAlphaAxp, // DEC Alpha AXP
+ archtPowerPc, // Motorola PowerPC
+ archtPowerMac, // Motorola PowerPC in big endian mode
+ archtPaRisc, // HP PA-RISC
+};
+
+struct DIS;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef size_t (*PFNCCHADDR)(struct DIS *, ULONG, char *, size_t, DWORD *);
+typedef size_t (*PFNCCHFIXUP)(struct DIS *, ULONG, size_t, char *, size_t, DWORD *);
+
+struct DIS *DisNew(enum ARCHT);
+
+size_t Disassemble(struct DIS *pdis, ULONG addr, const BYTE *pb, size_t cbMax, char *pad, char *buf, size_t cbBuf);
+void SetSymbolCallback(struct DIS *pdis,PFNCCHADDR,PFNCCHFIXUP);
+
+void FreePdis(struct DIS *);
+
+#ifdef __cplusplus
+}
+#endif