Important note: even if you have already done this, please make sure you have the latest version of XC=BASIC. The code published on the following pages may not work with earlier versions.
You'll need the following tools to write a game in XC=BASIC:
If you have successfully downloaded and installed everything, just start Textadept and type in a single Hello World program, then save it as hello_world.bas:
If you had set up the XC=BASIC language module in Textadept, you can compile the above program with simply pressing CTRL + SHIFT + R. Textadept will run the xcbasic64 compiler and display its output:
> xcbasic64 "hello_world.bas" "hello_world.prg" -l"hello_world.list" Memory information: =================== BASIC loader: $800 - $80c Library : $80d - $add Code : $ade - $b0d Data : $b0e - $b19 Variables* : $b1a - $b1b =================== *: uninitialized segment Complete. (0) > exit status: 0
If compiling using the keyboard shortcut didn't work for you for some reason, you can compile the program by executing the following command in the command line (you might need to write xcbasic64.exe on Windows):
xcbasic64 "hello_world.bas" "hello_world.prg"
This command will take hello_world.bas as input and create hello_world.prg as output.
Now that the program is compiled, close the Message Buffer tab in Textadept using CTRL + W and press CTRL + R to run the compiled program. This will invoke the VICE Emulator that will load and run the program. Alternatively, you can just run VICE and manually load and run the .prg file. In any way, the result will be the following:
Hooray, it works! You have successfully set up the XC=BASIC development environment.
We will start planning the game on the next page.