AppleWin/help/dbg-execution.html
2014-05-23 22:59:02 +01:00

272 lines
8.3 KiB
HTML
Raw Blame 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">
<h1>
Execution</h1>
<p>As you scroll around, you will notice the cursor and other lines change
colors.&nbsp; Normally the cursor line is shown with an inverse bar, that is
with a white background. Other colors have these meanings:
</p>
<table border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="666">
<COLGROUP>
<col width="161">
<col width="494">
<tbody>
<tr bgcolor="#000000">
<td width="161">
<p><font color="#ffffff"><b>Cursor Background</b></font></p>
</td>
<td width="494">
<p><font color="#ffffff"><b>Effect</b></font></p>
</td>
</tr>
<tr>
<td width="161">
<p>White
</p>
</td>
<td width="494">
<p><i>Address of cursor.</i></p>
</td>
</tr>
<tr>
<td bgcolor="#ffff00" width="161">
<p>Yellow (Bright)</p>
</td>
<td width="494">
<p><i>Cursor is on next 6502 instruction (At 6502 PC).</i></p>
</td>
</tr>
<tr>
<td bgcolor="#cccc00" width="161">
<p>Yellow (Dim)</p>
</td>
<td width="494">
<p><i>Line is next 6502 instruction (At 6502 PC).</i></p>
</td>
</tr>
<tr>
<td bgcolor="#ff0000" width="161">
<p>Red (Bright)</p>
</td>
<td width="494">
<p><i>Cursor is on active Breakpoint.</i></p>
</td>
</tr>
</tbody>
</table>
<p><br>
<br>
</p>
<p>Press Right Arrow to locate the current 6502 instruction.&nbsp; If you Page
Down, you can see that Branch Indicators are displayed on the right side of the
disassembly window, designated by <20><font face="Webdings, serif">5</font><EFBFBD> or <20><font face="Webdings, serif">6</font><EFBFBD>.&nbsp;</p>
<p>Press Right Arrow to again locate the current instruction.&nbsp; You will also
notice immediate instructions have a character single quoted, after them, such
as <20><font face="Courier, monospace">I<EFBFBD></font> at $<b>FA75</b>.</p>
<p>Pressing Space, will Trace (into) an instruction. &nbsp; Sometimes you trace
into a JSR (subroutine), and wish you hadn't.&nbsp; Pressing Shift-Space will "<i>Step
Out</i>" - that is, run until the Program Counter (PC) is equal to the
return address on the stack.&nbsp; Pressing Left Arrow will jump the cursor to
the next instruction after the original call.&nbsp;
</p>
<br>
<p><font size="4"><b>Notes</b>:</font></p>
<ul>
<li>
<p><i>Some code will place the arguments to the subroutine after the JSR
instruction.&nbsp; The debugger is not able to detect this and "<b>Step Out</b>"
correctly, so use caution, if the sub-routine plays with the stack.</i></p>
<li>
<p>
<i>The debugger is not able to detect if the top 2 bytes on the stack is a valid
return address, so pay careful attention if the stack is modified!</i></p>
</li>
</ul>
<br>
<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>Key</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><font face="Wingdings"><EFBFBD></font>
</p>
</td>
<td width="25%">
<p>Space
</p>
</td>
<td width="65%">
<p><i>Trace into instruction.</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p><font face="Wingdings"><EFBFBD><EFBFBD></font>
</p>
</td>
<td width="25%">
<p>Shift-Space
</p>
</td>
<td width="65%">
<p><i>Step out of subroutine.</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p>^<font face="Wingdings"><EFBFBD></font>
</p>
</td>
<td width="25%">
<p>Ctrl-Space
</p>
</td>
<td width="65%">
<p><i>Trace over instruction.</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p>^<font face="Wingdings"><EFBFBD></font>
</p>
</td>
<td width="25%">
<p>Ctrl-Down Arrow
</p>
</td>
<td width="65%">
<p><i>Run until cursor.</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p>^<font face="Wingdings"><EFBFBD></font>
</p>
</td>
<td width="25%">
<p>Ctrl-Right Arrow</p>
</td>
<td width="65%">
<p><i>Set PC to cursor.</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p><font face="Wingdings"><EFBFBD></font>
</p>
</td>
<td width="25%">
<p>Left Arrow
</p>
</td>
<td width="65%">
<p><i>Jump cursor to return address on stack.</i></p>
</td>
</tr>
</tbody>
</table>
<p><br>
<br>
</p>
<table bgcolor="#000000" border="0" cellpadding="2" cellspacing="0" width="90%">
<COLGROUP>
<col width="90">
<col width="166">
<tbody>
<tr bgcolor="#000000">
<td width="35%">
<p><font color="#ffffff"><b>Command</b></font></p>
</td>
<td width="65%">
<p style="FONT-STYLE: normal"><font color="#ffffff"><b>Description</b></font></p>
</td>
</tr>
<tr bgcolor="#cccccc">
<td width="35%">
<p>G&nbsp;[StopAddress]
</p>
</td>
<td width="65%">
<p><i>Resume execution until PC = StopAddress.</i></p>
</td>
</tr>
<tr bgcolor="#999999">
<td width="35%">
<p>G&nbsp;[StopAddress]&nbsp;[SkipAddress,Length]</p>
</td>
<td width="65%">
<p><i>Resume execution until PC = StopAddress.<br>
Additionally, if the PC exits the range [SkipAddress,Length],<br>
execution will be halted.</i></p>
</td>
</tr>
<tr bgcolor="#cccccc">
<td width="35%">
<p>####G</p>
</td>
<td width="65%">
<p><i>Alias for: R PC [=] address.</i></p>
</td>
</tr>
</tbody>
</table>
<p><br>
<br>
</p>
<table bgcolor="#000000" border="0" cellpadding="2" cellspacing="0" width="90%">
<COLGROUP>
<col width="90">
<col width="166">
<tbody>
<tr bgcolor="#00b8ff">
<td bgcolor="#30c0ff" width="35%">
<p><font color="#000000"><b>Input</b></font></p>
</td>
<td bgcolor="#30c0ff" width="65%">
<p><font color="#000000"><b>Effect</b></font></p>
</td>
</tr>
<tr bgcolor="#000000">
<td width="35%">
<p><font color="#00b8ff"><font face="Courier"><b>R PC FA62 </b></font></font>
</p>
</td>
<td width="65%">
<p><font color="#ffffff"><i>Set Program Counter to Value $<b><font color="#ffff00">FA62</font></b>
(RESET) </i></font>
</p>
</td>
</tr>
<tr bgcolor="#000000">
<td bgcolor="#000000" width="35%">
<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">G&nbsp;C600&nbsp;D000,3000</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="65%">
<p><font color="#ffffff"><i>Single-step until either PC = $C600, or PC &lt;= $D000</i></font></p>
</td>
</tr>
</tbody>
</table>
<br>
</body>
</html>