AppleWin/help/dbg-breakpoints.html

463 lines
21 KiB
HTML
Raw Normal View History

<!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.&nbsp;
Breakpoints can also be disabled, and later re-enabled. &nbsp; 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 <20>=<3D><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 comparison operator is equal <20>=<3D></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>
2019-10-22 20:42:55 +00:00
<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>
2019-10-22 20:42:55 +00:00
</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>
2019-10-22 20:42:55 +00:00
</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>
2019-10-22 20:42:55 +00:00
</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>
2019-10-22 20:42:55 +00:00
</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<65>s <20>reg<65> 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">BPV vpos[,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 video-scanner's vertical position matches vpos. (NB. Auto-disable when hit.)</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">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="#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">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="#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">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 <20>*<2A> may be used to clear all 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">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="#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">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="#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">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>
<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">BRK [0|1|2|3|all] [on|off]</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">Break on BRK or Invalid 1-3 byte opcodes</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">BRKOP [opcode]</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">Break on Opcode</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">BRKINT [on|off]</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">Break on Interrupt</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>&lt;</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>&gt;</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 &lt; F000</b></font></font></p>
</td>
<td width="75%">
<p><font color="#ffffff"><i>Add Breakpoint when PC &lt; $<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 &lt; D000</b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Add Breakpoint when PC &lt; $ <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>Add 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>Add 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 &lt; 1FF</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Add Breakpoint when Stack has had something pushed onto it.</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">BPV A0</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Add Breakpoint when video-scanner is at line 160 ($A0) which is the start of the MIXED area.</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">BRK ON</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Break execution when the opcode to be executed is $00 (ie. BRK).</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">BRK ALL ON</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Break execution when the opcode to be executed is $00 (ie. BRK) or any Invalid opcode.</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">BRK 0 OFF</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Disable breaking execution when the opcode to be executed is $00 (ie. BRK).</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">BRKOP 6C</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Break execution when the opcode to be executed is $6C (ie. JMP (ABS)).</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">BRKINT ON</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Break execution just after an interrupt occurs.</i></font></p>
</td>
</tr>
</tbody>
</table>
<br>
</body>
</html>