Skip to content

Commit

Permalink
Update the Tektronix demos
Browse files Browse the repository at this point in the history
  • Loading branch information
rbanffy committed Dec 17, 2024
1 parent d1e6659 commit 429b9d0
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 18 deletions.
12 changes: 6 additions & 6 deletions TEKLINES.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
50 CSI$=ESC$+"["
60 PRINT CSI$+"?38h"
70 FOR I = 1 TO 200
80 X=RND(8)*1024: Y=RND(8)*768: GOSUB 160: C1$=XY$
90 X=RND(9)*1024: Y=RND(9)*768: GOSUB 160: C2$=XY$
80 X=RND(8)*1024: Y=RND(8)*768: GOSUB 1000: C1$=XY$
90 X=RND(9)*1024: Y=RND(9)*768: GOSUB 1000: C2$=XY$
100 PRINT GS$+C1$+C2$+US$+CHR$(13)
110 NEXT
120 REM Pause for a short time
130 FOR I = 1 TO 10000: NEXT
140 PRINT CSI$+"?38l"
150 END
160 REM calculate coordinates for x,y
170 REM returns them in xy$
180 XY$=CHR$((Y\32) OR 32) + CHR$((Y MOD 32) OR 96) + CHR$((X\32) OR 32) + CHR$((X MOD 32) OR 64)
190 RETURN
1000 REM calculate coordinates for x,y
1010 REM returns them in xy$
1020 XY$=CHR$((Y\32) OR 32) + CHR$((Y MOD 32) OR 96) + CHR$((X\32) OR 32) + CHR$((X MOD 32) OR 64)
1030 RETURN
26 changes: 26 additions & 0 deletions TEKTEXT2.BAS
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
10 REM Play with Tektronix graphics
20 ESC$=CHR$(27)
30 GS$=CHR$(29)
40 US$=CHR$(31)
50 CSI$=ESC$+"["
60 SZ$="89:;"
70 REM Tektronix mode
80 PRINT CSI$+"?38h"
90 REM Print random-sized text in random positions
100 FOR I=1 TO 200
110 X=RND(8)*1024: Y=RND(8)*768:GOSUB 1000
120 PRINT ESC$+MID$(SZ$,INT(RND(2)*4)+1,1)+"Tektronix"
130 NEXT
140 REM Pause for a short time
150 FOR I = 1 TO 10000: NEXT
160 REM Back to VT mode
170 PRINT CSI$+"?38l"
180 END
1000 REM move-to (X, Y)
1010 GOSUB 2000
1020 PRINT GS$+XY$+US$;
1030 RETURN
2000 REM calculate coordinate string for (X,Y)
2010 REM returns them in XY$
2020 XY$=CHR$((Y\32) OR 32) + CHR$((Y MOD 32) OR 96) + CHR$((X\32) OR 32) + CHR$((X MOD 32) OR 64)
2030 RETURN
Loading

0 comments on commit 429b9d0

Please sign in to comment.