Imbastardizer

Description of the page content

A BASIC preprocessor written in Vim.

Tags:
Imbastardizer is a BASIC preprocessor written in VimL. It's similar to Vimclair BASIC, but it's more generic and more configurable, suitable for several dialects of BASIC (first focused on GW-BASIC and MSX BASIC). In fact, Imbastardizer eventually will be able to replace Vimclair BASIC for development in Sinclair BASIC.

README file

Description

Imbastardizer is a BASIC preprocessor written in VimL.

Goal

Easier cross-development in some dialects of BASIC that need line numbers or lack control structures.

Planned target BASIC dialects

  • GW-BASIC (DOS)

  • MSX BASIC (MSX)

  • Sinclair BASIC (ZX Spectrum)

  • SAM BASIC (SAM Coupé)

  • MasterBASIC (SAM Coupé)

  • S*BASIC (QL)

  • Beta BASIC (ZX Spectrum)

Features

  • C-style block and line comments.

  • Bash-style line comments.

  • Splitted lines.

  • Labels instead of line numbers.

  • #vim directive to execute any Vim command in the source.

  • Long variable names using the #vim directive to make the substitutions.

  • Control structures (can be nested):

    • DO …​ LOOP

    • DO …​ LOOP UNTIL

    • DO …​ LOOP WHILE

    • DO UNTIL…​ LOOP

    • DO UNTIL …​ LOOP UNTIL

    • DO UNTIL …​ LOOP WHILE

    • DO WHILE …​ LOOP

    • DO WHILE …​ LOOP UNTIL

    • DO WHILE …​ LOOP WHILE

    • EXIT DO

    • EXIT FOR

    • IF …​ THEN …​ ENDIF

    • IF …​ THEN …​ ELSE …​ ENDIF

    • IF …​ THEN …​ ELSE IF …​ ELSE …​ ENDIF (with any number of ELSE IF)

  • Procedures (without parameters):

    • DEF PROC, END PROC, EXIT PROC, CALL.

  • Procedures with parameters can be simulated ad hoc with the #vim directive.

  • The CALL command can be changed with #procedureCall, e.g.: #procedureCall proc or even make it empty: #procedureCall.

Ancestors

Imbastardizer is an improved replacement for previous tools that were developed only for one specific dialect of BASIC:

Planned features

  • Modular design.

  • The target BASIC dialect can be selected in the BASIC source.

  • The source converter is separated from the media maker.

  • Simple method to add new target BASIC dialects.

Status

The project was started in 2016-12. It’s under development, but already used to develop a project in GW-BASIC with PC-BASIC.

Download

You can download Imbastardizer in Github.

Related pages

Vimclair BASIC
A Sinclair BASIC preprocessor written in VimL
MBim
Cross-development toolkit for MasterBASIC and SimCoupe.
SBim
An S*BASIC preprocessor.