KERNAL API: BASIC and MATH jump table #134
Labels
documentation
Improvements or additions to documentation
enhancement
New feature or request
release-1.0
Considered important for the 1.0 platform release
Traditionally, Commodore BASIC makes its library of math routines available to ML programs via a jump table. This table also includes limited API access to the BASIC interpreter, for use by extensions. BASIC 65 has a similar jump table, but this is currently undocumented. We should formalize, test, and document this API.
Important note: Accessing BASIC routines requires that the BASIC CPU MAP be active, which hides most RAM from the CPU. At minimum, we need to document requirements for accessing BASIC from ML, including the MAP settings. For example, an ML program at $2014 that calls the cosine math routine would need to install a dispatch routine at $1600 that changes MAP, calls cos, then restores MAP, while preserving input and output arguments. This might be well served by a new KERNAL helper routine in $E000-$FFFF that can encapsulate the KERNAL MAP definitions.
See b65.src starting at $7f00.
The text was updated successfully, but these errors were encountered: