Skip to content

Commit cfae3ac

Browse files
committed
fix ADC function typos
1 parent a2b6109 commit cfae3ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/opcodes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ void adc(byte d) {
5555
big += (p & 1); // add with Carry (A was computer just after this)
5656

5757
if (p & 0b00001000) { // Decimal mode!
58-
high = (old & $F0)+(d & $F0) // compute carry-less LSN
59-
if (((big & 0x0F) > 9)||(high != (big & $F0))) { // LSN overflow? was 'a' instead of 'big'
58+
high = (old & 0xF0)+(d & 0xF0); // compute carry-less LSN
59+
if (((big & 0x0F) > 9)||(high != (big & 0xF0))) { // LSN overflow? was 'a' instead of 'big'
6060
big += 6; // get into next decade
6161
}
6262
if (((big & 0xF0) > 0x90)||(big & 256)) { // MSN overflow?

0 commit comments

Comments
 (0)