Welcome to the Yap Programming Language! A BASIC replacement language for the Commodore 128 microcomputer.
You need to have the following software installed on your development system:
- Copy the contents of
CMakeUserPresets.json.template
to a newCMakeUserPresets.json
file and add the absolute path to the LLVM/Clang compiler binary on your system as the value ofCMAKE_C_COMPILER
. - Copy the contents of
.env.template
to a new.env
file, and setCC65_PATH
to the path to the location ofcc65
on your system. Also, setLLVM_BIN_PATH
to the location of thebin/
directory that contains the LLVM binaries.
To lint the project, run:
make lint
This will run ClangTidy
twice on the source code: Once with respect to the C99 standard for the Commodore target, and
once with respect to the CMake compilation database for the native target.
To format the project according to the configured style, run:
make format
This will run ClangFormat
on the source code.
To build the native binaries, run the yali-native
run configuration in CLion, either with the native-debug-local
or
native-release-local
preset selected.
To build the Commodore binary, run the build
run configuration in CLion.
The project can also be built on the command line.
To build the Commodore 128 debug target, run:
make
You can also set the BUILD_TYPE
variable to Release
to build the target without debugging features enabled:
make BUILD_TYPE=Release
If you want to remove all build files before creating a new build, run:
make clean
cmake --preset native-debug-local
cmake --build build-native-debug
cmake --preset native-release-local
cmake --build build-native-release
Tests can be run either in CLion by running the All CTest
configuration or on the command line by running:
make test
If the above command is run on the command line, an additional coverage report will be generated in
build-native-debug/coverage/
.
Open the index.html
file in a browser to view the report.
x128 build-c128-release/yali.prg