mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-22 09:30:15 +00:00
412 lines
16 KiB
HTML
412 lines
16 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
<html>
|
||
<head>
|
||
<title>AppleWin Debugger Tutorial</title>
|
||
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252">
|
||
</head>
|
||
<body style="DIRECTION: ltr" lang="en-US">
|
||
<h2><a name="Breakpoints"></a>Breakpoints</h2>
|
||
<p>You now have a variety of options when specifying a breakpoint.
|
||
Breakpoints can also be disabled, and later re-enabled. This lets ones
|
||
set a bunch of breakpoints, and quickly re-activate them without having to
|
||
re-enter the breakpoint logic.</p>
|
||
<p><br>
|
||
<br>
|
||
</p>
|
||
<table border="0" cellpadding="2" cellspacing="0" width="90%">
|
||
<COLGROUP>
|
||
<col width="64">
|
||
<col width="192">
|
||
<tbody>
|
||
<tr bgcolor="#000000">
|
||
<td bgcolor="#000000" width="25%">
|
||
<p><font color="#ffffff"><b>Command</b></font></p>
|
||
</td>
|
||
<td bgcolor="#000000" width="75%">
|
||
<p style="FONT-STYLE: normal"><font color="#ffffff"><b>Effect</b></font></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#cccccc">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPA
|
||
r [op] value</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">Adds
|
||
(conditional) Breakpoint.<br>
|
||
|
||
Default operator is equal ‘=’<br>
|
||
|
||
(In a future version, will dispatch to BPX, BPR, BPP, or BPIO.)</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#999999">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPX<br>
|
||
|
||
BPX expression<br>
|
||
|
||
BPX address[,len]<br>
|
||
|
||
BPX [op] symbol</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">Add
|
||
Breakpoint trigger to stop executing when the PC is within the range of
|
||
the Address, Symbol, or Expression. i.e. Range is: [addr,addr+len)<br>
|
||
|
||
Default length is 1.<br>
|
||
|
||
Default comparision operator is equal ‘=’</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#cccccc">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BP</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">Currently
|
||
an Alias for BPX.<br>
|
||
|
||
(In a future version, will also support Loading and Saving of
|
||
breakpoints.)</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#999999">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPM
|
||
address[,len]</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">Add
|
||
Breakpoint trigger when memory is accessed by 6502.</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#cccccc">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPMR
|
||
address[,len]</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">Add
|
||
Breakpoint trigger when memory is read by 6502.</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#999999">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPMW
|
||
address[,len]</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">Add
|
||
Breakpoint trigger when memory is written by 6502.</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#cccccc">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPR
|
||
reg [op] value</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">Add
|
||
Breakpoint trigger when Register’s ‘reg’
|
||
value is compared to the Value.</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#999999">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPD</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">Disable
|
||
Breakpoint (grayed out).</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#cccccc">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPE</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">Enable
|
||
Breakpoint (colored red).</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#999999">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPC
|
||
#</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">Clear
|
||
specified Breakpoint.<br>
|
||
|
||
Note: The asterisk ‘*’ may be used to clear all
|
||
breakpoints.</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#cccccc">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPL</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">List
|
||
Breakpoints.</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#999999">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPIO</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">(In
|
||
a future version, will add Breakpoint trigger on memory read or write.)</span></i></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#cccccc">
|
||
<td width="25%">
|
||
<p><font color="#000000"><font face="Courier"><b><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPP</span></b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><i><span style="BACKGROUND: 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">(In
|
||
a future version, will add Breakpoint trigger on specific flag cleared
|
||
or set.)</span></i></p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p><br>
|
||
<br>
|
||
</p>
|
||
<p>The general format for the conditional breakpoint is:</p>
|
||
<ul>
|
||
<li>
|
||
<p style="MARGIN-BOTTOM: 0in"><i>BPA register [operator] value.</i></p>
|
||
</li>
|
||
</ul>
|
||
<p>You can use the following comparison operators:</p>
|
||
<table border="1" cellpadding="2" cellspacing="0" width="75%">
|
||
<COLGROUP>
|
||
<col width="26">
|
||
<col width="64">
|
||
<col width="166">
|
||
<tbody>
|
||
<tr bgcolor="#000000">
|
||
<td width="10%">
|
||
<p><font color="#ffffff"><b>Op</b></font></p>
|
||
</td>
|
||
<td width="25%">
|
||
<p><font color="#ffffff"><b>Name</b></font></p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><font color="#ffffff"><b>Effect</b></font></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="10%">
|
||
<p>=</p>
|
||
</td>
|
||
<td width="25%">
|
||
<p>Equal</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Break when register is equal to value.</i></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="10%">
|
||
<p>!</p>
|
||
</td>
|
||
<td width="25%">
|
||
<p>Not Equal</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Break when register is not equal to value.</i></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="10%">
|
||
<p><</p>
|
||
</td>
|
||
<td width="25%">
|
||
<p>Less Than</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Break when register is less than value.</i></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="10%">
|
||
<p>></p>
|
||
</td>
|
||
<td width="25%">
|
||
<p>Greater Than</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Break when register is greater than value.</i></p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p><br>
|
||
<br>
|
||
</p>
|
||
<p>Breaking on any of the 6502 registers is fully supported:</p>
|
||
<table border="1" cellpadding="2" cellspacing="0" width="75%">
|
||
<COLGROUP>
|
||
<col width="26">
|
||
<col width="64">
|
||
<col width="166">
|
||
<thead>
|
||
<tr bgcolor="#000000">
|
||
<td width="10%">
|
||
<p><font color="#ffffff"><b>Reg</b></font></p>
|
||
</td>
|
||
<td width="25%">
|
||
<p><font color="#ffffff"><b>Name</b></font></p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><font color="#ffffff"><b>Effect</b></font></p>
|
||
</td>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td width="10%">
|
||
<p>A</p>
|
||
</td>
|
||
<td width="25%">
|
||
<p>Accumulator</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Break when Accumulator is triggered.</i></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="10%">
|
||
<p>X</p>
|
||
</td>
|
||
<td width="25%">
|
||
<p>Register X</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Break when Index X is triggered.</i></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="10%">
|
||
<p>Y</p>
|
||
</td>
|
||
<td width="25%">
|
||
<p>Register Y</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Break when Index Y is triggered.</i></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="10%">
|
||
<p>PC</p>
|
||
</td>
|
||
<td width="25%">
|
||
<p>Program Counter</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Break when PC is triggered.</i></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="10%">
|
||
<p>S</p>
|
||
</td>
|
||
<td width="25%">
|
||
<p>Stack Pointer</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Break when Stack Pointer is triggered.</i></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="10%">
|
||
<p>P</p>
|
||
</td>
|
||
<td width="25%">
|
||
<p>Processor Status (flags)</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Break when flags are triggered.</i></p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<br>
|
||
<h2><font size="4">Notes:</font></h2>
|
||
<ul>
|
||
<li>
|
||
<p><i>BPP, Breaking on a specific flag (either set, or cleared) is forth-coming in a
|
||
future version.</i></p>
|
||
</li>
|
||
</ul>
|
||
<br>
|
||
<p><font size="4"><b>Examples</b>:</font></p>
|
||
<table bgcolor="#000000" border="0" cellpadding="2" cellspacing="0" width="75%">
|
||
<COLGROUP>
|
||
<col width="64">
|
||
<col width="192">
|
||
<tbody>
|
||
<tr bgcolor="#00b8ff">
|
||
<td bgcolor="#30c0ff" width="25%">
|
||
<p><font color="#000000"><b>Input</b></font></p>
|
||
</td>
|
||
<td bgcolor="#30c0ff" width="75%">
|
||
<p><font color="#000000"><b>Effect</b></font></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#000000">
|
||
<td width="25%">
|
||
<p><font color="#00b8ff"><font face="Courier"><b>BPX < F000</b></font></font></p>
|
||
</td>
|
||
<td width="75%">
|
||
<p><font color="#ffffff"><i>Add Breakpoint when PC < $<b><font color="#ffff00">FA62</font></b>.</i></font></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#000000">
|
||
<td bgcolor="#000000" width="25%">
|
||
<p><font color="#00b8ff"><font face="Courier"><b>BPX PC < D000</b></font></font></p>
|
||
</td>
|
||
<td bgcolor="#000000" width="75%">
|
||
<p><font color="#ffffff"><i>Add Breakpoint when PC < $ <b><font color="#ffff00">D000</font>.</b></i></font></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#000000">
|
||
<td bgcolor="#000000" width="25%">
|
||
<p><font color="#00b8ff"><font face="Courier"><b><span style="BACKGROUND: rgb(0,0,0) 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPR
|
||
A 0</span></b></font></font></p>
|
||
</td>
|
||
<td bgcolor="#000000" width="75%">
|
||
<p><font color="#ffffff"><i>Adds Breakpoint when Accumulator is zero.</i></font></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#000000">
|
||
<td bgcolor="#000000" width="25%">
|
||
<p><font color="#00b8ff"><font face="Courier"><b><span style="BACKGROUND: rgb(0,0,0) 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPR
|
||
A ! 0</span></b></font></font></p>
|
||
</td>
|
||
<td bgcolor="#000000" width="75%">
|
||
<p><font color="#ffffff"><i>Adds Breakpoint when Accumulator is <b>not</b> zero.</i></font></p>
|
||
</td>
|
||
</tr>
|
||
<tr bgcolor="#000000">
|
||
<td bgcolor="#000000" width="25%">
|
||
<p><font color="#00b8ff"><font face="Courier"><b><span style="BACKGROUND: rgb(0,0,0) 0% 50%; moz-background-clip: initial; moz-background-origin: initial; moz-background-inline-policy: initial">BPR
|
||
S < 1FF</span></b></font></font></p>
|
||
</td>
|
||
<td bgcolor="#000000" width="75%">
|
||
<p><font color="#ffffff"><i>Adds Breakpoint when Stack has had something pushed onto it.</i></font></p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<br>
|
||
</body>
|
||
</html>
|