forge Documentation

introduction

Introduction

FORGE is a fast interpreter for the BASIC language on the Atari 8-bit computers.

Key Differences from Other BASICs

No Line Numbers

One big difference from other BASIC interpreters in 1980s era 8-bit computers is the lack of line numbers, as well as an integrated full-screen editor. This is similar to newer programming environments, giving the programmer a higher degree of flexibility.

Integer-First Design

Another big difference is that default variables and operations are done using integer numbers; this is one of the reasons that the programs run so fast relative to its peers from the 1980s.

Runtime Code Generation

The other reason is that the program is parsed on run, generating optimized code for very fast execution.

Current Features

FORGE supports:

  • Integer and floating point variables, including all standard arithmetic operators.
  • All graphic, sound, and color commands from Atari BASIC, plus some extensions from TurboBASIC XL.
  • All control flow structures from Atari BASIC and TurboBASIC XL.
  • Automatic string variables of up to 255 characters.
  • Arrays of "word", "byte", floating point and strings.
  • User defined functions and procedures using FUNC/ENDFUNC, with integer parameters.
  • Modular code organization with INCLUDE directives.
  • Compilation to binary loadable files.
  • Multiple versions available:
    • Full version FORGE.COM (floating point)
    • Integer-only FORGEI.COM (smaller, faster)
    • Command-line compiler FORGEC.COM (floating point)
    • Command-line compiler FORGECI.COM (integer-only)

Performance

FORGE is designed for speed:

  • 2 times faster than compiled TurboBasicXL in benchmarks
  • 6 times faster than OSS Integer Basic
  • Small runtime footprint (less than 3k)
  • Fast execution through optimized code generation

Getting Started

Ready to start programming? See First Steps to write your first FORGE program.

Next Steps