90 REM IB IS THE INPUT BYTE AND OB IS THE OUTPUT BYTE
100 OUT &H37A,&H4: | REM SET UP 37A FOR INPUTTING |
110 OUT &H378,&H0: | REM FORCE I/O BITS 0&1 HIGH |
120 | REM TO USE THEM AS INPUTS |
130 | REM AND FORCE THE REST OF |
140 | REM THE BITS HIGH (OFF) |
150 | REM TO TURN EVERYTHING ELSE |
OFF. |
|
160 A1=INP(&H37A) AND &HF |
|
170 A2=INP(&H379) AND &HF0 |
|
180 IB=A1 OR A2 |
|
190 IB=IB AND &H3 : | REM ONLY LEAVE THE TWO |
200 | REM THERMOSTAT CONTACTS |
210 IF IB=0 THEN OB=OB OR &H8:OUT &H378,OB:GOTO 160 | |
220 | REM TURN ON THE HEAT |
230 IF IB=1 THEN OB=OB AND NOT &HC:OUT &H378,OB:GOTO 160 | |
240 | REM THIS SHOULD NOT BE POSSIBLE |
250 | REM TURN THEM OFF. |
260 IF IB=2 THEN OB=OB AND NOT &HC:OUT &H378,OB:GOTO 160 | |
270 | REM TURN BOTH AIR AND HEAT OFF |
280 IF IB=3 THEN OB=OB OR &H4:OUT &H378,OB:GOTO 160 | |
290 | REM TURN ON AIR |
Figure 6
PPIO2899 Manual | 31 |
B&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph