Commodore PET BASIC Tokenizer: A Curious Bug

2025-07-05
Commodore PET BASIC Tokenizer: A Curious Bug

This article explores a quirky bug in early Commodore PET BASIC tokenizers stemming from their whitespace handling. Early BASIC interpreters ignored spaces between keywords, leading to 'LET THEN' being interpreted as 'LETHEN', resulting in syntax errors. The article delves into the BASIC tokenization process, explaining why ignoring whitespace improved efficiency, and dissects the Commodore BASIC 1.0 tokenizer code. It ultimately reveals the root cause of the bug and its fix in later versions.

Read more
Development

Virtual Keypunch: A Retro Trip to the 'Big Iron' Era

2025-03-10
Virtual Keypunch: A Retro Trip to the 'Big Iron' Era

Remember punch cards? Now you can experience this retro programming method with 'The Virtual Keypunch,' a free online tool. Type your text, and it generates a simulated punch card image, supporting various card types (FORTRAN, COBOL, etc.) and even binary mode. It's not just a fun nostalgic experience; it offers developers a unique way to learn about early programming.

Read more
Development

Spinning Globe on a Commodore PET: A Retro 8-bit Dev Story

2025-01-11
Spinning Globe on a Commodore PET: A Retro 8-bit Dev Story

This post details the creation of a spinning globe animation demo on a Commodore PET, written in 6502 assembly. The author cleverly uses PETSCII characters and bit vector techniques to cram a 32x32 pixel world map into 4.8KB of memory, achieving surprisingly smooth animation. The article dives into the data structure design, projection algorithm, and optimization strategies, showcasing impressive programming skills and a passion for retro game development.

Read more