Category: Z80

ASM Diaries 2: A Hack for Case Insensitive Identifiers

0 commentsASM DiariesAssemblerquiche-z80Z80asm-diariesassemblerquiche-z80stringsZ80

This article will make a lot more sense with an ASCII table to look at. I don’t have quick access to a copyright free one, but you view one at https://www.asciitable.com Case insensitive comparisons in assembler are hard work. The design of the ASCII codes splits letters into two blocks. That requires your code to ….  Read More

ASM Diaries 1: Type Identifier Equals Data Length

0 commentsAmstrad CPCASM DiariesAssemblerBASICquiche-z80Z80Amstrad CPCasm-diariesassemblerquiche-z80Z80

A few years ago I reverse engineered Amstrad CPC BASIC. I’m currently writing a compiler for my Pascal-like language (called Quiche). This is an occasional series of articles where I note observations about assembly programming and, in particular, Z80 assembly language. This is a trick I learnt while reverse engineering the Amstrad BASIC interpreter. The ….  Read More

Passing Code Pointers as Data in Amstrad CPC BASIC

0 commentsAmstrad CPCAssemblerBASICUncategorizedZ80Amstrad CPCassemblerbasiccodingZ80

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