mirror of
https://github.com/thiagoauler/apple1.git
synced 2025-01-14 09:30:21 +00:00
correcting subtraction
This commit is contained in:
parent
258a9f6692
commit
bac269c9c2
@ -308,21 +308,24 @@ void cmp()
|
||||
{
|
||||
// compare memory with accumulator
|
||||
fetch_operand();
|
||||
subtractor(ac, operand);
|
||||
operand = operand ^ 0xFF;
|
||||
adder(ac, operand);
|
||||
}
|
||||
|
||||
void cpx()
|
||||
{
|
||||
// compare memory and index x
|
||||
fetch_operand();
|
||||
subtractor(x, operand);
|
||||
operand = operand ^ 0xFF;
|
||||
adder(x, operand);
|
||||
}
|
||||
|
||||
void cpy()
|
||||
{
|
||||
// compare memory and index y
|
||||
fetch_operand();
|
||||
subtractor(y, operand);
|
||||
operand = operand ^ 0xFF;
|
||||
adder(y, operand);
|
||||
}
|
||||
|
||||
void dec()
|
||||
|
Loading…
x
Reference in New Issue
Block a user