home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
RBBS in a Box Volume 1 #3.1
/
RBBSIABOX31.cdr
/
basw
/
bars.bas
< prev
next >
Wrap
BASIC Source File
|
1985-12-15
|
4KB
|
71 lines
1 ' ***********************************************************************
2 ' * *
3 ' * This program was designed on a Tandy 1000 with 128K RAM instead of *
4 ' * a PC. I don't know for sure if it will work on an IBM, but there *
5 ' * is one way to find out...try it. It is not intended as a complete *
6 ' * program by itself, but the way I sent it to the Userboard it can *
7 ' * be used autonomously. *
8 ' * It can be put to work in a number of ways. It would fit very *
9 ' * easily as a subroutine in a larger program, provided you have the *
10 '* memory to hold it, BASIC, MS-DOS, and a 32K screen. *
11 '* But the way I use it, I chain it from another basic program by *
12 '* storing the variables this program requires in a disk file, and *
13 '* putting a short "header" on this utility to read them into this *
14 '* program. Another way to use this program (but it's trickier) is *
15 '* to alter it so that it is done on screen 1. You have to be very *
16 '* careful when you do that, or you won't be able to get the PAINT *
17 '* to work right. I learned that the hard way. Another fault with *
18 '* that method is that it just doesn't look as pretty with only 4 *
19 '* colors to choose from. *
20 '* SUMMARY OF VARIABLES: *
21 '* INK - Colors in which bars will be drawn *
22 '* PAP - Background colors *
23 '* BASE - Bottom of "box" *
24 '* HIGH - How high the bar will go from its base *
25 '* *
26 '* If you have any questions about this program, you can call me at *
27 '* my office (at the McLean Church of Christ) at (502)-273-5114 or *
28 '* write me a letter (Box 272, Calhoun KY 42327), and I'll be glad to *
29 '* try to answer it for you. *
30 '* *
31 '* George A. McConnel - Program designer *
32 '* *
33 '***********************************************************************
8000 KEY OFF
8010 CLEAR ,,,32768!
8020 DIM B(3,5)
8040 FOR I=1 TO 3:READ INK(I):NEXT I
8050 FOR I=1 TO 3:READ PAP(I):NEXT I
8070 DATA 10,13,12
8080 DATA 2,5,4
8100 FOR I=1 TO 3:FOR J=1 TO 5
8110 READ B(I,J):GOTO 8130
8130 NEXT J
8140 NEXT I
8150 GOSUB 8230
8160 FOR I=1 TO 3
8170 FOR J=1 TO 5
8180 HIGH=B(I,J):BASE=200-(3-I)*4:X=20+J*40+I*4:GOSUB 8360
8190 NEXT J
8200 NEXT I
8210 LOCATE 1,1
8220 END
8230 SCREEN 5:CLS
8240 COLOR 15
8250 BASE=185
8260 LINE (42,BASE)-(308,BASE),,,-17477:LINE -(320,200):LINE (308,BASE)-(308,12):LINE (42,200)-(30,BASE):LINE -(30,0)
8270 LINE -(308,0):LINE-(320,12):LINE -(42,12):LINE-(30,0)
8280 LINE (42,199)-(320,199)
8290 LINE (42,199)-(42,12):LINE (319,199)-(319,12)
8300 PAINT (45,2),13,15
8310 PAINT (35,32),14,15
8320 PAINT (316,32),14,15
8330 PAINT (125,87),1,15
8340 LOCATE 1,1:PRINT"200":LOCATE 12,1:PRINT"100":LOCATE 24,1:PRINT" 0";
8350 RETURN
8360 HIGH=BASE-HIGH
8370 LINE (X-4,HIGH)-(X+4,BASE),INK(I),B:LINE (X-4,HIGH)-(X-8,HIGH-4),INK(I):LINE -(X,HIGH-4),INK(I):LINE-(X+4,HIGH),INK(I):LINE (X-8,HIGH-4)-(X-8,BASE-4),INK(I):LINE -(X-4,BASE),INK(I)
8380 PAINT (X,BASE-4),PAP(I),INK(I):PAINT (X-6,BASE-4),PAP(I),INK(I):PAINT (X,HIGH-2),PAP(I),INK(I)
8390 RETURN
8400 DATA 89,91,84,80,79,60,68,64,70,62,39,46,45,29,35