x16lib - Library for BASIC and Assembly
Posted: Sat Feb 24, 2024 9:07 am
In order to make developing for x16 as easy and convenient as possible, I've started working on a library that goes far beyond what the kernal currently offers. It sits in a rambank of choice and offers the programmer easy to use functions for common tasks.
For BASIC it taps directly into the BASIC variable space to ensure maximum performance.
x16lib is fully documented and with ready to use examples.
The current version offers only a few functions. I would like the community to suggest functions that needs to be in this library. So if you have idea's please post them below.
Please download here:
The current version of x16lib has the following functions:
Printcenter
Print a string in the center of the screen on a specific line
Swapveralayers
Swap the z-order of layer0 and layer1 of vera
Highmem functions
Quickly and easily save and read strings in/from any highram rambank.
Fading
Fades out the screen to all black and fade the screen back to normal operatingmode
String functions
Several well know string functions: trim, ltrim, rtrim, tally, instr and split
Custom keyboard handler
Custom keyboard handler which enables to get the state of individual keys and therefor can work with simultanious keypresses.
NOTE: As the ROM-version of BASLOAD remaps all variable names, BASIC programs loaded via the ROM-version of BASLOAD will not be compatible with x16lib at this moment.
For BASIC it taps directly into the BASIC variable space to ensure maximum performance.
x16lib is fully documented and with ready to use examples.
The current version offers only a few functions. I would like the community to suggest functions that needs to be in this library. So if you have idea's please post them below.
Please download here:
The current version of x16lib has the following functions:
Printcenter
Print a string in the center of the screen on a specific line
Swapveralayers
Swap the z-order of layer0 and layer1 of vera
Highmem functions
Quickly and easily save and read strings in/from any highram rambank.
Fading
Fades out the screen to all black and fade the screen back to normal operatingmode
String functions
Several well know string functions: trim, ltrim, rtrim, tally, instr and split
Custom keyboard handler
Custom keyboard handler which enables to get the state of individual keys and therefor can work with simultanious keypresses.
NOTE: As the ROM-version of BASLOAD remaps all variable names, BASIC programs loaded via the ROM-version of BASLOAD will not be compatible with x16lib at this moment.