Skip to content

Mechanism to preserve ZP variables before they are overwritten #390

@JPEWdev

Description

@JPEWdev

The OS and/or BASIC may put useful variables for a program into the Zero Page, and it would be convenient if there was a way to guarantee these variables were preserved, even if llvm-mos would have normally assigned a zero page variable to their address.

As an example, the C64 places the device number from a load in 0xBA, so by using this you can load data from the same device as the user specified, instead of hard coding etc. It would be nice if there was a way to either A) tell llvm-mos to not use this specific address for any other zero page variables, or B) run some code to preserve it before the zero page is overwritten.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions