Open barrym95838 opened 3 years ago
This is vastly improved, because ENTER happens all the time! Dropping 6 clocks and 7 bytes is awesome! I don't completely trust it yet, but the brevity of code is greatly appreciated.
I count only 4 clocks and 1 byte of improvement (from finding an arrangement that loses the CLC and replaces INY INY with ADC #2), hence my choice of the word "slightly" :-).
Hmm ... my suggested improvement tries to duplicate the behavior of your original ENTER, but it could be that both are vulnerable to a JSR ENTER that the compiler lays down at $xxFC, because that would trigger the JMP ($xxFF) bug inside your NEXT. If you haven't already done so, you gotta somehow make sure that never happens.
ENTER/EXIT may presume that the compiler didn't bag us, in the same manner that NEXT presumes that page-hopping was properly handled by the compiler
On Wed, Dec 30, 2020 at 3:51 PM barrym95838 notifications@github.com wrote:
Hmm ... my suggested improvement tries to duplicate the behavior of your original ENTER, but it could be that both are vulnerable to a JSR ENTER that the compiler lays down at $xxFC, because that would trigger the JMP ($xxFF) bug inside your NEXT. If you haven't already done so, you gotta somehow make sure that never happens.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chitselb/pettil/issues/79#issuecomment-752754478, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZ6TIG4VVLQWAOBLLJKSLSXOHFTANCNFSM4T6JBG3Q .
Can we improve enter a tiny bit by taking advantage of the likelihood that our IP won't wrap past $FFFF?