Commodore_64_ An_Introduction_to_Basic_Part_1.pdf

(32738 KB) Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
AN INTRODUCTION
TO BASIC- PART1
THE COMPREHENSIVE TEACH YOURSELF
PROGRAMMING SERIES
t commodore
COMPUTER
851038007.002.png
CONTENTS
851038007.003.png
Related Cassette
Programs
Subject
Tracing: Tracking down errors.
UNIT8PROG
Programmed Co/our; Normal and quote
UNIT9QUIZ
Unit9
screen modes; Screen representation of
conlrol characters; Useofposition andcolour
conlrol characters in progroms; The internal
clockTl$.
InputofData:The INPUT command;
UNIT10QUIZ
Relationships between programmerand user.
Flow-charts: Conditional commands in
UNIT11PROG
programs; Data validation; Flow-charts;
Glossaries; Program design.
AdvancedLoop Control:The FOR
UNIT12QUIZ
and NEXTcommands; Program structure.
Sounds: The 64voices; Control ofpitch,
SOUND DEMO, PIANO
103
volume and duration.
Unit 14
Data Reduction Programs: Terminating a
HEADS
stream ofdata; Program robustness.
ComputerGames: Reaction lime; theGET
REACTION
command; the internal limerTl; the RND
function; Structuringgames ofchance.
Afterword
AppendixA Mathematical aspects of 64: Expressions
Precision ofworking
Standard functions
Appendix B Answersto selected problems
Appendix C Common errors
851038007.004.png
you. (Yes—thereisacomputerinside.)Thelevel I
WelcometotheCOMMODORE 64
activities,industrialormedical applications,or
even games to amuseyou..
To havethis poweroveryourcomputer, to
make itintoafast,accurateobedientandwilling
slave,you mustbeabletoprogramthe machine.
Programming is the key to becoming a pilot.
Thiscourseisallaboutprogramming. It
alsoacompletemoderncomputerin itsown right.
Computersareextraordinarilyversatile; more
so,infact,thananythingexceptahuman.The64,
forinstance,canbeswitchedtobeateaching
machine,acalculator,anaidtothehandicapped,
□machineforfinancial recordsandstockcontrol,
amonitorfora patientin an intensivecareunit,a
computerused byengineerstodesign building-.,
powerstations andaircraft.
Computersandthesystemstheycontrol are
simpletotransfertoanyothercomputer,largeor
small.
The more programmingyou do,theeasier it
you. You do not need to know muchabou!
mathematics,butyouwillfind itusefulto havea
quietplacetoread,thinkandusethe64,anditis
thescenes.Thistrendwillcontinueformostofour
lifetimes.Theworld ispassingthrough a
computerrevolution,whichwillbeasprofound in
itseffectsasthe Industrial Revolutionwas in its
own time.
TheComputerRevolutioncan'tbestopped;
butall ofuscan, ifwelike,havesome influence
on theway itgoes. Theworld is becoming
divided intotwosortsofpeople—the
course. Don't rush!
Thecourseissplitintofifteen'units'.Eachunit
willtakeyouoneortwosolidevenings'work,on
average.Mostoftheunits includesomereading,
some practical workon the64, some
programming, and a 'self-test' questionnaire to
Everyunitcontainssome'experiments'whichyou
shouldtickoffasyoudothem.
When the units ask you questions,they
generallygive you spacesto writeyour answers.
Usethem. Write witha soft pencil, and have a
based products, orthey may hate computers, or
both. Tneyoften maketheirviewsknown, but
withoutany real effect—theycan'treachthe
controls,andwouldn'tknowhowtousethem if
they could.
rubbed out ifyou passthe64course on to
someoneelse. Ifyourcopyofthecoursealready
hastheanswerswritten in,gothrough itand
erase them before you start studying.
Programming isatight-knitsubjectinwhich
ideas depend closelyon each other. Topicsyou
learn aboutinearlierunitsarementioned and
used inthe lateroneswithoutanyfurther
explanation. Forexample,youwon'tbeableto
makeheadortailofunit10unlessyouhaveread
and understood allofunits 1 to9.Thismakes it
importantthatyoufollowtheunits in theorder
they are given.
ofthewhole revolution.They invent newtypesof
computers,andthinkuporiginalandusefulways
ofusing them.Thepilotshavea heavy
responsibility,since itrests onthem tosteerthe
worldtowardspeace,freedomand plenty,and
□wayfromthe nightmaresocietyoften depicted
in Science Fiction.
Whatsetsapartapilotfroma passenger?
Onlyone thing: understandingthewaya
computerworks. Ofcoursetherearedifferent
levelsofunderstanding.Mostpeopleunderstand
howto usea "Space Invaders" machineeven
though they couldn'texplainthe mechanismto
851038007.005.png
Whenyoustartworkona newunit, beginby
readingquicklyrightthrough itfrom beginningto
end.Youwon'tgetmuchofthedetail,butyouwill
formanideaofthekindoftopicsyouaregoingto
study.
Next,workthroughthe unit in detail. Every
partmatters,andthepartswhichseemthe
hardestmatterthemost. Don'tskipanything,but
frytounderstand everypoint.Whenyoufeel
you'velearnedsomething,repeatittoyourselfin
yourownwords. Don'tbeupset ifyoufindyou
orevengobacktoanearlierunittoclearup
someawkward point.This isquiteusualwith a
technical subject.
Programming is likeplaying a musical
instrument: you can only learn it by practice.You
mustthereforecompleteall theprogramming
problems in the course. As soon as you can, start
making upandsolving problems ofyourown.
WTienyou completethecourse,you'll be
abletousethe 64 for manydifferentpurposes.
Forinstance,you can have itadministertests or
quizzes,youcan make itplaygameswhichyou
inventyourself,andyoumayfind ituseful for
sumsandaccounts.Thegamesorotherapplica
tions can include coloured picturestoyourown
design,andsoundstoemphasiseyourmeaning—
beautiful tunes or rude noises!
Programming is,however,averylargesub
ject,ananoonecould do itfull justicein a single
course.Afterawhileyouwill probablywantto
takeyourprogrammingfurther.You may,for
instance, beinterested in solving morecompli
catedproblems,orinusingthe64asa con
trollerfora model railwayorprivatetelephone
exchange.Thesecondvolumein thisseries,
entitledAn IntroductiontoBasic:-Part2will
heipyouachievethesecomplexand
sophisticatedaims.
Well—enoughtalk. Itistimeyoustarted on
Unit 1. Good luck!
851038007.001.png
Zgłoś jeśli naruszono regulamin