reorder Alu3 instructions to deal with two-instruction literals
[fleet.git] / ships / Choice.ship
index 5ea93bb..eb56a40 100644 (file)
@@ -3,21 +3,18 @@ ship: Choice
 == Ports ===========================================================
 data  in:   in1
 data  in:   in2
-
 data  in:   in.swapIfZero
 data  in:   in.swapIfNonZero
 data  in:   in.swapIfNegative
 data  in:   in.swapIfPositive
 data  in:   in.swapIfNonNegative
 data  in:   in.swapIfNonPositive
-
 data  in:   in.muxIfZero
 data  in:   in.muxIfNonZero
 data  in:   in.muxIfNegative
 data  in:   in.muxIfPositive
 data  in:   in.muxIfNonNegative
 data  in:   in.muxIfNonPositive
-
 data  in:   in.deMuxIfZero
 data  in:   in.deMuxIfNonZero
 data  in:   in.deMuxIfNegative
@@ -32,34 +29,37 @@ data  out:  out2
 
 == TeX ==============================================================
 
-With judicious programming of its BenkoBoxes, this ship can be used to
-implement nearly all forms of selection and branching.
-
-When data is available at the in port, it is examined.  Which
-destination the datum has arrived on determines the *condition* the
-datum should be tested for and the *action* which should be taken if
-the condition holds true.
-
-The latter portion of the name of the destination (IfZero,
-If(Non)Positive, If(Non)Negative) determines the condition which the
-datum on the in port is tested for.  The former portion (mux, demux,
-swap) determines the *action* to be taken if the condition tests true.
-
-\begin{verbatim}
-  action   condition    effect
-  ------   ---------    -------------------------------
-  swap     false        in1->out1   in2->out2
-  swap     true         in2->out1   in1->out2
-  mux      false        in1->out1
-  mux      true         in2->out1
-  demux    false        in1->out1
-  demux    true         in1->out2
-\end{verbatim}
-
-In each case, the ship will wait for a datum to be available on all
-input ports (and only those ports) mentioned in the appropriate row of
-the "effect" column above, and will output them on the corresponding
-output ports.
+This ship needs to be updated to use opcode ports \cite{am25}.  For a
+general idea of what this ship is supposed to do, see \cite{am17}.
+
+%With judicious programming of its pumps, this ship can be used to
+%implement nearly all forms of selection and branching.
+%
+%When data is available at the in port, it is examined.  Which
+%destination the datum has arrived on determines the *condition* the
+%datum should be tested for and the *action* which should be taken if
+%the condition holds true.
+%
+%The latter portion of the name of the destination (IfZero,
+%If(Non)Positive, If(Non)Negative) determines the condition which the
+%datum on the in port is tested for.  The former portion (mux, demux,
+%swap) determines the *action* to be taken if the condition tests true.
+%
+%\begin{verbatim}
+%  action   condition    effect
+%  ------   ---------    -------------------------------
+%  swap     false        in1->out1   in2->out2
+%  swap     true         in2->out1   in1->out2
+%  mux      false        in1->out1
+%  mux      true         in2->out1
+%  demux    false        in1->out1
+%  demux    true         in1->out2
+%\end{verbatim}
+%
+%In each case, the ship will wait for a datum to be available on all
+%input ports (and only those ports) mentioned in the appropriate row of
+%the "effect" column above, and will output them on the corresponding
+%output ports.
 
 
 == Fleeterpreter ====================================================
@@ -210,6 +210,8 @@ public void service() {
 
 == Test ==============================================================================
 #skip
+#ship debug : Debug
+#expect 0
 
 == Contributors =========================================================
 Adam Megacz <megacz@cs.berkeley.edu>