Inputting Commands: ZX81 & 1000

See all articles from The Plotter v4 n5
Author(s): Glen Ten-Eyck
Publication: The Plotter
Pub Details: The Plotter v4 n5 (Volume 4, Issue 5)
Date: May 1986
Pages: 6

If you have tried to add a large keyboard to your T/S 1000 and had everything working except for the shifted keys S, D, F, and G, then this article is for you. I have come up with a soft ware fix for your keyboard problem. It is more round about than just hitting a key but it will work.

Peek and Poke are the heart of the fix. As you type a program in, the D-File is always 2 characters futher than the last visible character of the last entered line. Remember how poking number codes into D-File can change a character on the screen? You can do the same in the program, if you know where to poke.

When you come to a line that has LPRINT, LLIST, SLOW, or FAST in it, put PRINT there and ENTER the line. If the program wants a line like this-

  210 LPRINT TAB 5; A$

you ENTER this-

  210 PRINT

Then with NO LINE NUMBER you ENTER

  POKE (( PEEK 16396+256*PEEK 16397) - 2),---

The 3 blanks are filled in with one of 4 numbers. They are

  225 LPRINT
226 LLIST
227 SLOW
228 FAST

This will change PRINT to LPRINT, LLIST, SLOW, OR FAST. If there is more line to come, as in the example, use EDIT to bring the line down and finish it.

Look thru the program before starting to type it in. If it has more than one of these commands, follow a different procedure, designed to reduce the chance for error. Find a handy string name THAT IS USED by the program when it runs. Let us say that you use A$. You type in WITH NO LINE NUMBER the following:

  LET A$ = "((PEEK 16396*PEEK 16397-2)"

Now, as you ENTER the program you follow the same procedure as above, except that you use this line to POKE the values in:

  POKE VAL A$,---

filling the 3 spaces as above. DO NOT USE RUN OR TEST ANY PART of the program until you have put in the last of these commands. RUN will erase A$ and testing any part of the program may alter A$.

This will give you the 4 nissing commands. I hope that it helps you to enter some of the programs that you want but have not been able to do before.

If you want to put a line containing one of these instructions into a program that is already written, I have a plan for that too. Load up the program. Make a note of line number for the SLOW, FAST, LPRINT, or LLIST. On the very end of the program, make the line you want. EDIT the line number to put it where you want it. Last, delete the line from the end of the program.

If you want to LLIST a program, put these lines at the end-

  9998 STOP
9999 LLIST

If you do not want to LLIST the whole program, put the line number you want the listing to begin on after LPRINT. Use BREAK to stop the printer if you want to stop it before the END of the program. DO NOT shut off the printer with the switch while it is printing. Oh yes, get your listing by entering the command-

  GOTO 9999

Do not forget to delete these 2 lines before going on. They will mess up the poking and they use extra memory.

I hope that this information helps you to use your computer more effectively.