correcting subtraction
This commit is contained in:
parent
258a9f6692
commit
bac269c9c2
|
@ -308,21 +308,24 @@ void cmp()
|
||||||
{
|
{
|
||||||
// compare memory with accumulator
|
// compare memory with accumulator
|
||||||
fetch_operand();
|
fetch_operand();
|
||||||
subtractor(ac, operand);
|
operand = operand ^ 0xFF;
|
||||||
|
adder(ac, operand);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpx()
|
void cpx()
|
||||||
{
|
{
|
||||||
// compare memory and index x
|
// compare memory and index x
|
||||||
fetch_operand();
|
fetch_operand();
|
||||||
subtractor(x, operand);
|
operand = operand ^ 0xFF;
|
||||||
|
adder(x, operand);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpy()
|
void cpy()
|
||||||
{
|
{
|
||||||
// compare memory and index y
|
// compare memory and index y
|
||||||
fetch_operand();
|
fetch_operand();
|
||||||
subtractor(y, operand);
|
operand = operand ^ 0xFF;
|
||||||
|
adder(y, operand);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dec()
|
void dec()
|
||||||
|
|
Loading…
Reference in New Issue