16 episodes

Join Jay Versluis for tips and tricks on programming in BASIC and Assembly on vintage Commodore systems.

Jay's Commodore Podcast Jay Versluis

    • Technology

Join Jay Versluis for tips and tricks on programming in BASIC and Assembly on vintage Commodore systems.

    Discovered: Commodore 64C used in an auto repair shop (2018)

    Discovered: Commodore 64C used in an auto repair shop (2018)

    I’ve recently discovered a tweet that showed a Commodore 64C complete with green monitor and 1541-II drive, heavily dust covered, but still working and being used in a Polish Auto Shop. The picture itself was fascinating enough, but I’ve also discovered that it was a screen grab from a video – which I’m including here as well (had to replace the music with something royalty free).

    You can find the original article here: https://www.trojmiasto.pl/wiadomosci/Warszatat-samochodowy-zaslynal-dzieki-26-letniemu-komputerowi-Commodore-n106004.html

    The tweet I found is here: https://twitter.com/HistoryToLearn/status/928821265783250945

    Enjoy!!

    • 12 min
    How to write a text input routine in Commodore BASIC

    How to write a text input routine in Commodore BASIC

    In this screencast I’ll show you how to write your own INPUT routine in Commodore BASIC. This comes in handy when you want to reject certain keys from being used when asking users for keyboard input. In my example I’m going to allow all alpha characters (A-Z), as well as SPACE, RETURN and the DELETE key.

    Here’s the code:

    .gist table { margin-bottom: 0; }

    • 22 min
    Flashing Border Colors on the Commodore 128 in Machine Language

    Flashing Border Colors on the Commodore 128 in Machine Language

    In this episode I’ll show you how to create the iconic flashing borders on Commodore machines. Back in the day, when the system was loading, this was a nice way to indicate that the computer is busy doing something rather than being dead.

    I’ll show you the principle both in BASIC and in Machine Language on the C128. The VIC-II chip is the same on the C64 though, so this will also work on the Commodore 64.

    The same approach can be used on the Plus/4, however the addresses for the border and background colours are different (decimal 65305, or hex $FF19).

    The VIC-20 is another story, as the border and background colour are changed using the same address (decimal 36879, or hex $900F). This link may help though: http://www.sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?t=5905

    As always, enjoy 🙂

    • 8 min
    Programmatic Loops in Commodore BASIC

    Programmatic Loops in Commodore BASIC

    In this episode I’ll demonstrate how to use programmatic loops in Commodore BASIC.

    I’ll show you how to use the FOR/NEXT loop (available in all versions of Commodore BASIC), as well as the DO/WHILE loops (available on the Plus/4 and C128).

    Enjoy!

    • 11 min
    Flow Control in Commodore BASIC

    Flow Control in Commodore BASIC

    In this episode I’ll explain the concept of Flow Control in Commodore BASIC. It’s kind of a video update of a post I did a while ago.

    In essence, it means that we can tell the programme to take a different route in the code depending on a condition that’s met. We’ll explore the IF/THEN and ON… GOTO/GOSUB statements (available on all versions of Commodore BASIC), as well as the expanded IF/THEN/ELSE version (available on the C128 and Plus/4 only).

    In addition, I’ll also show you how to use the BEGIN and BEND clauses that were introduced with the C128.

    • 14 min
    How to run Commodore BASIC as a Scripting Language on macOS

    How to run Commodore BASIC as a Scripting Language on macOS

    Did you know you can run Commodore BASIC v2 on your Mac and Linux systems as a scripting language? It’s true – thanks to the marvellous efforts of Michael Steil and James Abbatiello. They’ve adapted the original BASIC v2 as featured on the VIC-20 and C64 with additional routines so that it works natively on modern machines. It’s ingenious!

    You can get the full source code on GitHub – it works a treat!

    For those who don’t quite know what to do with it, here are some instructions that’ll help you get CBM BASIC up and running on macOS.

    Download

    GitHub provides a convenient way to either clone a repository on your local machine if you have GitHub for Desktop installed, or you can download a ZIP file and unZIP it somewhere on your system. Once done, you should see a directory structure that looks exactly like the repo on GitHub.

    Compile

    You need a few utilities installed your your Mac to be able to compile files. Downloading Xcode will ptovide you with an excellent (and free) IDE as well as the command line tools needed to do that (gcc, make and several other goodies). You might be able to bring those components in using the Homebrew package manager.

    Using your Terminal app, navigate to your unZIPped folder. It includes a MAKEFILE so there’s no need to mess with any parameters. Enter “make” at the command prompt, and after a few moments you should have a file called “cbmbasic” without an extension in the same directory. That’s the binary for your Mac.

    To make it executable, we’ll have to tweak the file permissions – otherwise our operating system won’t be able to run it. We’ll do it using the chmod command:chmod +x ./cbmbasicYou can test if it works by calling the binary without any parameters like this:./cbmbasicIf all goes well you should see something like this:



    For easy access, copy the binary over to your /usr/bin directory. That’s where common command line utilities are installed on Mac and Linux systems. The added benefit is that the path to that folder is already in your local $PATH variable, and as such you can simply type “cbmbasic” from any location when you’re on the command line.

    Here’s how to copy the binary over (this will ask for your administrator password):sudo cp ./cbmbasic /usr/bin

    Using Direct Mode

    When you run the binary it will bring up something like the standard BASIC command prompt we’re used to seeing on the Commodore 64. There are however a few important differences between a C64 emulator and this implementation:



    * this is NOT an emulator

    * cursor keys DO NOT work

    * all commands typed in must be CAPITALISED



    Other than that, you can start typing like on a real machine. Be careful with certain POKE commands though as those may call system routines that might not be implemented.

    LOAD and SAVE commands have been tweaked to reference the command line structure. They work just fine, but will load and save files in Commodore file format (which is not clear text ASCII – more on that later). For example:LOAD"$"



    LIST



    0 "/Users/versluis/Desktop/cbmbasic" 00 2A

    4    "."                PRG  

    2    ".."               PRG  

    2    ".git"             PRG  

    567  "cbmbasic"         PRG  

    7350 "cbmbasic.c"       PRG  

    • 18 min

Top Podcasts In Technology

Listeners Also Subscribed To