Passing Code Pointers as Data in Amstrad CPC BASIC
One of my secret coding pleasures is passing a function as a parameter to a subroutine. Most modern languages have what’s called ‘first class code’. That means that you can assign the address of a function to a variable, store it in an array, and pass it as a parameter to a function. This enables …. Read More
How Amstrad CPC BASIC Compresses Error Messages
Amstrad CPC BASIC saves a few bytes by using some interesting compression in the way it stores error messages. Let’s take a look at how it works and how much space it saves. Below is the table of error messages. The messages are stored in what I refer to as ASCII7 format – bit 7 …. Read More
Variables, DEF FN Definitions and Arrays Storage in Amstrad CPC/Locomotive BASIC
(The information in this article comes from reverse engineering Amstrad CPC BASIC. You can find the reverse engineered source code in my CPC BASIC source code repository. You can find an example BASIC program which ‘walks’ the storage areas in the Examples folder of that repository. See also the CPC Wiki page for more technical …. Read More
My RetroChallenge 2021/10 Project – Amstrad CPC Firmware
My entry for RetroChallenge 2021/10 is to publish reverse engineered versions of the Amstrad CPC firmware ROMs which can be modified and assembled. In this post I want to explain why why I’m doing this. The first reason is a personal one: I have several projects on the go which would benefit from this. The …. Read More