1 COMMON A, AL, B, BASEONLY, C, C$, C1, CAT$, CC, CKT$, D, D$, DD, DIA, DIMN$, DMS, E, EO, EX$, F, F$, FD, FF, FQ, FRQ, G$, GO$, I, I$, L, LATLONG, LD, LL, LN, LS, LW, LX, MAX, MENU, MIN, MX, N, NN, NT, OV, P, PI, PROG$, Q, QQ, QU, R, RA, RC, T, T$, U, U$, UH, UL$, V$, VC, W, WHIP, WIRD, WW, X, X$, X1, XS, Z$, ZP, ZS
10 'ELFLASH - 9 OCT 86 rev. 19 MAR 2000
20 CLEAR:CLS:KEY OFF:SCREEN 0
30 COLOR 7,0,7
40 DIM F(12)       'standard apertures
50 F$="Ÿ/"
60 A$=SPACE$(7)
70 E$=STRING$(80,32)
80 UL$=STRING$(80,205)
90 T$=" ELECTRONIC FLASH CALCULATOR "
100 COLOR 1,7
110 PRINT UL$;
120 LOCATE 1,INT((80-LEN(T$))/2):PRINT T$
130 COLOR 7,0
140 PRINT STRING$(80,223);
150 PRINT " Press number in < > to:";
160 PRINT UL$;
170 PRINT "  < 1 >  Find BCPS (Beam Candlepower Seconds) rating"
180 PRINT "  < 2 >  Find I.S.O. rating of film"
190 PRINT "  < 3 >  Find Guide Number"
200 PRINT "  < 4 >  Find Subject Distance"
210 PRINT "  < 5 >  Find Lens Aperture (Ÿ/ setting)"
220 PRINT UL$;
230 PRINT "  < 0 >  EXIT"
240 Z$=INKEY$
250 IF Z$="1"THEN B1=1:GOTO 330
260 IF Z$="2"THEN A1=1:GOTO 330
270 IF Z$="3"THEN G1=1:GOTO 330
280 IF Z$="4"THEN D1=1:GOTO 330
290 IF Z$="5"THEN F1=1:GOTO 330
300 IF Z$="0"THEN CLS:RUN "fotomenu"
310 GOTO 240
320 '
330 '.....input data
340 VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
350 '
360 IF B OR B1 OR D1 OR F1 OR Q THEN 400
370 INPUT " ENTER: Beam Candle Power Seconds ..........";B
380 Z=B:GOSUB 1120:GOSUB 640
390 '
400 IF A OR A1 OR D1 OR F1 OR Q THEN 440
410 INPUT " ENTER: Film speed ......................ISO";A
420 Z=A:GOSUB 1120:GOSUB 640
430 '
440 IF G OR G1 THEN 510
450 INPUT " ENTER: Guide Number (metres)...............";G
460 Z=G:G=G/3.048000E-01:GOSUB 1120:GOSUB 640
470 IF G THEN 510
480 INPUT " ENTER: Guide Number (feet).................";G
490 Z=G:GOSUB 1120:GOSUB 640
500 '
510 IF D OR D1 OR B1 OR A1 THEN 580
520 INPUT " ENTER: Subject distance (metres) ..........";D
530 Z=D:D=D/3.048000E-01:GOSUB 1120:GOSUB 640
540 IF D THEN 580
550 INPUT " ENTER: Subject distance (feet) ............";D
560 Z=D:GOSUB 1120:GOSUB 640
570 '
580 IF F OR F1 OR B1 OR A1 THEN 620
590 INPUT " ENTER: Aperture .........................Ÿ/";F
600 Z=F:GOSUB 1120:GOSUB 640
610 '
620 GOTO 360
630 '
640 FOR  Z=1 TO 4
650 IF F=0 THEN IF G*D THEN F=G/D
660 IF D=0 THEN IF G*F THEN D=G/F
670 IF G=0 THEN IF D*F THEN G=D*F
680 IF B=0 THEN IF G*A THEN B=20*G^2/A
690 IF A=0 THEN IF G*B THEN A=20*G^2/B
700 IF G=0 THEN IF A*B THEN G=SQR(A*B/20)
710 IF A*B*G<>0 THEN 750
720 IF D*F*G<>0 THEN 750
730 NEXT Z:RETURN
740 '
750 '.....display results
760 VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
770 U1$="#####.#":U2$="#####"
780 GOSUB 900
790 IF F THEN PRINT " Aperture ...................... Ÿ/";USING F$;F
800 IF G THEN PRINT " Guide Number (metres) .........";USING U1$;G*3.048000E-01
810 IF G THEN PRINT " Guide Number (feet) ...........";USING U1$;G
820 IF A THEN PRINT " Film speed .................ISO";USING U2$;A
830 IF B THEN PRINT " Beam Candle Power Seconds .....";USING U2$;B
840 IF D THEN PRINT " Subject distance (metres) .....";USING U1$;D*3.048000E-01
850 IF D THEN PRINT " Subject distance (feet) .......";USING U1$;D
860 PRINT UL$;
870 IF F=0 THEN 1090
880 GOTO 970
890 '
900 IF F<100 THEN F$="##"
910 IF F<10 THEN F$="#"
920 IF F<>INT(F)THEN F$=F$+".#"
930 RETURN
940 '
950 DATA 1.4,2,2.8,4,5.6,8,11,16,22,32,45,64
960 '
970 FOR Z=1 TO 12:READ F(Z):NEXT Z
980 LN=CSRLIN
990 FOR Z=1 TO 12
1000 F=F(Z):GOSUB 900
1010 PRINT " Use Ÿ/";USING F$;F(Z);
1020 PRINT TAB(12);;".......................";
1030 PRINT USING "###.#";G/F(Z)*3.048000E-01;
1040 PRINT " m. (";USING "###.#";G/F(Z);
1050 PRINT " ft.)"
1060 NEXT Z
1070 PRINT UL$;
1080 LOCATE LN,12:PRINT "for subject distance of"
1090 GOSUB 1180
1100 GOTO 10
1110 '
1120 IF Z=0 THEN LOCATE CSRLIN-1:PRINT E$:LOCATE CSRLIN-2
1130 RETURN
1140 '
1150 LOCATE CSRLIN-1:PRINT A$:LOCATE CSRLIN-1,44:PRINT Z;SPACE$(10)
1160 RETURN
1170 '
1180 'PRT
1190 KEY OFF:GOSUB 1260:LOCATE 25,5:COLOR 0,2
1200 PRINT " Send this page to:(1)Printer Queue? (2)Printout? ";
1210 PRINT "(3)Next page? (1/2/3)";:COLOR 7,0
1220 Z$=INKEY$:IF Z$<"1"OR Z$>"3"THEN 1220 ELSE GOSUB 1260
1230 IF Z$="3"THEN RETURN
1240 FOR I%=1 TO 24:FOR J%=1 TO 80:LPRINT CHR$(SCREEN(I%,J%));:NEXT J%:NEXT I%
1250 IF Z$="2"THEN LPRINT CHR$(12) ELSE 1190
1260 LOCATE 25,1:PRINT STRING$(80,32);:RETURN
