mirror of https://github.com/mgcaret/of816.git
resolve #4, h/t ksherlock
This commit is contained in:
parent
30a8a259c7
commit
7f57ba6f06
|
@ -8,14 +8,9 @@
|
||||||
lda STACKBASE+6,x
|
lda STACKBASE+6,x
|
||||||
eor STACKBASE+2,x
|
eor STACKBASE+2,x
|
||||||
bpl samesign
|
bpl samesign
|
||||||
lda STACKBASE+4,x
|
lda STACKBASE+2,x ; Kelvin's excellent solution
|
||||||
cmp STACKBASE+0,x
|
sec
|
||||||
lda STACKBASE+6,x
|
rol
|
||||||
sbc STACKBASE+2,x
|
|
||||||
bvs :+
|
|
||||||
eor #$8000
|
|
||||||
: sec ; make sure we don't set Z
|
|
||||||
rol ; move comparison into carry
|
|
||||||
rts
|
rts
|
||||||
samesign: lda STACKBASE+6,x
|
samesign: lda STACKBASE+6,x
|
||||||
cmp STACKBASE+2,x
|
cmp STACKBASE+2,x
|
||||||
|
|
Loading…
Reference in New Issue