[Main]
Title=Infix Operators

[Top]
<U>Infix operators</U> take two arguments, one on either side.  Operators
have precedence, but operations with equal precedence are performed left
to right.  Apart from <CODE>+</CODE> or <CODE>-</CODE>, both arguments must be
absolute, and the result is absolute.
<OL>
<LI>
Highest Precedence
<BR><BR>
<DL>
<DT><B>*</B>
<DD><U>Multiplication</U>.
<BR><BR>
<DT><B>/</B>
<DD><U>Division</U>.  Truncation is the same as the C operator <CODE>/</CODE>.
<BR><BR>
<DT><B>%</B>
<DD><U>Remainder</U>.
<BR><BR>
<DT><B>&lt;</B>
<BR><B>&lt;&lt;</B>
<DD><U>Shift Left</U>.  Same as the C operator <CODE>&lt;&lt;</CODE>.
<BR><BR>
<DT><B>&gt;</B>
<BR><B>&gt;&gt;</B>
<DD><U>Shift Right</U>.  Same as the C operator <CODE>&gt;&gt;</CODE>.
</DL>
<BR>
</LI>
<LI>
Intermediate precedence
<BR><BR>
<DL>
<DT><B>|</B>
<DD><U>Bitwise Inclusive OR</U>.
<BR><BR>
<DT><B>&amp;</B>
<DD><U>Bitwise AND</U>.
<BR><BR>
<DT><B>^</B>
<DD><U>Bitwise Exclusive OR</U>.
<BR><BR>
<DT><B>!</B>
<DD><U>Bitwise OR NOT</U>.
</DL>
<BR>
</LI>
<LI>
Low Precedence
<BR><BR>
<DL>
<DT><B>+</B>
<DD><U>Addition</U>.  If either argument is absolute, the result has the section of
the other argument.  You may not add together arguments from different
sections.
<BR><BR>
<DT><B>-</B>
<DD><U>Subtraction</U>.  If the right argument is absolute, the
result has the section of the left argument.
If both arguments are in the same section, the result is absolute.
You may not subtract arguments from different sections.
<BR><BR>
<DT><B>==</B>
<DD><U>Is Equal To</U>.
<DT><B>&lt;&gt;</B>
<DD><U>Is Not Equal To</U>.
<DT><B>&lt;</B>
<DD><U>Is Less Than</U>.
<DT><B>&gt;</B>
<DD><U>Is Greater Than</U>.
<DT><B>&gt;=</B>
<DD><U>Is Greater Than Or Equal To</U>.
<DT><B>&lt;=</B>
<DD><U>Is Less Than Or Equal To</U>.
<BR><BR>
The comparison operators can be used as infix operators.  A true results has a
value of -1 whereas a false result has a value of 0.  Note, these operators
perform signed comparisons.
</DL>
<BR>
</LI>
<LI>
<DL>
<DT><B>&amp;&amp;</B>
<DD><U>Logical AND</U>.
<BR><BR>
<DT><B>||</B>
<DD><U>Logical OR</U>.
<BR><BR>
These two logical operations can be used to combine the results of sub
expressions.  Note, unlike the comparison operators a true result returns a
value of 1.  Also note that the logical
OR operator has a slightly lower precedence than logical AND.
</DL>
</LI>
</OL>
In short, it's only meaningful to add or subtract the <I>offsets</I> in an
address; you can only have a defined section in one of the two arguments.
