Skip to content

A library should be written to save and restore BASIC ZP on commodore #343

Open
@mysterymath

Description

@mysterymath

For context, see #341 and #315.

Our current commodore targets clobber BASIC ZP. This does seem a reasonable default behavior for a C program: it's like BASIC, but unlike the KERNAL, so it should clobber BASIC but preserve the KERNAL. The commodore targets used to exit by returning to a possibly broken BASIC, but #341 changes them to infinitely loop instead.

It may still be desirable to be able to return to BASIC. This would either require not using the BASIC area, or saving and restoring the BASIC ZP to a buffer. The latter seems more appropriate for a C program. Accordingly, we should see if there's a way to create a library, includable with -lsave-basic, that can save and restore ZP before and after main, across the various commodore targets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions