Here - 1000 BiT
Here - 1000 BiT Here - 1000 BiT
HOW TO NUMBER THE LINES IN A PROGRAMClear the screen.Enter NEW and then this program:1 REM HELLO2 PRINT "HI"3 PRINT "FRIEND"This program has three lines. Each line starts with a command. You have alreadylearned the PRINT command. We will tell you about the REM command in a minute.Usually you will skip numbers when writing the program.Like this:10 REM HELLO15 PRINT "HI"20 PRINT "FRIEND"It is the same program but has different numbers. The numbers are in order, but somenumbers are skipped. You skip numbers so that you can put new lines in between the oldlines later if the program needs fixing.Run the program you have entered. The computer does the commands in the lines. Itstarts with the lowest line number and goes down the list in order.THE REM COMMANDThe REM command is for writing little notes to yourself. The computer ignores the notes.Use REM for putting the name of your program in the top line of the program.Assignment 1:1. Use the HOME key to send the cursor home.Now use the same key (SHIFT CLR) to erase the screen.2. Use the command NEW. Explain what it does.3. Write a program which uses REM once and PRINT twice. Then use the commandRUN to make the program obey the commands.18
nINSTRUCTOR NOTES 2COLOR AND THE KEYBOARDThe C-64 has powerful color and graphics characters available from the keyboard. They^ provide plenty of "bells and whistles" to the student for increasing program richness.Each key has up to three functions, chosen by just pressing the key, or by pressing it whiler*\ holding down the SHIFT, CTRL or the COMMODORE FLAG key. For colors, the CTRLkey is held down while a color key (one of the number keys) is pressed.The CLR HOME key homes the cursor when pressed. (Home is the upper left corner ofthe screen.) Pressed with SHIFT, the CLR key erases the screen.All these keys can be used in PRINT commands in a program. This gives the C-64 someO very powerful options, and several lessons in the book are devoted to exploring them.A white background is used in this lesson. Some colors do not show up well on white. Infact, for each color screen there will be some colors which give blurry characters.If you choose white for the screen color and then white for the letter color, you will seenothing when you type! Try POKE 53281,15 for a grey screen which will show letters ofany color obtained from the color keys.Pressing the CTRL and RVS ON keys gives reversed characters. The reverse of a "space" is acolored block. A useful way to make color bars for adjusting the color TV is to do CTRLand RVS ON, then hold down the space bar to make a colored bar. Repeat for each of thecolors you get from CTRL and a color key. Then adjust your TV for best color. Yellowand perhaps purple are the most sensitive to proper adjustment.QUESTIONS:1. How do you do each of these things:^r*\nMake the computer type with red letters?Erase the screen?Empty the memory?Print your name?2. How do you change the screen background color to white?^ 3. What special key to you press to "enter" a line?r*\ 4. What is a command? Give some examples.^ 5. What does the computer mean when it prints "SYNTAX ERROR"?6. How could you print "FIRE" with each letter in a different color?19
- Page 3 and 4: KIDSAND THECOMMODORE 64
- Page 5 and 6: KIDSAND THECOMMODORE 64neoartment o
- Page 7 and 8: nTABLE OF CONTENTSAcknowledgements
- Page 9 and 10: nACKNOWLEDGEMENTS^My sincere thanks
- Page 11 and 12: nTO THE PARENTSThis book is designe
- Page 13 and 14: n~ ABOUT PROGRAMMINGThere is a comm
- Page 15 and 16: nn INSTRUCTOR NOTES 1 NEW, PRINT, R
- Page 17 and 18: COMMAND THE COMPUTERTry this. Type
- Page 19: THE NUMBER ZERO AND THE LETTER "O"T
- Page 23 and 24: There are eight colors on the numbe
- Page 25 and 26: OTHER COMMANDS IN PRINT STATEMENTSJ
- Page 27 and 28: LESSON 3 LIST, BOXES IN MEMORYClear
- Page 29: ADDING A LINEYou can add a new line
- Page 35 and 36: THE DELETE KEYThe DEL key is your "
- Page 37 and 38: INSTRUCTOR NOTES 5 TRICKS WITH PRIN
- Page 39 and 40: RULE: The semicolon makes the invis
- Page 41 and 42: Assignment 5:1- Write a program whi
- Page 43 and 44: LESSON 6THE INPUT COMMANDUse INPUT
- Page 45 and 46: YOU WEAR TWO HATS, USER AND PROGRAM
- Page 47 and 48: LESSON 7THE LET COMMAND, GLUING STR
- Page 49 and 50: GLUING THE STRINGSHere is how to st
- Page 51 and 52: LESSON 8THE GOTO COMMAND AND THE ST
- Page 53 and 54: A CAN OF SPAGHETTILook at this: 10
- Page 55 and 56: Assignment 8:1. Just for practice i
- Page 57 and 58: LESSON 9 THE IF COMMANDClear the me
- Page 59 and 60: JtTHE "NOT EQUAL" SIGNTwo signs:= m
- Page 61 and 62: INSTRUCTOR NOTES 10 INTRODUCING NUM
- Page 63 and 64: The thing which is put into the box
- Page 65 and 66: MIXTURES IN PRINTYou can print numb
- Page 67 and 68: INSTRUCTOR NOTES 11TAB AND DELAY LO
- Page 69 and 70: HOW BIG A SPACE CAN TAB( ) MAKE?The
HOW TO NUMBER THE LINES IN A PROGRAMClear the screen.Enter NEW and then this program:1 REM HELLO2 PRINT "HI"3 PRINT "FRIEND"This program has three lines. Each line starts with a command. You have alreadylearned the PRINT command. We will tell you about the REM command in a minute.Usually you will skip numbers when writing the program.Like this:10 REM HELLO15 PRINT "HI"20 PRINT "FRIEND"It is the same program but has different numbers. The numbers are in order, but somenumbers are skipped. You skip numbers so that you can put new lines in between the oldlines later if the program needs fixing.Run the program you have entered. The computer does the commands in the lines. Itstarts with the lowest line number and goes down the list in order.THE REM COMMANDThe REM command is for writing little notes to yourself. The computer ignores the notes.Use REM for putting the name of your program in the top line of the program.Assignment 1:1. Use the HOME key to send the cursor home.Now use the same key (SHIFT CLR) to erase the screen.2. Use the command NEW. Explain what it does.3. Write a program which uses REM once and PRINT twice. Then use the commandRUN to make the program obey the commands.18