Microsoft Basic 1985
From the originals
12 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
Image 1
MICROSOFT BASIC
Creative Programming in MICROSOFT® BASIC For optimal Macintosh™ performance MICROSOFT PRESS STEVE LAMBERT
A peach-colored book cover with large black stylized letters spelling BASIC over a pink concentric-arc graphic on a tilted square, a red banner reading 'For optimal Macintosh performance', a Microsoft Press logo box at lower left, and a gray vertical spine strip on the right bearing the author's name.
Reading notes: The large title letters are stylized; 'MICROSOFT' is printed above in spaced gray capitals and 'BASIC' is rendered in large black display letters, so the headline reading is inferred from the visible letterforms. Red top-left text 'Creative Programming in' is partially cut off at the top edge and may be incomplete. Spine author name read vertically from bottom to top.
- Printed product names
- Microsoft BASIC
- Languages
- English
PDF page 1
MICROSOFT BASIC
Creative Programming in MICROSOFT® BASIC For optimal Macintosh™ performance MICROSOFT PRESS STEVE LAMBERT
A book cover with a peach background, large black stylized BASIC lettering, a pink concentric-arc graphic on a tilted square, a red banner reading 'For optimal Macintosh performance', a gray vertical spine band with the author's name, and a Microsoft Press logo in the lower left.
Reading notes: The red top-left line 'Creative Programming in' is partially cut off at the left edge and may be incomplete. The Macintosh trademark symbol and the registered mark are rendered small and may vary in exact form. Reading order of the spine text 'STEVE LAMBERT' is vertical and was transcribed as read from bottom to top.
- Printed product names
- Microsoft BASIC
- Languages
- English
PDF page 2
Creative Programming in Microsoft® BASIC
Creative Programming in Microsoft® BASIC For Optimal Macintosh™ Performance
A plain white page with a centered black sans-serif title block reading the heading in three lines, with small specks and a faint red mark on the left edge.
Reading notes: Registered (®) and trademark (™) symbols are small and read as superscripts; they are reproduced as printed. Faint red marks and specks on the page are not text and were not transcribed.
- Printed product names
- Microsoft BASIC
- Languages
- English
PDF page 4
Creative programming in Microsoft BASIC for optimal Macintosh performance.
PUBLISHED BY Microsoft Press A Division of Microsoft Corporation 10700 Northup Way, Box 97200, Bellevue, Washington 98009 Copyright © 1985 by Steve Lambert All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Library of Congress Cataloging in Publication Data Lambert, Steve, 1945- Creative programming in Microsoft BASIC for optimal Macintosh performance. Includes index. 1. Macintosh (Computer)-Programming. 2. BASIC (Computer program language) I. Title. QA76.8.M3L36 1985 005.265 85-18952 ISBN 0-914845-57-8 Printed and bound in the United States of America. 123456789 FGFG 89098765 Distributed to the book trade in the United States by Harper and Row. Distributed to the book trade in Canada by General Publishing Company, Ltd. Distributed to the book trade outside the United States and Canada by Penguin Books Ltd. Penguin Books Ltd., Harmondsworth, Middlesex, England Penguin Books Australia Ltd., Ringwood, Victoria, Australia Penguin Books N. Z. Ltd., 182-190 Wairau Road, Auckland 10, New Zealand British Cataloging in Publication Data available Apple® is a registered trademark, ImageWriter'" and MacPaint™ are trademarks, and Macintosh TM is a trademark licensed to Apple Computer, Incorporated. Commodore TM 64 is a trademark of Commodore Electronics Limited. CompuServe® is a registered trademark of CompuServe Information Service. DIALOG® is a registered service mark of DIALOG Information Services, Incorporated. Dow Jones News/Retrieval® is a registered trademark of Dow Jones & Company, Incorporated. PL-lOOOT" is a trademark ofElexor Associates. IBM® PC is a registered trademark oflnternational Business Machines Corporation. Microsoft® and Multiplan® are registered trademarks of Microsoft Corporation. THE SOURCE"' is a service mark of Source Telecomputing Corporation. The Sensorbus TM is a trademark ofTransensory Devices, Incorporated.
Reading notes: Several trademark and service names have OCR-garbled symbols (e.g., 'ImageWriter'"', 'TM', 'PL-lOOOT"') that are normalized to clean spellings in productNames. The Library of Congress catalog number '85-18952' is ambiguous as a printed date and is listed only as printed.
- Printed product names
- Macintosh · ImageWriter · IBM PC · Multiplan · THE SOURCE · Sensorbus
- Printed dates
- 1985 · 1945 · 85-18952
- Languages
- English
PDF page 5
Preface Acknowledgments I Contents I Section I: Introduction x Chapter 1: An Introduction to BASIC Chapter 2: The Macintosh BASIC Environment 3 13 Section II: Graphics 24 Chapter 3: Introduction to Graphics Chapter 4: Tracking the Mouse Chapter 5: Drawing a Grid Chapter 6: Transferring a Picture Chapter 7: Manipulating a Picture Chapter 8: Generating a Pattern Chapter 9: The MiniPaint Program 27 31 43 55 67 85 111 Section Ill: Communications 142 Chapter 10: Introduction to Communications Chapter 11: The Terminal Program Chapter 12: The Expanded Communication Program 145 153 177 v
Reading notes: Section III heading reads 'Ill' which may be an OCR misreading of 'III'
- Printed product names
- Macintosh BASIC
- Languages
- English
PDF page 6
vi CREATIVE PROGRAMMING IN MICROSOFT BASIC Section IV : Games 262 Chapter 13: Introduction to Games Chapter 14: The Shell Game Chapter 15: The Backgammon Game 265 267 303 Section V: Data Acquisition and Control 336 Chapter 16: Introduction to Data Acquisition and Control Chapter 17: The ADC-1 Chapter 18: The HBC-1 339 347 371 Section VI: Appendices 394 Appendix A: Alphabetical List of Commands Appendix B: A Few Short Utility Programs Appendix C: Building the HBC-1 Index 397 443 481 531
Reading notes: Table of contents page; no advertised products, prices, or dates present.
- Languages
- English
PDF page 7
Preface I have been studying Microsoft BASIC, on and off, for about eight years-ever since I assembled my first kit-computer and discovered that if I wanted software for it, I had to write it myself. The availability of computer programs has improved since 1977, but every now and then I still want a program that just doesn't exist, and I dig out my BASIC books, refresh my memory, and become a programmer for a week or so. I have a pretty good collection of books about BASIC, having been through eight or nine com- puters with five different operating systems since that first kit. And because there are versions of Microsoft BASIC that will take advantage of the special features of almost every computer on the market, the purchase of each computer requires a new BASIC and a new book. If I have come up with a few truths in these years of learning and relearning BASIC, they are that complex programs are no more difficult to write than simple pro- grams-they are just longer-and the fastest way to learn how to program is by studying other people's programs and figuring out how they work (or why they don't). I have tried to apply these truths to this book about Microsoft BASIC for the Macintosh. The sample programs are not short, simple examples demonstrating features you could easily understand by reading the manual. They are, for the most part, programs that serve a useful purpose or demonstrate techniques that can be applied to such programs. I have tried to point out the pitfalls and "undocumented features" that I stumbled in or over, and explain the reasons for my approach to different problems. The power and speed of new versions of BASIC have kept pace with the power and speed of newly released computers. If this trend continues-and there is no rea- son to believe that it won't-it will soon be feasible to write commercial-application, vii
Reading notes: Line-break hyphenation in 'com-puters' and 'pur-pose' suggests reflowed text; reading order may be affected by page-break artifacts such as the trailing page marker 'vii'.
- Printed product names
- Microsoft BASIC · Macintosh
- Printed dates
- 1977
- Languages
- English
PDF page 8
viii CREATIVE PROGRAMMING IN MICROSOFT BASIC entertainment, and utility software in BASIC, thereby re-establishing computer pro- gramming as a cottage industry open to anyone with a personal computer and the ability to reason clearly. For the part-time programmer, it is easy to fall into the trap of using the old fa- miliar commands that have faithfully followed you from version to version of BASIC. I hope this book encourages you to explore new territory, expand your horizons, and take advantage of the tremendous potential of the power offered by the team of Microsoft BASIC and the Macintosh.
Reading notes: Page header 'viii CREATIVE PROGRAMMING IN MICROSOFT BASIC' appears to be a running header rather than a primary heading
- Printed product names
- Microsoft BASIC · BASIC · Macintosh
- Languages
- English
PDF page 9
Acknowledgments As with every book that manages to make the journey from a mere idea to a finished product in the hands of a reader, this book was produced through the cooperative efforts of many people. The people in the editorial, technical review, and production departments at Microsoft Press have my unqualified respect for their ability to pull all the pieces together into one cohesive package. My particular thanks go to Managing Editor Joyce Cox, who took personal responsibility for editing the manuscript, to Technical Review Manager Barry Preppernau, who provided the backgammon game in Chapter 15 and reviewed all programs for reliability, and to Technical Reviewer Chris Matthews, who built and tested an HBC-1, and helped with the technical as- pects of explaining analog-to-digital conversion. Special thanks go to two people who don't work for Microsoft Press, but who contributed greatly to this book: John Socha, fellow author and programmer, critically reviewed many of the pro- grams. He forced me to clean up my programming style, taught me much about both Microsoft BASIC and the Macintosh, and was always available to help me through the rough spots. Gordon Mills, a linear field engineer for Texas Instruments, devoted several hun- dred hours of his own time to the task of designing the HBC-1, and to the even greater task of explaining its theory of operation to me. ix
Reading notes: Headline not clearly identifiable in supplied text; primary heading set to null Some words appear split by extra spacing (e.g., 'Joyce Cox', 'Preppernau') which may reflect line-break artifacts
- Printed product names
- Microsoft Press · Microsoft BASIC · HBC-1
- Languages
- English
PDF page 10 · PDF page 3
The image is a plain, entirely blank white page with no artwork, layout elements, or markings visible.
PDF page 11
A completely blank white page with no visible artwork, layout elements, or printed content.
Reading notes: No visible text found in the image; transcript and printed fields left empty.
PDF page 12
An Introduction to BASIC Chapter 1
An Introduction to BASIC Chapter 1 When Apple created the Macintosh, it totally broke away from the orderly evolution- ary path followed by previous computers. The Mac is not only easy to use, it is friendly to the point of being fresh and has the potential for amazing power. Version 2.0 of Mi- crosoft BASIC made most of this power available to the average programmer, and the enhancements provided by version 2.1 and the BASIC compiler continue to increase the pleasure of programming on the Macintosh. Although this book is not a primer on either BASIC or the Macintosh, the chap- ters in this section give a short explanation of how the two fit together, and may help those readers familiar with traditional versions of BASIC on traditional machines to understand the power available through this new partnership. I The BASICs I People purchase the BASIC programming language for various reasons. Some have access to programs that are written in BASIC and need the language to run them. Others have specific problems and think they can create a program in BASIC that will solve them. A few intend to write programs for commercial distribution. But I imag- ine that the vast majority of the people who purchase BASIC do so out of a vague feel- ing that it is simply part of owning a computer. The computer is a mysterious device, and programming it occasionally is a responsibility much like the weekly winding of the grandfather clock, required to keep it running smoothly. Even after they discover their clock to be self-winding, people often continue to write programs in BASIC just because they find the exercise to be an entertaining form of mental gymnastics: Writ- ing and debugging a complex BASIC program can generate all the excitement and plea- sure of an adventure game you would pay to play in an arcade. 3
Reading notes: Page number '3' at end of text is uncertain as to whether it is a printed folio.
- Printed product names
- Macintosh · BASIC compiler
- Languages
- English