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 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!
==Alternatives== [[Image:Simons Basic Splash Screen.gif|thumb|right|The Simons' BASIC start-up screen]] Many BASIC extensions were released for the Commodore 64, due to the relatively limited capabilities of its native BASIC 2.0. One of the most popular extensions was the [[DOS Wedge]], which was included on the Commodore 1541 Test/Demo Disk. This 1 KB extension to BASIC added a number of disk-related commands, including the ability to read a disk directory without destroying the program in memory. Its features were subsequently incorporated in various third-party extensions, such as the popular [[Epyx FastLoad]] cartridge. Other BASIC extensions added additional keywords to make it easier to code sprites, sound, and high-resolution graphics like [[Simons' BASIC]] (1983) and Vision BASIC (2022). Although BASIC 2.0's lack of sound or graphics features was frustrating to many users, some critics{{who|date=September 2023}} argued that it was ultimately beneficial since it forced the user to learn machine language. The limitations of BASIC 2.0 on the C64 led to use of built-in ROM machine language from BASIC. To load a file to a designated memory location, the filename, drive, and device number would be read by a call: {{code|lang=cbmbas|1=SYS57812"filename",8}};<ref>{{cite book|title=Mapping the Commodore 64 & 64C|last=Leemon|first=Sheldon|publisher=COMPUTE! Publications|page=209|year=1987|isbn=9780874550825|url=https://archive.org/stream/Compute_s_Mapping_the_64_and_64C#page/n221/mode/2up|access-date=2018-03-25}}</ref> the location would be specified in the X and Y registers: {{code|lang=cbmbas|1=POKE780,0:POKE781,0:POKE782,192}};<ref>{{cite book|title=Mapping the Commodore 64 & 64C|last=Leemon|first=Sheldon|publisher=COMPUTE! Publications|page=71|year=1987|isbn=9780874550825|url=https://archive.org/stream/Compute_s_Mapping_the_64_and_64C#page/n83/mode/2up|access-date=2018-03-25}}</ref> and the load routine would be called: {{code|lang=cbmbas|1=SYS65493}}.<ref>{{cite book|title=Mapping the Commodore 64 & 64C|last=Leemon|first=Sheldon|publisher=COMPUTE! Publications|page=231|year=1987|isbn=9780874550825|url=https://archive.org/stream/Compute_s_Mapping_the_64_and_64C#page/n243/mode/2up|access-date=2018-03-25}}</ref> A disk magazine for the C64, ''[[Loadstar (magazine)|Loadstar]]'', was a venue for hobbyist programmers, who shared collections of proto-commands for BASIC, called with the {{code|1=SYS address + offset}} command.{{citation needed|date=March 2018}} From a modern programming point of view, the earlier versions of Commodore BASIC presented a host of bad programming traps for the programmer. As most of these issues derived from [[Microsoft BASIC]], virtually every home computer BASIC of the era suffered from similar deficiencies.<ref>{{Cite web|url=https://www.atariarchives.org/c1ba/page007.php|title=Compute!'s First Book of Atari|website=www.atariarchives.org|accessdate=21 August 2023}}</ref> Every line of a Microsoft BASIC program was assigned a [[line number]] by the programmer. It was common practice to increment numbers by some value (5, 10 or 100) to make inserting lines during program editing or debugging easier, but bad planning meant that inserting large sections into a program often required restructuring the entire code. A common technique was to start a program at some low line number with an {{mono|[[GOSUB#Computed GOSUB|ON...GOSUB]]}} [[jump table]], with the body of the program structured into sections starting at a designated line number like 1000, 2000, and so on. If a large section needed to be added, it could just be assigned the next available major line number and inserted to the jump table. In addition, all variables are treated as global variables. Clearly defined loops beyond the FOR...NEXT construct are hard to create, often causing the programmer to rely on the {{mono|[[GOTO]]}} command (this was later rectified in BASIC 3.5 with the addition of the {{mono|DO, LOOP, WHILE, UNTIL}}, and {{mono|EXIT}} commands). Flag variables often needed to be created to perform certain tasks. Later BASIC versions on Commodore and other platforms included a {{mono|DELETE}} and {{mono|RENUMBER}} command, as well as an AUTO line numbering command that would automatically select and insert line numbers according to a selected increment. Earlier BASICs from Commodore also lack debugging commands, meaning that bugs and unused variables are hard to trap. {{mono|IF...THEN...ELSE}} structures, a standard part of Z80 Microsoft BASICs, were added to BASIC 3.5 after being unavailable in earlier versions of Commodore BASIC.
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)