[ Go to Stephen's Entry Page ]
[ TI Book front page |   TI99/4a Articles to read   | TI Resources Page |   PC99 Programs   | TI Lines Issue 1 |   TI Lines Issue 2 ]
contact - please use subject="pc99 page" to avoid spam trap!

TI-Lines was published from Oxford by Peter Brooks, for British users of the Texas Instruments TI-99/4A Home Computer.
This is TI Lines issue 3, the first "subscription" copy, as the first two issues were sent out free of charge. TI Lines Issue 4

E D I T O R I A L

Hello and welcome to the first of the subscribed copies of TI-LINES, and to a new format. I have managed to obtain reduction-copying facilities and it is my intention to replace the original A4 size issues with A5 booklets as soon as it is practical, thus making any collection of TI-LINES consistent.

As a result of Home Computing Weekly publishing a letter from me concerning Oxon TI Users I have had many enquiries from owners resident outside Oxfordshire who would like membership details.

My letter mentioned the facility whereby TI-LINES is read onto cassette for the benefit of blind/partially-sighted Users, and my willingness to expand that side of things if there was sufficient demand. HCW readers took that to mean that they were being offered subsidised (GBP l.50 p.a.) membership as well, and a dozen letters arrived over the following few days. I sent a circular back to each one explaining the state of affairs, and offered Associate membership for GBP 10 p.a. To date only one enthusiast has taken up the offer and to Mr B. MUNRO SCOTT a warm welcome. I hope that we can provide you with plenty of information and entertainment over the coming months and that you will feel free to contribute anything and every- thing which you think might be of interest.

I send complimentary copies out to ROBERT BATTS of TI who has been extremely helpful in many fields over the last several months; to CLIVE SCALLY of TI99/4A EXCHANGE who organises a national User group; to PAUL DICKS, who is the founding father of the TI User groups in this country and who is still active - TIHOME still exists as a software collection which Paul administers as well as being a columnist on the newsletter which is put out by his successors; to STEPHEN SHAW, who, as I write, has just become the father of a bouncing baby boy - so to Stephen and Cathy congratulations and when will George start programming ?

(web note- George started immediately - at age 6 months he attended the first UK TI users meeting in Manchester. His TI99/4a console is still set up and still fully operational. He now has a B.Eng in Computer Science and a job with a UK software company as a Software Developer)

Our total strength (measured in TI-LINES) is 14 and I hope that it grows - but not too much or I'll go broke!

STOP PRESS: For all the younger TI enthusiasts there will be a section devoted to their ideas and interests. It will be edited by DAVID BROWN of NN Fruteford Drive, Abingdon, so if you have anything please send it to him for consideration. His phone number is Abingdon 2J8lj.

I've had a few questionnaires back and I'm beginning to get an idea of the general interests and equipment of members - well, of five of them anyway. Most have indicated that they would be willing to advise and assist fellow members and I will publish relevant details in the next issue. Thank you for your help and I will do my utmost to see that your needs are met.

Finally, I would welcome reviews from members of programs, books, etc., etc. and anything else which is publishable - articles, programs, letters, criticisms - anything which lets you play the game instead of just spectate.


B E G I N N E R ' S - B A S I C - I I

By Peter Brooks (originally published in Tidings, V2.5, October 82)

T h e - F i r s t - S t e p s

This series will attempt to slowly introduce the novice to BASIC on the TI-99 and to the principles of 'programming'. It is not intended as a replacement for the TI manual, but will try to offer a different perspective so that your chances of under- standing the commands and functions are increased. If, as the series progresses, there are still points which you feel have been inadequately covered, please write in with details of the problem area(s).

If you have ever used a calculator which possesses one or more 'memories', you will be familiar with the idea of 'storing' numbers in a machine. On calculators, however, the memories tend to be identified by numbers also: Memory 1, Memory 2, and so on, so that storing 26.5 in Memory 7 is achieved by keying '26.5 STO 7', where STO is the store command. To recall the contents of Memory 7 to the display, you might use 'RCL 7', where RCL is the 'recall' or 'retrieve' command.

On computers, a similar system exists. In this case though, the memories are not preset as they are on calculators, and their identification is made by 'name', not number. Thus the computer 'memories' can·be called A or SOCK or MEMORY or EGBERT or even something which gives a clue as to what is being stored there - for example, if you needed to store the number 365 as part of a calculation involving Time in years, you might call the memory DAYS.

BASIC's way of storing and recalling numbers is different from that used on the calculator. To store 365 in DAYS, BASIC uses:
LET DAYS = 365
The number or 'expression' (equation) on the right of the equals (=) sign is 'assigned to' (stored in) the memory indicated on the left of the equals sign; in this case, the memory is called DAYS. On the TI computers, as on many others, the use of LET is optional - which means that if you leave it out, the computer won't throw a fit -

so that:
DAYS = 365
is also acceptable. The memories in computers (which are really storage areas inside memory chips) are called VARIABLES, and are more versatile than on most calculators. You can use one sort of Variable to store numbers - NUMERIC VARIABLE - and another sort to store letters (letters, numbers as sequences of digits, punctuation marks etc.) called STRING VARIABLE.

To enable the computer and you to distinguish between a variable which stores numbers from one which stores letters, the name of the letter-storing (STRING) variable has a dollar sign tacked onto the end. (There are other types of variable, but they are not available on the Texas.) The.assignment (storage) of data to such variables is also carried out differently:
DAY$ = "MONDAY"
('$' is the closest that this typewriter gets to a dollar). Whatever is to be assigned to a string variable needs to be enclosed in quotation marks. There are other ways of assigning data to these variables which don't require the use of quotes, but we will delve into that later.

Another difference is that although you can assign a string of digits (a number!) to a string variable, that variable can't be used directly in expressions (equations). It CAN be used indirectly, but again, we will delve into that later.

If you find it difficult to think of the variables in terms of 'string' and 'numeric', it might help you to think of them as 'text' and 'mathematical' or 'words memories' and 'number memories'. As long as you are familiar with the terms NUMERIC and STRING that's all that matters.

We'll try out a few examples on the TI-99. thus:
ICKYPO0 = 2

As you can see from the name of the variable, this is going to be a rather informal series. Switch the computer on and select TI BASIC. We will initially be using the computer in the so-called IMMEDIATE MODE, where the computer will execute any instructions there and then, instead of storing them away for later execution as in a PROGRAM.

Let us try out one or two things.
DAYS = 365
Type DAYS = 365 and then press ENTER. The computer will have created a Numeric Variable called DAYS and assigned the number 365 to it. The question now is: how can we recall the contents of the variable to the screen ? What is the recall or retrieve instruction ?

There is a command available, called PRINT, which allows us to print data on the TV screen. If PRINT is used with a numeric variable, it will fetch whatever number is currently assigned to that variable and put it on the screen.

PRINT DAYS

The number 365 will be printed underneath the instruction. It appears with both a leading and a trailing space (one in front and one behind), which you cannot actually see. The leading space will be replaced by a minus sign if the number is negative. The trailing space prevents any following information from being confused with the number, a type of 'formatting' of the display. Formatting can involve a lot more, but again we can deal with that subject in more detail later in the series.

Let's try some other variables:
NAME$ = "DONALD DUCK"
If we try printing the contents of the string variable called NAME$,
PRINT NAME$
'Donald Duck' is printed underneath without any leading or trailing spaces, which is something to bear in mind for future use.

PRINT NAME$ ; NAME$
Now, if you ENTERed this correctly with a semi-colon (;) between the two NAME$, your display should now show a line which reads 'DONALD DUCKDONALD DUCK'. The semi-colon is known as a PRINT SEPARATOR, and tells the computer that once it has printed something it should wait on the same line, as the next PRINT instruction is to have its information printed directly after the previous information. This also demonstrates the lack of spaces between the text! There are two other PRINT SEPARATORS: they are the comma (,) and the colon(:).

PRINT NAME$ , NAME$
This time the second printing places the 'DONALD DUCK' about halfway across the screen from the beginning of the first printing. The comma separator tells the computer to begin printing the next piece of information at the halfway point, unless it has already passed that point, in which case it will print on the begin- ning of the next line down.

PRINT NAME$ : NAME$
This time the two items are printed one under the other; the colon tells the computer that it should begin printing the next item on the next line. The colon is actually a very handy separator in that if you use several of them together you can print several blank lines between items, or even just print several blank lines after the last printed item, which causes the screen's contents to 'scroll' upwards; for example:
PRINT :::::

A quick recap, then, on PRINT SEPARATORS: after the data in an instruction to PRINT, a semicolon means: 'hang about, there's more to go next to this lot'; a comma means: 'start the next lot halfway across the screen, unless you're already past it or the next lot is more than half a screen's width in length,in which case start at the beginning of the next line'; and a colon means: 'start the next lot at the beginning of the next line'.

The PRINT instruction is a very flexible one, and there are more facets to its format which we will look into later.

A = 10
A$ = "GREEN BOTTLES"
PRINT A ; A$
The above is an example of the kind of thing that you can do with separators. You have told the computer to store the number 10 in a 'number memory' or NUMERIC VARIABLE called A, and to store the phrase "GREEN BOTTLES" in a 'word memory' or STRING VARIABLE called A$ (pronounced 'A-STRING'), and then to print the contents of the numeric variable A, to wait on the same line, and then to print the contents of the string variable A$ straight after the first item. The result on screen is:
10 GREEN BOTTLES. You may now gasp with amazement.

Now let us introduce the dreaded LINE NUMBERS. Suppose that we wanted to store the three statements above without executing them there and then, and check that the computer had stored them correctly ? Let's call them statements 1, 2, and 3 (complicated, eh ?):

1 A = 10
2 A$ = "GREEN BOTTLES"
3 PRINT A ; A$ 

Note that by giving each statement a number, you have told the computer not to execute each statement as it is entered, but to store it and wait to be told when to do something else. The computer will list out the statements in the right order when you tell it to:
LIST
and you can check to see if everything has been entered correctly.

Finally, we tell the computer that we'd like it to execute our statements, by giving it the instruction:
RUN
whereupon 10 GREEN BOTTLES appears on screen. The computer screen colour changes from cyan (a sort of pale blue) to green for the time it takes to execute the three statements, and then returns to cyan when finished, as well as printing DONE to make sure that we know that the computer is ready to accept further instructions. The CURSOR (that little black square which keeps flashing on and off) also returns.

In effect what you have done is to enter a PROGRAM into the computer, admittedly not a particularly scintillating one, but a program nevertheless. Ah, but... I hear you say,...we've seen REAL programs in the magazines, and they don't have nice neat l, 2, 3 line numbers, they have 10, 20, 21, 30, or 100, 105, 106, 110, 120, line numbers. How come ?

There's no great mystery. If you wanted to insert another statement in our little program to get the screen to scroll a little first before printing 10 GREEN BOTTLES, by adding PRINT ::::: as a first line, you'd need to rewrite the whole program, UNLESS...you'd already written the program with big gaps between the line numbers just so that you could insert any extra lines as and when you needed them. On some computers you have to do things this way, but on the 99s, as on many others, there is a command which can help you out:

RESEQUENCE
LIST
well, well, our program has changed a little. The RESEQUENCE command, RES for short, which the computer will also respond to, has changed the first statement number into 100, the second into 110, and the third into 120. As standard, the computer starts renumbering at 100 and goes up in steps of 10. You can even specify what the first line number will be, and what the step or 'increment' will be. For example:
RES 117 , 26
LIST
See what I mean ? You can now add the extra line of PRINT ::::: as say line 17, and then RES again to smarten it all up. Experiment a little and see what you can find out!

Any queries or contributions which members may have with respect to the BEGINNER'S BASIC series are welcomed. Eventually the series will be compiled into a booklet and sold, probably through the numerous small software houses which are still supporting the TI-99/4A.

The next issue will see coverage of the keyboard functions, editing, different versions of the 99s available, maths while PRINTing, INPUT, GOTO, and CALL CLEAR.


L E T T E R S
Even though he has his hands full at the moment, STEPHEN SHAW (see Editorial) has responded to Gary Harding's plea for help in the Bulletin Board in V1.1 You may remember that Gary had problems with his printer and RS232. I asked for anyone in OTIU to come forward and help out, but no-one was able to. In the meantime I had written to Stephen and to Gary, and had learned that Gary's printer and RS232 had both received a clean bill of health from a BBC micro (it managed to drive the printer without any trouble) and AKHTER INSTRUMENTS (they checked his RS232 and found nowt wrong). Stephen wrote back with the following information, about which Gary had not been aware - and as it happens didn't make any difference to his problems - and which is well worth while reproducing here for the benefit of those who may eventually find the folding stuff to expand their systems.

There should be a sticker inside the RS232 manual which tells you that the details on how to connect up the pins are wrong. To connect the RS232 card to a printer you need an eleven line ribbon cable. Pins l to 9 are connected to each other (1 to l 2 to 2, etc.,) TI pin 10 (handshake in) connects to PRINTER pin 11 (busy). TI pin 16 could go to PRINTER pin 16, but it is easier and neater to connect TI pin 11 (logic ground) to PRINTER pin 16 (Ov LGC GND). No other printer pins need to be connected.

Stephen also noted that he now has three consoles with three different keyboards, and three different modulators!
I often receive current news from Stephen and others, and from time to time I will run a News spot in TI-LINES - probably just half a page - to make sure that we all keep up with things.



CTRL and FCTN part 3

I need to clear up some unanswered questions from the last article.

If you entered and ran the program given in Part 2 and left it running long enough, you should have observed two things (or possibly three — it depends on how long you ran the program)

* When the program begins running, the first thing that you should notice is the small shapes in the bottom left-hand corner of the screen. The rightmost shape will be changing shape pretty rapidly, and occasionally the whole group may flicker.

* The second thing which should soon make itself known is a sudden streak of "insects" which begins at the bottom right hand corner of the screen and shoots across to the left.

* The third effect only appears after several more seconds, when the flickering shape at the left ceases moving for a few moments — there may also be a small "ripple" through the line of insects, causing them to advance towards the left. This pausing occurs every minute or so, but the rippling effect may cease.

So what are they? The first effect is caused by the computer "working" on your program. Remember that I said that the User-Definable Graphics (UDGs) occupied the same area of memory as the computer used while working? The shape-changing is due to the UDGs acting as a window on the execution of the loop in Lines 150-170.

In effect, the computer is counting while we watch.

The second effect, the streak of insects, is a little more difficult to explain — mostly because of a lack of detailed information on the processes used by the 99/4A when storing data. When a program instructs the computer to store data in a variable (whether numeric or string doesn't really matter), the computer locates an area in memory which is not being used and stores the data there.

It keeps a record of where it has got to as far as storage space goes, so that when the program instructs the computer to store something else, the computer then locates the next free area to store it in. In the program we are using, the computer is instructed to store the same data over and over again. Once it has finished filling the T$() array, it has to start all over again, but being stupid (as all computers are) it doesn't use the areas which it has finished with, it keeps on using fresh areas until it runs out of memory.

What happens then is the third effect, called Garbage Collection (you'll find a large number of terms in computing which relate to domestic activities — another is Housekeeping).

This is what occurs when the computer pauses. It is "clearing out" if you like, all the data which is not currently required. This probably involves resetting the internal record of where free areas of memory are located, rather than by actually removing the data. Considering the speed at which computers work when not coping with programs in Basic, the 99/4A seems to spend rather longer doing its household chores than one might expect.

On top of all this, (as if it wasn't enough), the "HELLO MA" shape which you see appearing in the UDGs is likely to be in transit — in the process of being stored temporarily in a work area or a "buffer" (a kind of reception area or waiting room, if that helps you to picture it) — rather than actually being in its final position.

end of article

[ TI Book front page   |    TI Resources Page    |   PC99 Review    |   PC99 Programs ]