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

Backup and restore monitor zero page usage #134

Conversation

stefan-b-jakobsson
Copy link
Collaborator

Hi,

This takes a backup of zero page addresses used by the monitor and restores them on exit, partly solving issue #111.

It works fine if you exit the monitor with the .X command. It will not work if you reset the computer. I'm not sure this is a good idea - or good enough an implementation. Marking it as draft.

@mooinglemur
Copy link
Collaborator

I think this approach is fine.

@stefan-b-jakobsson
Copy link
Collaborator Author

OK, I have to verify that it actually works as advertised.

@mooinglemur mooinglemur linked an issue Jul 22, 2023 that may be closed by this pull request
@mooinglemur
Copy link
Collaborator

@stefan-b-jakobsson

Giving this some further thought, perhaps we should instead just switch to using BASIC ZP

We can steal exactly 11 bytes from $D4-$DE, the first two of which are poker/linnum, used for several things including address parsing, and the other 9 tempst are for 3 temporary pointers to strings when doing BASIC string evaluation.

For the remaining single ZP address we need, we can reuse forpnt at $E5, and if we need one more, we can steal $E6 as well. I think we will need it as I want to allow setting the rom/ram banks separately rather than having one variable for both.

What do you think?

@stefan-b-jakobsson
Copy link
Collaborator Author

At first glance, it sounds great. As far as I remember it uses 12 bytes from the zero page.

@mooinglemur
Copy link
Collaborator

Superseded by #173

@mooinglemur mooinglemur closed this Oct 6, 2023
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.

MONITOR clobbers 'free' ZP locations
2 participants