-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdebug.html
executable file
·150 lines (107 loc) · 4.16 KB
/
debug.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<html>
<head>
<title>debug</title>
<meta name="description" content="Extended Debug for the emulator">
</head>
<body leftmargin=70 topmargin=70>
<font face=verdana>
<B>Extended Debug For The Emulator</B>
<br><br>
<!-- s -->
<ul>
<li><b>c</b> - compare several bytes (arrays). For example:<br>
<!-- START AUTOMATIC ASM TO HTML EXPORT -->
<pre><font size=2 face="Terminal">
<font color=#000064>org</font> 100h
<font color=#0000FF>jmp</font> a
v1 <font color=#000064>db</font> 1,4,3,4,5,6,7
v2 <font color=#000064>db</font> 1,5,3,0,5,6,7
a:
<font color=#0000FF>mov</font> <font color=#C80000>ax</font>, v1
<font color=#0000FF>mov</font> <font color=#C80000>al</font>, v2
<font color=#0000FF>mov</font> <font color=#C80000>dx</font>, v1
<font color=#0000FF>mov</font> <font color=#C80000>dl</font>, v2
<font color=#0000FF>ret</font>
</font></pre>
<!-- emu8086 version 4.00-Beta-3 -->
<!-- STOP AUTOMATIC ASM TO HTML EXPORT -->
To compare v1 and v2 type the following:<br><br>
<b> c v1 L 7 v2</b><br><br>
<b>L</b> denotes the size of the array. If L parameter is not specified this command compares 8 bytes by default. For example to compare 8 bytes at offsets CS:100 and CS:233 type the following:<br><br>
<b> c 100 233</b><br><br>
It is also possible to use registers as parameters, for example:<br><br>
<b>c SI L 20h DI</b><br><br>
The command outputs only those addresses with values that are different. <br>
Equal bytes are not printed out.
<br><br>
<li><b>i</b> - input and display byte from a specified port. For example:
<br><br>
<b>i 123</b>
<br><br>
To input a word value use <b>iw</b> command.
<br><br>
<li><b>o</b> - output byte to a specified port. For example:
<br><br>
<b>o 123 55</b>
<br><br>
To output a word value use <b>ow</b> command. For example:
<br><br>
<b>ow 123 5512</b>
<br><br>
<li><b>d</b> - dump 128 bytes at specified address. For example:
<br><br>
<b>d ds:3 </b><br>
<b>d ds:[bx] </b><br>
<b>d ds:[bx+si] </b><br>
<b>d bx + 5</b><br>
<b>d 10 </b>
<br><br>
If no segment is specified CS is used by default. Square brackets are optional.
Subsequent use of <b>d</b> command without parameters shows next block of the memory.
<br><br>
<b> L </b> parameter can be used to specify the number of bytes to dump. For example:
There must be spaces around L to distingush from variable offset, for example:
<br><br>
<b>d lion L 10</b>
<br><br>
The above command dumps 16 bytes at offset of a variable called lion.
<br><br>
If requred to denote variable L, declared as <b>L db 5</b>, brackets must be used. For example:
<br><br>
<b>d [L]</b>
<br>
<b>d [L] L 1</b>
<br><br>
<li><b>t</b> - single step.
<br><br>
<li><b>p</b> - step over (procedure or interrupt).
<br><br>
<li><b>r</b> - show all registers and current instruction at CS:IP.
<br><br>
<ul>
<li><b>rf</b> - view/set flags.
<li><b>r</b> [register name] - view/set register value.
</ul>
<br><br>
</ul>
<br><br>
Note: All output values are in hex. All input parameters must be in hex. The <b>h</b> suffix is not required.<br><br>
The debug commands and output may not be compatible with the original Microsoft debug because of the enhanced features. The original debug cannot process commands such as: <br>
<b>d bx+si</b><br>
<b>iw 100</b><br>
<b>ow 100 1234</b><br>
...
<br><br>
More commands are to be added in the nearest future.
<br><br>
<font size=1>
<a href="http://www.microsoft.com" target="_blank">Microsoft</a> ® is a registered trademark of Microsoft Corporation.<br>
</font>
<br><br>
<!-- e -->
<!--
<a href="http://www.emu8086.com/dr/emu8086_assembler_solutions_faq.html">Frequently asked questions</a>
-->
</font>
</body>
</html>