--- title: "Heating System Analyzer" id: 51895 type: "computer_media" slug: "heating-system-analyzer" url: "http://localhost/computer_media/heating-system-analyzer/" markdown_url: "http://localhost/computer_media/heating-system-analyzer.md" published_at: "2023-08-16T01:42:21+00:00" modified_at: "2026-04-04T20:17:53+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2023/08/SCR-20260404-ebns.png" excerpt: "Enter your home's dimensions, insulation thicknesses, and fuel costs to get a detailed yearly heating bill estimate with fuel-conversion savings comparisons." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "Timex Computer Corporation" slug: "timex-computer-corporation" taxonomy: "post_tag" url: "http://localhost/tag/timex-computer-corporation/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Tim Rossetti" slug: "tim-rossetti" taxonomy: "indiv" url: "http://localhost/indiv/tim-rossetti/" genre: - name: "Home" slug: "home" taxonomy: "genre" url: "http://localhost/type/home/" media_type: "Cassette" programmers: - name: "Tim Rossetti" slug: "tim-rossetti" taxonomy: "indiv" url: "http://localhost/indiv/tim-rossetti/" download_url: "https://archive.org/download/timex-sinclair-software-archive/HeatingSystemAnalyzer (1983)(Timex)(US)(TS1000)(Cassette).zip" mediadate: "1983" producer_company: - id: 11401 title: "Timex Computer Corporation" type: "company" url: "http://localhost/company/timex-computer-corporation/" images: - url: "http://localhost/wp-content/uploads/2023/08/SCR-20260404-ebns.png" - url: "http://localhost/wp-content/uploads/2023/08/SCR-20260404-ebkx.png" related_products: - id: 12820 title: "Heating System Analyzer" type: "product" url: "http://localhost/product/heating-system-analyzer/" media_type_tags: "Home" --- Heating System Analyzer is a BASIC program that calculates yearly home heating energy costs by collecting data on floor perimeters, ceiling heights, window areas, attic dimensions, and insulation details across multiple floors. It computes heat loss using R-values for fiberglass (R-3.17 per inch) and Zonolite mineral insulation (R-2.4 per inch), applies degree-heating-hour figures for twelve U.S. cities, and models oil, natural gas, and electric furnaces with user-supplied or default efficiency values. The program supports setback thermostat savings (5° or 10° night reduction), storm window factors, and a conversion analysis mode that compares heating costs before and after switching fuel types or adding insulation. User input is guided through a graphical house cross-section and plan-view diagram rendered with block graphics characters, along with animated “BTU HEAT LOSS” text during the title sequence. *** ## Program Analysis ### Program Structure The program is organized into a main flow (lines 1–800) and a set of subroutines called via `GOSUB`: - **Lines 1–75:** Initialization and floor count input. Arrays `P`, `C`, `W`, `H`, `V` are dimensioned dynamically to match the number of floors `S`. - **Lines 98–179:** Per-floor data collection loop — perimeter, ceiling height, window area, and volume estimate. - **Lines 180–229:** Attic area and insulation input; wall insulation input. - **Lines 233–300:** Storm window query and setback thermostat handling. - **Lines 280–325:** Heat loss computation for walls and attic. - **Lines 405–460:** Fuel type selection and annual consumption calculation. - **Lines 510–699:** Cost calculation, display, and conversion analysis. - **Lines 700–720:** Option to change insulation and re-run analysis. - **Lines 1000–1099:** Title screen subroutine with animated block graphics. - **Lines 2000–2099:** Furnace efficiency input subroutine. - **Lines 3000–3099:** Furnace efficiency and fuel cost information display. - **Lines 4000–4099:** Setback thermostat selection subroutine. - **Lines 6000–6099:** City/degree-heating-hour selection subroutine. - **Lines 7000–7099:** House plan-view diagram subroutine. - **Lines 9000–9010:** SAVE and RUN for program storage. ### Heat Loss Calculations Volume of each floor is estimated with the formula `V(I) = 0.0589 * P(I)^2 * C(I)`, which approximates a square floor plan from perimeter alone. This is a significant simplifying assumption — irregular floor plans will produce inaccurate volume estimates. Wall heat loss per floor is computed at line 310: - Wall conduction: `(P(I)*C(I) - W(I)) / RW` — wall area minus windows, divided by wall R-value. - Window conduction: `W(I) / RG` — window area divided by glazing R-value (1.0 for single, 1.8 for storm/double pane). - Infiltration: `V(I) * 0.0135` — a fixed infiltration coefficient applied to volume. - All three terms are summed and multiplied by `DHH` (degree-heating-hours for the selected city). Attic heat loss is `AA / RA * DHH`. The total heat loss `HL` at line 325 applies a thermostat temperature factor: `(HLW + HLA) * T / 65`, scaling linearly with the thermostat setting relative to 65°F. ### Degree-Heating-Hour Data Twelve U.S. cities are hard-coded with degree-heating-day values (lines 6050–6072), which are then multiplied by 1000 at line 6075 to convert to degree-heating-hours. The table of cities and values is: | City | DHD value | | --- | --- | | Anchorage, AK | 261 | | Flagstaff, AZ | 172 | | Denver, CO | 151 | | Hartford, CT | 148 | | Wilmington, DE | 118 | | Boise, ID | 139 | | Boston, MA | 135 | | Duluth, MN | 240 | | Buffalo, NY | 168 | | New York City, NY | 115 | | Portland, OR | 111 | | Seattle, WA | 106 | These values appear to be in hundreds of degree-days (e.g., Anchorage’s 261 × 1000 = 261,000), which are then used directly in the heat loss equations without explicit unit reconciliation — users in other regions or cities have no option to enter a custom value. ### Fuel Consumption and Cost Modeling Annual fuel quantities are computed based on fuel type (`E`): - **Oil (E=1):**`GO = (HL / 140000) / 0.7` at default 70% efficiency, or adjusted by user-entered `EFF`. The divisor 140,000 represents approximate BTU per gallon of oil. - **Gas (E=2):**`TH = (HL / 100000) / 0.75` at default 75% efficiency. 100,000 BTU per therm is standard. - **Electric (E=3):**`KWH = HL / 3412`, since 1 kWh = 3,412 BTU. Electric heat is assumed 100% efficient by default. When a user-entered efficiency is used for electric heat, `KWH = (HL / 3412) / EFF` divides by `EFF` rather than `EFF/100`, unlike the oil and gas branches which correctly use `/EFF*100`. This means entering an efficiency like 100 for electric would divide KWH by 100 rather than leaving it unchanged — a bug in the electric efficiency branch. ### Setback Thermostat and Conversion Modes The setback thermostat multiplier `SB` is initialized to 1.0 (no setback) and set to 0.95 (5° setback) or 0.9 (10° setback) via the subroutine at line 4000. It multiplies the final annual cost figures at lines 525, 535, and 545. The conversion analysis mode is controlled by the flag `CV`: on first pass `CV=0`, the first fuel cost is stored in `PC`, `CV` is set to 1, and the user picks a second fuel type. The difference `SAV = PC - C` then shows the annual savings or loss. Similarly, the `ADD` flag (set at line 717) tracks whether the user is comparing additional insulation rather than a fuel switch, adjusting the wording of savings messages. ### Key BASIC Idioms - **INKEY$ polling with bounce prevention:** The pattern `IF INKEY$<>"" THEN GOTO N / IF INKEY$="" THEN GOTO N+1` is used throughout to wait for a keypress while draining any pre-held key, providing reliable single-keystroke detection without INPUT. - **Key range checking via CHR$ codes:** Lines 53 and 416 filter numeric keypresses using `CHR$ 28`–`CHR$ 37` (digits 0–9 in ZX81 character set) and convert to integer with `CODE A$ - 28`. - **Dynamic array dimensioning:** Arrays are sized at runtime after the floor count `S` is determined (lines 60–64), conserving memory. - **TAB for column alignment:**`TAB` is used within PRINT statements to position block graphics elements for the house diagram, avoiding repeated spaces. ### Title Screen Animation Subroutine 1000 draws a detailed house cross-section using block graphics, then animates “BTU HEAT LOSS” labels cycling through different row positions in a `FOR I=1 TO 5` loop (lines 1029–1043). The animation overwrites successive rows with alternating `\~~` and `\,,` patterns (▄ and ▀ characters) flanking the text labels, creating a scrolling heat-wave effect without any machine code or PAUSE-based timing — loop iteration speed serves as the delay. ### Bugs and Anomalies - **Volume formula:**`V(I) = 0.0589 * P(I)^2 * C(I)` assumes a square footprint (`P/4` per side, area = `P^2/16 ≈ 0.0625*P^2`); the coefficient 0.0589 is slightly off from the exact square approximation and ignores all non-square layouts. - **Electric efficiency bug:** As noted above, the electric branch at line 453 divides by raw `EFF` (e.g., 100) rather than `EFF/100`, producing grossly incorrect results when the user enters furnace efficiency for electric heat. - **Line 660 unreachable:** Line 660 (`IF CV=1 THEN GOTO 660` branches there) contains no code in the listing between 660 and 661 — the program falls through to line 661, which is the intended behavior, but the branch target label at 660 is missing explicit content. - **Line 416/418 race condition:** Lines 416–418 read INKEY$ twice in close succession without clearing the key, meaning the second read at 418 could potentially differ from the first at 416 if timing is tight, though in practice the held key makes this unlikely. - **Gas cost formula label:** The subroutine at line 3040 labels the denominator as `(CCF)(1.02)`, implying the formula converts CCF (hundred cubic feet) to therms — but the prompt at line 530 asks for cost per therm directly, creating a mismatch between the displayed formula and the actual input expected. ## Source Code ``` 1 REM HEATING SYSTEM ANALYZER REV 1 BY TIM ROSSETTI 280 HIGH ST STIRLING, N.J. 07980 3 LET ADD=0 10 LET EFF=0 11 LET CV=0 12 LET SB=1 40 GOSUB 1000 49 PRINT AT 20,0;" PRESS/ NUMBER OF FLOORS OR " 50 PRINT AT 21,0;" HEATED AREAS" 51 IF INKEY$<>"" THEN GOTO 51 52 IF INKEY$="" THEN GOTO 52 53 IF INKEY$CHR$ 37 THEN GOTO 51 54 LET A$=INKEY$ 55 LET S=CODE A$-28 60 DIM P(S) 61 DIM C(S) 62 DIM W(S) 63 DIM H(S) 64 DIM V(S) 75 CLS 98 GOSUB 7000 101 PRINT AT 4,3;"~~~~~~~~~~~~~~" 102 FOR I=1 TO S 105 PRINT AT 3,3;"FLOOR ";I 110 PRINT AT 20,0;" ENTER/ THE PERIMETER OF FLOOR ";I 111 PRINT AT 21,0;" (FEET) " 112 INPUT P(I) 113 PRINT AT 17,0;" " 115 PRINT AT 16,5;" PERIMETER=";P(I);" FEET " 120 PRINT AT 20,0;"ENTER/ CEILING HEIGHT OF FLOOR ";I 121 INPUT C(I) 122 PRINT AT 17,5;" CEILING HEIGHT=";C(I);" FEET " 130 LET V(I)=0.0589*P(I)**2*C(I) 155 PRINT AT 20,0;" ENTER/ WINDOW AREA OF FLOOR ";I 156 PRINT AT 21,9;"(SQUARE FEET)" 157 INPUT W(I) 158 PRINT AT 18,5;" WINDOW AREA=";W(I);" SQ-FT " 162 PRINT AT 20,0;" CHECK INPUT " 163 PRINT AT 21,0;"% % % %P%R%E%S%S% %A%N%Y% %K%E%Y% %T%O% %C%O%N%T%I%N%U%E% % % % " 164 IF INKEY$<>"" THEN GOTO 164 165 IF INKEY$="" THEN GOTO 165 172 PRINT AT 16,0;" " 173 PRINT AT 17,0;" " 174 PRINT AT 18,0;" " 179 NEXT I 180 PRINT AT 3,3;" ATTIC " 181 PRINT AT 4,3;" ~~~~~~~~~~ " 185 PRINT AT 17,0;" AREA= (A TIMES B)+(D TIMES E) " 192 PRINT AT 20,0;" ENTER/ ATTIC AREA " 193 PRINT AT 21,0;" (SQUARE FEET) " 194 INPUT AA 195 PRINT AT 10,8;" " 196 PRINT AT 11,8;" " 197 PRINT AT 10,9;"ATTIC=";AA;" SQ-FT " 198 PRINT AT 20,0;" " 200 PRINT AT 17,0;" " 201 PRINT AT 18,0;" F/ FIBERGLASS" 202 PRINT AT 19,0;" Z/ ZONOLITE MINERAL" 203 PRINT AT 21,0;"PRESS/ TYPE OF ATTIC INSULATION " 204 IF INKEY$<>"" THEN GOTO 204 205 IF INKEY$="" THEN GOTO 205 206 IF INKEY$<>"F" AND INKEY$<>"Z" THEN GOTO 204 207 IF INKEY$="F" THEN GOTO 216 209 PRINT AT 18,0;" " 210 PRINT AT 19,0;" " 211 PRINT AT 20,0;" ENTER/ ATTIC ZONOLITE MINERAL " 212 PRINT AT 21,0;" INSULATION THICKNESS (INCHES) " 213 INPUT IA 214 LET RA=2.4*IA 215 GOTO 221 216 PRINT AT 19,0;" " 217 PRINT AT 20,0;" ENTER/ ATTIC FIBERGLASS " 218 PRINT AT 21,0;" INSULATION THICKNESS (INCHES) " 219 INPUT IA 220 LET RA=3.17*IA 221 IF IA<1 THEN LET RA=1 222 PRINT AT 12,9;"THICKNESS=";IA;" IN." 223 PRINT AT 13,14;"R-";INT RA 224 PRINT AT 20,0;" ENTER/ WALL FIBERGLASS " 225 INPUT IW 226 LET RW=3.17*IW 227 IF IW<1 THEN LET RW=1 228 PRINT AT 15,9;"THICKNESS=";IW;" IN." 229 PRINT AT 16,14;"R-";INT RW 230 PRINT AT 18,0;" " 231 FOR I=1 TO 30 232 NEXT I 233 IF ADD=1 THEN GOTO 300 234 PRINT AT 20,0;" DOES HOUSE HAVE STORM WINDOWS " 235 PRINT AT 21,0;"AND/OR DOUBLE PANE GLASS? (Y/N)" 236 IF INKEY$<>"" THEN GOTO 236 237 IF INKEY$="" THEN GOTO 237 238 IF INKEY$<>"Y" AND INKEY$<>"N" THEN GOTO 236 259 IF INKEY$="N" THEN GOTO 261 260 IF INKEY$="Y" THEN GOTO 265 261 LET RG=1.0 262 CLS 263 PRINT AT 10,7;"NO STORM WINDOWS" 264 GOTO 270 265 LET RG=1.8 266 CLS 267 PRINT AT 10,5;"HOUSE HAS STORM WINDOWS" 270 PRINT AT 20,0;"DO YOU USE A SETBACK THERMOSTAT?" 271 PRINT AT 21,13;"(Y/N)" 275 IF INKEY$<>"" THEN GOTO 275 276 IF INKEY$="" THEN GOTO 276 277 IF INKEY$<>"Y" AND INKEY$<>"N" THEN GOTO 275 278 IF INKEY$="Y" THEN GOSUB 4000 279 IF INKEY$="N" THEN GOTO 280 280 CLS 281 PRINT AT 20,0;" WHAT IS THE NORMAL SETTING OF " 282 PRINT AT 21,0;" THE THERMOSTAT? (DEG. F) " 283 INPUT T 289 CLS 290 GOSUB 6000 301 LET HLW=0 302 CLS 305 FOR I=1 TO S 310 LET H(I)=(((P(I)*C(I)-W(I))/RW)+(W(I)/RG)+(V(I)*0.0135))*DHH 314 LET HLW=H(I)+HLW 315 NEXT I 320 LET HLA=AA/RA*DHH 325 LET HL=(HLW+HLA)*T/65 405 PRINT AT 21,0;" PRESS NUMBER OF TYPE OF HEAT " 410 PRINT AT 7,3;"1/ OIL" 411 PRINT AT 9,3;"2/ NATURAL GAS" 412 PRINT AT 11,3;"3/ ELECTRIC" 414 IF INKEY$<>"" THEN GOTO 414 415 IF INKEY$="" THEN GOTO 415 416 IF INKEY$CHR$ 31 THEN GOTO 419 417 LET E$=INKEY$ 418 LET E=CODE E$-28 419 CLS 420 GOSUB 3000 421 PRINT AT 20,0;" DO YOU KNOW THE EFFICIENCY OF " 422 PRINT AT 21,0;" THE FURNACE? (Y/N) " 423 IF INKEY$<>"" THEN GOTO 423 424 IF INKEY$="" THEN GOTO 424 425 IF INKEY$<>"Y" AND INKEY$<>"N" THEN GOTO 423 426 IF INKEY$="Y" THEN GOSUB 2000 427 IF E=1 THEN GOTO 434 428 IF E=2 THEN GOTO 445 429 IF E=3 THEN GOTO 450 434 IF EFF<>0 THEN GOTO 437 435 LET GO=(HL/140000)/0.7 436 GOTO 460 437 LET GO=(HL/140000)/EFF*100 438 GOTO 460 445 IF EFF<>0 THEN GOTO 448 446 LET TH=(HL/100000)/0.75 447 GOTO 460 448 LET TH=(HL/100000)/EFF*100 449 GOTO 460 450 IF EFF<>0 THEN GOTO 453 451 LET KWH=HL/3412 452 GOTO 460 453 LET KWH=(HL/3412)/EFF 460 CLS 461 LET EFF=0 510 IF E=1 THEN GOTO 520 511 IF E=2 THEN GOTO 530 512 IF E=3 THEN GOTO 540 520 PRINT AT 21,0;"ENTER/ COST OF GALLON OF OIL ($)" 522 INPUT CO 523 IF CO>=10 THEN GOTO 522 525 LET COIL=CO*GO*SB 529 GOTO 550 530 PRINT AT 21,0;" ENTER/ COST PER THERM (CENTS) " 531 GOSUB 3015 532 INPUT CT 533 IF CT<1 THEN GOTO 532 535 LET CGAS=CT*TH*SB/100 539 GOTO 550 540 PRINT AT 21,0;" ENTER/ COST OF KWH (CENTS) " 541 GOSUB 3015 542 INPUT CKW 543 IF CKW<1 THEN GOTO 542 545 LET CLEC=CKW*KWH*SB/100 550 IF E=1 THEN LET E$="OIL" 551 IF E=2 THEN LET E$="GAS" 552 IF E=3 THEN LET E$="ELECTRIC" 602 CLS 605 PRINT AT 10,0;" THE YEARLY ENERGY COST IS: " 607 IF E=1 THEN LET C=COIL 608 IF E=2 THEN LET C=CGAS 609 IF E=3 THEN LET C=CLEC 610 LET C=INT C 611 PRINT AT 12,7;"$";C;" FOR ";E$;" HEAT" 613 PRINT AT 21,0;"% % % %P%R%E%S%S% %A%N%Y% %K%E%Y% %T%O% %C%O%N%T%I%N%U%E% % % % " 615 IF INKEY$<>"" THEN GOTO 615 616 IF INKEY$="" THEN GOTO 616 620 IF CV=1 THEN GOTO 660 630 PRINT AT 20,0;" DO YOU WISH TO CONVERT " 631 PRINT AT 21,0;" HEATING SYSTEM? (Y/N) " 635 IF INKEY$<>"" THEN GOTO 635 636 IF INKEY$="" THEN GOTO 636 637 IF INKEY$<>"Y" AND INKEY$<>"N" THEN GOTO 635 641 IF INKEY$="N" THEN GOTO 700 642 IF INKEY$="Y" THEN GOTO 650 650 CLS 651 IF CV=1 THEN GOTO 400 652 LET PC=C 653 LET CV=1 655 GOTO 400 661 LET SAV=PC-C 662 CLS 664 IF PC>C THEN GOTO 690 665 IF C>=PC THEN GOTO 666 666 IF ADD=0 THEN GOTO 671 667 PRINT AT 10,0;" IT IS NOT ECONOMICAL TO ADD " 668 PRINT AT 12,0;" THAT AMOUNT OF INSULATION " 669 PRINT AT 14,0;" AND CONVERT TO ";E$;" HEAT" 670 GOTO 630 671 PRINT AT 10,0;"IT IS NOT ECONOMICAL TO CONVERT" 672 PRINT AT 12,12;"TO ";E$ 689 GOTO 630 690 IF ADD=1 THEN GOTO 695 691 PRINT AT 10,0;" THE CONVERSION TO ";E$ 692 PRINT AT 12,12;"WILL SAVE" 693 PRINT AT 14,9;"$";SAV;" THIS YEAR" 694 GOTO 630 695 PRINT AT 10,0;" THE ADDITIONAL INSULATION " 696 PRINT AT 12,0;" WITH ";E$;" HEAT" 697 PRINT AT 14,0;" WILL SAVE $";SAV;" THIS YEAR" 699 GOTO 630 701 CLS 705 PRINT AT 20,5;"DO YOU WISH TO CHANGE" 706 PRINT AT 21,2;"INSULATION THICKNESSES? (Y/N)" 710 IF INKEY$<>"" THEN GOTO 710 711 IF INKEY$="" THEN GOTO 711 712 IF INKEY$<>"Y" AND INKEY$<>"N" THEN GOTO 710 713 IF INKEY$="Y" THEN GOTO 716 715 IF INKEY$="N" THEN GOTO 800 716 CLS 717 LET ADD=1 718 GOSUB 7000 720 GOTO 201 999 STOP 1005 PRINT AT 0,15;".." 1006 PRINT AT 1,13;"..'' ''.." 1007 PRINT AT 2,11;"..'' ''.." 1008 PRINT AT 3,9;"..'' ''.." 1009 PRINT AT 4,7;"..'' ''.." 1010 PRINT AT 5,5;"..% % .." 1011 PRINT AT 6,5;"''':'''''''''''''''''''''''''''''''''':'''" 1012 PRINT AT 7,6;" :";TAB 24;": " 1013 PRINT AT 8,6;" :";TAB 9;":'''''':";TAB 18;":'''''':";TAB 24;": " 1014 PRINT AT 9,6;" :";TAB 9;": :";TAB 18;": :";TAB 24;": " 1015 PRINT AT 10,6;" :";TAB 9;":......:";TAB 18;":......:";TAB 24;": " 1016 PRINT AT 11,6;" :";TAB 24;": " 1017 PRINT AT 12,6;" :";TAB 24;": " 1018 PRINT AT 13,6;"':'''''''''''''''''''''''''''''''''':'" 1019 PRINT AT 14,6;" :";TAB 24;": " 1020 PRINT AT 15,6;" :";TAB 9;":'''''':";TAB 18;":'''''':";TAB 24;": " 1021 PRINT AT 16,6;" :";TAB 9;": :";TAB 18;": :";TAB 24;": " 1022 PRINT AT 17,6;" :";TAB 9;":. :";TAB 18;":......:";TAB 24;": " 1023 PRINT AT 18,6;" :";TAB 9;": :";TAB 24;": " 1024 PRINT AT 19,6;" :";TAB 9;": :";TAB 24;": " 1025 PRINT AT 20,0;"% % % % % % % ''% % % % % % ''''''''''''''''''''% % % % % % % % " 1029 FOR I=1 TO 5 1030 PRINT AT 2,3;",,~~,,~~,,";TAB 23;",,~~,,~~,," 1031 PRINT AT 8,0;"~~,,~~,,~~";TAB 26;"~~,,~~,,~~" 1032 PRINT AT 14,0;",,~~,,~~,,";TAB 26;",,~~,,~~,," 1033 PRINT AT 10,0;"~~BTU~~";TAB 26;"~~BTU~~" 1034 PRINT AT 16,0;",,~~,,~~,,";TAB 26;",,~~,,~~,," 1035 PRINT AT 12,0;"~~,,~~,,~~";TAB 26;"~~,,~~,,~~" 1037 PRINT AT 14,0;"HEAT~~";TAB 26;"~~LOSS" 1038 PRINT AT 8,0;",,~~,,~~,,";TAB 26;",,~~,,~~,," 1039 PRINT AT 16,0;"~~,,~~,,~~";TAB 26;"~~,,~~,,~~" 1040 PRINT AT 10,0;",,~~,,~~,,";TAB 26;",,~~,,~~,," 1041 PRINT AT 2,3;"~~,,~~,,~~";TAB 23;"~~,,~~,,~~" 1042 PRINT AT 12,0;",,~~,,~~,,";TAB 26;",,~~,,~~,," 1043 NEXT I 1044 PRINT AT 2,3;" ";TAB 23;" " 1051 PRINT AT 5,7;"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" 1052 PRINT AT 6,0;" ";TAB 7;";;";TAB 23;";;";TAB 26;" " 1053 PRINT AT 7,0;" ";TAB 7;"@@";TAB 23;"@@";TAB 26;" " 1054 PRINT AT 8,0;" ";TAB 7;"@@ HEATING @@";TAB 26;" " 1055 PRINT AT 9,0;" ";TAB 7;"@@ SYSTEM @@";TAB 26;" " 1056 PRINT AT 10,0;" ";TAB 7;"@@ ANALYZER @@";TAB 26;" " 1057 PRINT AT 11,0;" ";TAB 7;"@@";TAB 23;"@@";TAB 26;" " 1058 PRINT AT 12,0;" ";TAB 7;"@@";TAB 23;"@@";TAB 26;" " 1059 PRINT AT 13,0;" ";TAB 7;";;";TAB 23;";;";TAB 26;" " 1060 PRINT AT 14,0;" ";TAB 7;"@@";TAB 23;"@@";TAB 26;" " 1061 PRINT AT 15,0;" ";TAB 7;"@@";TAB 23;"@@";TAB 26;" " 1062 PRINT AT 16,0;" ";TAB 7;"@@";TAB 23;"@@";TAB 26;" " 1063 PRINT AT 17,0;" ";TAB 7;"@@";TAB 23;"@@";TAB 26;" " 1064 PRINT AT 18,0;" ";TAB 7;"@@";TAB 23;"@@";TAB 26;" " 1065 PRINT AT 19,0;" ";TAB 7;"@@";TAB 23;"@@";TAB 26;" " 1070 FOR I=1 TO 30 1071 NEXT I 1080 CLS 1099 RETURN 2008 PRINT AT 21,0;" " 2009 PRINT AT 20,0;" " 2010 PRINT AT 21,0;"ENTER/ FURNACE EFFICIENCY" 2011 INPUT EFF 2015 IF EFF<=0 OR EFF>100 THEN GOTO 2000 2099 RETURN 3000 PRINT AT 1,5;"EFFICIENCY OF FURNACES" 3002 PRINT AT 3,3;"GAS FURNACES: 75-80 PERCENT" 3003 PRINT AT 5,3;"OIL FURNACES: 65-80 PERCENT" 3004 PRINT AT 7,3;"ELECTRIC: 100 PERCENT" 3008 PRINT AT 9,0;" IF NO EFFICIENCY IS " 3009 PRINT AT 10,0;" ENTERED THEN THE PROGRAM" 3010 PRINT AT 11,0;" WILL ASSUME:" 3011 PRINT AT 13,7;"EFF=70 PCT FOR OIL" 3012 PRINT AT 14,7;"EFF=75 PCT FOR GAS" 3014 GOTO 3050 3015 PRINT AT 5,0;" REMEMBER TO INCLUDE ENERGY " 3016 PRINT AT 6,0;" ADJUSTMENT CHARGES AND MONTHLY " 3017 PRINT AT 7,0;" SERVICE CHARGES. CALCULATE COST" 3018 PRINT AT 8,0;" FROM RECENT BILLS." 3019 PRINT AT 11,0;"FORMULA:" 3020 PRINT AT 12,0;"''''''''''''''''" 3022 PRINT AT 14,5;"COST =" 3023 IF E=3 THEN GOTO 3030 3024 IF E=2 THEN GOTO 3040 3030 PRINT AT 13,13;" BILLS($) (100)" 3031 PRINT AT 14,13;"----------------" 3032 PRINT AT 15,13;" TOTAL KWH" 3039 GOTO 3049 3040 PRINT AT 13,13;" BILLS($) (100)" 3041 PRINT AT 14,13;"----------------" 3042 PRINT AT 15,13;" (CCF) (1.02)" 3049 RETURN 3060 PRINT AT 16,0;"NOTE: THIS PROGRAM CALCULATES " 3061 PRINT AT 17,0;"'''''''' THE ENERGY COST FOR THE " 3062 PRINT AT 18,0;" HEATING SYSTEM ONLY. " 3063 PRINT AT 19,0;" ''''''''" 3099 RETURN 4001 CLS 4010 PRINT AT 7,7;"SETBACK THERMOSTAT" 4011 PRINT AT 8,7;"''''''''''''''''''''''''''''''''''''" 4012 PRINT AT 10,3;"1/ 5 DEGREE NIGHT SETBACK" 4013 PRINT AT 12,3;"2/ 10 DEGREE NIGHT SETBACK" 4050 PRINT AT 21,0;" PRESS/ NUMBER OF SETBACK " 4075 IF INKEY$<>"" THEN GOTO 4075 4076 IF INKEY$="" THEN GOTO 4076 4077 IF INKEY$<>"1" AND INKEY$<>"2" THEN GOTO 4075 4078 IF INKEY$="1" THEN GOTO 4080 4079 IF INKEY$="2" THEN GOTO 4085 4080 LET SB=0.95 4081 GOTO 4086 4085 LET SB=0.9 4098 CLS 4099 RETURN 6001 PRINT AT 1,0;" THERMOSTAT SET AT ";T;" DEG. F " 6002 IF SB=0.95 THEN GOTO 6005 6003 IF SB=0.9 THEN GOTO 6007 6004 IF SB=1 THEN GOTO 6009 6005 PRINT AT 2,7;"5 DEGREE SETBACK" 6006 GOTO 6010 6007 PRINT AT 2,7;"10 DEGREE SETBACK" 6008 GOTO 6010 6009 PRINT AT 2,6;"NO SETBACK THERMOSTAT" 6010 PRINT AT 5,3;"1/ ANCHORAGE, ALASKA" 6011 PRINT AT 6,3;"2/ FLAGSTAFF, ARIZONA" 6012 PRINT AT 7,3;"3/ DENVER, COLORADO" 6013 PRINT AT 8,3;"4/ HARTFORD, CONNECTICUT" 6014 PRINT AT 9,3;"5/ WILMINGTON, DELAWARE" 6015 PRINT AT 10,3;"6/ BOISE, IDAHO" 6016 PRINT AT 11,3;"7/ BOSTON, MASSACHUSETTS" 6017 PRINT AT 12,3;"8/ DULUTH, MINNESOTA" 6018 PRINT AT 13,3;"9/ BUFFALO, NEW YORK" 6019 PRINT AT 14,2;"10/ NEW YORK CITY, NEW YORK" 6020 PRINT AT 15,2;"11/ PORTLAND, OREGON" 6021 PRINT AT 16,2;"12/ SEATTLE, WASHINGTON" 6024 PRINT AT 21,0;"ENTER/ NO. OF CITY NEAREST HOUSE" 6025 INPUT L 6026 IF L>12 OR L<1 THEN GOTO 6025 6031 IF L=1 THEN GOTO 6050 6032 IF L=2 THEN GOTO 6052 6033 IF L=3 THEN GOTO 6054 6034 IF L=4 THEN GOTO 6056 6035 IF L=5 THEN GOTO 6058 6036 IF L=6 THEN GOTO 6060 6037 IF L=7 THEN GOTO 6062 6038 IF L=8 THEN GOTO 6064 6039 IF L=9 THEN GOTO 6066 6040 IF L=10 THEN GOTO 6068 6041 IF L=11 THEN GOTO 6070 6042 IF L=12 THEN GOTO 6072 6050 LET DHH=261 6051 GOTO 6075 6052 LET DHH=172 6053 GOTO 6075 6054 LET DHH=151 6055 GOTO 6075 6056 LET DHH=148 6057 GOTO 6075 6058 LET DHH=118 6059 GOTO 6075 6060 LET DHH=139 6061 GOTO 6075 6062 LET DHH=135 6063 GOTO 6075 6064 LET DHH=240 6065 GOTO 6075 6066 LET DHH=168 6067 GOTO 6075 6068 LET DHH=115 6069 GOTO 6075 6070 LET DHH=111 6071 GOTO 6075 6072 LET DHH=106 6075 LET DHH=DHH*1000 6099 RETURN 7010 PRINT AT 2,18;" :'''''''''''''': " 7015 FOR I=3 TO 6 7016 PRINT AT I,18;" :";TAB 26;": " 7019 NEXT I 7020 PRINT AT 7,3;":'''''''''''''''''''''''''''''''";TAB 26;"''''''':" 7021 FOR I=8 TO 13 7022 PRINT AT I,3;": ";TAB 29;" :" 7023 NEXT I 7024 PRINT AT 14,3;":....................................................:" 7025 IF ADD=1 THEN GOTO 7098 7028 PRINT AT 10,8;"EXAMPLE PLAN VIEW" 7029 PRINT AT 11,8;"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" 7030 PRINT AT 15,15;"A" 7031 PRINT AT 10,2;"B" 7032 PRINT AT 6,10;"C" 7033 PRINT AT 4,17;"D" 7034 PRINT AT 1,22;"E" 7035 PRINT AT 4,27;"F" 7036 PRINT AT 6,28;"G" 7037 PRINT AT 10,30;"H" 7040 PRINT AT 17,0;" PERIMETER= A+B+C+D+E+F+G+H " 7099 RETURN 9000 SAVE "HEA%T" 9010 RUN ```