Addi needs to set the carry
This commit is contained in:
parent
308f64d3ac
commit
2254cd90a9
|
@ -9,6 +9,7 @@ Mon Sep 9 13:27:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
|||
(trace_{input,output}): Support OP_FLAG_OUTPUT.
|
||||
(OP_31000000): This ld2w varient is a 16-bit memory reference, not
|
||||
an 8-bit memory reference instruction for tracing purposes.
|
||||
(OP_201): Addi needs to set the carry.
|
||||
|
||||
Fri Sep 6 17:56:17 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
|
||||
|
||||
|
|
|
@ -584,10 +584,15 @@ OP_17001202 ()
|
|||
void
|
||||
OP_201 ()
|
||||
{
|
||||
uint tmp = State.regs[OP[0]];
|
||||
if (OP[1] == 0)
|
||||
OP[1] = 16;
|
||||
trace_input ("addi", OP_REG, OP_CONSTANT16, OP_VOID);
|
||||
State.regs[OP[0]] += OP[1];
|
||||
if (tmp > State.regs[OP[0]])
|
||||
State.C = 1;
|
||||
else
|
||||
State.C = 0;
|
||||
trace_output (OP_REG);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue