Use of the IN function

See all articles from Sinc-Link v3 n2
Author(s): George Chambers
Publication: Sinc-Link
Pub Details: Sinc-Link v3 n2 (Volume 3, Issue 2)
Date: March/April 1985
Pages: 11

It is sometimes desirable to be able to use two keys at the same time, Many games could be improved with this capability. On the TS2068 this is possible through the use of the ‘IN’ function.The following Table A, and Etch-a-Sketch demonstration program will illustrate this possibility.

TABLE A

            <-----IN values----->
  IN
Address   30     29    27    23    15
=======   ==     ==    ==    ==    ==

32766     BR     SH    M     N     B

49150     ENTER  L     K     J     H

57342     P      O     I     U     Y

61438     0      9     8     7     6

63486     1      2     3     4     5

64510     Q      W     E     R     T

65022     A      S     D     F     G

65278     -      Z     X     C     V
   5 REM An ETCH-a-SKETCH type of drawing routine to illustrate the use of the IN function on the TS2068 computer.
6 REM
7 REM By G F Chambers
8 REM
9 REM Use keys Q,A,P,and O for cursor control. Use keys 1-5 for choice of color.
10 LET x=125: LET y=95
20 IF IN 64510=30 AND y<172 THEN LET y=y+1
30 IF IN 65022=30 AND y>1 THEN LET y=y-1
40 IF IN 57342=30 AND x<254 THEN LET x=x+1
50 IF IN 57342=29 AND x>1 THEN LET x=x-1
55 IF IN 63486<>31 THEN GO SUB 130: GO TO 20
60 PLOT x,y
120 GO TO 20
130 LET r=0: LET c=32-IN 63486
140 LET c=c/2: LET r=r+1: IF c<=1 THEN GO TO 160
150 GO TO 140
160 IF INKEY$<>"" THEN GO TO 160
170 INK r: RETURN

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.