Introduction to BASIC

From C64-Wiki
Jump to navigationJump to search

Introduction to BASIC by Andrew Colin is a self-study course of the BASIC 2.0 programming language on Commodore 64. The course originally in English, presented in 1982, has been translated into Italian and is divided into two sections, a first part beginner and a second advanced part. This course was done in the same way for the other Commodore computer the VIC 20.

Introduction to BASIC
Language English (American), Italian
Author(s) Andrew Colin
Publisher Commodore Business Machines, Inc.
Year 1982
ISBN ISBN
Original price USD, , GBP
Media {{{Media}}}
Pages 152
Last Edition First Edition
Genre Programming Guide
Information



The Packaging[edit]

The packaging is presented in a solid blue colored cardboard box which the Commodore uses for its programs. Inside is the volume Introduction to BASIC Part 1 (Introduction to BASIC Part 1) and in another similar package the volume Introduction to BASIC Part 2(Introduction to BASIC Part 2), in A4 format and complete with general index and alphabetical index. Each part is completed by two tape cassettes with the programs listed in the books. The exercises to be done in the boxes are in English, also in the Italian version. It is quite easy, with a little goodwill to translate them into Italian, because the programs are BASIC 2.0, short and easily listed. In the first editions, a useful plastic template (flow-chart stencil) was also provided to draw the flow diagrams but later they didn't put it on anymore.

The Manuals[edit]

Introduction to BASIC Part 1[edit]

The "Introduction to BASIC Part 1" manual is a self-study text divided into 15 lessons, called "units", each of which deals with an important aspect of programming in BASIC. The introduction teaches how to proceed in the study. Colin teaches a study methodology useful for studying any subject, read the entire chapter quickly and fix the most important points, then read each paragraph in depth, fixing attention on the most important points, do the exercises, repeat the reading trying to memorize the most important points. Do not go to the next chapter if you have not finished the previous chapter. When studying a chapter, one must put oneself in the condition of having enough time to read it all in one session, without having interruptions. If you are interrupted in the study halfway through a chapter and resume it after some time, you must resume the reading from the beginning. Do not let many weeks go by between one chapter and the next. On the other hand it is necessary to digest the study and not study more than one chapter a day. The first unit is divided into three parts, called "experiments". The first experiment talks about the generalities that need to be known to make the computer work, when and how to make the connections, the precautions that must be taken for a correct use of the electrical part, in another it is explained how to fix the monitor and load the cassettes. To this end, the TESTACARD program is presented. In the second experiment we talk about the diskette recorder and the appropriate commands for a correct use of the diskette recorder. In the last experiment you learn to load the HANGMAN program which is the HANGER game, you have to guess the letters of a word but at every mistake a part of the gallows is built. If the word is guessed, we save ourselves, if after a certain number of attempts we do not guess we end up hanging. The Hangman game has not been translated. The second unit talks about the keyboard and is divided into four sections, one talks about the control keys, one talks about numbers and letters, one talks about the screen and one talks about how to correct introduction errors. The program that accompanies the second unit is called SPEETYPE and teaches you to beat the keyboard faster. The third unit talks about how to change colors on the screen. The third unit is accompanied by the UNIT3QUIZ program, as I said in English also in the Italian version but easily translatable. Similarly, all units from four to fifteen deal in detail with direct commands, program commands, practical advice, cycle control, how to find errors, how to program screen colors, how to input data with the INPUT command. , how to design a flow chart to build a solid program. Unit 12 talks about FOR cycles and how to program in a structured way. Unit 13 talks about the sound of the Commodore 64 and the commands to control the waveform emitted by the Commodore 64 sound synthesizer, called SID, accompanied by a SOUND DEMO program and a PIANO program that transforms the Commodore 64 keyboard into a small musical keyboard. Unit 14 talks about how to build robust programs, that is, proof of all the errors that the user makes and which usually make the program exit with an error message. Unit 14 is accompanied as usual by a program called HEAD. Unit 15 closes the beauty course by talking about the games. It proposes the REACTION program which measures a person's reflexes. In the three appendices we speak in Appendix A of the mathematical aspects of the Commodore 64, of the treatment of expressions, of the degree of precision of the calculations and of the standard functions made available on the Commodore 64. In Appendix B there are answers to the most common questions. In Appendix C there is a list of common errors. Unit 14 is accompanied as usual by a program called HEAD. Unit 15 closes the beauty course by talking about the games. It proposes the REACTION program which measures a person's reflexes. In the three appendices we speak in Appendix A of the mathematical aspects of the Commodore 64, of the treatment of expressions, of the degree of precision of the calculations and of the standard functions made available on the Commodore 64. In Appendix B there are answers to the most common questions. In Appendix C there is a list of common errors. Unit 14 is accompanied as usual by a program called HEAD. Unit 15 closes the beauty course by talking about the games. It proposes the REACTION program which measures a person's reflexes. In the three appendices we speak in Appendix A of the mathematical aspects of the Commodore 64, of the treatment of expressions, of the degree of precision of the calculations and of the standard functions made available on the Commodore 64. In Appendix B there are answers to the most common questions. In Appendix C there is a list of common errors. the treatment of expressions, the degree of precision of the calculations and the standard functions made available on the Commodore 64. In Appendix B there are answers to the most common questions. In Appendix C there is a list of common errors. the treatment of expressions, the degree of precision of the calculations and the standard functions made available on the Commodore 64. In Appendix B there are answers to the most common questions. In Appendix C there is a list of common errors.

Introduction to BASIC Part 2[edit]

The "Introduction to BASIC Part 2" manual is a self-study text divided into 15 lessons, called "units", each of which deals with an important aspect of advanced programming in BASIC. Unit 16 speaks of the DATA command, it is how to insert and read the data and how to reset the pointers with the RESTORE command. Unit 17 talks about the complexity of programs, IF-THEN commands, logical operators, AND, OR and NOT. In unit 18 we start talking about subroutines, their format and the use of the GOSUB command. This unit is accompanied by the PICTURE explanatory program. Unit 19 delves into the subroutine topic and adds a new program to the series called BIGLETTERS64. Unit 20 speaks of the "arrays". Unit 21 deals with strings, i.e. commands for manipulating words. Unit 22 talks about how to use "arrays" in research programs. It is interesting to see how the QUICKSORT program works, to understand how the computer manipulates strings and compares them. This little program here is very slow compared to the modern research programs that are on the Internet but this is a didactic program and studying it carefully also makes it clear how to set the keywords to do a search on Google. Unit 23 finally talks about the Commodore 64 machine, giving a close view of the bits, bytes and addressing, we are talking about the structure of the Commodore 64 and the organization of the memory of the Commodore 64 (which is a gruyere). There is talk of how to enter machine language data with the PEEK and POKE commands. Rarely, we talk about the character set and how to change them. In one of the accompanying programs WASPS64, a nice animated game is presented that teaches how to use the cursor keys to control an insecticide spray to kill a mosquito that turns randomly on the screen. Unit 24 is a mixture of particular concepts, on many commands grouped in this chapter, which is accompanied by MAKENAMES a title that is already a whole program. Unit 25 teaches how to program a program (program design), with the demonstrations GRAFFS and DUNGEON. The last unit the 26, finally speaks of a very particular aspect of the Commodore 64, which are the SPRITES. The VIC 20, sprite doesn't have any, as well as MS-DOS or Windows sprite don't have any. The sprite is a small area, programmable graphically, in order to make figurines, which can be moved, by means of appropriate controls on the screen. The Commodore 64 has 8 sprites which can be intercepted with each other with other commands. This is the basic concept of all the games that the Commodore 64 has. In fact, in unit 26 we talk about how to draw a sprite, how to insert a sprite into a program, the control of the sprites, the study of programs with sprite, many color sprites and how to make many sprites work together. This chapter is the icing on a good and abundant cake. The programs that accompany this chapter are SPRITE DISPLAY, SPRITE EDITOR, and some examples that are called LINEAR, CIRCULAR 1, CIRCULAR 2, BOUNCE, BUS, COSPRED, a color sprite editor, SOLAR, a listable program, all DATA and POKE, that calculates the orbit of the Earth around the Sun and the Moon around the Earth and shows the orbits on the video, SPRMAC, GROTTY, listable, calculates the orbits like Solar, plus Venus and a comet and PLANETS, listable, like Grotty but more precise with the speed of the comet variable according to the distance from the Sun. In short, in this final part there are the bases to program all the games and all the educational programs that can come to mind such as Visible solar system, Asronomy and planetarium. Three appendices, in the first we talk about how to create sounds and how to play music, then talk about the principles of harmony on the Commodore 64 and three demonstration programs which are DUBLIN, TUNE PLAYER and SHEBA, which plays “The arrival of the Queen of Saba ”by GF Handel, the first demo (stration) of what the small three-voice SID of the Commodore 64 is capable of, seems to listen to a quartet of an interval on television. Chamber music is ideal for playing on the Commodore 64. At the Commodore 64 I made him make all the noises that came to my mind, from the police siren, to the (difficult) one of the submarines, to the sirens of the factories in wartime, horn, you can indulge yourself and have fun in a world of sounds. Then I bought Synthesond from HES (Human Engineer Software) and I marched, programmed any waveform of the three synthesizers that the SID makes available and play music with the keyboard, recording it on floppy disk, an extraordinary thing. Appendix B provides a subroutine library, which you can take advantage of and meanwhile learn how to recognize and load interesting subroutines from other programs. The subroutines concern a tolerant, robust INPUT, larger letters, formatted numbers, show strings, binary converter, name extractor, search in a list, the bubble sort, which is a search routine, the quicksort, other search routine, a simplier of fractions, equations, Appendix C gives the list of answers to the proposed exercises.

The magnetic support with its programs[edit]

The tapes of the two courses are four in all and mainly contain quiz units, to be performed after finishing studying a unit, to understand if you have learned enough on your own or if you need to go on repetition. The quiz units at the end give an overall mark, by means of which it is possible to understand whether it is possible to move on to the study of the next unit or to go back to the beginning. In addition to the quiz units, there are many demonstration programs, such as SOUND DEMO, HEADS, ESG, CRAPS and various others. I have never seen floppy disks, also because in 1982, when the course was out, the Model 154I drive was a rarity and you went for everything only with the tape recorder. Then at that time the tape recorder was considered more secure and backup was preferred to be done on tape, like banks.

How to load programs[edit]

To load the programs insert the cassette in the tape recorder, write LOAD on the keyboard and press the RETURN  key. PRESS PLAY ON TAPE appears and you must press the PLAY button on the recorder. At the beginning of the upload the first part is dedicated to the title that is loaded and after a while it appears written on the video, you tap the space bar to start the upload immediately, otherwise after a while it starts on its own. When it has finished loading READY appears, you can see the program, with the LIST command, you can print on the printer, with the PRINT command, or you can run it with the RUN command.

The Author[edit]

Andrew Collin became a free lecturer in Computer Science from the University of Strathclyde in Glasgow, where he taught since 1970. Professor Colin has published 12 textbooks on various aspects of computer science. Someone has been translated into many languages. He has also written countless articles. He is co-inventor of the Binary Tree, a standard data structure widely used in many computer programs. Professor Colin wrote this book in 1982 and after more than 40 years his way of teaching has spread to high school and computer science universities, engaging thousands of students in the study of structured programming. A sincere thanks is due to him,

The Publisher[edit]

Commodore was a Californian dittarella, which produced accounting machines and also sold typewriters. When the geniuses of the hardware built the first computer in the garage, assembling various and disparate pieces, mainly process controllers, many people in the world immediately started to industrialize their production. In England Siclar produced the Spectrum, in the United States Apple produced the MacIntosh and the Apple II and the Commodore, made the Pet, the VIC 20 and finally the Commodore 64. The Commodore in addition to the computer to produce the most suitable software for use with his computer and one of his first products, if not the first one was this introduction to basic, because to make the commodore 64 work you had to give him simple commands in basic.

Comment[edit]

The lessons (units) are easy to understand, they are divided into sections, each of which deals with a single unitary topic and therefore short and easy to remember. You can complete each chapter in about an hour, so doing one chapter a day completes the beginner course in 15 days. At this point you are already able to program small and simple programs that you can think of and it is good to do it, because by immediately applying what you have learned you fix the concepts you have just learned, forever. In addition, from the outset you are already able to read programs made by others and you immediately see the difference between programs with a solid structure and programs built in a confused way, which stand up by way of subroutines. This course enables any person to build solid programs, well structured in BASIC 2.0. It is easy then, once learned to program in such a small way, to extend the study, applying these rules, to all other programming languages, such as C, also present on the Commodore 64 or in Forth, in Pascal, in Fortran, in Cobol, present on the Commodore 64, using the most appropriate language for the intended purposes. Or even switch to other platforms and write in Quick Basic, in Visual Basic, in Lisp, in Java and in any other symbolic programming language that exists. Once you have learned the principles, basically you just need to know the syntax of the commands, to be able to use any language. Finally, just complete this cycle of lessons, to be able to copy the list of a game from a magazine and correct the typing errors that do not make it work or at the very least understand if it is a bogus list, that is, of those programs written but never tried and which, in practice, is not they work, maybe fix it and make it work. Whoever completes the advanced course the following month, then is able to do anything, of course games are the most attractive but for pastime and to understand how it works, you can write a small word processor. write an archive program (database), there is a very nice one made by Microcomputer called Galileo. Whoever writes himself Galileo, learns the basics of the database. Learn to write matrices. In this course you not only learn to program but you learn above all to think in a structured way and to solve difficult complex problems, breaking them up into small parts and reducing them to many simple problems, each easily solved. The Introduction to BASIC part 1 and 2 being a methodology for learning to program, by extension it can become a way to elaborate thinking at its best. This I think is the greatness of this series of small lessons made by Professor Andrew Colin.

Links[edit]