# Microsoft Basic 1985 — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1)

## Transcribed source material

Machine transcriptions and image descriptions; uncertain copy may be marked [illegible]. Verify against the linked originals. Historical rights remain with the original owners.

These are transcribed excerpts, not the full publications. Open the originals for remaining pages.

### Image 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-504b381419086635048557c16dc75a00c0716005c4a4f231f039015b29275d3e)

MICROSOFT BASIC

Transcribed text:

Creative Programming in

MICROSOFT® BASIC

For optimal Macintosh™ performance

MICROSOFT PRESS

STEVE LAMBERT

Image description: 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

[Original Image 1](https://www.vintageapple.net/files/de135742871c7e04a257212004b02f90fa52cc05b3615ffb75d2ef2c8d24e72b/d6011c9a6f105d85fee97b21.webp)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-d370bc8e19ffff739fa6afefbcf2da8c926b159b8c6d99a4148c29b62f786bb2)

MICROSOFT BASIC

Transcribed text:

Creative Programming in

MICROSOFT® BASIC

For optimal Macintosh™ performance

MICROSOFT PRESS

STEVE LAMBERT

Image description: 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

[Original PDF page 1](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-a86a9683cae7356b1198b9dc125e27706e2304f45c00ed173f84daf91455aa71)

Creative Programming in Microsoft® BASIC

Transcribed text:

Creative Programming in
Microsoft® BASIC

For Optimal
Macintosh™
Performance

Image description: 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

[Original PDF page 2](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=2)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-043779d874d3e5906511917bd075c5d257450ae0375747bd7d2e8051d7ef9986)

Creative programming in Microsoft BASIC for optimal Macintosh performance.

Transcribed text:

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

[Original PDF page 4](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-fd6bd80639cc5f043d61867b13d425c6abd52959b8e430923e2c1f2268568f2c)

Transcribed text:

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

[Original PDF page 5](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-9cd846458549ca191195f6e3f83337d3e999f0616b5764ad627548899d5d4ac6)

Transcribed text:

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

[Original PDF page 6](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-e46b6e9bae29cd8e6d10640c7f1754c5ee6c7b0d338e5d51ed1ab7aa76c930fe)

Transcribed text:

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

[Original PDF page 7](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-e7981af31cea9e1859a57d4552a9294b6c56d483b8a80f5d5d19bf01d83e96ad)

Transcribed text:

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

[Original PDF page 8](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-dd256591e48a7dc8769584ba3905052536054c37ae684b3e63e9d4eafe9e4a80)

Transcribed text:

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

[Original PDF page 9](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=9)

### PDF page 10 · PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-c87b169a059aa6fe94ee38a41923baa9a1f2d89719e6e076126f09799ae74c8c)

Image description: The image is a plain, entirely blank white page with no artwork, layout elements, or markings visible.

[Original PDF page 10](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=10) · [Original PDF page 3](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=3)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-f8ebd02954007203ba055c628e09988d1b473ab0a96d43e49faada2f7b4e9655)

Image description: 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.

[Original PDF page 11](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=11)

### PDF page 12

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-microsoft-basic-1985-6e0e56/1#scan-f8590ddeff7d8989c115b809e5bc09e42d15f812d17cdb116033f567d3e59a19)

An Introduction to BASIC Chapter 1

Transcribed text:

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

[Original PDF page 12](https://www.vintageapple.net/files/e23a90b2d7a95e77700a0f26185f85ba3de32ed5ea6fe51f29ce3d4fff363673/Microsoft_Basic_1985.pdf#page=12)
