Precursor to VIP introduction

This commit is contained in:
2020-12-23 12:26:02 -06:00
parent d636719775
commit 9f5a5233ea
19 changed files with 636 additions and 348 deletions
+35 -26
View File
@@ -135,7 +135,7 @@
border-width: 0 1px 1px 0;
}
.bordered tr > :first-child {
.bordered tr > :first-child, .op1 {
padding: 1px 12px 1px 12px;
text-align: center;
}
@@ -245,12 +245,12 @@
</p>
<p>
Floats, like words, are represented as sequences of character digits. They
are differentiated from words by the presence of a dot <code>.</code>
are distinguished from words by the presence of a dot <code>.</code>
character somewhere within the sequence. Only one dot may be present in a
float literal, and dots cannot be used in hexadecimal literals. If the given
value cannot be represented in the float data type, a parsing error occurs.
Float values in the expression evaluator are subjected to the same
restrictions as on the Virtual Boy's CPU: if the result of any float
Float values in the expression evaluator are subjected to the following
restrictions: if the value of any float literal or the result of any float
operation is NaN, an infinity, a denormal number or negative zero, it will be
changed to positive zero.
</p>
@@ -259,7 +259,7 @@
slightly different. When used in a numeric operation, a boolean will use the
value <code>0</code> if false or the value <code>1</code> if true. Boolean
literals are specified with the named values <code>true</code> and
<code>false</code> within the expression. In a boolean operation, any result
<code>false</code> within the expression. In a boolean operation, any value
that is zero is considered false, and any non-zero value is considered true.
</p>
<p>
@@ -298,13 +298,13 @@
<td class="mono">disp</td>
<td>Displacement offset for jumps and memory accesses.</td>
</tr>
<tr>
<!--tr>
<td class="mono">fetch</td>
<td>
Data unit index during a fetch operation, or <code>-1</code> if the read
operation is not a fetch.
</td>
</tr>
</tr-->
<tr>
<td class="mono">format</td>
<td>Current instruction's encoding format.</td>
@@ -354,7 +354,7 @@
</tr>
<tr>
<td class="mono">value</td>
<td>Value read by the current memory access.</td>
<td>Value read or to be written by the current memory access.</td>
</tr>
<tr>
<td class="mono">vector</td>
@@ -434,15 +434,14 @@
<p>
Operators may apply to one (unary) or two (binary) values. All unary
operators appear to the left of the value they modify (or another unary
operator). Binary operators appear between the values they modify. Each
operator considers the types of its operands in order to produce a new value
of the appropriate type.
operator). Binary operators appear between the values they modify.
</p>
<p>
If the operands of a binary operator have different types, one of the values
will be converted to the other type before performing the operation. The
conversion depends on the "greater" of the two types, in the following order
(higher is "greater"):
Each operator considers the types of its operands in order to produce a new
value of the appropriate type. If the operands of a binary operator have
different types, one of the values will be converted to the other type before
performing the operation. The conversion selects the "greater" of the two
types, in the following order (higher is "greater"):
</p>
<table class="indent">
<tr><td class="center narrow">&uarr;</td><td>Float</td></tr>
@@ -452,7 +451,7 @@
</table>
<p>
For example, if an operation contains both a signed word and a float, the
signed word value is first converted to float.
signed word value is converted to float before performing the operation.
</p>
<p>
Operators have assigned precedence that specifies the order of operations.
@@ -467,12 +466,14 @@
<p>
The following operators may be used in expressions. Groups listed higher have
higher precedence and happen before groups listed lower. Operators within
groups have the same precedence and are processed in the order they appear in
the expression from left to right.
groups have the same precedence and are processed according to the order in
which they appear in the expression: right-to-left for unary operators,
left-to-right for binary operators.
</p>
<table class="indent bordered">
<tr>
<td class="mono open">~</td>
<td rowSpan="18" class="middle">Unary</td>
<td class="mono open op1">~</td>
<td class="open">Not Bitwise</td>
<td class="open">Cannot be used with a float value.</td>
</tr>
@@ -562,7 +563,8 @@
<td>The binary value is not modified.</td>
</tr>
<tr>
<td class="mono open">/</td>
<td rowSpan="20" class="middle">Binary</td>
<td class="mono open op1">/</td>
<td class="open">Divide</td>
<td class="open">Zero divisor yields zero as result.</td>
</tr>
@@ -589,17 +591,17 @@
<tr>
<td class="mono open">&lt;&lt;</td>
<td class="open">Shift Left</td>
<td class="open">Cannot be used with a float value.</td>
<td class="open">Cannot be used with float values.</td>
</tr>
<tr>
<td class="mono open">&gt;&gt;</td>
<td class="open">Shift Right Arithmetic</td>
<td class="open">Cannot be used with a float value.</td>
<td class="open">Cannot be used with float values.</td>
</tr>
<tr>
<td class="mono">&gt;&gt;&gt;</td>
<td>Shift Right Logical</td>
<td>Cannot be used with a float value.</td>
<td>Cannot be used with float values.</td>
</tr>
<tr>
<td class="mono open">&gt;</td>
@@ -634,17 +636,17 @@
<tr>
<td class="mono">&amp;</td>
<td>And Bitwise</td>
<td>Cannot be used with a float value.</td>
<td>Cannot be used with float values.</td>
</tr>
<tr>
<td class="mono">^</td>
<td>Exclusive Or Bitwise</td>
<td>Cannot be used with a float value.</td>
<td>Cannot be used with float values.</td>
</tr>
<tr>
<td class="mono">|</td>
<td>Or Bitwise</td>
<td>Cannot be used with a float value.</td>
<td>Cannot be used with float values.</td>
</tr>
<tr>
<td class="mono">&amp;&amp;</td>
@@ -691,6 +693,13 @@
<td>Performs a halfword read of the specified signedness.</td>
</tr>
</table>
<p>
Reads are subjected to the alginment restrictions of the Virtual Boy's CPU:
the lowest bit of the address is ignored for halfword reads, and the lowest
two bits of the address are ignored for word reads.
</p>
<h1>&nbsp;</h1>
</body>
</html>