home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib27b.dsk
/
DOUBLE.LO.DEMO.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
2KB
|
48 lines
10 REM **********************
20 REM * DOUBLE.LO.DEMO *
30 REM * BY CHRIS SCHUMANN *
40 REM * COPYRIGHT (C) 1986 *
50 REM * BY MICROSPARC, INC *
60 REM * CONCORD, MA 01742 *
70 REM **********************
71 REM MODIFIED FOR IIGS AND IIC PLUS BY S. KARATSORIDIS
75 GOSUB 500:GS = PEEK(788)
80 DEF FN R(X) = INT( RND(1) *X)
90 PRINT CHR$(21): TEXT : HOME :D$ = CHR$(4)
100 IF PEEK(64435) = 6 AND PEEK(64448) = 0 THEN 120
105 IF PEEK(64435) = 6 AND PEEK(64448) = 224 AND GS = 1 THEN 120
110 HOME : VTAB 12: PRINT "THIS PROGRAM ONLY WORKS ON THE //C, IIGSAND IIC PLUS!": END
120 IF PEEK(49248) <128 THEN 180
125 IF GS = 1 OR PEEK(64447) = 5 THEN 180
130 HOME
140 PRINT "This program uses 80 columns. If you"
150 PRINT : PRINT "wish to use it, set the 80/40 switch to"
160 PRINT : PRINT "the UP position."
170 END
180 PRINT D$"PR#3": REM Turn on 80 Cols
190 PRINT : REM Make firmware ready
200 X = PEEK(49246): REM Double Mode
210 GR : REM Now in 80 X 40 mode
220 HOME : FOR I = 1 TO 7: PRINT TAB( I *10 +1);I;: NEXT
230 PRINT
240 FOR I = 1 TO 8: PRINT "0123456789";: NEXT
250 PRINT TAB( 30)"Press <RETURN> to quit."
260 XO = 0:XN = XO
270 XN = XO +1: IF XN = 80 THEN XN = 0: REM Wrap-around
280 Z = PEEK( -16336): REM Click speaker
290 COLOR= 15: PLOT XN,39
300 COLOR= 0: PLOT XO,39:XO = XN
310 COLOR= FN R(16)
320 ON ( FN R(2) >0) GOTO 350
330 VLIN FN R(40), FN R(40) AT FN R(80)
340 GOTO 360
350 HLIN FN R(80), FN R(80) AT FN R(40)
360 IF PEEK( -16384) <128 THEN 270: REM No key pressed
370 GET A$: REM Absorb key press
380 TEXT : HOME : PRINT CHR$(21): REM 80 Col's off
390 X = PEEK(49247): REM Single Mode
400 END
500 REM DETECT IIGS ROUTINE
510 FOR AA = 0 TO 19: READ BB: POKE 768 +AA,BB: NEXT AA
520 CALL 768: RETURN
530 DATA 56,32,31,254,176,2,144,6,169,255,141,20,3,96,169,1,141,20,3,96