The Turbo Rascal Syntax Error Programming Language

The Turbo Rascal Programming Language

At LemonSpawn, we truly believe that the world needs yet another programming language. Turbo Rascal is a strongly typed language that mimics Pascal, but follows standards like your mom. It was developed, mostly while intoxicated, because the author was fascinated by MOS6502 assembly language but tired of trying to maintain a consistent overview of assembler source files and rewriting tedious routines. While interested in learning about MOS6502 assembly language, the author was not keen on re-implementing routines over and over again.

Why not use another high-level programming language for the C64, such as CC65? Well, this would defy the initial goal of the author: to fulfill a childhood dream of finally understanding how the C64 works. What better way than to actually write a compiler on your own? So the author sat down one weekend with a couple of sixpacks, and here we are.

Turbo Rascal is developed to produce as fast and optimized assembly code as possible. The code is both high and low level, and continuously has new features added as the codebase is expanded. Our initial goal is to produce a small game that will be included as an example project.

For a practial introduction to the language, click here 

Download TRSE and check out the tutorials

Online tutorials

Current features:

  • Pascal-like syntax
  • Conditionals: While, For, If, Else, And, Or
  • Branched binary and logical conditions: if (a=b and (c<>d or (e>b and g<k) ) ) then ….
  • Global variables: Byte, Integer, String, Pointer, Binary inclusion
  • Arrays: Byte [Integer arrays soon]
  • Recursive binary operations for 8-bit operands, such as siny[x]:= ((sine[c2x*2] + sine[c2y+b])/2) &7;
  • Procedure definition and calls with parameters, but not yet return values.
  • Tons of built-in functions for SID handling, memory management, fast screen poking & number writing, sine functions etc
  • Editor Cycle Counter (automatically counts the number of cycles in all block/statement, displayed in the editor. Handy for optimizations!)
  • Sprite handling (enabling you to draw sprites on x>255)
  • SID file support. Include SID files directly: load, init and play addresses extracted from header, so just init and call play!
  • Raster IRQ support. Hook procedures/interrupts to the raster
  • Preprocessor directives : @Include files, @define, @ifdef, @ifndef, @endif
  • Integrated image support (multicolor)
  • Joystick & keyboard input methods
  • Inline assembler
  • Error handling with line numbers etc
  • Code completion (both built-in functions and your own symtab (user-defined variables and procedures))
  • Built-in post optimizer, works like a charm
  • Zeropage addressing pointers
  • Ultra-fast Abstract Syntax Tree (AST) compiler written in C++
  • Tutorials (work in progress)
  • Unit Test Program
  • Handy built-in lever designer
  • Sprite editor
  • Multicolor / regular color image editor
  • Character set editor