File MOL.BA (BASIC source file)

Directory of image this file is from
This file as a plain text file

1DEFFNZ(X,Y)=X-Y*INT(X/Y)
2DIM E9$(20)
3DIM A$(105,2)
4DIM F$(50)
5DIM N$(3)
6DIM M(105)
7DIM Z$(72)
8DEFFNA$(X9)=SEG$(F$,X9,X9)
9FILEV#4:"LPT:"
10PRINT"WO SIND DIE DATEN? VOLLSTAENDIGER NAME:"
11INPUTE9$
12FILE#1:E9$
13E=1
14IFEND#1GOTO16
15GOTO17
16GOTO22
17INPUT#1:Z$
18A$(E)=SEG$(Z$,1,2)
19M(E)=VAL(SEG$(Z$,3,9))
20E=E+1
21GOTO14
22CLOSE#1
23L=0
24I1=1
25INPUTF$
26GOSUB64
27GOSUB40
28L=L+H*M5
29IFFNA$(I1)="."GOTO31
30GOTO26
31PRINT"1 MOL DES ANGEGEBENEN STOFFES WIEGT";L;"G."
32PRINT
33PRINT"WOLLEN SIE EIN WEITERES MOLGEWICHT"
34PRINT"BERECHNET HABEN (J ODER N)";
35INPUTA$
36IFA$="J"GOTO38
37GOTO39
38GOTO23
39CLOSE#4\STOP
40U=1
41O=105
42IFO<>U+1GOTO44
43GOTO50
44IFN$<A$(INT((O+U)/2))GOTO46
45GOTO48
46O=INT((O+U)/2)
47GOTO49
48U=INT((O+U)/2)
49GOTO42
50IFN$=A$(U)GOTO52
51GOTO54
52M5=M(U)
53GOTO63
54IFN$=A$(O)GOTO56
55GOTO58
56M5=M(O)
57GOTO63
58PRINT
59PRINTN$;" EXISTIERT NICHT UND WIRD NICHT"
60PRINT"BERECHNET!"
61PRINT
62M5=0
63RETURN
64I2=I1
65I2=I2+1
66IFFNA$(I2)<="9"GOTO68
67GOTO65
68Z$=F$
69N$=SEG$(Z$,I1,I2-1)
70I1=I2
71I2=I2+1
72IFFNA$(I2)>="A"GOTO74
73GOTO71
74H=VAL(SEG$(Z$,I1,I2-1))
75I1=I2
76RETURN
77END



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search