1080 Y = 20:X = 1: GOSUB 1160:MM = PEEK( -16304) + PEEK( -16302) + PEEK( -16300): GET A$: TEXT
1085 HOME : VTAB 12: PRINT "PRESS ANY KEY WHEN FINISHED VIEWING THE SCREEN": FOR MM = 1 TO 1000: NEXT MM:MM = PEEK( -16304) + PEEK( -16302) - PEEK( -16300): POKE 49168,0: GET A$: TEXT
1090 INPUT "DO YOU WANT TO SAVE THE SCREEN?";AB$
1100 IF LEFT$(AB$,1) = "N" THEN 1140
1110 ONERR GOTO 2280
1120 PRINT D$;"BSAVE P."NA$",A$2000,L$2000"
1130 POKE 216,0
1140 INPUT "RUN AGAIN ? ";AB$: IF LEFT$(AB$,1) = "Y" THEN RUN
1870 IF DT = 2 THEN G = G(1) +G(2):PM = OM: GOTO 1900
1880 IF DT = 3 THEN G = G(1) +G(2) +G(3):PM = OM: GOTO 1900
1890 G = G(DT) +G(DT -1) +G(DT -2):PM = MI(DT -3)
1900 GOSUB 1300
1910 NEXT DT
1920 RETURN
1930 REM ERROR HANDLERS
1940 M$ = "MONTH > 12": GOTO 2000
1950 M$ = "MONTH < LAST MONTH": GOTO 2000
1960 M$ = "INVALID DAY": GOTO 2000
1970 M$ = "DAY < LAST DAY": GOTO 2000
1980 M$ = "INVALID GALLONS": GOTO 2000
1990 M$ = "INVALID MILEAGE"
2000 VTAB 22: CALL -868
2010 VTAB 22: PRINT M$;: HTAB 20
2020 INVERSE : PRINT "ANY KEY WHEN READY";: NORMAL : CALL -198: GET T$: PRINT : RETURN
2030 HOME : VTAB 6: HTAB 10: PRINT "NIBBLE GAS MISER"
2040 VTAB 8: HTAB 10: PRINT "BY DANIEL WHITNEY"
2050 VTAB 14: PRINT "* COPYRIGHT 1985 BY MICROSPARC, INC. *"
2060 VTAB 21: HTAB 7: PRINT "DO YOU WANT INSTRUCTIONS? ";: GET T$: PRINT T$: IF T$ < >"Y" THEN RETURN
2070 HOME : VTAB 2: PRINT "NIBBLE GAS MISER IS A GAS MILEAGE": PRINT " RECORDING AND PLOTTING PROGRAM."
2080 PRINT : PRINT "THE PROGRAM ASKS YOU FOR DATA ON": PRINT " ON EACH GAS PURCHASE. ENTER THE": PRINT " MONTH AND DAY NUMERICALLY."
2090 PRINT : PRINT "THEN ENTER THE NUMBER OF GALLONS.": PRINT " IF YOUR QUANTITY IS IN LITERS,": PRINT " PRECEDE THE ENTRY WITH AN 'L':": PRINT " >L31.2": PRINT " THE PROGRAM WILL CONVERT IT FOR YOU."
2100 PRINT : PRINT "TO QUIT, ENTER -1 FOR ANY REQUESTED": PRINT " DATA ITEM. THE PROGRAM WILL THEN": PRINT " PLOT A 3-POINT MOVING AVERAGE FOR": PRINT " YOUR DATA."
2110 VTAB 22: PRINT "PRESS ANY KEY TO CONTINUE ";: GET T$: PRINT : RETURN
2120 REM GALLON PROCESSOR
2130 GF = 0:L$ = LEFT$(G$,1): IF L$ = "L" THEN G$ = MID$ (G$,2)
2140 G = VAL(G$): IF L$ < >"L" GOTO 2180
2150 G = G/3.785
2160 G = FN R(G)
2170 VTAB 22: HTAB 30: PRINT G" GALS": FOR I = 1 TO 600: NEXT
2180 IF G >MG OR G = 0 THEN GF = 1
2190 RETURN
2200 ER = PEEK(222): IF ER = 6 THEN PRINT "FILE NOT FOUND": GOTO 2230
2210 IF ER = 13 THEN PRINT "FILE TYPE MISMATCH": GOTO 2230
2220 PRINT "ERROR NUMBER "ER
2230 PRINT D$"CLOSE "N$
2240 GOSUB 2020: GOTO 270
2250 ER = PEEK(222): IF ER = 6 THEN PRINT "FILE NOT FOUND": GOTO 2270