Category:Locomotive Basic: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 6:
'''Locomotive BASIC''' is a variant of BASIC that is built into the ROM of the [[wp:Amstrad CPC|Amstrad CPC]] series of Z80-based home computers introduced in 1984. In the 1980s, CPCs were a popular, slightly more expensive alternative to the Commodore C64/C128 and were not just suited for games but also office work because of their high resolution displays and [[wp:CP/M|CP/M]] support. They came with a built-in cassette deck (CPC 464 and 664) or 3" disk drive (CPC 6128) as storage devices and a "green screen" or color monitor which also housed the power supply. Sales were particularly strong in the UK, Germany, France, and Spain. Today, Locomotive BASIC can be used via CPC emulators such as [http://www.winape.net/ WinAPE] or [http://sourceforge.net/projects/javacpc/ JavaCPC]—which is perfectly legal because Amstrad has given their permission for distributing CPC ROM images with emulators.
 
Locomotive BASIC was comparatively advanced for its time (with e.g. software interrupts and comprehensive graphics and audio commands) and is very cleanly implemented, just like the rest of the Amstrad CPC ROM. No doubt this was partly because the CPC debuted relatively late during the era of 8-bit machines, so Locomotive Software had more of an opportunity to consider the good and bad software design decisions in existing home computers. System calls are made with <tt>CALL</tt> via dedicated jump blocks in RAM, so they are unaffected by changes to the ROM between CPC models. This makes software very compatible between the original three CPC models and ''mostly'' compatible for the later, considerably less popular "Plus" models that came out in 1990. Together with AMSDOS, the '''Ams'''trad '''D'''isk '''O'''perating '''S'''ystem, Locomotive BASIC is also used for disk and tape operations. (Some commands however, e.g. <tt>disckit3</tt> for formatting disks, are only available under CP/M.)
 
As on many other 8-bit machines of the era, BASIC programs are often extended with Z80 machine code which is <tt>READ</tt> from <tt>DATA</tt> statements, <tt>[[wp:PEEK and POKE|POKE]]</tt>-d to RAM, and then <tt>CALL</tt>-ed—an approach that was especially popular with type-in games in CPC magazines. The CPC also has a more convenient form of BASIC extensions, RSX<ref>http://www.cpcwiki.eu/index.php/RSX</ref> commands ('''r'''esident '''s'''ystem e'''x'''tensions). They are easily recognized by being prefixed with a pipe character and have the advantage of being freely relocatable in memory. Some RSX commands, such as "|ren" to rename files, are part of the AMSDOS ROM, but RSX routines can also reside in RAM, e.g. to provide new graphics primitives or other new capabilities to BASIC.
Anonymous user