3.1 ТЕРМОСТАТ.

Програма З.1.

10 CLEAR 65300: DIM A(64)

20 FOR 1-1 ТО 1964

30 READ A (l): POKE (65300 +1) Л (1)

40 NEXT I

50 DATA 243,1,0,0,17,141,55,219

60 DATA 254,203,119,40,10,0,0,0

70 DATA 19,122,183,32,242,24,7,0

80 DATA 19,3,122,183,32,8,33,85

90 DATA 255,112,35,113,251,201,219,254

100 DATA 203,119,40,10,0,0,0,19

110 DATA 122,183,32,211,24,232,0,0

120 DATA 0,19,122,183,32,232,24,222

125 INPUT “Tmax= “;T

130 PRINT AT 9,6;”TEMPER.:”;AT 9,26.”(C)”

135 PRINT AT 12,6;*T max = “AT 9,26,”(C)”

140 OUT 254,7. RANDOMIZE USR 65301

150 LET F=256*PEEK 65366+PEEK 65366-1

160 IF F<0 THEN LET F=0

165 GO SUB 2000

170 PRINT AT 9,16;” “AT 9,16,INT(C)

175 IF T>C THEN GO SUB 1000

177 PAUSE 1000

180 GO TO 140

1000 FOR N = 1 TO 1000

1010 OUT 254,24

1020 OUT 254,0

1030 NEXT N

1040 RETURN

2000 IF F<1600 THEN LET C=F/20-40

2010 IF F>-1600 THEN LET C=F/40

3000 RETURN