Lesson 2:

Clearing and Displaying information on the homescreen.

Well, I know that you are itching to get programing, but the first thing that we need to know are the basics of programming. We first need to create a program to put the code. On a new or freshly resetted calculator, you should be seeing this screen when you press [PRGM]:



Select the "NEW" Option and press [ENTER].

Type in the name TEST1.

This will put you in the program editor. Now I am sure you are wondering where the commands are. Well, there is an alphabetic listing located by pressing [2nd] and [0]. This of course is a very inefficient way of finding commands, so we need to know where the important commands are located. While in the program manager, press [PRGM]. You should be greeted by the following screen:

Note: The Catalog menu has all the commands in an alphabetical listing. To get to the end of the list, from the begining, press up. You can 
also more easily navigate by pressing [Alpha] and the first letter of the command that you are looking for.

This first menu is called CTL, which is short for Control Commands. This list includes commands for Boolean Logic (If, Then, Else, End), commands for creating loops (Repeat, While, For(), and a few other commands that need to be mentioned (Lbl, Goto, Return, Stop, Pause, Delvar, Menu(). These of course will be explained in more detail later.

You will also notice the next menu is I/O. This stands for Input and Output. This menu will give you commands for gathering Input (Input, Prompt, getKey), displaying information and text (Disp, Output(, ClrHome).

Now that you know where some of these commands are located, it is time we got our hands dirty and did some actual programming. Once you are in the program editor, paste ClrHome onto the first line by either using the cursor to select it, or pressing its menu number. Press [ENTER] and paste the Disp command onto the next line. You then need to type the following: "HELLO WORLD". To type, press [2nd] and [ALPHA]. Press [ENTER] and on the next line, paste the Pause command. Again, press [ENTER] and paste the ClrHome command on the last line. Now press [2nd] and [MODE], and then run the program.

To run a program, from the homescreen, press [PRGM], then select the name of the program, and press [ENTER] twice.

Press [ENTER] and you will be greeted by the done message.

Now, there are other ways to display the "Hello World!" message. We can replace the line ":Disp "HELLO WORLD!" with ":Output(4,1,"HELLO WORLD". Using the Output( command will allow you to place text and variable information anywhere on the 8x16 homescreen. You use the format Output(Row,Column,text or variable. Output( is good for games that move characters around the screen. This will be discussed in more detail in a later lesson.

An alternate way of posting text to the screen, as long as it is a one-liner, and wanting to pause, is to use the Pause command. Yes, that's correct, the Pause command can display one line of text, when it pauses for the [ENTER] key to be pressed. This may come in handy when needing a Yes or No answer and having the input show up after the Pause command has been used.

To see the coding in action, click on this link here.

Command Definitions for this lesson:

ClrHome: This command Will take you to the homescreen and clear it.

Disp: This command displays information, one line at a time. You can make it display more than one line at a time by adding an "," combination between 
every 16 characters. This will shave off a couple bytes when displaying text, instead of using Disp multiple times.

Output(: This command displays text and variable information at a specified cooridinate on the homescreen, where it would be Output(1-8,1-16. This
command is very handy for games that have moving text, or use to move a character around the screen.

Pause: This command pauses all operations, until the [ENTER] key is pressed. Useful when displaying text and wanting to make sure 
the user has read it. You can also display text the same as using the Disp command with Pause, though you can only put one line (16 characters).

This concludes this lesson. In the next lesson, you will be given a brief introduction to the variables on the 83+.

<<Previous - Contents - Next>>