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
Commodore Plus/4
(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!
=== BASIC === {{unreferenced section|date=January 2023}} The Plus/4's [[memory map]], which used [[bank switching]] far more extensively than the C64, gave it a 56% larger amount of user-accessible memory than the C64 for programming in BASIC, and its [[Commodore BASIC|BASIC programming language]] was vastly improved, adding sound and graphics commands as well as looping commands that improved [[structured programming|program structure]]. The Plus/4 does not have the Restore key on the VIC and C64, but a similar function may be achieved by holding down Run/Stop and pressing the reset button. This will reboot the computer into the machine language monitor, but any BASIC programs in memory will be left intact. The Plus/4 contains an [[Easter egg (media)|Easter egg]]. Entering the command <code>SYS DEC("CDAB")</code> or <code>SYS 52651</code> puts up the names of three programmers and a hardware designer: Fred Bowen, John Cooper, Terry Ryan and [[Bil Herd]], with Bowen's name at the top in reverse-field and Ryan's at the bottom blinking on and off. While the C64 had the advertised {{nowrap|64 KB}} of RAM installed, only about {{nowrap|38 KB}} was available for BASIC programs. The Plus/4's BASIC V3.5 made {{nowrap|59 KB}} available, aided by its memory map that swapped the ROMs in and out of memory as needed, and that placed the [[memory mapped I/O]] registers, which all 6502-based computers have to use, at the top of memory ({{mono|$FD00}}), while in the C64 they had been located at the much lower address {{mono|$D000}}. On the C64, a program was able to swap out the ROMs and the I/O registers manually and thus gain access to the full {{nowrap|64 KB}}, but this was not compatible with BASIC on that machine; on the Plus/4, on the other hand, most of the ROM area was automatically switched out when not needed, rendering the RAM existing at the same addresses accessible for BASIC programs. The BASIC program area on the Plus/4 begins at {{mono|$1000}}, but the BASIC ROM starts at {{mono|$8000}} so the automatic switching of the OS ROMs is not initiated unless a BASIC program grows big enough to reach {{mono|$8000}}, or 28K in size. Since RAM on the C16 never exceeds the {{mono|$8000}} line, banking does not occur on that machine. As on the C64, writing to the ROM areas will alter the RAM underneath. The registers at {{mono|$FDD0-$FDDF}} contain the ROM configuration for the machine, which normally has the BASIC and kernal ROMs enabled. The ROM configuration is adjusted by writing to the registers (the value is irrelevant). {{mono|$FDD0}} enables or disables BASIC, {{mono|$FDD1}} the low function ROM, {{mono|$FDD2}} the low cartridge ROM, {{mono|$FDD3}} is unused, {{mono|$FDD4}} the kernal, {{mono|$FDD5}} the high function ROM, and {{mono|$FDD6}} the high cartridge ROM. The upper portion of the kernal ROM at {{mono|$FC00-$FCFF}} is always enabled no matter what the memory configuration, as are the I/O registers. Furthermore, the registers at {{mono|$FF3E-$FF3F}} if written to will bank out (or in) all ROMs currently enabled via the ROM configuration at {{mono|$FDD0-$FDDF}} excepting {{mono|$FC00-$FCFF}}; this is done by BASIC automatically to read program text above {{mono|$8000}}. Since disabling the ROMs will also remove the kernal interrupt handler, it will be necessary to first turn off interrupts via an SEI instruction. BASIC 3.5 added all of BASIC 4.0's disk commands as well as sound and graphics functions to support the TED, additional programming features, and statements to allow structured programming. While BASIC 2.0 was 8K in size and BASIC 4.0 12K, BASIC 3.5 ballooned to 20K in size, as big as the entire set of OS ROMs in the VIC-20 and C64.
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)