Locomotive BASIC

From CPCWiki - THE Amstrad CPC encyclopedia!
Revision as of 01:20, 28 April 2007 by 202.225.69.234 (Talk)

Jump to: navigation, search

free midi ringtones sonyericsson ringtones generic paxil midi ringtones valium sale ambien online free sprint ringtones cheap adipex ativan online nexium online free sagem ringtone cheap ativan mono ringtones cheap lorazepam free ringtones free mono ringtones free real ringtones cheap ativan buy phentermine norco online ericsson ringtones cialis online cheap ultram nokia ringtones cheap levitra real ringtones free ericsson ringtones cheap ortho free ringtones samsung ringtones cheap cyclobenzaprine cheap wellbutrin free punk ringtones free cool ringtones buy clomid alltel ringtones lortab online diazepam sagem ringtones ativan online free motorola ringtones free nextel ringtones meridia online nokia ringtones cheap paxil sony ericsson ringtones best bonus casino online sprint ringtones free alltel ringtones buy xenical tramadol online fioricet online free polyphonic ringtones buy carisoprodol buy ativan ambien online alltel ringtones clomid online generic alprazolam free samsung ringtones free nokia ringtones cheap adipex free verizon ringtones kyocera ringtones tracfone ringtones free qwest ringtones xanax online generic clonazepam xenical online cingular ringtones cialis online generic alprazolam cheap nexium fioricet online free funny ringtones free mp3 ringtones cheap ultracet ativan online free verizon ringtones diazepam online free ericsson ringtones rivotril free ringtones carisoprodol online cheap xanax free free ringtones free tracfone ringtones buy vicodin wwe ringtones phentermine online cyclobenzaprine online verizon ringtones hydrocodone online buy xenical cheap levitra hydrocodone online cheap meridia nokia ringtones cheap ultram cheap soma cheap propecia ativan online cheap adipex cheap lorazepam free samsung ringtones free mono ringtones free sprint ringtones cheap soma celexa online buy vicodin buy cialis sonyericsson ringtones canadian casino online cheap cyclobenzaprine free qwest ringtones free polyphonic ringtones ultram online xanax online free tracfone ringtones qwest ringtones lipitor online cheap ultram buy nexium sony ericsson ringtones cheap ativan cheap xenical generic cialis cheap carisoprodol sagem ringtones meridia online nextel ringtones but tramadol carisoprodol online mixing valium and xanax cheap norco generic valium cyclobenzaprine online clonazepam online free kyocera ringtones cheap adipex free sonyericsson ringtones carisoprodol online hydrocodone online free sony ericsson ringtone cheap meridia zanaflex online free cingular ringtones viagra online wwe ringtones free nokia ringtone free mtv ringtones vicodin online generic meridia sony ericsson ringtones sagem ringtones free qwest ringtones sony ringtones cheap tramadol free qwest ringtones polyphonic ringtones cheap xanax free sagem ringtones free funny ringtone free sony ericsson ringtones cheap viagra free free ringtones free samsung ringtones ambien online valium half life buy ultram free sony ericsson ringtones generic phentermine valium side effects cheap valium diazepam online free samsung ringtone cheap hoodia diazepam online mp3 ringtones viagra online online xanax cheap soma but adipex cialis online pharmacy online online cheap soma order hydrocodone didrex online cheap lorazepam funny ringtones cheap sildenafil levitra online free tracfone ringtones casino craps online free ringtone cheap didrex generic cialis free mp3 ringtone free nextel ringtones jazz ringtones Template:Stub

CPC Start Screen showing Locomotive copyright and BASIC version

Locomotive BASIC was a BASIC interpreter for the Amstrad CPC range of computers.

Description

Locomotive BASIC, was one of the best and fastest BASIC implementations of the era. The language benefited both from a clean, well-thought out implementation of the core language by Locomotive, and by the excellent firmware of the CPC, which lent most of its advanced features to the BASIC.

Unlike the competing Commodore 64, it featured a comprehensive graphic capabilities with its PLOT, DRAW, PAPER, INK, PEN, BORDER and (in BASIC 1.1) FILL commands. It had extensive sound commands, granting control of the AY-3-8912 via the firmware's volume and tone envelope system. With the SOUND command, you could select channels, set envelopes, pitch, noise and volume. That was something unmatched by other computers of that era.

Also there was simple interface for memory management, with MEMORY and LOAD commands. The latter allowed for loading of raw screen data, thus providing easy picture showing. Both through this (combined with CALL, PEEK and POKE) and the firmware's RSX system, it was easy to mix BASIC and assembly code, thereby speeding up programs by coding the slowest parts directly in machine code. Many successful programs, including games such as Radzone and applications such as PowerPage, made use of this technique.

With DEF FN, ON variable GOTO and ON variable GOSUB, Locomotive BASIC provided the rudiments of "structured programming", though nowhere near the extent of the PROCedures of BBC BASIC.

All in all, if you compare BASIC interpreters of that era, the Locomotive's seems to be the best 'all-rounder' regarding the combination of speed and complexity, and still some of its features were unmatched by others.

If you are interested in more information about the different versions of the CPC's BASIC and the technical details, you can have a look at the article "Technical information about Locomotive BASIC".

History

The CPC implementation of Locomotive BASIC was developed directly from Locomotive Software's existing Z80 BASIC. The existence of this is cited as one of the reasons Locomotive requested that Amstrad change the CPC's processor from a 6502 to a Z80.

The 464 shipped with BASIC 1.0 on ROM.

The language was revised and debugged for the 664, 6128 and Plus machines to become BASIC 1.1. Changes were minor but significant for the programmer, and included:

  • DEC$ bug removed (in BASIC 1.0, it required two opening brackets and was undocumented)
  • Better handling of string arguments to RSXs (|DIR,"*.BAS" rather than a$="*.BAS":|DIR,@a$)
  • DATA statements can appear anywhere within a line; in BASIC 1.0, they had to be at the end of a line
  • FILL command (fill area with solid colour)
  • COPYCHR$ function (fetch character from screen)
  • Better garbage collection
  • Some number-handling bugs removed (e.g. in FOR loops with negative start/end values)
  • FRAME (CALL