AppleWin/help/dbg-calculator.html

324 lines
13 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">
<h2><a name="Calculator"></a>Calculator</h2>
<p>There is a basic mini hex calculator built in.&nbsp; It can do Addition,
Subtraction, Division, Modulus, bit-wise And, bit-wise Or, bit-wise Exclusive
Or, and bit-wise Negation, with Values, Register and Symbols.&nbsp; It will
display results in Hex, Binary, Decimal, and as a Character (single quoted.)</p>
<p><br>
<br>
</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>Plus</p>
</td>
<td width="65%">
<p><i>Addition.</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p>-</p>
</td>
<td width="25%">
<p>Minus</p>
</td>
<td width="65%">
<p><i>Subtraction.</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p>%</p>
</td>
<td width="25%">
<p>Percent</p>
</td>
<td width="65%">
<p><i>Calculate remainder (modulus).</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p>/</p>
</td>
<td width="25%">
<p>Forward Slash</p>
</td>
<td width="65%">
<p><i>Calculate quotient.</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p>&amp;
</p>
</td>
<td width="25%">
<p>Ampersand</p>
</td>
<td width="65%">
<p><i>Bit-wise AND.</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p>|
</p>
</td>
<td width="25%">
<p>Pipe</p>
</td>
<td width="65%">
<p><i>Bit-Wise (inclusive) OR.</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p>^</p>
</td>
<td width="25%">
<p>Caret</p>
</td>
<td width="65%">
<p><i>Bit-Wise (exclusive) OR, also called XOR.</i></p>
</td>
</tr>
<tr>
<td width="10%">
<p>!</p>
</td>
<td width="25%">
<p>Exclamation</p>
</td>
<td width="65%">
<p><i>Bit-Wise NOT.</i></p>
</td>
</tr>
</tbody>
</table>
<p><br>
<br>
</p>
<h2><font size="4">Notes:</font></h2>
<ul>
<li>
<p style="MARGIN-BOTTOM: 0in"><i>The unary bit-wise Negation operator, <20>!<21> only effects
the next immediate expression.</i></p>
<li>
<p style="MARGIN-BOTTOM: 0in"><i>There is (currently) no multiplication operator, due
to the asterisk <20>*<2A> being used for the wild card operator.</i></p>
</li>
</ul>
<p><br>
<br>
</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>CALC 9+1</b></font></font></p>
</td>
<td width="75%">
<p><font color="#ffffff"><i>Calculate 9+1, in hex.</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">R
A 1</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Set Accumulator to 1.</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">R
X 2</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Set X to 2.</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">R
Y 3</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Set Y to 3.</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">CALC
A+X+Y</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate sum of registers.</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">CALC
1FF-S</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate Stack Depth.</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">CALC
BRKV+1</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate address of Break Vector + 1<br>
(First byte is a jump instruction.)</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">CALC
A+#A</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate Accumulator plus (decimal) 10.</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">CALC
A+0A</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate Accumulator plus (decimal) 10.</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">CALC
A+$0A</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate Accumulator plus (decimal) 10.</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">CALC
0A+0A</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate 10 + 10, in hex.</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">CALC
$RESET+1</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate Address of Reset + 1 (First opcode is one byte, CLD).</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">CALC
!HOME</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate bit-wise NOT.</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">CALC
X &amp; Y</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate bit-wise AND of Register X , Register Y.</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">CALC
X | Y</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate bit-wise OR of Register X , Register Y.</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">CALC
X ^ Y</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate bit-wise XOR of Register X , Register Y.</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">CALC
X / Y</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate division of Register X , Register Y.</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">CALC
X % Y</span></b></font></font></p>
</td>
<td bgcolor="#000000" width="75%">
<p><font color="#ffffff"><i>Calculate remainder of Register X , Register Y.</i></font></p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;
</p>
</body>
</html>