annotate udis86-1.4/docs/doc.html @ 1:4a9dcbd9e54f

-files of 0.13 beta -fixes so that it now compiles with the current dmd version
author marton@basel.hu
date Tue, 05 Apr 2011 20:44:01 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
1 <html>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
2 <head>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
3 <title>Documentation: Udis86 - Disassembler Library for x86 and AMD64</title>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
4 <style type="text/css">@import 'style.css';</style>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
5 <style>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
6 #api_tab td {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
7 vertical-align: top;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
8 padding: .4em;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
9 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
10 #api_tab {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
11 width: 100%;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
12 padding: 0em;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
13 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
14 .func {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
15 text-align: center;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
16 font-family: monospace;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
17 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
18
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
19 </style>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
20 </head>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
21 <body>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
22 <div id="topbar"><h1>Udis86 - Disassembler Library for x86 and AMD64</h1></div>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
23 <div id="wrapper">
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
24 <div id="content">
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
25
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
26 <a href="index.html">Home</a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
27
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
28 <h1>Documentation</h1>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
29 <small><i>Dec 19, 2006</i> - Added new API function and Standalone build mode.</small>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
30 <hr size="1"/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
31 <br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
32 <a href="#sec1">1. Using the library - libudis86</a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
33 <blockquote>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
34 <a href="#sec11">1.1 Compiling and Installing</a> <br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
35 <blockquote>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
36 <a href="#sec111">1.1.1 Standalone Udis86</a> <br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
37 </blockquote>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
38 <a href="#sec12">1.2 Interfacing With Your Program</a> <br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
39 <a href="#sec13">1.3 A Quick Example</a><br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
40 <a href="#sec14">1.4 The Udis86 Object</a><br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
41 <a href="#sec15">1.5 Functions</a><br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
42 <a href="#sec16">1.6 Examining an Instruction</a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
43 </blockquote>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
44 <a href="#sec2">2. Using the command-line tool - udcli</a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
45 <blockquote>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
46 <a href="#sec21">2.1 Usage</a> <br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
47 <a href="#sec22">2.2 Command-line options</a> <br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
48 <a href="#sec23">2.3 The hexadecimal input mode</a> <br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
49 </blockquote>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
50 <br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
51 <hr size="1"/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
52
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
53 <a name="sec1"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
54 <h2>1. Using the library - libudis86</h2>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
55
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
56 <p>libudis86 can be used in a variety of situations, and the extent to which you
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
57 need to know the API depends on the functionality you are looking for. At its
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
58 core, libudis86 is a disassembler engine, which when given an input stream of
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
59 machine code bytes, disassembles them for you to inspect. You could use it,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
60 simply, to generate assembly language output of the code, or to inspect
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
61 individual instructions, their operands, etc.</p>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
62
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
63 <a name="sec11"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
64 <h3>1.1 Compiling and installing</h3>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
65
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
66 <p>libudis86 is developed for Unix-like environments, and steps to installing
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
67 it is very simple. Get the source tarball, unpack it, and,</p>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
68 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
69 $ ./configure
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
70 $ make
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
71 $ make install
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
72 </pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
73 <p>is all you need to do. Ofcourse, you may need to have root privileges to make
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
74 install. The install scripts copy the necessary header and library files to
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
75 appropriate locations of in system.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
76 </p>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
77
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
78 <a name="sec111"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
79 <h4>1.1.1 Standalone Udis86</h4>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
80
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
81 <p>Standalone udis86 is (for now) a simple build hack that lets you build
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
82 a single relocatable object file with all of the libudis86 functionality, that you
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
83 could possibly use in any environment, say, a kernel module. The standalone object
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
84 assumes the availablity of the following functionality in the environment.</p>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
85
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
86 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
87 - memset()
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
88 - vprintf()
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
89 - sscanf()
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
90 </pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
91
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
92 <p> To build udis86 in standalone mode, do the following.</p>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
93
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
94 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
95 $ ./configure
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
96 $ make standalone
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
97 </pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
98
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
99 which will generate <code>ud_standalone.o</code> in <code>ud/libudis86</code>. This build
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
100 mode is a little hack'ish in nature and hopefully is replaced with better configure scripts
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
101 in the future. If you have ideas, let me know!
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
102
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
103 <a name="sec12"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
104 <h3>1.2 Interfacing with your program</h3>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
105
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
106 <p>Once you have installed libudis86, to use it with your program, first,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
107 include in your program the udis86.h header file,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
108 </p>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
109
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
110 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
111 #include &lt;udis86.h&gt;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
112 </pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
113
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
114 <p>and then, add the following flag to your GCC command-line options.</p>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
115
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
116 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
117 -ludis86
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
118 </pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
119
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
120 <a name="sec13"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
121 <h3>1.3 A Quick Example</h3>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
122
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
123 The following code is an example of a program that interfaces with libudis86 and
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
124 uses the API to generate assembly language output for 64-bit code, input from
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
125 STDIN.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
126 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
127 /* simple_example.c */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
128
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
129 #include &lt;stdio.h&gt;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
130 #include &lt;udis86.h&gt;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
131
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
132 int main()
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
133 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
134 ud_t ud_obj;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
135
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
136 ud_init(&ud_obj);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
137 ud_set_input_file(&ud_obj, stdin);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
138 ud_set_mode(&ud_obj, 64);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
139 ud_set_syntax(&ud_obj, UD_SYN_INTEL);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
140
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
141 while (ud_disassemble(&ud_obj)) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
142 printf("\t%s\n", ud_insn_asm(&ud_obj));
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
143 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
144
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
145 return 0;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
146 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
147 </pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
148 To compile the program:
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
149 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
150 $ gcc -ludis86 simple_example.c -o simple_example
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
151 </pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
152
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
153 <p>This example should give you an idea of how this library can
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
154 be used. The following sections describe, in detail, the complete API of
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
155 libudis86.</p>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
156
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
157 <a name="sec14"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
158 <h3>1.4 The Udis86 Object</h3>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
159
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
160 <p>To maintain reentrancy and thread safety, udis86 does not use static data.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
161 All data related to the disassembly process are stored in a single object,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
162 called the udis86 object. So, to use libudis86 you must create an instance of
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
163 this object,</p>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
164
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
165 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
166 ud_t my_ud_obj;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
167 </pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
168
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
169 and initialize it,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
170
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
171 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
172 ud_init(&my_ud_obj);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
173 </pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
174
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
175 Ofcourse, you can create multiple instances of libudis86 and spawn multiple
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
176 threads of disassembly. Thats entirely upto how you want to use the library.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
177 libudis86 guarantees reentrancy and thread safety.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
178
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
179 <a name="sec15"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
180 <h3>1.5 Functions</h3>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
181
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
182 All functions in libudis86 take a pointer to the udis86 object (ud_t) as the first
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
183 argument. The following is a list of all functions available.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
184
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
185
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
186 <ol>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
187 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
188 <pre>void ud_init (ud_t* ud_obj)</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
189 ud_t object initializer. This function must be called on a udis86 object
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
190 before it can used anywhere else.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
191 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
192
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
193 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
194 <pre>void ud_set_input_hook(ud_t* ud_obj, int (*hook)())</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
195
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
196 This function sets the input source for the library. To retrieve each
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
197 byte in the stream, libudis86 calls back the function pointed to by
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
198 "hook".
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
199
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
200 The hook function, defined by the user code, must return a single byte
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
201 of code each time it is called. To signal end-of-input, it must return the
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
202 constant, <code>UD_EOI</code>.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
203 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
204
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
205 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
206 <pre>void ud_set_input_buffer(ud_t* ud_obj, unsigned char* buffer, size_t size);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
207
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
208 This function sets the input source for the library to a buffer of fixed
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
209 size.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
210 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
211
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
212 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
213 <pre>void ud_set_input_file(ud_t* ud_obj, FILE* filep);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
214
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
215 This function sets the input source for the library to a file pointed to by
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
216 the passed FILE pointer. Note that the library does not perform any checks,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
217 assuming the file pointer to be properly initialized.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
218 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
219
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
220 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
221 <pre>void ud_set_mode(ud_t* ud_obj, uint8_t mode_bits);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
222
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
223 Sets the mode of disassembly. Possible values are 16, 32, and 64. By
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
224 default, the library works in 32bit mode.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
225 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
226
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
227 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
228 <pre>void ud_set_pc(ud_t*, uint64_t pc);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
229
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
230 Sets the program counter (EIP/RIP). This changes the offset of the
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
231 assembly output generated, with direct effect on branch instructions.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
232 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
233
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
234 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
235 <pre>void ud_set_syntax(ud_t*, void (*translator)(ud_t*));</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
236
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
237 libudis86 disassembles one instruction at a time into an intermediate
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
238 form that lets you inspect the instruction and its various aspects
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
239 individually. But to generate the assembly language output, this
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
240 intermediate form must be translated. This function sets the translator.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
241 There are two inbuilt translators,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
242 <br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
243 <ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
244 <li>UD_SYN_INTEL - for INTEL (NASM-like) syntax.</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
245 <li>UD_SYN_ATT - for AT&amp;T (GAS-like) syntax.</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
246 </ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
247 If you do not want libudis86 to translate, you can pass a NULL to the
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
248 function, with no more translations thereafter. This is particularily
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
249 useful for cases when you only want to identify chunks of code and then
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
250 create the assembly output if needed.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
251 <br/><br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
252 If you want to create your own translator, you must pass a pointer to
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
253 function that accepts a pointer to ud_t. This function will be called
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
254 by libudis86 after each instruction is decoded.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
255 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
256
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
257 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
258 <pre>void ud_set_vendor(ud_t*, unsigned vendor);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
259
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
260 Sets the vendor of whose instruction to choose from. This is only useful for
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
261 selecting the VMX or SVM instruction sets at which point INTEL and AMD have
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
262 diverged significantly. At a later stage, support for a more granular
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
263 selection of instruction sets maybe added.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
264 <br/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
265 <ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
266 <li>UD_VENDOR_INTEL - for INTEL instruction set.</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
267 <li>UD_VEDNOR_ATT - for AMD instruction set.</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
268 </ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
269 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
270
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
271 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
272 <pre>unsigned int ud_disassemble(ud_t*);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
273
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
274 This function disassembles the next instruction in the input stream.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
275 <i>RETURNS</i>, the number of bytes disassembled. A 0 indicates end of
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
276 input.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
277 <i>NOTE</i>, to restart disassembly, after the end of input, you must
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
278 call one of the input setting functions with the new input source.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
279 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
280
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
281 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
282 <pre>unsigned int ud_insn_len(ud_t* u);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
283 Returns the number of bytes disassembled.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
284 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
285
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
286
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
287 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
288 <pre>uint64_t ud_insn_off(ud_t*);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
289 Returns the starting offset of the disassembled instruction relative
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
290 to the program counter value specified initially.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
291 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
292
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
293 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
294 <pre>char* ud_insn_hex(ud_t*);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
295 Returns pointer to character string holding the hexadecimal
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
296 representation of the disassembled bytes.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
297 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
298
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
299 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
300 <pre>uint8_t* ud_insn_ptr(ud_t* u);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
301 Returns pointer to the buffer holding the instruction bytes. Use
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
302 ud_insn_len(), to determine the length of this buffer.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
303 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
304
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
305 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
306 <pre>char* ud_insn_asm(ud_t* u);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
307 If the syntax is specified, returns pointer to the character string holding
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
308 assembly language representation of the disassembled instruction.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
309 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
310
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
311 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
312 <pre>void ud_input_skip(ud_t*, size_t n);</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
313 Skips <code>n</code> number of bytes in the input stream.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
314 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
315 </ol>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
316
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
317 <a name="sec16"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
318 <h3>1.6 Examining an Instruction</h3>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
319
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
320 After calling ud_disassembly, instructions can be examined by accessing fields
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
321 of the ud_t object, as described below.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
322
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
323 <ol>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
324 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
325 <pre>ud_mnemonic_code_t ud_obj->mnemonic</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
326
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
327 The mnemonic code for the disassembled instruction. All codes are
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
328 prefixed by UD_I, such as, <code>UD_Imov, UD_Icall, UD_Ijmp</code>, etc.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
329 See a list of mnemonic codes in mnemonics.h.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
330 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
331
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
332 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
333 <pre>ud_operand_t ud_obj->operand[n]</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
334
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
335 The array of operands of the disassembled instruction. A maximum of
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
336 three operands are allowed, indexed as 0, 1, and 2. Operands can be
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
337 examined using the their sub-fields as described below.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
338 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
339
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
340 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
341 <pre>ud_type_t ud_obj->operand[n].type</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
342 This field represents the type of the operand n. Possible values are -
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
343 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
344 UD_OP_MEM - A Memory Addressing Operand.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
345 UD_OP_REG - A Register Operand.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
346 UD_OP_PTR - A Segment:Offset Pointer Operand.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
347 UD_OP_IMM - An Immediate Operand
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
348 UD_OP_JIMM - An Immediate Operand for Branch Instructions.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
349 UD_OP_CONST - A Constant Value Operand.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
350 UD_NONE - No Operand.</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
351
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
352 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
353
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
354 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
355 <pre>ud_obj->operand[n].size</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
356 This field gives the size of operand n. Possible values are - 8, 16, 32, 48, 64.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
357 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
358
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
359 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
360 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
361 ud_obj->operand[n].base
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
362 ud_obj->operand[n].index
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
363 ud_obj->operand[n].scale
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
364 ud_obj->operand[n].offset
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
365 ud_obj->operand[n].lval</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
366
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
367 For operands of type <code>UD_OP_MEM</code>,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
368 <ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
369 <li><code>ud_obj->operand[n].base</code> is the base register (if any),</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
370 <li><code>ud_obj->operand[n].index</code> is the index register (if any),</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
371 <li><code>ud_obj->operand[n].scale</code> is the scale (if any), </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
372 <li><code>ud_obj->operand[n].offset</code> is the size of displacement/offset to be added (8,16,32,64),</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
373 <li><code>ud_obj->operand[n].lval</code> is displacement/offset (if any).</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
374 </ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
375
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
376 For operands of type <code>UD_OP_REG</code>,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
377 <ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
378 <li><code>ud_obj->operand[n].base</code> field gives the register.</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
379 </ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
380
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
381 For operands of type <code>UD_OP_PTR</code>,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
382 <ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
383 <li><code>ud_obj->operand[n].lval</code> holds the segment:offset.</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
384 <li><code>ud_obj->operand[n].size</code> can have two values 32
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
385 (for 16:16 seg:off) and 48 (for 16:32 seg:off).</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
386 </ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
387
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
388 For operands of type <code>UD_OP_IMM, UD_OP_JIMM, UD_OP_CONST</code>,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
389 <ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
390 <li><code>ud_obj->operand[n].lval</code> holds the value.</li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
391 </ul>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
392
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
393 Possible values for <code>ud_obj->operand[n].base</code> and <code>ud_obj->operand[n].index</code>.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
394 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
395 /* No register */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
396 UD_NONE,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
397
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
398 /* 8 bit GPRs */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
399 UD_R_AL, UD_R_CL, UD_R_DL, UD_R_BL,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
400 UD_R_AH, UD_R_CH, UD_R_DH, UD_R_BH,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
401 UD_R_SPL, UD_R_BPL, UD_R_SIL, UD_R_DIL,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
402 UD_R_R8B, UD_R_R9B, UD_R_R10B, UD_R_R11B,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
403 UD_R_R12B, UD_R_R13B, UD_R_R14B, UD_R_R15B,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
404
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
405 /* 16 bit GPRs */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
406 UD_R_AX, UD_R_CX, UD_R_DX, UD_R_BX,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
407 UD_R_SP, UD_R_BP, UD_R_SI, UD_R_DI,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
408 UD_R_R8W, UD_R_R9W, UD_R_R10W, UD_R_R11W,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
409 UD_R_R12W, UD_R_R13W, UD_R_R14W, UD_R_R15W,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
410
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
411 /* 32 bit GPRs */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
412 UD_R_EAX, UD_R_ECX, UD_R_EDX, UD_R_EBX,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
413 UD_R_ESP, UD_R_EBP, UD_R_ESI, UD_R_EDI,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
414 UD_R_R8D, UD_R_R9D, UD_R_R10D, UD_R_R11D,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
415 UD_R_R12D, UD_R_R13D, UD_R_R14D, UD_R_R15D,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
416
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
417 /* 64 bit GPRs */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
418 UD_R_RAX, UD_R_RCX, UD_R_RDX, UD_R_RBX,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
419 UD_R_RSP, UD_R_RBP, UD_R_RSI, UD_R_RDI,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
420 UD_R_R8, UD_R_R9, UD_R_R10, UD_R_R11,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
421 UD_R_R12, UD_R_R13, UD_R_R14, UD_R_R15,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
422
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
423 /* segment registers */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
424 UD_R_ES, UD_R_CS, UD_R_SS, UD_R_DS,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
425 UD_R_FS, UD_R_GS,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
426
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
427 /* control registers*/
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
428 UD_R_CR0, UD_R_CR1, UD_R_CR2, UD_R_CR3,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
429 UD_R_CR4, UD_R_CR5, UD_R_CR6, UD_R_CR7,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
430 UD_R_CR8, UD_R_CR9, UD_R_CR10, UD_R_CR11,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
431 UD_R_CR12, UD_R_CR13, UD_R_CR14, UD_R_CR15,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
432
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
433 /* debug registers */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
434 UD_R_DR0, UD_R_DR1, UD_R_DR2, UD_R_DR3,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
435 UD_R_DR4, UD_R_DR5, UD_R_DR6, UD_R_DR7,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
436 UD_R_DR8, UD_R_DR9, UD_R_DR10, UD_R_DR11,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
437 UD_R_DR12, UD_R_DR13, UD_R_DR14, UD_R_DR15,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
438
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
439 /* mmx registers */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
440 UD_R_MM0, UD_R_MM1, UD_R_MM2, UD_R_MM3,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
441 UD_R_MM4, UD_R_MM5, UD_R_MM6, UD_R_MM7,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
442
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
443 /* x87 registers */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
444 UD_R_ST0, UD_R_ST1, UD_R_ST2, UD_R_ST3,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
445 UD_R_ST4, UD_R_ST5, UD_R_ST6, UD_R_ST7,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
446
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
447 /* extended multimedia registers */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
448 UD_R_XMM0, UD_R_XMM1, UD_R_XMM2, UD_R_XMM3,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
449 UD_R_XMM4, UD_R_XMM5, UD_R_XMM6, UD_R_XMM7,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
450 UD_R_XMM8, UD_R_XMM9, UD_R_XMM10, UD_R_XMM11,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
451 UD_R_XMM12, UD_R_XMM13, UD_R_XMM14, UD_R_XMM15,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
452
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
453 UD_R_RIP</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
454
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
455 Possible values for <code>ud_obj->operand[n].lval</code> depend on <code>ud_obj->operand[n].size</code>,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
456 based on which you could use its sub-fields to access the integer values.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
457
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
458 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
459 ud_obj->operand[n].lval.sbyte - Signed Byte
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
460 ud_obj->operand[n].lval.ubyte - Unsigned Byte
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
461 ud_obj->operand[n].lval.sword - Signed Word
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
462 ud_obj->operand[n].lval.uword - Unsigned Word
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
463 ud_obj->operand[n].lval.sdword - Signed Double Word
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
464 ud_obj->operand[n].lval.udword - Unsined Double Word
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
465 ud_obj->operand[n].lval.sqword - Signed Quad Word
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
466 ud_obj->operand[n].lval.uqword - Unsigned Quad Word
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
467 ud_obj->operand[n].lval.ptr.seg - Pointer Segment in Segment:Offset
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
468 ud_obj->operand[n].lval.ptr.off - Pointer Offset in Segment:Offset </pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
469
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
470 <li>Prefix Fields - These fields store prefixes (if found). If a prefix
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
471 does not exists then the field corresponding to it has the value <code>UD_NONE</code>.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
472 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
473 ud_obj->operand[n].pfx_rex - 64-bit mode REX prefix
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
474 ud_obj->operand[n].pfx_seg - Segment register prefix
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
475 ud_obj->operand[n].pfx_opr - Operand-size prefix (66h)
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
476 ud_obj->operand[n].pfx_adr - Address-size prefix (67h)
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
477 ud_obj->operand[n].pfx_lock - Lock prefix
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
478 ud_obj->operand[n].pfx_rep - Rep prefix
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
479 ud_obj->operand[n].pfx_repe - Repe prefix
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
480 ud_obj->operand[n].pfx_repne - Repne prefix</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
481 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
482
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
483 Possible values for <code>ud_obj->operand[n].pfx_seg</code> are,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
484 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
485 UD_R_ES, UD_R_CS, UD_R_SS, UD_R_DS,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
486 UD_R_FS, UD_R_GS, UD_NONE</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
487 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
488
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
489 <li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
490 <pre>uint4_t ud_obj->pc</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
491 The program counter.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
492 </li>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
493 </ol>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
494
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
495 <a name="sec2"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
496 <h2>2. Using the command-line tool - udcli</h2>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
497
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
498 A front-end incarnation of this library, udcli is a small command-line tool for
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
499 your quick disassembly needs.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
500
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
501 <a name="sec21"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
502 <h3>2.1 Usage</h3>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
503 <pre>$ udcli [-option[s]] file</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
504
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
505 <a name="sec22"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
506 <h3>2.2 Options</h3>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
507 <pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
508 -16 : Set the disassembly mode to 16 bits.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
509 -32 : Set the disassembly mode to 32 bits. (default)
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
510 -64 : Set the disassembly mode to 64 bits.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
511 -intel : Set the output to INTEL (NASM like) syntax. (default)
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
512 -att : Set the output to AT&amp;T (GAS like) syntax.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
513 -v &lt;v&gt; : Set vendor. &lt;v&gt; = {intel, amd}
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
514 -o &lt;pc&gt; : Set the value of program counter to <pc>. (default = 0)
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
515 -s &lt;pc&gt; : Set the number of bytes to skip before disassembly to <n>.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
516 -c &lt;pc&gt; : Set the number of bytes to disassemble to <n>.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
517 -x : Set the input mode to whitespace seperated 8-bit numbers in
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
518 hexadecimal representation. Example: 0f 01 ae 00
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
519 -noff : Do not display the offset of instructions.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
520 -nohex : Do not display the hexadecimal code of instructions.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
521 -h : Display help message.</pre>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
522
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
523 <a name="sec23"></a>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
524 <h3>2.3 The hexadecimal input mode</h3>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
525
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
526 Noteworthy among the command-line options of the udcli is "-x" which sets the
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
527 input mode to whitespace seperated 8-bit numbers in hexadecimal representation.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
528 This could come as a handy tool, for quickly disassembling hexadecimal
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
529 representation of machine code, like those generated during software crashes, etc.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
530
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
531 <div style="text-align:center; padding: 1em;">
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
532 <img src="ss.jpg" style="border: 1px double; padding: 2px;"/>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
533 </div>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
534
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
535 <div style="text-align:center"><small>&copy; 2006 Vivek Mohan</small></div>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
536 </body>
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
537 </html>