Das Große Commodore BASIC-Handbuch

Total Page:16

File Type:pdf, Size:1020Kb

Das Große Commodore BASIC-Handbuch Das große Commodore BASIC-Handbuch Michael Orkim Düsseldorf • Berkeley • Paris Inhaltsverzeichnis Einleitung 9 Kapitel 1 Ein erstes einfaches Programm 13 Kapitel 2 Grundlagen für Neugierige - Zusammenspiel von Interpreter, Betriebssystem und Hardware 21 Platzverteilung im Rechner 21 Maschinenunabhängigkeit 23 Interpretation und Kompilierung 24 Dem Interpreter auf die Finger geschaut 26 Speicherverwaltung und Interpreter 32 Platz für Maschinenprogramme 38 Der BASIC-Interpreter und die Ein-/Ausgabesteuerung 39 Der Bildschirm-Editor - Teil des Interpreters 43 Fensterbefehle beim C128 59 Externe Editoren 62 Kapitel 3 Bestandteile von BASIC 63 Generelle Eigenschaften des Commodore-BASIC 63 BASIC-Sprachelemente 65 Datentypen und Zuweisungen 66 Zeichen und Codes 69 Primäre und sekundäre Schlüsselwörter 69 Ausdrücke 72 Variablennamen 73 Operatoren 74 Funktionen 83 Reservierte Wörter in BASIC 7.0 85 Leerstellen 90 Kapitel 4 Ein- und Ausgabe in BASIC 91 Schnittstellen 91 Die Tastatur 96 Ausgabe auf den Bildschirm 98 Ausgabe vom Bildschirm 104 Das große Commodore BASIC Handbuch Ausgabe auf den Drucker 106 Ein- und Ausgabe von Kassette 108 Ein- und Ausgabe von der Diskette 109 Kapitel 5 Funktionen...113 Gliederung nach Funktionstypen 114 Mathematische Funktionen 115 Zeichenkettenfunktionen 144 Grafik- und Sprite-Funktionen 151 Systemfunktionen 155 Kapitel 6 Maschinennahe Befehle und Variablen 157 Die Systemvariablen 164 Kapitel 7 Dateiverwaltung 167 Programmdateien 168 Benutzerdateien 168 Sequentielle Dateien 168 Direktzugriffs-Dateien 169 Anlegen von sequentiellen und Direktzugriffs-Dateien 169 Kapitel 8 Alphabetische Übersicht über alle BASIC-Schlüsselwörter .... 173 Kapitel 9 Programmstrukturierung und -Steuerung in BASIC 487 Darstellungshilfsmittel 487 Datenorientierte Strukturierung 494 Ablauforientierte Strukturierung 496 Kapitel 10 Programmentwicklung und Austesten in BASIC 501 Modulare Programmierung 504 Zusammenfassung "Programmentwicklung" 510 Overlay-Technik 510 Prototyping und Bildschirm-Layout 515 Benutzerführung uns Menütechnik 518 Austesten von Programmen 522 Zusammenfassung "Programme austesten" 524 Inhaltsverzeichnis Kapitel 11 Übertragbarkeit von BASIC-Programmen 527 Kompatibilität 527 Bildschirmspeicher - 531 Groß-/Kleinschreibung 531 Anhang A BASIC-Befehlserweiterung Simons BASIC für den C64 und C128 535 Anhang B Befehlserweiterung EXBASIC LEVEL II 569 Anhang C BASIC-Befehlserweiterung Honey.Aid für den C64 593 Anhang D BASIC-Befehlserweiterung SUPER EXPANDER 64 605 Anhang E Alphabetische Befehlsübersicht mit Crossreference aller BASIC-Versionen 617 Anhang F Alphabetische Befehlsübersicht nach Funktionen 623 Programmverzeichnis 629 Stichwortverzeichnis 631.
Recommended publications
  • Commodore 64 Users Guide
    INTRODUCTION Now that you've become more intimately involved with your Commo- dore 64, we want you to know that our customer support does not stop here. You may not know it, but Commodore has been in business for over 23 years. In the 1970's we introduced the first self-contained per- sonal computer (the PET). We have since become the leading computer company in many countries of the world. Our ability to design and manufacture our own computer chips allows us to bring you new and better personal computers at prices way below what you'd expect for this level of technical excellence. Commodore is committed to supporting not only you, the end user, but also the dealer you bought your computer from, magazines which publish how-to articles showing you new applications or techniques, and . importantly . software developers who produce programs on cartridge, disk and tape for use with your computer. We encourage you to establish or join a Commodore "user club" where you can learn new techniques, exchange ideas and share discoveries. We publish two separate magazines which contain programming tips, information on new products and ideas for computer applications. (See Appendix N). In North America, Commodore provides a "Commodore Information Network" on the CompuServe Information Service . to access this network, all you need is your Commodore 64 computer and our low cost VICMODEMtelephone interface cartridge (or other compatible modem). The following APPENDICEScontain charts, tables, and other informa- tion which help you program your Commodore 64 faster and more efficiently. They also include important information on the wide variety of Commodore products you may be interested in, and a bibliography listing of over 20 books and magazines which can help you develop your programming skills and keep you current on the latest information con- cerning your computer and peripherals.
    [Show full text]
  • Downloads to Cassette
    C[]r:1r:1 * [JATA SOFTWARE GUIDES YOU AND YOUR VIC 20® DOWN ROADS OF ADVENTURE WITH: • Maelstrom* • Escape MCP* • Gator Chase* • Astro Command • Caves of Annod • Capture the Beast • Whirlwind Rescue* • Street Maze • The Market • Chivalry THROUGH TRAILS OF CREATIVITY WITH: • Sketch and Paint ALONG THE PATH TO KNOWLEDGE WITH: • Wordspot • Math Tutor Series • Alphabet Tutor • Conversion • Gotcha Math • English Invaders • Math Invaders Series ASK FOR COMM*DATA COMPUTER HOUSE SOFTWARE AT YOUR LOCAL DEALER. Or Send for FREE Catalog: COMM*DATA COMPUTER HOUSE 320 Summit Avenue Milford, Michigan 48042 Quality software also available (313) 685-0113 for Pet and Commodore 64 computers Dealer Inquiries Welcome . VIC 20 is a Registered Trade mark of Commodore Business Machines. In c. • 'High Res Full Machine Code Arcade Style Games. King of the mountain! Workhorse solutions for tough questions. When Southern Solutions acquired the exclusive marketing rights for the CMS Accounting System. the first (and the best) acrounting system for the Commodore computer. we offered dealers who were di$atisfied with their current accounting software the opportunity to swap ... ours for an)Qne elses. WOINI We were covered with the others .. MAS. BPI. ESS. etc ... all trading for CMS. We prCNide the only complete coverage of real software for Commodore computers: . mE PREMIER ... SYSTEM Iv. Real accounting. More like a mini. yet priced for the Commodore. SuperMath n, gives precision to $1 bllUon. No one else comes close. General ledger. accounts receivable. acrounts payable. payroll. inventory. mailing list. Plus important vertical products: oil accounting. pharmacy management encumbrance Software accounting. church records and more.
    [Show full text]
  • Elektor N° 77
    fi)®wrn .l]Jfi?OO ;. à) J1ncrn~ i ! i,G.Iftîfp , fiIQJ:uflIUiiüÜ@ •=·......, .=a ... l e... .-... t.. r·· ,..... , r·, 1· •-... VENTE PAR CORRESPONDANCE : 11, RUE DE LA CLEF - 59800 LILLE -Tél. (20) 55.98.98 -TARIF AU 01/11/84 Paiement à la commande: ajouter 20 F pour frais de port et emballage, Franco à partir de 500 F • Contre-remboursement: Frais d'emballage et de port en sus. Nos kifs comprennent le circuit imprimé et tous les composants nécessaires à la réalisation, composants de qualité professionnelle, résistance COGECO.condensateurs MKH SIEMENS, etc ... selon la liste publiée dans l'article d'ELEKTOR, ainsi que la face avant et le transformateur d'alimentation si mentionnés Nos kits sont livrés avec supports de circuits intéarés POUR TOUT KIT NON REPRIS Cl-DESSOUS, VEUILLEZ NOUS CONSUL TER. PRELUDE + CRESCENDO = XL PROMO DU MOIS La chaîne XL haut de gamme d'ELEKTOR (kits fournis avec résistance â • TEST-AUTO couche métallique et potentiomètres CERMET) En kit : !• MULTIMETRE DIGITAL EN KIT POUR LE CONTRiiLE • PRELUDE: Préamplificateur à télécommande de conception ultra-moderne ET 1A MAINTENANCE DES VÈHICULES AUTOMOBILES -BUS (83022-1) (avec pot CERMET) • ..... •• .. • . ••• 15.28.0574 595,80F (Vor Elektor n" 63) -PREAMPLIFICATEUR "MC" (83022-2) . .... ... .. 15 28,0581 197,00F PRINCIPALES CARACTÉRISTIQUES -PREAMPLIFICATEUR "MD" (83022-3) . ... .. .. 15 28,0582 202,40F -Alf,cnag<!LE03 l/ 2dioits. -INTERLUDE (83022-4) . ... .. .. ....... .. 15 28,0584 247,30F ~ - ~~ des IB!Siom : 11) mV à 200 V "' 2 gammes - REGLAGE DE TONALITE (83022-5) • • • • • • • • . • • 15.28.0583 140,50 F ., · MUlure. des couronto: 10 mA à 20 A.
    [Show full text]
  • User's Reference Manual Commodore BASIC Version
    User’s Reference Manual Commodore BASIC Version 4.0 C: commodore Commodore BASIC Version 4.0 \ Appropriate for use with: CBM and PET Computers l Series 2001 l Series 3000 l Series 4000 l Series 8000 Part Number 321604 First Edition July 1980 C: commodore 0 1980 Commodore Business Machines, Inc. Introduction Commodore BASIC 4.0 is the most sophisticated software developed for the CBM com- puter line to date. Programs are of course upward compatible from previous Commodore BASIC releases but both the user and the programmer can enjoy new features of 4.0 The first Commodore BASIC, version 2.0, was released in August 1977 for the PET 2001-8 computer. Version 3.0 in July 1978 added a machine language monitor and corrected known bugs of version 2.0. Version 3.0 is standard in all 2001 series since July 1978. Version 4.0, completed in October 1979 included all the improvements of previous releases, enhanced the speed of string processing, and integrated disk commands into the BASIC language. BASIC 4.0 is standard in the CBM 4000 series and the CBM 8000 series. It is also available as an upgrade for CBM 2001 and 3000 series. The information in this manual has been reviewed and is believed to be entirely reliable. However, no responsibility is assumed for inaccuracies. The material in this manual is for information purposes only and is subject to change without notice. Table of Contents Chapter 1 General Information About Commodore BASIC.................................. I 1.1 Initialization .............................................................................................1
    [Show full text]
  • Microsoft BASIC Easter Egg
    Microsoft BASIC Easter Egg Commodore PET Microsoft 6502 BASIC has its roots in the Commodore PET Commodore bought MOS in October 1976 and worked on converting the KIM platform into a complete computer system. They licensed Microsoft BASIC for 6502 (also October 1976), renamed it to Commodore BASIC, replaced the “OK” prompt with “READY.”, stripped out the copyright string and shipped it in the ROMs of the first Commodore PET in 1977. In 1979, Commodore started shipping update ROMs with a version 2 of Commodore BASIC for existing PETs. Apart from updates in array handling, it also contained what became known as the WAIT 6502 Easter egg. If you type “WAIT6502,1” into a Commodore PET with BASIC V2 (1979), it will show the string “MICROSOFT!” at the top left corner of the screen. The Easter egg code does not print the characters through library routines, but instead writes the values directly into screen RAM. While BASIC used the ASCII character encoding, the Commodore character set had its own encoding, with “A” starting at $01, but leaving digits and special characters at the same positions as in ASCII. Thus, when the 10 hidden and obfuscated bytes a1 54 46 8f 13 8f 52 43 89 cd has their two most significant bytes stripped becoming 21 14 06 0f 13 0f 12 03 09 0d and then reversed, on the PET they decode into: MICROSOFT! Although this particular version of the Easter egg was written for the Commodore PET, Microsoft did not encode its company name in BASIC specifically for Commodore: The 9 digit BASIC 6502 version 1.1 for the KIM-1 contained the 10 hidden bytes: The version of Microsoft BASIC for the 6502-based Apple II, called “AppleSoft“, contains the same 10 bytes KIM-1 BASIC was released in 1977, AppleSoft II in spring 1978, and the V2 ROM of the PET in spring 1979.
    [Show full text]
  • How to Get Hundreds of Free Programs for the VIC·20 And
    Second Class Mail Registration no. 5918, Shelburne, Ontario The INDEPENDENT Commodore Users' Magazine No. 20 JUNE 1983 ~'),~() VIC, PET Making Games, Finding Games, and Playing Games. C-64 GAMES Is It Good or Bad? How to get Hundreds of Free Programs for the VIC·20 and Commodore 64 see page 2 10610 BAYVIEW (Bayview Plaza) RICHMOND HILL, ONTARIO, CANADA L4C 3N8 (416) 884-4165 C64-LINK' The Smart 64 RTC Call or write payments Serial by VISA, Cartridge Audio 1/0 MASTERCARD Expansion Slot Switch RF Video Port Cassette Port Users Port or BANK TRANSFER. Mail orders also by certified check, etc. IEEE Disks (2031) (4040) Tape VIC Modem (8050) (8250) (9090) lEE E Printers 1541 Drive or VL3 Cable Many more 64s And V L 16 (4022) (8023) to Parallel 1525 Printer (8300) Printer etc. or 1515 Printer Wf fl (future) lEE E to Par a II e I IEEE to Serial or VL4 Cable Interface Cartridge Interface to Standard Parallel M other Board True Serial Modem Devices Devices Give These Expanded Capabilities To Your 64 * The ability to transfer data from any type of device to another (IEEE, Serial, Parallel) ,it I * BASIC 4.0 which allows you to run more PET BASIC programs and gives you extended disk and 110 commands. I And * The ability to have several 64s on line together - sharing common IEEE PAL © devices such as disks or printers with Spooling Capability. * Built-in machine language monitor I * A built-in terminal or modem program which allows the system to communi­ Spooling Other cate through a modem to many bulletin board systems and other computer mainframes.
    [Show full text]
  • BASIC Programming with Unix Introduction
    LinuxFocus article number 277 http://linuxfocus.org BASIC programming with Unix by John Perr <johnperr(at)Linuxfocus.org> Abstract: About the author: Developing with Linux or another Unix system in BASIC ? Why not ? Linux user since 1994, he is Various free solutions allows us to use the BASIC language to develop one of the French editors of interpreted or compiled applications. LinuxFocus. _________________ _________________ _________________ Translated to English by: Georges Tarbouriech <gt(at)Linuxfocus.org> Introduction Even if it appeared later than other languages on the computing scene, BASIC quickly became widespread on many non Unix systems as a replacement for the scripting languages natively found on Unix. This is probably the main reason why this language is rarely used by Unix people. Unix had a more powerful scripting language from the first day on. Like other scripting languages, BASIC is mostly an interpreted one and uses a rather simple syntax, without data types, apart from a distinction between strings and numbers. Historically, the name of the language comes from its simplicity and from the fact it allows to easily teach programming to students. Unfortunately, the lack of standardization lead to many different versions mostly incompatible with each other. We can even say there are as many versions as interpreters what makes BASIC hardly portable. Despite these drawbacks and many others that the "true programmers" will remind us, BASIC stays an option to be taken into account to quickly develop small programs. This has been especially true for many years because of the Integrated Development Environment found in Windows versions allowing graphical interface design in a few mouse clicks.
    [Show full text]
  • User's Reference Manual Commodore BASIC Version 4.0
    User's Reference Manual Commodore BASIC Version 4.0 This document took MANY hours of work to convert from paper to digital format. Printing had not been disabled however, please do no post this document on any publicly accessable location (i.e. your website) without getting written permission from www.commodore.ca in advance. commodore Scanned, OCR'ed & .PDF'ed by www.commodore.ca April 4, 2003 Commodore BASIC Version 4.0 Appropriate for use with: CBM and PET Computers • Series 2001 • Series 3000 • Series 4000 • Series 8000 Part Number 321604 First Edition July 1980 commodore © 1980 Commodore Business Machines Introduction Commodore BASIC 4.0 is the most sophisticated software developed for the CBM com- puter line to date. Programs are of course upward compatible from previous Commodore BASIC releases but both the user and the programmer can enjoy new features of 4.0 The first Commodore BASIC, version 2.0, was released in August 1977 for the PET 2001-8 computer. Version 3.0 in July 1978 added a machine language monitor and corrected known bugs of version 2.0. Version 3.0 is standard in all 2001 series since July 1978. Version 4.0, completed in October 1979 included all the improvements of previous releases, enhanced the speed of string processing, and integrated disk commands into the BASIC language. BASIC 4.0 is standard in the CBM 4000 series and the CBM 8000 series. It is also available as an upgrade for CBM 2001 and 3000 series. The information in this manual has been reviewed and is believed to be entirely reliable.
    [Show full text]
  • Commodore Enters in the Play “Business Is War, I Don't Believe in Compromising, I Believe in Winning” - Jack Tramiel
    Commodore enters in the play “Business is war, I don't believe in compromising, I believe in winning” - Jack_Tramiel Commodore_International Logo Commodore International was an American home computer and electronics manufacturer founded by Jack Tramiel. Commodore International (CI), along with its subsidiary Commodore Business Machines (CBM), participated in the development of the home personal computer industry in the 1970s and 1980s. CBM developed and marketed the world's best-selling desktop computer, the Commodore 64 (1982), and released its Amiga computer line in July 1985. With quarterly sales ending 1983 of $49 million (equivalent to $106 million in 2018), Commodore was one of the world's largest personal computer manufacturers. Commodore: the beginnings The company that would become Commodore Business Machines, Inc. was founded in 1954 in Toronto as the Commodore Portable Typewriter Company by Polish-Jewish immigrant and Auschwitz survivor Jack Tramiel. By the late 1950s a wave of Japanese machines forced most North American typewriter companies to cease business, but Tramiel instead turned to adding machines. In 1955, the company was formally incorporated as Commodore Business Machines, Inc. (CBM) in Canada. In 1962 Commodore went public on the New York Stock Exchange (NYSE), under the name of Commodore International Limited. Commodore soon had a profitable calculator line and was one of the more popular brands in the early 1970s, producing both consumer as well as scientific/programmable calculators. However, in 1975, Texas Instruments, the main supplier of calculator parts, entered the market directly and put out a line of machines priced at less than Commodore's cost for the parts.
    [Show full text]
  • Practical-Computing
    85pMay 1984 Reviews Grid Compass, Sharp PC -5000 Olivetti M-24, Touch Screen HP 150 BBC Graphics ROM and telesoftware add-on Logo for Atari, Commodore 64, Spectrum Denmark DKr34.50, Greece Dra 245. Holland DFL8 50. Italy L4100, Spain Pts 360. Switzerland SFr7 40, Germany DM8 50. France Fr32.60, Canada C$4.50, Australia A$3.00, Singapore M$6.35. USA $3.95(D72162) Authorised Dealer Service Centre System Consultancy COMPUTECH FINANCIAL ACCOUNTING PACKAGES Payroll £375 Invoicing and Stock Recording £295 Sales, Purchases and General Ledgers each £295 Also costing and group consolidation COMPUTECH UTILITIES DISK for reliable error checking copying, diskette scan, interpret and patch, etc VisiCalc, Applewriter and other Apple software (Prices onrequest) COMPUTECH CHAIN MAIL A mailing merging document processor which may be used with text files, including random files and Applewriter 1.1 binary files COMPUTECH GRAPHICS DISK for printing Apple pictures and graphs on Epson and Microline (free with printers purchased from Computech)£30 COMPUTECH TERMINAL UTILITIES Apple to Apple and Apple to mainframe from £130 switches and jumpers provide hardware options without soldering OM 4:2).Got_ovavav_ DIPLOMAT VIDEO DIGITISER store a frame from video camera in etof a second, process and print - for Apple II £195 for APPLE //e, including 64K Extended 80 Column Card£345 DIPLOMAT PARALLEL Interface £80 DIPLOMAT SERIAL COMMUNICATIONS Interface £85 DIPLOMAT RAM 16 Memory Expansion £95 DIPLOMAT CLOCKICALENDAR £80 LOWER CASE Character Generator with Applewriter 1,1. enhancements £50 MICROMUX Data Exchange (Max 16 Ports) from £850 MATRIX PRINTERS, Microline and Epson with graphics and up to 200 cps from £222 MICROLINE Optional Character Generator £15 DAISY WHEEL PRINTERS, Olympia, Qume, Ricoh from £798 Prices exclude VAT, Carriage and Packing For full details phone for data sheets and a FREE demonstration CLIMPUTIECIrel SYS1 168 Finchley Road, London NW3 6HP.
    [Show full text]
  • The Commodore 128 1 What's in This Book 2 the Commodore 128: Three Computers in One 3 the C128 Mode 6 the CP/M Mode 9 the Bottom Line 9
    The Official Book T {&~ Commodore \! 128 Personal Computer - - ------~-----...::.......... Mitchell Waite, Robert Lafore, and Jerry Volpe The Official Book ~~ Commodore™128 Personal Computer Howard W. Sams & Co., Inc. A Subsidiary of Macmillan, Inc. 4300 West 62nd Street, Indianapolis, Indiana 46268 U.S.A. © 1985 by The Waite Group, Inc. FIRST EDITION SECOND PRINTING - 1985 All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical. photocopying, recording, or otherwise, with­ out written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. International Standard Book Number: 0-672-22456-9 Library of Congress Catalog Card Number: 85-50977 Illustrated by Bob Johnson Typography by Walker Graphics Printed in the United States of America The Waite Group has made every attempt to supply trademark information about company names, products, and services mentioned in this book. The trademarks indicated below were derived from various sources. The Waite Group cannot attest to the accuracy of this information. 8008 and Intel are trademarks of Intel Corp. Adventure is a trademark of Adventure International. Altair 8080 is a trademark of Altair. Apple II is a registered trademark of Apple Computer, Inc. Atari and Atari 800 are registered trademarks of Atari Inc. Automatic Proofreader is a trademark of COMPUTE! Publications.
    [Show full text]
  • Advanced BASIC Programming for the Commodore 64
    Advanced BASIC programming for the Commodore 64 and Other Commodore Computers Editor-in-Chief: David Culverwell Executive Editor: Terrell Anderson Production Editor: Sandra Tamburrino Text Design: Paula Huber Cover Design: Don Sellers Indexer: Leah Kramer Typesetter: Action Comp Co., Inc., Baltimore, MD Printer: R. R. Donnelley & Sons Co., Harrisonburg, VA Typefaces: Trump Mediaeval (text), Antique Olive (display), OCR-A (programs) Advanced BASIC programming for the Commodore 64 and Other Commodore Computers Michael Richter Robert J. Brady Co., Bowie, MD 20715 A prentice-Hall Publishing and Communications Company Note to Authors Do you have a manuscript or a software program re­ lated to personal computers? Do you have an idea for developing such a project? If so, we would like to hear from you. The Brady Co. produces a complete range of books and applications software for the per­ sonal computer market. We invite you to write to David Culverwell, Editor-in-Chief, Robert J. Brady Co., Bowie, Maryland 20715. Advanced BASIC Programming for the Commodore 64 and Other Commodore Computers Copyright © 1984 by Robert J. Brady Co. All rights reserved. No part of this publication may be reproduced or transmit­ ted in any form or by any means, electronic or mechanical, including photo­ copying and recording, or by any information storage and retrieval system, without permission in writing from the publisher. For information, address Robert J. Brady Co., Bowie, Maryland 20715. Library of Congress Cataloging in Publication Data Richter, Michael, 1939- Advanced BASIC programming for the Commodore 64 and other Commodore computers. Includes index. 1. Commodore 64 (Computer)-Programming. 2.
    [Show full text]