home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib23a.dsk
/
MARCH.1985
/
SPINNER.DEMO1.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
4KB
|
100 lines
10 REM **********************
20 REM * SPINNER DEMO1 *
30 REM * BY STEVEN KEARNS *
40 REM * COPYRIGHT (C) 1985 *
50 REM * BY MICROSPARC, INC *
60 REM * CONCORD, MA 01742 *
70 REM **********************
80 REM
90 PRINT CHR$(4)"BLOAD SPINNER"
100 MS = 24576: REM MOVES STRING INTO BUFFER
110 SS = 24630: REM SPINS STRING
120 SL = 24770: REM LENGTH OF STRING
130 ST = 24771: REM FIRST CHARACTER OF STRING
140 DIR = 8: REM DIRECTION OF SPIN
150 HOME : VTAB 12: PRINT SPC( 9)"A DEMO FOR THE SPINNER"
160 POKE DIR,0: GOSUB 790
170 A$ = "^ ": CALL MS,A$
180 HOME : VTAB 12: HTAB 7: PRINT "DEMO OF 2 CHARACTER STRING"
190 GOSUB 790
200 HOME
210 POKE 32,3: REM MOVE EDGE OF SCREEN
220 VTAB 3: PRINT "TRY THIS LITTLE EXPERIMENT."
230 PRINT : PRINT "FOLLOW ONE OF THE LITTLE ";: INVERSE : PRINT "^";: NORMAL : PRINT "'S"
240 PRINT : PRINT "ACROSS THE SCREEN WITH YOUR"
250 PRINT : PRINT "FINGER AT THE SAME SPEED. NOW"
260 PRINT : PRINT "REVERSE YOUR FINGER AND TRAVEL THE"
270 PRINT : PRINT "OTHER DIRECTION AT THE SAME SPEED."
280 PRINT : PRINT "WELL, WHICH WAY IS IT SPINNING?": TEXT
290 GOSUB 790
300 A$ = "! * ": CALL MS,A$
310 HOME : VTAB 12: HTAB 7: PRINT "DEMO OF 4 CHARACTER STRING"
320 GOSUB 790
330 A$ = "** THE SPINNER BY STEVE KEARNS ": CALL MS,A$
340 HOME : VTAB 12: HTAB 7: PRINT "DEMO OF 31 CHARACTER STRING"
350 GOSUB 790
360 A$ = "THIS MESSAGE IS EXACTLY SIXTY-TWO CHARACTERS IN LENGTH ++++++ ": CALL MS,A$
370 HOME : VTAB 12: HTAB 7: PRINT "DEMO OF 62 CHARACTER STRING"
380 GOSUB 790
385 REM SET STRING = TO NORMAL SPACE
390 A$ = " ": CALL MS,A$: POKE ST,160
400 HOME : VTAB 10: HTAB 9: PRINT "FLOAT TITLES TO THE TOP"
410 VTAB 12: HTAB 7: PRINT "WITH 124 CHARACTER STRINGS!"
420 GOSUB 790: VTAB 22: CALL -868
430 :
440 REM FLOAT ROUTINE
450 :
460 A$ = "CENTERED TITLE":L = LEN(A$)/2
470 FOR X = 1 TO 124 - LEN(A$):A$ = A$ +" ": NEXT X
480 POKE DIR,1: CALL MS,A$
490 FOR R = 1 TO 104 -L: FOR PAUSE = 1 TO 60: NEXT PAUSE
500 CALL SS: NEXT R
510 VTAB 14: HTAB 5: PRINT "LIST 440-500 FOR FLOAT ROUTINE"
520 VTAB 20: HTAB 5: PRINT "COPYRIGHT 1985 BY MICROSPARC, INC";: PRINT : VTAB 22: HTAB 6: PRINT "PRESS THE SPACE BAR TO CONTINUE"
530 X = PEEK( -16384)
540 IF X = 160 THEN POKE -16368,0: GOTO 560
550 GOTO 530
560 :
570 REM SPECIAL MESSAGES
580 :
590 HOME
600 :
610 REM N = 1 FOR NORMAL MESSAGE
620 REM F = 1 FOR FLASHING MESSAGE
630 :
640 N = 1:F = 0:A$ = "/ 31 CHARACTER NORMAL STRING //": GOSUB 860
650 VTAB 12: HTAB 13: PRINT "NORMAL MESSAGES"
660 GOSUB 790
670 N = 0:F = 1:A$ = "FLASHING MESSAGES ARE POSSIBLE-": GOSUB 860
680 HOME : VTAB 12: HTAB 13: PRINT "FLASHING MESSAGES"
690 GOSUB 790
700 A$ = " COMBINE MODES ": CALL MS,A$
710 POKE ST,160
720 HOME : VTAB 12: HTAB 8: PRINT "EVEN COMBINATIONS ARE EASY!"
730 GOSUB 790
740 A$ = "** THE SPINNER BY STEVE KEARNS ": CALL MS,A$
750 HOME : VTAB 12: HTAB 13: PRINT "HAPPY SPINNING!"
760 GOSUB 790
770 HOME : END
780 :
790 REM SPIN SUBROUTINE
800 :
810 VTAB 20: HTAB 5: PRINT "COPYRIGHT 1985 BY MICROSPARC, INC";: PRINT : VTAB 22: HTAB 6: PRINT "PRESS THE SPACE BAR TO CONTINUE"
820 FOR PAUSE = 1 TO 60: NEXT PAUSE
830 X = PEEK( -16384): POKE -16368,0
840 IF X = 160 THEN RETURN
850 CALL SS: GOTO 820
860 :
870 REM ENTERS FLASHING AND
880 REM NORMAL MESSAGES
890 :
900 IF N = 1 THEN A = 64
910 IF F = 1 THEN A = 0
920 FOR X = 1 TO LEN(A$)
930 B$ = MID$ (A$,X,1)
940 IF B$ >"?" THEN 960
950 Z = ASC(B$) +64 +A: GOTO 970
960 Z = ASC(B$) +A
970 POKE ST +X -1,Z: NEXT
980 POKE SL, LEN(A$)
990 RETURN