* simops.c (trace_output): Properly align accumulator output.
(OP_3{0,2,4}00): Properly parenthesize test expression. Add error
if shift count is too high.
+ (OP_4E{00,02,04,20,22,40,42}): Make tests agree with book.
Fri Sep 6 17:56:17 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
OP_4E04 ()
{
trace_input ("exef0f", OP_VOID, OP_VOID, OP_VOID);
- State.exe = (State.F0) ? 0 : 1;
+ State.exe = (State.F0 == 0);
trace_output (OP_FLAG);
}
OP_4E24 ()
{
trace_input ("exef0t", OP_VOID, OP_VOID, OP_VOID);
- State.exe = State.F0;
+ State.exe = (State.F0 != 0);
trace_output (OP_FLAG);
}
OP_4E40 ()
{
trace_input ("exef1f", OP_VOID, OP_VOID, OP_VOID);
- State.exe = (State.F1) ? 0 : 1;
+ State.exe = (State.F1 == 0);
trace_output (OP_FLAG);
}
OP_4E42 ()
{
trace_input ("exef1t", OP_VOID, OP_VOID, OP_VOID);
- State.exe = State.F1;
+ State.exe = (State.F1 != 0);
trace_output (OP_FLAG);
}
OP_4E00 ()
{
trace_input ("exefaf", OP_VOID, OP_VOID, OP_VOID);
- State.exe = (State.F0 | State.F1) ? 0 : 1;
+ State.exe = (State.F0 == 0) & (State.F1 == 0);
trace_output (OP_FLAG);
}
OP_4E02 ()
{
trace_input ("exefat", OP_VOID, OP_VOID, OP_VOID);
- State.exe = (State.F0) ? 0 : (State.F1);
+ State.exe = (State.F0 == 0) & (State.F1 != 0);
trace_output (OP_FLAG);
}
OP_4E20 ()
{
trace_input ("exetaf", OP_VOID, OP_VOID, OP_VOID);
- State.exe = (State.F1) ? 0 : (State.F0);
+ State.exe = (State.F0 != 0) & (State.F1 == 0);
trace_output (OP_FLAG);
}
OP_4E22 ()
{
trace_input ("exetat", OP_VOID, OP_VOID, OP_VOID);
- State.exe = (State.F0) ? (State.F1) : 0;
+ State.exe = (State.F0 != 0) & (State.F1 != 0);
trace_output (OP_FLAG);
}