Jump to content

Category:Locomotive Basic: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 9:
 
Locomotive BASIC was comparatively advanced for its time (with e.g. software interrupts and comprehensive graphics and audio commands) and was very cleanly implemented, just like the rest of the Amstrad CPC ROM. System calls could be made with <tt>CALL</tt> via dedicated jump blocks in RAM, so they were unaffected by changes to the ROM between CPC models. This made 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.
 
Memory on the CPC 464 and 664 was subdivided into four 16 kB blocks (0 to 3), with block 3 at &c000 normally reserved for the screen. The CPC 6128 featured a second 64 kB bank which could be accessed from BASIC in block 1 of the first bank (&4000 and &7fff) via [[wp:Bank switching|bank switching]]. RSX commands for bank switching are included on the system discs and discussed in chapter 8 of the CPC user manual.<ref>http://www.cpcwiki.eu/index.php/User_Manual</ref> Even on the 64 kB models, it was possible to do [[wp:Multiple buffering|double buffering]] in BASIC by also reserving RAM block 1 for the screen, drawing into the hidden screen, and then setting the CRTC screen address to the currently hidden screen with the BASIC [[wp:I/o port|port I/O]] command <tt>OUT</tt>.
 
Locomotive BASIC served as a sort of primitive operating system for the CPC and was also used (together with AMSDOS RSX commands<ref>http://cpcwiki.eu/index.php/RSX</ref>) for disk and tape operations. As on many other 8-bit machines of the era, it was common to extend BASIC programs by <tt>READ</tt>-ing Z80 machine code from <tt>DATA</tt> statements, <tt>[[wp:PEEK and POKE|POKE]]</tt>-ing it to RAM, and then <tt>CALL</tt>-ing the code, an approach especially popular with type-in games from old CPC magazines.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.