Locomotive BASIC

Locomotive BASIC

Locomotive Basic is a proprietary dialect of the BASIC programming language written by Locomotive Software used only on the Amstrad CPC (where it was built-in on ROM). It was the main ancestor of Mallard BASIC, the interpreter for CP/M supplied with the Amstrad PCW and later the Amstrad-designed and built ZX Spectrum +3.

Version history

It was published in two versions: 1.0 which only came with the CPC model 464, and 1.1 which shipped with all other versions. A special update—or rather, a ROM extension—was available on the Amstrad CPC Plus series machines, which added specialised BASIC commands for taking advantage of the extra capabilities of those machines.

Features

It was a rather simple but powerful BASIC implementation by the standards of the day, featuring dedicated commands for handling graphics (such as DRAW, PLOT, INK, PAPER, and FILL in v1.1), even allowing the creation of multiple screens, windows, and the like, although the color system and palette handling was awkward. Interestingly enough, a table giving the numeric codes for the 27 system colors was printed over the built-in 3" disk drive casing on the 664 and later machines. Simple as it was, it did stand out however among other BASICs of the time by offering a timer-based software interrupt mechanism using the EVERY or AFTER commands; this offered a timed repeating or once-off call respectively to the BASIC line number of your choice.

Also, it granted an almost full control over the CPC sound chip, an AY-3-8912 with 3 melodic channels and 1 noise channel (which was also used on the ZX Spectrum, Atari ST and MSX computers, with none of them having such a complete built-in SOUND command). Everything, from selecting a particular channel or a combination of channels, setting envelopes, volume, pitch, noise, and so on could be done with a single SOUND command, with up to 7 parameters. The only thing that could not be done with BASIC was perhaps playing back digital sampled sounds, like in the game RoboCop.

Disk, tape, and file management were managed by BASIC itself, and were usually good enough for simple file management, with commands such as GET, PUT, ERASE, SAVE, MERGE, RUN, CAT, LOAD etc. In fact, during those years, the BASIC supplied as standard with every low-cost home computer also acted as a more or less simple operating system.

Also available were some special commands for memory allocation and handling, like MEMORY and a parametric LOAD command, allowing, for example, to load a file containing "raw" picture data into video memory, causing it to be displayed, with a couple of BASIC instructions. Adding the right memory address(es) as parameter to the commands LOAD or SAVE you could handle raw uncompressed 17 KB screen pictures at ease. CALLing another address you've got a forced system reset (call 0), the famous "Press Any Key" (call &bb18) or for eliminating flicker in animation by allowing you to synchronize with the monitor's raster scan via "sync frame-flyback" (call &bd19); this was given its own dedicated command in Basic 1.1 - FRAME. With PEEK and POKE, you've got a nice interface for assembly language.

Contemporary rivals

Locomotive BASIC compared to the Commodore 64's BASIC (Commodore BASIC), which had no dedicated commands for graphics or sound, allowed doing pretty much anything that was within the standard capabilities of the machine. This was not unimportant, as some other machines of the era using full graphics or sound was limited to assembler programmers. MSX, Spectrum and some others offered a similar, more or less complete command set for their sound and graphics capabilities. The only things going clearly beyond BASIC capabilities were the overscan modes used in games and demos, weird 27-color graphics modes, digital sound playback, and smooth scrolling.

Unlike Sinclair BASIC or Commodore 64 BASIC, which had various keyboard command shortcuts or specialized keys for choosing symbols or colors, Locomotive BASIC keywords were typed in full and the interpreter parsed, recognized and tokenised them. However, there were abbreviations like "?" for "PRINT" and a few shortcuts. Programs could be saved onto cassette tape or floppy disk and retrieved as binary or ASCII files.


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Locomotive BASIC — es un dialecto del lenguaje de programación BASIC escrito por la compañía británica Locomotive Software para la gama de ordenadores CPC de Amstrad. Fue el antecesor del Mallard BASIC, el intérprete para CP/M suministrado con los Amstrad PCW, y… …   Wikipedia Español

  • Locomotive BASIC — ist ein BASIC Dialekt der Schneider/Amstrad CPC 8bit Homecomputerbaureihe, im ROM enthalten und zugleich als OS gedacht, in Entwicklung, Befehlsumfang und durch den Hersteller, Locomotive, eng verwandt mit dem ebenfalls bekannten Mallard BASIC.… …   Deutsch Wikipedia

  • Locomotive BASIC — est un dialecte propriétaire du langage de programmation BASIC écrit par Locomotive Software. Disponible seulement sur certaines Compatible PC Amstrad (Amstrad PC 1512 par exemple) et tous les Amstrad CPC où l interpréteur était intégré sur une… …   Wikipédia en Français

  • Locomotive BASIC 2 — Este artículo o sección sobre informática necesita ser wikificado con un formato acorde a las convenciones de estilo. Por favor, edítalo para que las cumpla. Mientras tanto, no elimines este aviso puesto el 18 de agosto de 2010. También puedes… …   Wikipedia Español

  • Locomotive Software — era una pequeña empresa británica de software, la mayor parte de cuyos desarrollos fueron para los ordenadores domésticos y de pequeña empresa elaborados por Amstrad en los años 80. Locomotive escribió (o contribuyó de forma significativa) las… …   Wikipedia Español

  • Locomotive Software — was a small British software house which did most of its development for Amstrad s home and small business computers of the 1980s.It wrote or contributed significantly to the ROMs of the Amstrad CPC 464, Amstrad CPC 664 and Amstrad CPC 6128 home… …   Wikipedia

  • Locomotive Software — Locomotive Software, fondée en février 1983, est la société à l origine notamment du BASIC équipant l ordinateur personnel Amstrad CPC. Elle équipa par la suite d autres ordinateurs de la marque Amstrad comme les PCW. Les personnes à l origine de …   Wikipédia en Français

  • Basic (langage) — BASIC Pour les articles homonymes, voir Basic. {{{image}}}   Sigles d une seule lettre   Sigles de deux lettres   Sigles de trois lettres …   Wikipédia en Français

  • BASIC — Información general Paradigma estructurado imperativo Apareció en 1964 Diseñado por John George Kemeny; Thomas Eugene Kurtz …   Wikipedia Español

  • BASIC-256 — с …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”