How to switch graphic modes on the Commodore C128
The C128 had various chips to display different kinds of graphics that man just stuck to the standard 40 column text display for “ease of use” and let their software handle the rest. To appreciate why...
View ArticleHow to use the Commodore C128 in 2MHz FAST mode
The C128 could run twice as fast as its predecessor, the legendary C64. All you had to do was issue the FAST command, or switch back with the SLOW command to its default speed (1MHz). One drawback of...
View ArticleHow to load a .PRG file in VICE
Usually you’d attach a disk image to the VICE emulator and load one of several files from your virtual disk. Occasionally though you’ll come across single files ending in .PRG – those are the files...
View ArticleHow to set the time on your Commodore C64 / C128
Did you know that the Commodore computers had a built-in clock? It wasn’t an exact science, and it didn’t show the date, but it was able to display a 24hr clock. It did this by counting how many...
View ArticleHow to load and save binary data on the C128 and Plus/4
Thanks to BASIC 7.0’s powerful commands we can load and save arbitrary sections of memory to disk using BLOAD and BSAVE. This was useful for dealing with machine code as well as raw image data. Both...
View ArticleHow to merge BASIC programmes on your Commodore C64, C128 and Plus/4
You can merge / combine / concatenate BASIC programmes on a Commodore computer. It’s often useful to develop shorter chunks of code and put them together for a larger app. Sadly there’s no built-in...
View ArticleHow to locate and set the cursor on your Commodore C128
Sadly the Commodore machines don’t offer a routine to locate or set the current cursor position via BASIC. There is however a Kernel routine named PLOT which can do this in Machine Language. Here’s how...
View ArticleHow to use SD2IEC: a quick command reference
I’ve ordered an SD2IEC a few weeks ago from Nic over at http://sd2iec.co.uk. It’s an SD card reader for Commodre computers and emulates many features of the 1541 Floppy Disk Drive. I went for the...
View ArticleThe evolution of Flow Control in Commodore BASIC
When I had a C64 back in the days, the only IF/THEN statement we could create in BASIC v2 was just that: IF and THEN. There was no ELSE, and everything had to be on a single line. It was the only flow...
View ArticleHow to split a long string into separate words in Commodore BASIC
Here’s a quick word splitter routine for CBM BASIC. It takes phrase and “explodes” all words into an array, removing spaces. Feel free to adopt it for your own needs. 10 rem word splitter 20 rem splits...
View ArticleHow to switch the Commodore 1571 into 1541 mode and back
The Commodore 1571 floppy drive powers up in compatibility mode and behaves just like a 1541 drive – unless a C128 is connected and sends it a fast serial transfer. They did this because otherwise the...
View ArticleHow to create sequential files on your Commodore C128
Sequential files are files to which we can write arbitrary data and read it back later. We can even append data to the file later without having to re-write the whole file. This works with the...
View ArticleHow to create relative data files on your Commodore 128
The CBM DOS can write “relative data” onto disk, based on individual records. The advantage is that all space is allocated once and then randomly accessed if and when it’s needed – much like the tracks...
View ArticleHow to save data to your C128 RAM Expansion Unit (REU)
With a RAM Expansion Unit (REU), the Commodore 128 could address up to 512k of data. That was huge in the late eighties! All you needed was one of those REUs, plug it into your cartridge port, and so...
View ArticleHow to use direct block access commands in Commodore DOS
We can access each sector’s raw data on Commodore disk drives with direct block access commands. Supported drives include the 1541, 1571, the VICE emulator as well as the SD2IEC card reader (for the...
View ArticleHow to print numbers as columns in Commodore BASIC
In this episode I’m demonstrating how to print numbers in evenly spaced columns in Commodore BASIC. On the C128 and the Plus/4 we can use a nifty little function called PRINT USING for this, with...
View ArticleWorking with Keyboard Input in Commodore BASIC
In this episode I’ll show you three ways to take user input from the keyboard in Commodore BASIC. The INPUT and GET commands work on all systems, while the GETKEY command only works on the Plus/4 and...
View ArticleMatching Lottery Numbers on the Commodore 64
In this episode I’m amending my previous lottery number generator to take six lucky numbers from the user to match against the randomly drawn numbers from the Commodore 64. This will allow us to...
View ArticleLottery Statistics in Commodore BASIC
In this episode I’m adding statistics support to my previous lottery generator on the Commodore 64. I’ll add an array that is updated if my supplied numbers have been matched, and how many times over...
View ArticleWriting HELLO WORLD in Machine Language on the Commodore 128
The Commodore 128 has a built-in machine language monitor which makes it ideal for ML development. However, most (or pretty much all) documentation on this subject is geared towards the Commodore 64,...
View Article
More Pages to Explore .....