PC-BASIC Documentation

Total Page:16

File Type:pdf, Size:1020Kb

PC-BASIC Documentation PC-BASIC documentation Version 2.0.3 1. PC-BASIC 2.0.3 A free, cross-platform emulator for the GW-BASIC family of interpreters. PC-BASIC is a free, cross-platform interpreter for GW-BASIC, Advanced BASIC (BASICA), PCjr Cartridge Basic and Tandy 1000 GWBASIC. It interprets these BASIC dialects with a high degree of accuracy, aiming for bug-for-bug compatibility. PC-BASIC emulates the most common video and audio hardware on which these BASICs used to run. PC-BASIC runs plain-text, tokenised and protected .BAS files. It implements floating-point arithmetic in the Microsoft Binary Format (MBF) and can therefore read and write binary data files created by GW-BASIC. This is the documentation for PC-BASIC 2.0.3, last updated 2020-09-26 19:20:46. It consists of the following documents: • Quick Start Guide, the essentials needed to get started • User's Guide, in-depth guide to using the emulator • Configuration Guide, settings and options • Language Guide, overview of the BASIC language by topic • Language Reference, comprehensive reference to BASIC • Technical Reference, file formats and internals • Developer's Guide, using PC-BASIC as a Python module 2 PC-BASIC Table of Contents PC-BASIC 2.0.3 ...................................................................................................................... 2 Quick Start Guide................................................................................................................. 14 Installation.............................................................................................................................. 15 BASIC survival kit .................................................................................................................. 16 Program location.................................................................................................................... 17 External resources................................................................................................................. 18 User's guide ......................................................................................................................... 19 The working environment ...................................................................................................... 20 Special keys........................................................................................................................... 21 Keyboard shortcuts................................................................................................................ 24 Alternative keys ..................................................................................................................... 25 Clipboard operations.............................................................................................................. 25 Emulator control keys ............................................................................................................ 25 Compatibility .......................................................................................................................... 26 Programs and files................................................................................................................. 27 Accessing your drives............................................................................................................ 29 Compatible BASIC files ......................................................................................................... 30 Packages ............................................................................................................................... 31 Cassette tapes....................................................................................................................... 31 Security.................................................................................................................................. 32 Connecting to peripherals...................................................................................................... 33 Printing................................................................................................................................... 33 Serial and parallel ports ......................................................................................................... 33 Changing the interface........................................................................................................... 34 Emulation targets................................................................................................................... 35 Codepages ............................................................................................................................ 36 Fonts...................................................................................................................................... 40 Table of Contents 3 Redirecting I/O....................................................................................................................... 41 Command-line interface......................................................................................................... 41 Text-based interface .............................................................................................................. 42 Configuration guide............................................................................................................. 43 Changing settings .................................................................................................................. 44 Synopsis ................................................................................................................................ 46 Positional arguments ............................................................................................................. 47 Options .................................................................................................................................. 48 Examples ............................................................................................................................... 59 Language guide ................................................................................................................... 61 Working with programs .......................................................................................................... 62 Control flow............................................................................................................................ 63 Arrays and variables .............................................................................................................. 66 Type conversion .................................................................................................................... 67 String operations.................................................................................................................... 68 Text and the screen ............................................................................................................... 69 The printer ............................................................................................................................. 70 Keyboard input....................................................................................................................... 71 Function-key macros ............................................................................................................. 72 Calculations and maths ......................................................................................................... 73 Mathematical functions .......................................................................................................... 73 Random numbers .................................................................................................................. 73 Devices and files.................................................................................................................... 74 File operations ....................................................................................................................... 74 Devices .................................................................................................................................. 74 Graphics ................................................................................................................................ 77 Sound .................................................................................................................................... 78 Joystick and pen .................................................................................................................... 79 Disks and DOS ...................................................................................................................... 80 Serial communications........................................................................................................... 81 4 PC-BASIC Event handling ....................................................................................................................... 82 Error handling ........................................................................................................................ 83 User-defined functions........................................................................................................... 84 Date and time ........................................................................................................................ 85 Including data in a program ..................................................................................................
Recommended publications
  • Cumberland Tech Ref.Book
    Forms Printer 258x/259x Technical Reference DRAFT document - Monday, August 11, 2008 1:59 pm Please note that this is a DRAFT document. More information will be added and a final version will be released at a later date. August 2008 www.lexmark.com Lexmark and Lexmark with diamond design are trademarks of Lexmark International, Inc., registered in the United States and/or other countries. © 2008 Lexmark International, Inc. All rights reserved. 740 West New Circle Road Lexington, Kentucky 40550 Draft document Edition: August 2008 The following paragraph does not apply to any country where such provisions are inconsistent with local law: LEXMARK INTERNATIONAL, INC., PROVIDES THIS PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions; therefore, this statement may not apply to you. This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in later editions. Improvements or changes in the products or the programs described may be made at any time. Comments about this publication may be addressed to Lexmark International, Inc., Department F95/032-2, 740 West New Circle Road, Lexington, Kentucky 40550, U.S.A. In the United Kingdom and Eire, send to Lexmark International Ltd., Marketing and Services Department, Westhorpe House, Westhorpe, Marlow Bucks SL7 3RQ. Lexmark may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.
    [Show full text]
  • Alive Dead Media 2020: Tracker and Chip Music
    Alive Dead Media 2020: Tracker and Chip Music 1st day introduction, Markku Reunanen Pics gracefully provided by Wikimedia Commons Arrangements See MyCourses for more details, but for now: ● Whoami, who’s here? ● Schedule of this week: history, MilkyTracker with Yzi, LSDJ with Miranda Kastemaa, holiday, final concert ● 80% attendance, two tunes for the final concert and a little jingle today ● Questions about the practicalities? History of Home Computer and Game Console Audio ● This is a vast subject: hundreds of different devices and chips starting from the late 1970s ● In the 1990s starts to become increasingly standardized (or boring, if you may :) so we’ll focus on earlier technology ● Not just hardware: how did you compose music with contemporary tools? ● Let’s hear a lot of examples – not using Zoom audio The Home Computer Boom ● At its peak in the 1980s, but started somewhat earlier with Apple II (1977), TRS-80 (1977) and Commodore PET (1977) ● Affordable microprocessors, such as Zilog Z80, MOS 6502 and the Motorola 6800 series ● In the 1980s the market grew rapidly with Commodore VIC-20 (1980) and C-64 (1982), Sinclair ZX Spectrum (1982), MSX compatibles (1983) … and many more! ● From enthusiast gadgets to game machines Enter the 16-bits ● Improving processors: Motorola 68000 series, Intel 8088/8086/80286 ● More colors, more speed, more memory, from tapes to floppies, mouse(!) ● Atari ST (1984), Commodore Amiga (1985), Apple Macintosh (1984) ● IBM PC and compatibles (1981) popular in the US, improving game capability Not Just Computers ● The same technology powered game consoles of the time ● Notable early ones: Fairchild Channel F (1976), Atari VCS aka.
    [Show full text]
  • Introduction to Programming in Fortran 77 for Students of Science and Engineering
    Introduction to programming in Fortran 77 for students of Science and Engineering Roman GrÄoger University of Pennsylvania, Department of Materials Science and Engineering 3231 Walnut Street, O±ce #215, Philadelphia, PA 19104 Revision 1.2 (September 27, 2004) 1 Introduction Fortran (FORmula TRANslation) is a programming language designed speci¯cally for scientists and engineers. For the past 30 years Fortran has been used for such projects as the design of bridges and aeroplane structures, it is used for factory automation control, for storm drainage design, analysis of scienti¯c data and so on. Throughout the life of this language, groups of users have written libraries of useful standard Fortran programs. These programs can be borrowed and used by other people who wish to take advantage of the expertise and experience of the authors, in a similar way in which a book is borrowed from a library. Fortran belongs to a class of higher-level programming languages in which the programs are not written directly in the machine code but instead in an arti¯cal, human-readable language. This source code consists of algorithms built using a set of standard constructions, each consisting of a series of commands which de¯ne the elementary operations with your data. In other words, any algorithm is a cookbook which speci¯es input ingredients, operations with them and with other data and ¯nally returns one or more results, depending on the function of this algorithm. Any source code has to be compiled in order to obtain an executable code which can be run on your computer.
    [Show full text]
  • A Beginner's Guide to Freebasic
    A Beginner’s Guide to FreeBasic Richard D. Clark Ebben Feagan A Clark Productions / HMCsoft Book Copyright (c) Ebben Feagan and Richard Clark. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". The source code was compiled under version .17b of the FreeBasic compiler and tested under Windows 2000 Professional and Ubuntu Linux 6.06. Later compiler versions may require changes to the source code to compile successfully and results may differ under different operating systems. All source code is released under version 2 of the Gnu Public License (http://www.gnu.org/copyleft/gpl.html). The source code is provided AS IS, WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Microsoft Windows®, Visual Basic® and QuickBasic® are registered trademarks and are copyright © Microsoft Corporation. Ubuntu is a registered trademark of Canonical Limited. 2 To all the members of the FreeBasic community, especially the developers. 3 Acknowledgments Writing a book is difficult business, especially a book on programming. It is impossible to know how to do everything in a particular language, and everyone learns something from the programming community. I have learned a multitude of things from the FreeBasic community and I want to send my thanks to all of those who have taken the time to post answers and examples to questions.
    [Show full text]
  • IBM Unica Campaign: Administrator's Guide to Remove a Dimension Hierarchy
    IBM Unica Campaign Version 8 Release 6 February, 2013 Administrator's Guide Note Before using this information and the product it supports, read the information in “Notices” on page 385. This edition applies to version 8, release 6, modification 0 of IBM Unica Campaign and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright IBM Corporation 1998, 2013. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Chapter 1. Administration in IBM Unica To view system table contents .......27 Campaign ..............1 Working with user tables ..........28 Campaign-related administrative tasks in IBM Unica About working with user tables ......28 Marketing ...............1 Guidelines for mapping user tables .....28 To access data sources from within a flowchart 29 Chapter 2. Managing security in IBM Working with user tables while editing a flowchart ..............29 Unica Campaign ...........3 Working with user tables from the Campaign About security policies ...........3 Settings page .............30 The global security policy .........3 Working with data dictionaries ........39 How Campaign evaluates permissions.....4 To open a data dictionary.........39 Using the Owner and Folder Owner roles . 4 To apply changes to a data dictionary ....40 Guidelines for designing security policies....5 When to use a data dictionary .......40 Security scenarios.............5 Data dictionary syntax..........40 Scenario 1: Company with a single division . 5 To manually create a new data dictionary . 40 Scenario 2: Company with multiple separate Working with table catalogs .........41 divisions...............7 To access table catalogs .........41 Scenario 3: Restricted access within a division .
    [Show full text]
  • Ecaccess User Guide
    ECaccess User Guide User Support Operations Department Version 3.3.0 May 2009 c Copyright 2009 European Centre for Medium-Range Weather Forecasts Shinfield Park, Reading, RG2 9AX, United Kingdom Literary and scientific copyrights belong to ECMWF and are reserved in all countries. The information within this publication is given in good faith and considered to be true, but ECMWF accepts no liability for error, omission and for loss or damage arising from its use. CONTENTS Contents 1 Introduction 3 2 Ecaccess concepts 4 2.1 ECaccess gateway ......................................... 4 2.2 Using an ECaccess gateway ................................... 5 2.3 Plugins ............................................... 5 3 Security authentication 7 3.1 ECaccess certificate ........................................ 7 3.2 ECcert command ......................................... 7 4 Unattended file transfers initiated from ECMWF 10 4.1 Target location ........................................... 10 4.2 ECtrans command ......................................... 11 4.2.1 Transfer to a Member State host via gateway ....................... 12 4.2.2 Transfer from a Member State host via gateway ...................... 12 5 Shell commands 14 5.1 Environment ............................................ 14 5.2 Access to Shell commands .................................... 15 5.3 General information ........................................ 15 5.4 File management ......................................... 15 5.5 Batch job management .....................................
    [Show full text]
  • Argus Research (July 2020)
    EQUITY RESEARCH REPORT July 13, 2020 MOLECULAR DATA INC. (NCM: MKD) Founded in 2013, China-based Molecular Data operates an e-commerce platform that KEY STATISTICS connects and serves participants of the Chinese chemicals industry across the value chain. Key Stock Statistics COMPANY HIGHLIGHTS Recent price (7/7/20) $2.40 * MKD: Connecting China’s Chemical Industry Value Chain 52 week high/low $11.80/$0.57 ADS Outstanding (M) 115 * In our view, Molecular Data has assembled a comprehensive network that can capture value across multiple previous pain points in China’s fragmented chemicals industry. Market cap (M) $276.0 Dividend Nil * After several years of organically building platform capabilities to include financial services, warehousing, logistics and software as a service (SaaS) offerings, Molecular Yield Nil Data should now be able to diversify its revenue stream beyond its core chemical direct e-commerce sales. This should lead to enhanced profit margins and, ultimately, sustainable Sector Overview profitability. Sector Materials * At the end of 2019, Molecular Data completed an initial public offering that yielded net Sector % of S&P 500 2.5% proceeds of approximately $55 million. As a result, we view the company as well posi- tioned to invest in its integrated e-commerce platform with new higher-margin services, and to pursue the acquisition of new capabilities and services globally. Financials ($M) * Although we expect near-term financial results to be impacted by the COVID-19 outbreak, Cash & Mkt Securities 8.3 which forced many customers and suppliers to halt operations throughout the first half of Debt 2.0 2020, we are encouraged by continued robust traffic on the Molbase platform.
    [Show full text]
  • Popular Computing Weekly (1984-03-15)
    1 '^0 POPULAR i(h>^ BRITAIN'S BEST-SELLING MICRO WEEKLY News Desk Business Software houses moves from Commodore opt for Amstrad rron LOMMODORE f NEWS FLASH TITANIC SEE PAGE 30 SiUiOTi<:iJU l^STAR-j OOOOQOOOO DMSIS330000QOOOOO 2. • Prugrammlng Bon: Skull Trap I « Mi>lnrrJa-i mm aitH rtfltKM .n, on Commodore 64 See page 10 I 4. • New Releases .4. LGAMEtJ WJ itivmMl SO -SOFT WAR E CAN you HANDLE THE ULTIMATE? FEATURE PACKED, 100% MACHINE CODE, THE MOST AMAZING PROGRAMMES, THE SMOOTHEST AND PURE ADDICTION, AQiON, THE HIGHEST RESOLUTION GRAPHICS? SO WHICH WILL BLOW FIRST - YOUR COMPUTER OR ALL ULTIMATE GAMES ARE ARCADE STANDARD, VOUR MIND? ™H.BfollDwnBr I Send to: , UllimatePlayThcGo The Green, AshbydsbZouch, I of Aihby CompulJii andGrii(^iciLld..The Grwi. AiMay 6a I :wlBf.hir«,T«l([l530| 411485. D. ^1^ 15-21 March 19S4 Vol 3 No 1 5 Ediior News Imagine you are playing an aijwenture. Brendon Gore You are happily exploJing a fantasy world, indulging in a little monster News Editor Letters y David Kelly bashing, when an arrow appears in ttie Reportsr middle of your chesl. With dimming Star 10 Chrisiina ErsKitie Game eyes, you read the lollowing message: Sortware Editor Skull Trap on CoFTKTioOoiB 64 By James N "You have been Killed by Duncan, who G rati am Tayloi is floors Street Lite 12 in the same building two above Production Editor you". Lynne Conslabie Dauid KflHy lalksio Roban Slsm Editorial Secretary Reviews 16 Clao Clierry l^ulti-laskfna package trom Skywate Advertisement U»r>aget The Mulli User Dungeon (or MUD as David Lake it is more affectionately known) has Asslelant Advertisement Manager been up and running at Essex Uni- Allan versity since 1979.
    [Show full text]
  • MIC5161 Win 2003 Launch V6
    Microsoft Windows Server 2003 and Microsoft Visual Studio .NET 2003 Launch Guide Do more with less. 1 Contents Introduction 2 Introducing Microsoft® Windows® Server 2003 4 Windows Server 2003 Case Studies 10 Introducing Microsoft® Visual Studio® .NET 2003 26 Visual Studio .NET 2003 Case Studies 41 Australian .NET Connected Partners 47 Microsoft® SQL Server™ 52 Microsoft Exchange Server 53 Windows Server 2003 and Visual Studio .NET 2003 Launch Sponsors 55 Platform Partner 56 Platinum Sponsors 61 Gold Sponsors 81 Silver Sponsors 96 Australian Windows Server 2003 JDP 100 Microsoft Gold Certified Partners 102 2 3 Welcome to the launch of Windows Server 2003! This is an exciting time for In my ten or more years in the Australian developer community, the combination Microsoft, our partners and customers, as this is unquestionably the most of Microsoft Windows Server 2003 and Microsoft Visual Studio® .NET 2003 is customer-focused Windows Server release yet. The reality of today’s IT environment the most exciting launch I have ever been involved with. Last February, Microsoft is the demand to do more with technology and, at the same time, do it with reset the bar for innovation and productivity with a new development paradigm for less cost. Over the last two years, we have spent time with customers using building Web Services and applications – Visual Studio .NET. This year, we build Microsoft® Windows® 2000 Server and Windows NT® Server 4.0 to really on that momentum by offering an entire development platform for the building understand what it would take to enable them do a lot more with Windows Server and execution of those applications.
    [Show full text]
  • MASM61PROGUIDE.Pdf
    Introduction (C) 1992-1996 Microsoft Corporation. All rights reserved. Programmer's Guide Microsoft® MASM Assembly-Language Development System Version 6.1 For MS-DOS® and Windows™ Operating Systems Microsoft Corporation Information in this document is subject to change without notice. Companies, names, and data used in examples herein are fictitious unless otherwise noted. No part of this document maybe reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Microsoft Corporation. ©1992 Microsoft Corporation. All rights reserved. Microsoft, MS, MS-DOS, XENIX, CodeView, and QuickC are registered trademarks and Microsoft QuickBasic, QuickPascal, Windows and Windows NT are trademarks of Microsoft Corporation in the USA and other countries. U.S. Patent No. 4,955,066 Hercules is a registered trademark of Hercules Computer Technology. IBM, PS/2, and OS/2 are registered trademarks of International Business Machines Corporation. Intel is a registered trademark of Intel Corporation. NEC and V25 are registered trademarks and V35 is a trademark of NEC Corporation. Document No. DB35747-1292 Printed in the United States of America. Macro Assembler 6.1 (16-bit) - MSDN Archive Edition Page 1 MASM Features New Since Version 5.1 (C) 1992-1996 Microsoft Corporation. All rights reserved. Introduction The Microsoft® Macro Assembler Programmer’s Guide provides the information you need to write and debug assembly-language programs with the Microsoft Macro Assembler (MASM), version 6.1. This book documents enhanced features of the language and the programming environment for MASM 6.1. This Programmer’s Guide is written for experienced programmers who know assembly language and are familiar with an assembler.
    [Show full text]
  • Scanned Document
    OJ )> Vl () 0 ,0 ,m' I 1-V II&JS mm&Radio4 I nederlandse ornroep stichting I THE CHIP SHOP BASICODE2 mmmRadio4 - Broadcasting Support Services CONTENTS ©NOS nederlandse omroep stichting, Hilversum, Netherland 1. INTRODUCTION 5 ISBN 0-906965-14-4 2. HOW TO USE BASICODE-2 7 This edition first published by Broadcasting Support Services January 1984 3. BASICODE- THE SPECIFICATIONS 9 THE CHIP SHOP BBC Radio4 4. BASICODE-2 PROTOCOL 12 British Broadcasting Corporation Portland Place 5. APPLE II & lie 26 London W1A 1AA 6. BBC (A& B) 29 All rights reserved. This handbook and the accompanying computer programs are copyright. No part of this handbook or 7. COMMODORE COMPUTERS 31 the accompanying computer programs may be reproduced, 8. SHARP MZSOA 36 translated, copied or transmitted by any means whatsoever without the prior written permission of the copyright owners. 9. SINCLAIR ZX81 37 The publisher assumes no responsibility for errors, nor liability 10. TANDY TRS-80 & VIDEOGENIE 41 for loss or damage, however caused, arising from the use of the Basicode 2 kit. 11. THE FUTURE 47 The BASICODE-2 kit is available for £3.95 frorr:: Broadcasting Support Services P.O. Box? London W3 6XJ Please make cheques or postal orders payable to Broadcasting Support Services. Published for The Chip Shop, Radio 4, by Broadcasting Support Services- an independent educational charity providing follow­ up services for viewers and listeners. Introduction Chapter One BASICODE-2 INTRODUCTION BASICODE has been developed by the radio programme Hobbyscoop This book and the accompanying cassette contain the details of NOS­ which is broadcast weekly by Nederlanse Omroep Stichting (NOS), BASICODE.
    [Show full text]
  • Awk, Perl, Etc
    CNAM, spécialité Informatique NSY116- Multimédia & interaction humain-machine (2008-9) Le texte P. Cubaud <[email protected]> 1. Codes, structures (2. Transport, compression, cryptage) 3. Analyse (4. Synthèse) 5. Présentation Bibliographie B. Habert, C. Fabre, F. Isaac De l’écrit au numérique InterEditions, 1998 I.H. Witten, A. Moffat, T.C. Bell Managing gygabytes. Compressing and indexing documents and images Van Nostrand, 1994 Techniques de l’ingénieur série H. section Document numérique (en ligne au CNAM) R. Laufer, D. Scavetta Texte, hypertexte, hypermédia Que-sais-je n°2629 (v2 1995) 1. Codes - Structures Codage des caractères Trois problèmes : • caractère ≠ glyphe • coder ≠ classer • norme ≠ standard Aussi vieux que le télégraphe… et toujours non résolus. 7 bits : American Standard Code for Information Interchange (ASCII, 1967 - puis ISO646 en 1983) 8 bits : ISO-Latin-XXX (ISO 8859-n) Au delà : Unicode (1990, v3 en 2000) et ISO 10646 = Site web unicode: www.unicode.org Une table à garder en attendant… et un outil : iconv MACCROATIAN [numer:~] pcubaud% iconv -l MACROMANIA ANSI_X3.4-1968 ANSI_X3.4-1986 ASCII CP367 IBM367 ISO-IR-6 ISO646-US ISO_646.IRV:1991 US US-ASCII CSASCII MACCYRILLIC UTF-8 MACUKRAINE ISO-10646-UCS-2 UCS-2 CSUNICODE MACGREEK UCS-2BE UNICODE-1-1 UNICODEBIG CSUNICODE11 MACTURKISH UCS-2LE UNICODELITTLE MACHEBREW ISO-10646-UCS-4 UCS-4 CSUCS4 MACARABIC UCS-4BE MACTHAI UCS-4LE HP-ROMAN8 R8 ROMAN8 CSHPROMAN8 UTF-16 NEXTSTEP UTF-16BE ARMSCII-8 UTF-16LE GEORGIAN-ACADEMY UTF-32 GEORGIAN-PS UTF-32BE KOI8-T UTF-32LE MULELAO-1
    [Show full text]