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 'EXPOSURE - 7 OCT 86 rev. 12 MAR 2000
20 CLS:KEY OFF:SCREEN 0
30 COLOR 7,0,4
40 ON ERROR GOTO 2880
50 UL$=STRING$(80,205)
60 E$=STRING$(40,32)
70 E1$=STRING$(80,32)
80 E3$=STRING$(30,32)
90 F$="Ÿ/"
100 IF Z$<>""THEN 2180    'chained from FILTER program
110 T$=" EXPOSURE CALCULATOR "
120 COLOR 7,4:PRINT UL$;
130 COLOR 15,4:LOCATE 1,(80-LEN(T$))/2:PRINT T$
140 COLOR 4,0:PRINT STRING$(80,223);
150 COLOR 7,0
160 PRINT " Press number in < > for:"
170 PRINT UL$;
180 PRINT "  < 1 >  CAMERA exposures"
190 PRINT "  < 2 >  ENLARGER exposures"
200 PRINT "  < 3 >  EXPOSURE / FILTER factor"
210 PRINT UL$;
220 PRINT "  < 0 >  EXIT"
230 Z$=INKEY$
240 IF Z$="0"AND FLAG=0 THEN CLS:RUN "fotomenu"
250 IF Z$="0"AND FLAG=1 THEN CLS:RUN "filter"
260 IF Z$="1"THEN 310
270 IF Z$="2"THEN 1430
280 IF Z$="3"THEN 2180
290 GOTO 230
300 '
310 '.....camera exposures
320 CLS
330 T$=" CAMERA EXPOSURES "
340 COLOR 7,4:PRINT UL$;
350 COLOR 15,4:LOCATE CSRLIN-1,INT((80-LEN(T$))/2):PRINT T$
360 COLOR 4,0:PRINT STRING$(80,223);
370 COLOR 7,0
380 IF C=0 THEN INPUT " ENTER: Footcandles (if known) .....";C
390 IF I=0 THEN INPUT " ENTER: Film Speed ..............ISO";I
400 IF C*I<>0 THEN 580
410 IF I<>0 THEN 420 ELSE 310
420 IF S<>0 THEN 450
430 INPUT " ENTER: Exposure (sec. e.g. 1/60)...";X$
440 IF X$<>"" THEN GOSUB 2740
450 IF C<>0 THEN GOSUB 1380:GOTO 580
460 IF F<>0 THEN 490
470 INPUT " ENTER: Aperture .................Ÿ/";F
480 GOSUB 1980
490 IF C<>0 THEN GOSUB 1390:GOTO 580
500 IF S*F<>0 THEN GOSUB 1400:GOTO 580
510 GOTO 560
520 '
530 VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
540 RETURN
550 '
560 'PRINT DATA
570 GOSUB 530:GOTO 420
580 GOSUB 530:Z=C:GOSUB 2720:D=Z
590 T$=" EQUIVALENT EXPOSURES "
600 COLOR 7,4:LOCATE 1:PRINT UL$;
610 COLOR 15,4:LOCATE 1,INT((80-LEN(T$))/2):PRINT T$
620 LOCATE 2,7
630 COLOR 0,7:PRINT " for";D;;"Footcandles of illumination with ";
640 Z=LOG(5.119999E-02*C*I)/LOG(2):GOSUB 2710
650 E=Z:Z=I:GOSUB 2710:PRINT "ISO";Z;;"film ( EV";E;;") "
660 COLOR 7,0:PRINT UL$;
670 LOCATE CSRLIN-1,40:PRINT "Ë"
680 PRINT TAB(11);;"APERTURE PREFERRED";TAB(40);;"º";TAB(52);;"SHUTTER PREFERRED"
690 PRINT UL$;
700 LOCATE CSRLIN-1,40:PRINT "Î"
710 Q=SQR(2)
720 '
730    FOR P=1 TO 12           'aperture preferred table
740 F=Q^P:GOSUB 1390
750 Z=S:IF Z>1 THEN GOSUB 2710:GOTO 780
760 IF Z>5.000000E-01 THEN GOSUB 2700:GOTO 780
770 Z=INT(1/Z+5.000000E-01)
780 IF S>5.000000E-01 THEN N$=""ELSE N$="1/"
790 T=Z:Z=F:GOSUB 2710
800 IF Z=5.699999 THEN Z=5.599999
810 IF Z>10 THEN Z=INT(Z)
820 FX=T:GOSUB 1280
830 PRINT TAB(7);N$;USING T$;T;:PRINT " sec.";
840 FX=Z:GOSUB 1280
850 PRINT TAB(25);"@ ";F$;USING T$;Z;
860 PRINT TAB(40);;"º"
870    NEXT P
880 '
890 Q=4000                     '2x fastest speed
900    FOR P=1 TO 12           'shutter preferred table
910 N$=""
920 Q=Q/2
930 IF Q=6.250000E+01 THEN Q=60        'for 1/60 sec.
940 IF Q=7.500000 THEN Q=8          'for 1/8 sec.
950 S=1/Q:GOSUB 1380
960 Z=S:IF Z>1 THEN GOSUB 2710:GOTO 990
970 IF Z>5.000000E-01 THEN GOSUB 2700:GOTO 990
980 Z=INT(1/Z+5.000000E-01)
990 IF S>5.000000E-01 THEN N$=""ELSE N$="1/"
1000 T=Z:Z=F:GOSUB 2710
1010 IF Z=5.699999 THEN Z=5.599999
1020 IF Z>10 THEN Z=INT(Z)
1030 FX=T:GOSUB 1280
1040 LOCATE 5+P,48:PRINT N$;USING T$;T;:PRINT " sec.";
1050 IF Z<1 THEN PRINT TAB(65);;"Not Possible";:GOTO 1080
1060 FX=Z:GOSUB 1280
1070 PRINT TAB(65);"@ ";F$;USING T$;Z
1080    NEXT P
1090 '
1100 PRINT UL$;
1110 LOCATE CSRLIN-1,40:PRINT "Ê"
1120 Y=7
1130 PRINT TAB(Y);
1140 PRINT "The exposures and apertures shown are mathematically correct but,"
1150 PRINT TAB(Y);
1160 PRINT "due to the reciprocity failure characteristics of each particular"
1170 PRINT TAB(Y);
1180 PRINT "film emulsion, unusually short (less than 1/1000 sec.) or very long"
1190 PRINT TAB(Y);
1200 PRINT "(more than 5 sec.) indicated exposures may have to be increased by"
1210 PRINT TAB(Y);
1220 PRINT "a factor of up to 3x. Unusually long or short exposures can also"
1230 PRINT TAB(Y);
1240 PRINT "cause colour shifts in some colour films.";
1250 GOSUB 2920
1260 CLEAR:CLS:GOTO 10
1270 '
1280 T$="####"
1290 IF FX<1.000000E+05 THEN T$="#####"
1300 IF FX<1.000000E+04 THEN T$="####"
1310 IF FX<1000 THEN T$="###"
1320 IF FX<100 THEN T$="##"
1330 IF FX<10 THEN T$="#"
1340 IF FX<10 AND FX<>INT(FX)THEN T$="#.#"
1350 IF FX<1 THEN T$=".##"
1360 RETURN
1370 '
1380 F=SQR(C*I*S/20):RETURN
1390 S=20*F^2/C/I:RETURN
1400 C=20*F^2/S/I:RETURN
1410 I=20*F^2/C/S:RETURN
1420 '
1430 '.....enlarger exposures
1440 CLS
1450 COLOR 7,4:PRINT UL$;
1460 T$=" ENLARGER EXPOSURES "
1470 COLOR 15,4:LOCATE CSRLIN-1,INT((80-LEN(T$))/2):PRINT T$
1480 COLOR 4,0:PRINT STRING$(80,223);
1490 COLOR 7,0
1500 PRINT " KNOWN EXPOSURE DATA FOR A GIVEN IMAGE"
1510 PRINT UL$;
1520 PRINT " NOTE: All dimensional data must be in the same units, e.g. ";
1530 PRINT "inches, millimetres.";
1540 PRINT
1550 PRINT " Press any key to continue....."
1560 IF INKEY$=""THEN 1560
1570 VIEW PRINT 5 TO 24:CLS:VIEW PRINT:LOCATE 5
1580 INPUT " ENTER: Aperture ...........Ÿ/";V
1590 IF V=0 THEN LOCATE CSRLIN-1:PRINT E$:LOCATE CSRLIN-1:GOTO 1580
1600 F=V:GOSUB 1980
1610 INPUT " ENTER: Exposure (seconds) ...";S
1620 IF S=0 THEN LOCATE CSRLIN-1:PRINT E$:LOCATE CSRLIN-1:GOTO 1610
1630 INPUT " ENTER: Image length..........";X
1640 IF X=0 THEN LOCATE CSRLIN-1:PRINT E$:LOCATE CSRLIN-1:GOTO 1630
1650 INPUT " ENTER: Image width ..........";M
1660 IF M=0 THEN LOCATE CSRLIN-1:PRINT E$:LOCATE CSRLIN-1:GOTO 1650
1670 INPUT " ENTER: Lens height (if known)";HO
1680 IF X*M<>0 THEN 1690
1690 VIEW PRINT 5 TO 24:CLS:VIEW PRINT:LOCATE 5
1700 Z=V:H=HO:HX=X:GOSUB 2710:GOSUB 2050:R=M/X
1710 PRINT UL$;
1720 '
1730 PRINT " EXPOSURE DATA FOR NEW IMAGE"
1740 PRINT UL$;
1750 IF W=0 THEN LOCATE 11:INPUT " ENTER: Image length ............";W
1760 IF W THEN L=R*W:GOTO 1800
1770 IF L=0 THEN LOCATE 11:INPUT " ENTER: Image width .............";L
1780 IF L THEN W=L/R:GOTO 1800
1790 GOTO 1750
1800 Q=L*W/M/X:Y=4*Q*S/F^2
1810 F=0:S=0:HW=W
1820 LOCATE 11:PRINT E$
1830 IF F=0 THEN LOCATE 11:INPUT " ENTER: Aperture...............Ÿ/";F
1840 IF F THEN GOSUB 1980:S=Y*F^2/4:GOTO 1880
1850 IF S=0 THEN LOCATE 11:INPUT " ENTER: Exposure (seconds) ......";S
1860 IF S THEN F=2*SQR(S/Y):GOTO 1880
1870 GOTO 1820
1880 VIEW PRINT 11 TO 24:CLS:VIEW PRINT:LOCATE 11
1890 Z=W:GOSUB 2700:X=Z
1900 Z=L:GOSUB 2700:M=Z
1910 Z=S:GOSUB 2710:S=Z
1920 Z=F:GOSUB 2710
1930 H=H*HW/HX:GOSUB 2050
1940 PRINT UL$;
1950 GOSUB 2920
1960 CLEAR:CLS:GOTO 10
1970 '
1980 IF F=1.399999 THEN F=SQR(2)
1990 IF F=2.799999 THEN F=SQR(2)*2
2000 IF F=5.599999 THEN F=SQR(2)*4
2010 IF F= 11 THEN F=SQR(2)*8
2020 IF F= 22 THEN F=SQR(2)*16
2030 RETURN
2040 '
2050 '.....display results
2060 IF Z<100 THEN Z$="##"
2070 IF Z<10 THEN Z$="#"
2080 IF Z<>INT(Z)THEN Z$=Z$+".#"
2090 PRINT "  Image.........";
2100 PRINT USING "###.##";X;
2110 PRINT " x";USING "###.##";M
2120 PRINT "  Exposure......";
2130 PRINT USING "###.##";S;:PRINT " seconds @ ";F$;USING Z$;Z
2140 IF H=0 THEN PRINT " ";:GOTO 2160
2150 PRINT "  Lens height...";USING "###.##";H
2160 RETURN
2170 '
2180 '.....exposure/filter factor
2190 CLS
2200 COLOR 7,4:PRINT UL$;
2210 T$=" EXPOSURE FACTOR / FILTER FACTOR "
2220 COLOR 15,4:LOCATE CSRLIN-1,INT((80-LEN(T$))/2):PRINT T$
2230 COLOR 4,0:PRINT STRING$(80,223);
2240 COLOR 7,0
2250 '
2260 INPUT " ENTER: Exposure without factor ....(e.g. 1/60)...";X$
2270 IF X$=""THEN LOCATE CSRLIN-1:PRINT E1$;:LOCATE CSRLIN-1:GOTO 2260
2280 LOCATE CSRLIN-1:PRINT "       ";:LOCATE CSRLIN-1,37:PRINT X$;E3$
2290 GOSUB 2740       'convert to decimal
2300 '
2310 INPUT " ENTER: Aperture without factor ....Ÿ/";F
2320 IF F=0 THEN LOCATE CSRLIN-1:PRINT E1$;:LOCATE CSRLIN-1:GOTO 2310
2330 F$=STR$(F):F$=RIGHT$(F$,LEN(F$)-1)
2340 LOCATE CSRLIN-1:PRINT "       ";:LOCATE CSRLIN-1,37:PRINT "Ÿ/";F$;E3$
2350 GOSUB 1980       'correct rounded-off standard values
2360 '
2370 INPUT " ENTER: Exposure / Filter factor ....";X
2380 IF X=0 THEN LOCATE CSRLIN-1:PRINT E1$;:LOCATE CSRLIN-1:GOTO 2370
2390 X$=STR$(X):X$=RIGHT$(X$,LEN(X$)-1)
2400 LOCATE CSRLIN-1:PRINT "       ";:LOCATE CSRLIN-1,37:PRINT X$;"x";E3$
2410 '
2420 PRINT TAB(9);;"New Exposure with factor ...";
2430 GOSUB 2640
2440 S$=STR$(CINT(1/(S*X)))
2450 IF 1/(S*X)<=1 THEN S$=STR$(S*X)
2460 S$=RIGHT$(S$,LEN(S$)-1)
2470 IF 1/(S*X)>1 THEN PRINT "1/";
2480 PRINT S$;;" sec. @ Ÿ/";USING U$;F
2490 '
2500 F=SQR(F^2/X):GOSUB 1280
2510 IF F<=1 THEN 2580
2520 PRINT TAB(31);;"or....";
2530 S$=STR$(1/S)
2540 IF S>=1 THEN S$=STR$(S)
2550 S$=RIGHT$(S$,LEN(S$)-1)
2560 IF 1/(S*X)>1 THEN PRINT "1/";
2570 PRINT S$;;" sec. @ Ÿ/";USING U$;F
2580 PRINT UL$;
2590 GOSUB 2920
2600 IF FLAG=0 THEN CLEAR:CLS:GOTO 10
2610 CLS:RUN "filter"
2620 END
2630 '
2640 IF F<1000 THEN U$="###"
2650 IF F<100 THEN U$="##"
2660 IF F<10 THEN U$="#"
2670 IF F<>INT(F)THEN U$=U$+".#"
2680 RETURN
2690 '
2700 Z=INT(100*Z+5.000000E-01)/100:RETURN
2710 Z=INT(10*Z+5.000000E-01)/10:RETURN
2720 Z=INT(Z+5.000000E-01):RETURN
2730 '
2740 '.....convert fraction to decimal
2750 A=VAL(X$)           'numerator
2760 K=LEN(X$):B$=""
2770 FOR Z=1 TO K
2780 IF MID$(X$,Z,1)="/"THEN Z=Z+1:GOTO 2800
2790 NEXT Z
2800 FOR J=Z TO K
2810 B$=B$+MID$(X$,J,1)
2820 NEXT J
2830 B=VAL(B$)   'denominator
2840 IF B=0 THEN B=1
2850 S=A/B       'decimal value
2860 RETURN
2870 '
2880 '.....error trap
2890 CLS:PRINT "Error";ERR;;"in line";ERL
2900 END
2910 '
2920 'PRT
2930 KEY OFF:GOSUB 3000:LOCATE 25,5:COLOR 0,2
2940 PRINT " Send this page to:(1)Printer Queue? (2)Printout? ";
2950 PRINT "(3)Next page? (1/2/3)";:COLOR 7,0
2960 Z$=INKEY$:IF Z$<"1"OR Z$>"3"THEN 2960 ELSE GOSUB 3000
2970 IF Z$="3"THEN RETURN
2980 FOR I%=1 TO 24:FOR J%=1 TO 80:LPRINT CHR$(SCREEN(I%,J%));:NEXT J%:NEXT I%
2990 IF Z$="2"THEN LPRINT CHR$(12) ELSE 2930
3000 LOCATE 25,1:PRINT STRING$(80,32);:RETURN
