Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Locomotive BASIC
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Features of the CPC platform == [[File:Locomotive BASIC world map.gif|thumb|upright=1.3|A program in Amstrad BASIC which draws a world map in Mode 1 (320x200px and 4 colours)]] [[File:Locomotive BASIC color bars.gif|thumb|upright=1.3|Printing colour bars on the screen in Mode 0 (16 colours) with BASIC]] [[File:Amstrad CPC ink numbers.png|thumb|Amstrad CPC colour palette with ink numbers]] If a programmer is concerned only with writing in a rich BASIC dialect they have an excellent machine on which to ply their skills and there is no reliance or expectation the programmer will ultimately have to resort to machine code or study the function of the hardware to produce good quality software. However, to fully comprehend the ethos behind Amstrad BASIC and push the machine to its limits, it is necessary to understand, at least superficially, the design approach to the machine as a whole. Fundamentally, the CPC platform consists of clever hardware with a rich firmware to exploit it; compartmentalised into sub-systems with standardised jump tables to access functionality. Amstrad BASIC was written to expose as much of this platform and firmware as possible to the programmer. === Firmware jump blocks === At a machine level on the CPC platform, application software need not be concerned with code moving about in the actual firmware (e.g. for different versions and re-assembly) so long as it uses the documented jump block addresses. For example, the firmware call TXT_PRINT_CHAR is ubiquitous - but note from below the firmware vectors are different in BASIC 1.0 and BASIC 1.1 ($9400 vs $93FE). In many machines, re-assemblies of the firmware and subsequent moving of routines can cause major headaches, but with the CPC platform so long as software uses the published jump block calls (i.e. $BB5A), software will run on all CPC platforms with no issues. [[File:B1.0 BB5A.png|450px|frameless|center|$BB5A call on basic 1.0]] The firmware jumps have changed between versions but the address for TXT_PRINT_CHAR remains $BB5A. [[File:B1.1 BB5A.png|450px|frameless|center|$BB5A call on basic 1.1]] === The firmware modules === Kernel Key Manager Text VDU Graphics VDU Screen Pack Cassette / AMSDOS (AMStrad Disc Operating System) Sound Manager Machine Pack Maths Pack Amstrad BASIC leveraged and exposed the platform being written to take full advantage of the machine, bundling up BASIC code into the requisite calls into the firmware,<ref>https://www.theregister.com/Print/2014/02/12/archaeologic_amstrad_cpc_464/</ref> providing specific commands for functionality rather than reliance on generic *FX or PEEK & POKE statements required to access features on competitor platforms.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)