Locomotive BASIC

Locomotive BASIC is a BASIC dialect of the Schneider / Amstrad CPC 8bit home computer range, included in ROM and also intended as an operating system in development, and instruction set by the manufacturer, Locomotive, closely related to the Mallard BASIC also known. This language was developed by the small British company Locomotive Software.

It was programmed in the dialog on the command line, the necessary line numbering, or amendments thereto was automated. Like most BASICs operated as an interpreter, an optional compiler was also available.

The extensive and well -to-use language scope made ​​the programming of most applications in BASIC even possible. Additional functions could be integrated with assembler memory calls ( Z80A ) in the program itself. The sprites of C64 are missing, but about surfaces with up to eight dialog boxes can be programmed quickly and fluently. Overall, it is a largely balanced, rounded with good programming language syntax.

The storage medium that served cassette and floppy disk drives, hard to issue point-like monitor or printer, as input keyboard or joystick. As the built-in speakers they could be addressed directly. Optional, further external hardware interfaces required by the manufacturer or our own programming.

According to the development time, however, the major approaches of structured programming are largely absent, be due to the often manageable programming scope but also not much missing and then it implemented skillfully combined with other methods such as the infamous GOTO. The programming is a problem - or machine- oriented, parallel processing, networking and object orientation are still in their infancy or not yet born.

Examples

Something simple instead of " Hello World":

10 REM Example   20 PRINT " Zylinderflaechenberechnung "   INPUT " Please enter cylinder height ... " 30, H   INPUT " Please enter cylinder radius ... " 40, R   50 A = 2 * PI * (R ^ 2 R * H)   60 PRINT " cylinder face = " A The whole course can be also simplified, implemented here by the command line:

Input " radius, height ... " R, H: " Zylinderflaeche =" 2 * PI * (r ^ 2 r * h) Each command line is limited to about 255 characters, the special German characters in the BASIC itself, except as ASCII calls that are not available.

Versions

While the version is 1.0 or 1.1 used in the Schneider / Amstrad CPC and the Mallard Basic same company or the familiar in England BBC BASIC were used in PCW / Joyce or NC100, was for the DOS / GEM environment of the PC-compatible Amstrad PC1512 version Locomotive BASIC2 created. The exact version is:

Locomotive BASIC 2   Version 1.12 July 11 86   Copyright 1986 Locomotive Software Ltd. Locomotive Basic2 was a graphical integrated development environment in the GEM graphic surface. The programs were able to deal with windows that generate mouse concomitantly and color graphics.

Operation

When Locomotive Basic CPC is not a pure interpreter, but rather a subset of the work to be performed at compile time was already running when you enter the program. For example, were the BASIC commands such as PRINT, IF, FOR, etc. are not stored letter by letter in the main memory, but it was the pre-translation in a so-called token (one byte as a numerical code for the corresponding command ). Thus, the execution of the program has been accelerated because now no longer had to be determined at run time by more than one character to be executed BASIC command, instead, could be able to jump over the token value from a table in the main memory directly to the appropriate routine. For test runs and troubleshooting were on the command line special commands. The compact lexis of the language supported the avoid typos, the error messages were concise. The possible types of variables are limited to the most essential, the declaration is often not necessary.

  • BASIC
527250
de