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

KERNAL API: BASIC command and function extensions #135

Open
dansanderson opened this issue Jun 12, 2024 · 0 comments
Open

KERNAL API: BASIC command and function extensions #135

dansanderson opened this issue Jun 12, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request release-1.0 Considered important for the 1.0 platform release

Comments

@dansanderson
Copy link
Collaborator

dansanderson commented Jun 12, 2024

BASIC 10 has an internal vector-based API for looking up commands and functions. It may be possible to formalize and document (and, if needed, repair) this as an external BASIC extension API, such that third-party software packages can add BASIC commands and functions while remaining compatible with future ROM revisions.

Historically, adding commands has been a popular use case for monkeypatching the C64 ROM, and monkeypatching the MEGA65 KERNAL is not feasible while it is under active development. The existing keyword lookup mechanisms have the potential to be inexpensively formalized for similar third-party extensions, without monkeypatching.

Doing this sooner rather than later will help us figure out what other parts of the KERNAL/BASIC need to be part of the API surface to make useful extensions, e.g. accessors for state variables. It currently looks like significant parts of the parser would need to be formalized to make this feasible: keywords are responsible for parsing their own arguments.

See b65.src starting $02f7.

@dansanderson dansanderson added documentation Improvements or additions to documentation enhancement New feature or request release-1.0 Considered important for the 1.0 platform release labels Jun 12, 2024
@dansanderson dansanderson changed the title KERNAL API: BASIC extensions KERNAL API: BASIC command and function extensions Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request release-1.0 Considered important for the 1.0 platform release
Projects
None yet
Development

No branches or pull requests

1 participant