mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-02-12 14:20:10 +00:00
* Minor tidy * Changes: . semicolon now Comment EOL . double fwd-slash now Divide floor . (single fwd-slash unassigned) * . fwd-slash now parsed in Range_GetPrefix() . WIP: 'bp bank/addr' * Add error msgs * Extend Breakpoint_t struct * Update cmd 'bpl' to support displaying prefixes * Do prefix checks & output error msgs * Add _CheckBreakpointValueWithPrefix() . support bank, for BP_OP_EQUAL Stop reason: include BP id * WIP: fix BPs (non-BPM) * Fix cmd 'bpr' * Stop reason: don't show BP id for BP_HIT_REG (as it already includes it) Add comment about nArgs from calling funcs Refactor _CmdBreakpointAddCommonArg(): nArgs * Stop reason for memory BP: show full prefixed address * Stop reason: output BP id in consistenct way * Support ROM prefix filter * Complete addr prefix logic * Improve logic * BP: 'HDD DMA to/from memory' - use common hit id function * Support rw bank 100 * Support double forward-slash at start of line as a comment * Refactor: use debugger naming convention for vars * Changed prefix errors from 'bad' to 'out-of-range' * DebugInitialize(): Reset g_breakpointHitID * Refactor: use debugger var naming convention & formatting style * Switch divide-operator to the underscore char, and allow double-fslash as a comment anywhere on a line * Update help for debugger calculator * Update help for debugger breakpoints * Update help for debugger breakpoints (conditional) * Fix help:breakpoints.html & fix ArgsGetRegisterVlaue() to do case-insensitive compare * Fix underscore to be treated as a alphanumeric in a few edge cases * Revert to using '//' as divide operator * Help: update debugger Breakpoints & Calculalor pages * Help: update debugger Calculator (missed one) * Detabify and align * Display (1) or (2) prefix for LC1 or LC2 breakpoint * #1419 Added Aux.1 and Aux.N indicators * Display (1) or (2) suffix for LC1 or LC2 breakpoint * Extend cmd 'bpl' to display BP's end addr * Show both bank and slot together * Fix spacing for BP with range * Add: FG_INFO_BP_MEM, FG_INFO_MEM_WRITE, BG_INFO_MEM_BANK_LC, FG_INFO_MEM_BANK_LC colors * Cleanup * Add 3x5 mini hex numbers * Mini hex font to have rounded 0,A,C glyphs * Display 2 hex Bank now * Support edge-case for bank 0x100 * Tidy up end red spacer * Refactor & introduce new struct AddressPrefix_t * Fix a few bugs: . bpl: fix end addr . fix for 'R' and 'W' not coloured for single-byte BPs (eg. bpmr 100) --------- Co-authored-by: michaelangel007 <michaelangel007@sharedcraft.com>
332 lines
13 KiB
HTML
332 lines
13 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="Calculator"></a>Calculator</h2>
|
||
<p>There is a basic mini hex calculator built in. It can do Addition,
|
||
Subtraction, Multiplication, Floor Division, Modulus, bit-wise And, bit-wise Or, bit-wise Exclusive
|
||
Or, and bit-wise Negation, with Values, Register and Symbols. 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>Asterisk</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Multiplication.</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>Double forward slash</p>
|
||
</td>
|
||
<td width="65%">
|
||
<p><i>Calculate quotient (floor or integer divide).</i></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="10%">
|
||
<p>&</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, ‘!’, only effects
|
||
the next immediate expression.</i></p>
|
||
<li>
|
||
<p style="MARGIN-BOTTOM: 0in"><i>Older versions of AppleWin's Debugger used ‘/’ for (floor or integer) division. The debugger needed a way for users to refer to auxiliary memory and banked memory addresses. The IIgs monitor uses ‘/’ for bank prefixes, so consistency with this notation was adopted. Since division is rarely used the operator was changed to ‘//’.</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 & 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 floor 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>
|
||
</p>
|
||
</body>
|
||
</html>
|