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