User Tools

Site Tools





Sidebar

blog:2020-04-19

back to blog...

BASIC Enhancements For Your C64

CBMThe Commodore C64 comes with a pretty powerful and easy-to-use architecture, based on BASIC 2.0. But, have you ever wished that the C64 had a few more powerful commands, like those found in BASIC 7.0 (which can be found in the C128 and TED machines)? Well, the ever helpful publication Loadstar actually released some ingenious add-ons to the C64's BASIC 2.0 during it's many years of production.

In this post, I am going to take a look a four of (what I consider to be) the best of these BASIC enhancements that were made available to Loadstar subscribers. The utilities I'll be looking at include: NuBASIC, B +, BASIC 4, and Star BASIC.

You can download a disk image with all of these advanced BASIC utilities here: The Basics.d64. Each of these utilities came with a demo, which I've also included on the disk.

I've also produced PDFs of the user guides that was provided with each of the programs, which you can freely download here: B Plus.pdf BASIC 4.pdf NuBASIC.pdf Star BASIC.pdf

If you'd like to have these manuals printed all together in a nicely bound book, I've also created this book that you can buy from Lulu: The Four BASICs. I've also blogged a bit about the copy I printed of it for myself, here:Sept. 8th, 2023.

NuBASIC

Written by: Joe Garret
Published by: Loadstar, Issue #29, 1986

Advantages: small, commands are easy to understand and use, focuses on screen presentation.

Load NuBASIC with the command LOAD “NUBASIC”,8,1, then execute with SYS49152 and finally NEW. NuBASIC provides you with nine additional BASIC commands. You can execute them in either at the command prompt or in your programs.

As with all of the advanced BASIC programs covered in this article, if you wish to share the programs you create with the NuBASIC commands, you will have to include the NuBASIC file on your distributed disk and include a line in your program to load it and execute the SYS command, like this:

10 LOAD"NUBASIC",8,1
20 SYS49152

The bulk of NuBASIC's commands focus on making it easy to create more dynamic screens, like windows, scrolling, and character placement. So, if you want an easy way to include some interesting menus and screen effects in your programs, then NuBASIC should suite you well. It's small and doesn't take up too much BASIC RAM.

B +

Written by: Jon Mattson
Published by: Loadstar, Issue #66, 1989

Advantages: robust list of additional commands, does not take up any BASIC memory, stays active after RUN/STOP - RESTORE.

Load B+ with the command, LOAD“B+”,8,1:NEW then activate it with SYS49152. B+ adds 36 new commands that help you avoid many of those annoying POKE and PEEK commands BASIC 2.0 forces you to endure. There are also some special effects commands that are normally only available when programming in machine language.

To share a program you've written with B+, you will need to include the “B+” prg on your floppy disk and include a couple of lines at the beginning of your program to load it into memory, like this:

10 IF A=0 THEN A=1:  LOAD "B+",8,1
20 SYS49152

The nice thing about using B+ is that it doesn't take up a single byte of available BASIC memory, so you can utilize all of the BASIC RAM for your program.

Some of the more advance functions provide by B+ include Hi-Res screen drawing, sprite controls, saving up to four different screens in their own buffer for instant recall later on, creation of windows, and so much more.

BASIC 4

Written by: Rick Nash
Published by: Loadstar, Issue #65, 1989

Advantages: many commands dedicated to control text screens, ability to embed itself into programs, very well documented.

To start using BASIC 4, type in LOAD “BASIC 4”,8 and then RUN. You now have access to BASIC 4's 50 additional commands to BASIC 2.0 to exploit to your needs.

Unlike the other BASIC extensions in this article, distributing a program you've written with BASIC 4 is one of the unique features of this utility. When you've completed your program, you save it with BASIC 4's command CSAVE, like this: CSAVE “MYPROGRAM”,8. What this will do is compile and save a copy of BASIC 4 with your program into one PRG file. So, when you want to run your program, all you need to do is LOAD it from the disk and it will automatically put BASIC 4 into the computer's memory and then run your program.

A program that is CSAVE'd, cannot be LISTed, all you'll see is the message:

C64 EXTENDED BASIC
COPYRIGHT (C) 1989, BY RICK NASH

So, before you CSAVE, make sure you do a regular SAVE of your program so you will have the original that you can still make changes to.

There are some really useful data management commands that BASIC 4 provides, like sorting and searching data arrays. You can even save entire screens of text into memory or even to floppy disk, for retrieval at a later time. I thought that was really cool.

BASIC 4 also has some really well written documentation. All of the commands are explained in detail, along with excellent examples on how to use them.

Star BASIC

Written by: Steven Emsley
Published by: Loadstar, Issue #90, 1991

Advantages: wide range of commands, expanded DOS, includes sprite and SID commands.

To get Star BASIC up and running you first LOAD “STAR BASIC”,8,1, then activate it with SYS35792 followed by CLS. Once it's up and running, you have access to it's over 70 lists of commands that span the C64's entire list of resources. You have commands for manipulating data, display graphics and text, disk functions, sound and music, and even an easy way of assigning tasks to the C64's function keys.

To distribute programs written with Star BASIC, you will need to provide its PRG file along with your written program. As with NuBASIC and B+, you can then add the required lines of code into your program to load and activate Star BASIC, as described above.

The one thing you have to be careful when using Star BASIC is when using RUN/STOP - RESTORE. If you do this at any point, Star BASIC will have to be re-initialized by using SYS51200. Also, unlike the other BASIC expanders in this article, Star BASIC's commands all use an indicator at the beginning of the command, that being the exclamation point. So, to do a disk directory, you need to type !DIR. If you don't like using the exclamation point, Star BASIC allows you to change it to something else, by using a special POKE command. This is explained in the manual.

The power of Star Basic lies in the number of extended commands it provides. And what makes it even more unique is that it provides it's own DOS wedge, adding 19 commands to disk operations alone.

Star BASIC does many things that you usually have to perform with those dreaded POKE and PEEK commands, as well as provides enhanced commands for sprite and sound controls.

There's really a lot to discover with Star BASIC, but thankfully, the documentation covers all of the features well.


1004 visitors

blog/2020-04-19.txt · Last modified: 2023/10/15 20:47 by David