Contact - please use subject="pc99 page" to avoid spam trap!
This page contains TI99/4A Programming hints, tips for TI99/4A Module care, and using TI Writer.
Web article Five-
One of the longest running professional supporters, writing in many magazines, was Cheryl Whitelaw, writing as Regena.
For this article some selected text from the January 1988 issue of Micropendium, retaining the original column widths and hyphenations, starting with an article by- Regena-
PROGRAMMING REMINDER HINTS
By REGENA
Are you still having FUN with your computer? Life has been
so hectic for me the last little while that I haven't had as much time
to program. Once in a while, however, I do like to sit at the com-
puter and program. (In fact, I'd rather program than write the arti-
cles, but of course most programmers are like that.) This month
I am going to offer you a few "reminder" programming hints. These
may be things you've known about for a long time but haven't used
for a while or they may be things you use in every program you
write. I hope you find these hints helpful.
When you start a program, number your lines by 10s (100, 110,
120, etc.). If you need to add lines later, you'll be able to insert
them with numbers within existing lines. You may want to start
major sections with 1000, 2000, 3000, and so forth, so you can
keep track of them. When the program is working in final form,
you can use RESequence to renumber your lines. If you really need
to conserve memory, you can RES 1,1 to number your lines by ones,
starting with Line l.
I usually clear the screen with CALL CLEAR, but you can use
other methods. For example, if you have all black printing on the
screen, you can turn the screen black with CALL SCREEN(2).
If you have graphics on the screen, you can change the color of
those characters to "invisible" with CALL COLOR(S,1,1), where
S is the set number for the characters involved. Or you may change
the characters to be a blank. For example, if you have Character
99 defined as a tree, and there are trees randomly placed on the
screen, you can make all the trees disappear with
CALL CHAR(99,"")
You may fill the screens with blanks with statements such as
CALL HCHAR(1,1,32,768)
or
CALL VCHAR(1,1,32,768)
The computer starts in the upper left corner, Row 1 and Column
1, and places the blank character or space in each position for 24
rows and 32 columns.
You may also use CALL HCHAR or CALL VCHAR to clear
parts of the screen. As in the above examples, you do not need to
restrict the number of characters in the fourth parameter to one
row or. one column. Let's say you have graphics on the top half
of the screen and some printing on the bottom half. If you want
to erase the bottom part of the screen only, you can use
CALL HCHAR(13,1,32,32*12)
Another hint is to remember that the colon in the PRINT state-
ment means to go to the next line. If you are translating from other
computer versions of BASIC, you may have noticed that the colon
is a statement separator. If you want to print several blank lines,
you need to use PRINT or? for each line you want in other ver-
sions of BASIC. In TI BASIC, you may use the colon, such as
PRINT:::::. You may use colons along with other numbers or
strings, such as
PRINT::"HELLO":::::"HERE IS THE TITLE"::::Remember to use the ON-GOTO procedure rather than a series
400 CALL KEY(O,K,S)
410 IF (K(65)+(K >68) THEN 400
420 ON K-64 GOIO 1000,2000,3000.4000
To create a pause or delay in a program, you may use either a
FOR-NEXT loop or a CALL SOUND delay:
300 PRINT "ONE"
310 FOR DELAY =1 H) 400
320 NEXT DELAY
330 PRINT "TWO"
340 PRINT "THREE"
350 CALL SOUND (500,9999,30)
360 CALL SOUND (1,9999,30)
370 PRINT "FOUR"
Sometimes when you read and process data in a FOR-NEXT loop
you will notice a slight delay before the last data item. You can
avoid the delay if you use one more loop than you need and add
a dummy variable. For example, if you are printing lots of graphic
characters on the screen you might notice a delay before the last
character is put on. Increase the loop and use the last data item
twice (print the last character in the same place two times).
300 FOR N=1 to 25
310 READ ROW,COL,C
320 CALL HCHAR(ROW,COL,C)
330 NEXT N
340 DATA 3,5,42,... (your data items here)
350 DATA... 10,12,65,10,12,65
If you really have to "squeeze" your program to fit in the availa-
200 READ N$,A$
210 FOR M=1 TO 6
220 X$=SEG$(A$,M,1)
230 NEXT M
400 DATA RICK,571389
My final reminder is that if you have the disk system and do not
need a lot of open files, gain valuable bytes by using this procedure:
1. From the title screen, press any key to begin.
2. Press 1 for TI BASIC.
3. Enter CALL FILES(1)
4. Enter NEW
5. Proceed as usual.
I use this as a standard procedure every time I sit down to pro-
gram. Some of my longer programs will not run (you'll get an OUT
OF MEMORY error) if you do not do this before loading and run-
ning the program.
END OF ARTICLE
CLEANING MODULE CONTACTS
Having trouble with computer lockups or just getting your com-
puter started (such as screen garbage when you go into Extended
BASIC)? If so the following ... may help you solve
your problem.
...taken from the Central Iowa Users
Group newsletter. The article is by Ron Rutledge.
Readers who use the sug-
gestions for cleaning the 4A and its cartridges do so at their own
risk. Ed.
By RON RUTLEDGE
Dirty contacts can screw-up any electrical device and the 4A
is not an exception. The only place you are likely to run into this
problem is in using command modules. Both the module contacts
and the port itself can become dirty, but cleaning the port itself is
a big job as you have to disassemble the console. The good news
is that cleaning the cartridge will almost always suffice and can
be done quickly without special tools or cleaners. All you need
is a screwdriver, a rag, a standard pencil eraser, and in some cases
a medium Phillips screwdriver.
Remove the screw from the center of the cartridge if there is
one. Then pry the clips in the outside slots to the bottom left and
right of the center screw. If there is a clip in the center instead
of a screw, pry it back after the bottom left and right slots are pried
off. If it should bend off don't worry, it won't effect the perfor-
mance of your module.
The module board can now be removed. Do this carefully and
note how the spring-loaded "door" is assembled, if there is one,
so that you can put it back together if it pops out.
Once the board has been removed take the rag (a facial tissue will work but cloth is better) and rub off any residue from the edge connector contacts. Do the contacts on both sides if the module has them. Once the worst is removed take any soft rubber eraser and "erase" the contacts until they become dry, clean and shiny. You need to do only the outer half of the contacts as that is much as ever gets worn (you can see the scratch marks on the contacts).
After the cleaning, put the cartridge back together and go. Symptoms of dirty contacts include the console locking-up and unusual errors where none occurred before. (For example, my dirty Extended BASIC cartridge gives me syntax errors in programs where there were no errors when it was clean.)
Don't jump to clean a cartridge on the first appearance of an error. Such problems may be caused by static and not having the module firmly seated in the cartridge port, among other things. But if you have a continuing problem, cleaning the contacts is quick and cheap and may get you running again.
END OF ARTICLE
TI WRITER
Get to the bottom
of TI-Writer
Know how to get to the end of a docu-
ment while using the TI-Writer editor? Just
enter S (for Show Line) from the command
line and then enter E. The next thing you
know the cursor will be on the last line of
the document. To get back to the top, enter
S and then l.
The letter E for "end" can also be used
when deleting, copying or moving lines.
For example, after entering D for delete in the command line, enter 10 E to delete everything from line number 10 to the end of the document.
end of article
Time-saver
for XBASIC users
Lots of programmers put their program identification in line 100 as a REMark. Six months later, listing the program, it answers you questions. What the heck is this? When did I write it'? Why did I write it?
I've been pulling a little trick in XBASIC that the more I do it, the handier it seems. I add another program line, so that the beginning of my program looks like this:
1 !SAVE DSK1.PROGRAMNAM
100 ! Prog 'PROGRAMNAM' H. Hoyt
7/28/87 Demonstration Prog
Note all of the 10 characters in the pro-
gram name can be used to describe the pro-
gram. One of my friends was using single
letter program names because he hated the
extra typing.
If you type line 100 program description
data once, and then hit Enter followed by
FCTN 8 (REDO), you can edit out 00 in
100 to create line I and further edit it to
create SAVE DSK1. PROGRAMNAM
and delete the rest of the stuff. By itself,
this wouldn't be worth the trouble, but just
see what happens next.
After line 1 has been properly entered;
hit FCTN 8 again and then FCTN 3
(DELETE) to eat the line number. space
and exclamation mark. What results is
SAVE DSK1.PROGRAMNAM in the
screen buffer. Just hit Enter and the pro-
gram is automatically saved. This saves so
much typing that it encourages you to save
program pieces more frequently, reducing
the loss in case of a program crash.
end of article