Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breaking] Make commodore family targets infinitely loop on exit #342

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

mysterymath
Copy link
Member

We currently take advantage of the BASIC ZP area, but commodore family
targets can only load programs from a BASIC environment. This makes it
intrinsically unsafe to exit by return, since it always returns to a
possibly-clobbered environment.

Instead, exiting by looping still allows a screen's worth of output to
be viewed, without possibly returning to a broken BASIC interpreter.
This is arguably a bugfix, but it's also a very significant change in
behavior, so I'm considering it a breaking change.

We should also have an optional library that saves and restores BASIC ZP
on entry-exit and exits via returning, but that shouldn't block this
change.

We currently take advantage of the BASIC ZP area, but commodore family
targets can only load programs from a BASIC environment. This makes it
intrinsically unsafe to exit by return, since it always returns to a
possibly-clobbered environment.

Instead, exiting by looping still allows a screen's worth of output to
be viewed, without possibly returning to a broken BASIC interpreter.
This is arguably a bugfix, but it's also a very significant change in
behavior, so I'm considering it a breaking change.

We should also have an optional library that saves and restores BASIC ZP
on entry-exit and exits via returning, but that shouldn't block this
change.
@mysterymath
Copy link
Member Author

See #341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant