--- title: "HP23" id: 50511 type: "computer_media" slug: "hp23" url: "http://localhost/computer_media/hp23/" markdown_url: "http://localhost/computer_media/hp23.md" published_at: "2023-06-18T15:23:03+00:00" modified_at: "2026-03-31T12:32:28+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2023/06/SCR-20260331-hyow.png" excerpt: "An engineering program plots horsepower curves for industrial natural gas compressors, running for days unattended while automatically printing hundreds of pressure-ratio charts." 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: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Leroy Keith Watson" slug: "keith-watson" taxonomy: "indiv" url: "http://localhost/indiv/keith-watson/" genre: - name: "Engineering" slug: "engineering" taxonomy: "genre" url: "http://localhost/type/engineering/" media_type: "Program" programmers: - name: "Leroy Keith Watson" slug: "keith-watson" taxonomy: "indiv" url: "http://localhost/indiv/keith-watson/" download_url: "https://archive.org/download/timex-sinclair-software-archive/HP23%20%281985%29%28Watson%2C%20Leroy%20Keith%29%282068%29%28US%29%28Side%20A%29%28Program%29.zip" mediadate: "1985" images: - url: "http://localhost/wp-content/uploads/2023/06/SCR-20260331-hyow.png" - url: "http://localhost/wp-content/uploads/2023/06/SCR-20260331-hxlj.png" - url: "http://localhost/wp-content/uploads/2023/06/SCR-20260331-hxvt.png" - url: "http://localhost/wp-content/uploads/2023/06/SCR-20260331-hxrr.png" - url: "http://localhost/wp-content/uploads/2023/06/HP-23-Watson-Leroy-KeithInstructions.jpg" - url: "http://localhost/wp-content/uploads/2023/06/HP-23-Watson-Leroy-Keith.jpg" media_type_tags: "Engineering" --- # HP23 This program generates horsepower and gas compression rate curves for large natural gas compressors at a plant in Ira Township, Michigan, plotting the results as graph-paper-style charts intended for a Timex 2040 printer. The program iterates through up to 20 compressor step numbers (N=0 through N=19), computing compression ratios, suction and discharge pressures, and flow values using engineering formulas involving exponential and power functions. Each step requires approximately 750,000 calculations and 5–7 hours of run time, with the author estimating a total of about 4–5 days for a full run. A machine code routine is POKEd into memory at address 50000 and called via RANDOMIZE USR to handle a modified screen COPY operation for shorter screen outputs. The program stores compressor-specific constants (clearance percentages and capacity values) in lookup tables implemented as long chains of conditional IF statements, with two separate subroutine sets for two different compressor capacities (CAP=0.000496 and CAP=0.000602). *** ## Program Analysis ### Program Structure The program is divided into several functional regions: 1. **Lines 1–36:** Introduction screens explaining the program’s purpose, runtime expectations, and hardware requirements, with PAUSE 0 / INKEY$ keypress gates between each screen. 2. **Line 100:** Unconditional jump to initialization at line 8000 (actual entry is at 8101). 3. **Lines 300–420:** Core HP curve plotting loop, computing compression ratio `R` and plotting suction/discharge pressure coordinates. 4. **Lines 500–625:** Secondary curve plotting for fixed flow values (50–225 MMSCFD in 25-unit steps). 5. **Lines 630–699:** Boundary and label printing, including max-discharge-pressure annotations and the short-screen COPY machine code path. 6. **Lines 820–879:** Graph paper background drawing using nested PLOT loops driven by DATA statements. 7. **Lines 1000–1130:** Compressor constant lookup tables (clearance `C` and capacity `CAP`) for two compressor types. 8. **Lines 5000–5699:** Screen label subroutines, OVER 1 underline effects, and an LPRINT loop (lines 5700–5710). 9. **Lines 6000–6120:** Machine code POKE block and RANDOMIZE USR call for the short-screen COPY. 10. **Lines 8101–8990:** Parameter initialization, user prompts (mostly bypassed by hardcoded defaults), and outer loop management across step numbers N=0 to N=18. ### Key Formulas and Engineering Context The core thermodynamic model uses a polytropic compression formula. The flow variable `F` represents millions of cubic feet per day (MMSCFD). Key derived quantities are: - `LOGER = (H/F - 2.636) * 0.016740324` — linearized log of compression ratio. - `R = EXP LOGER` — compression ratio. - `S2 = F / (CAP6 * (100 - R - C*(R^0.7752 - 1) + 1.6719))` — absolute suction pressure. - `D2 = R * S2` — absolute discharge pressure. - The condition `D2*103.869 - S2*92.824 > 106000` represents a rod-load limit for the compressor. The exponent 0.7752 is the polytropic index for natural gas under these operating conditions. The constant 1.6719 relates to clearance volume behavior. ### Compressor Constant Tables Two subroutines provide step-dependent clearance percentages `C` for different compressor models: | Subroutine | CAP value | CAP6 | Description | | --- | --- | --- | --- | | GO SUB 1000 | 0.000496 | CAP*600*0.01 | DeLaval HV16C-6 / 11.5″ cylinder | | GO SUB 1100 | 0.000602 | CAP*600*0.01 | Second compressor variant | Each subroutine implements its lookup via a chain of 20 individual `IF N=x THEN LET C=...` statements (lines 1000–1019 and 1100–1119), rather than an array or READ/DATA structure. This is inefficient but straightforward to maintain. ### Machine Code Usage Lines 6010–6110 POKE a short Z80 machine code routine into address 50000 and execute it with `RANDOMIZE USR 50000`. The byte sequence is: | Address | Byte (decimal) | Z80 Instruction | | --- | --- | --- | | 50000 | 243 | DI (disable interrupts) | | 50001 | 6 | LD B, n | | 50002 | 103 | 103 (operand: 103 lines) | | 50003 | 33 | LD HL, nn | | 50004 | 0 | (low byte of address 16384) | | 50005 | 64 | (high byte of address 16384) | | 50006 | 205 | CALL nn | | 50007 | 8 | (low byte) | | 50008 | 10 | (high byte → address 2568, a ROM COPY routine) | | 50009 | 201 | RET | This invokes a ROM COPY sub-entry point with HL pointing to the start of screen RAM and B set to 103, effectively printing only the top half of the screen — a workaround for compressor step labels that occupy a shortened display area. ### Graph Paper Drawing Lines 820–876 draw the graph grid using three nested PLOT loops each driven by a DATA value (`AA`, `TT`, `LL`) controlling the tick extent. Four DATA lines (873–876) provide different grid configurations for successive screen panels. The variables `XX` and `YY` set the horizontal and vertical pixel spacings respectively, computed from the pressure range divided by the screen resolution. ### Plotting Coordinate Mapping Suction pressure `S` and discharge pressure `D` are mapped to screen pixel coordinates as follows: - `S3 = (S - SL) / ((SH - SL) * 0.0039215686)` — note 0.0039215686 ≈ 1/255, mapping suction range to 0–255 pixels (X axis). - `D3 = (D - DL) / ((DH - DL) * 0.0057142857)` — note 0.0057142857 ≈ 1/175, mapping discharge range to 0–175 pixels (Y axis). The screen is 256×176 pixels. Points outside the active range are filtered by conditional checks before each PLOT call. ### Flow Control and Loop Management The inner loops at lines 318 and 510 use `NEXT F` and `NEXT R` within the loop body (not at the loop foot) as a `CONTINUE`-equivalent, skipping to the next iteration when constraint conditions are met. This was a common Sinclair BASIC idiom. The variable `LINE` (initialized at line 8320) is incremented by 10 at line 697 and used in the computed GO TO at line 699 (`GO TO (8340+LINE)`) to step through the multi-panel graph sequence at lines 8340, 8350, 8360, 8370. ### Notable Anomalies and Issues - Line 100 jumps to line 8000, which does not exist; execution actually falls through to line 8101. This is a valid technique — BASIC searches for the next line at or after the target. - Line 699 uses a computed GO TO (`GO TO (8340+LINE)`), an elegant dispatch mechanism to sequence through successive graph panels. - Line 8345 references `GO TO X00` where `X00` is a numeric variable set to 300 at line 8980. This is an unusual variable-targeted GO TO (the expression evaluates to a line number); it effectively routes to the curve-plotting subroutine. - The LPRINT loop at lines 5700–5710 is an infinite loop (`GO TO 5700` with no exit), apparently an unfinished or placeholder routine. - Several parameter-input sections (lines 8601–8965) are largely bypassed by hardcoded defaults and unconditional jumps, meaning the interactive prompts are vestigial. - Line 8800 is jumped to from line 8765 but line 8800 does not exist as a label in the listing — execution continues at line 8805, again using the next-line search behavior. - Lines 8870 and 8945 are referenced by GO TO but are absent from the listing, meaning execution falls through to lines 8880 and 8950 respectively. ## Source Code ``` 1 REM "HP23" 2 PAPER 0 4 INK 7 5 PAPER 0 6 BORDER 0 8 INK 7 9 CLS 10 PRINT "The following information is asked of the computer user to establish parameters to developeHorsepower Curves. All of the parameters have already been programed into this demostrationtape to allow for the lack of knowledge on this subject by thecurrent user." 11 PRINT ''"Press any key to continue": PAUSE 0: CLS 15 PRINT "This program will copy 8 screensof ""graph paper"" for each step on which curves are drawn representing the horsepower and gas compression rate in millons of cubic feet per day on large natural gas compressors in a plant in Ira Township, Michigan.This work belongs to me and was not done on my company's time but my company has rewarded me with certain achevement placks and certificates for this program." 16 PRINT ''"Press any key to continue": PAUSE 0: CLS 20 PRINT "This program can be modified to use it with any other type of compressor as long as certain data is known about the compressors." 21 PRINT ''"Press any key to continue": PAUSE 0: CLS 25 PRINT "The program will take quite a long a time to fully calculate all of the graphs this program was intended to make, about 4 to5 days. Each compressor step number takes about 5 to 7 hours depending on the Step Number the program is currently workingon.": PRINT "The best way to use this programis to load the computer at nightand leave the 2040 printer on all night long. The program will automatically do all of thenecessary work without attention" 26 PRINT ''"Press any key to continue": PAUSE 0: CLS 30 PRINT "This program is slow because it uses a lot of conditional statements and does around 750,000 calculations for each compressor step number. I thinkthe program could be written better than it was but I didn't have my 2068 very long before I wrote this horsepower curve program. So I am sending it along to you with very little change from the original" 31 PRINT ''"Press any key to continue": PAUSE 0: CLS 35 PRINT "TURN ON YOUR TIMEX 2040 PRINTER": PRINT ''"Please allow several minutes forthe program to starting plottingthe curves": PRINT '''"THE COMPUTER WILL NOT BE LOCKED": PRINT " UP OR IN AN ENDLESS LOOP " 36 PRINT ''"Press any key to continue": PAUSE 0: CLS 100 GO TO 8000 300 REM ////CURVE PLOT\\\\\\\\ 308 LET F1=((SL+14.7)*CAP*600/100*(100-((DH+14.7)/(SL+14.7))-C*(((DH+14.7)/(SL+14.7))^.7752-1)+1.6719)+.5) 309 LET F2=((SH+14.7)*CAP*600/100*(100-((DL+14.7)/(SH+14.7))-C*(((DL+14.7)/(SH+14.7))^.7752-1)+1.6719)+.5) 310 FOR H=HP TO ((HP-QQ)+(J*QQ)) STEP QQ 312 IF H>(HP-QQ)+(J*QQ) THEN GO TO 421 315 IF F1F2 THEN NEXT H 322 IF D>DH+50 THEN LET F=F+1 323 IF R<=4 AND R>3 THEN LET F=F+.01 324 IF R<3 AND R>=2.2 THEN LET F=F+.025 325 IF R<2.2 AND R>1.95 THEN LET F=F+.195 326 IF R<=1.95 THEN LET F=F+.495 329 LET HPMM=H/F 330 LET LOGER=(H/F-2.636)*.016740324 340 LET R=EXP LOGER 350 LET S2=F/(CAP6*(100-R-C*(R^.7752-1)+1.6719)) 360 LET D2=R*S2 365 IF D2*103.869-S2*92.824>120000 THEN LET F=F+1 370 IF D2*103.869-S2*92.824>106000 THEN NEXT F 380 LET S=S2-14.7: LET D=D2-14.7 382 IF S<=SL OR D<=0 THEN LET F=F+1 383 IF D>DH OR D>1440 THEN NEXT F 385 IF S>SH OR S=SL AND S<=SH AND D>=DL AND D<=DH THEN PLOT S3,D3 401 IF S3<=2 AND D3>0 THEN LET SS=SH-SL 402 LET S3=S3+1: LET D3=D3+1 405 IF S3<=255 AND S3>=0 AND D3<=175 AND D3>=0 THEN PLOT S3,D3 410 NEXT F 420 NEXT H 500 FOR F=50 TO 225 STEP 25 502 IF FF2 THEN GO TO 621 505 IF F>225 THEN GO TO 621 507 LET DH2=DH+14.7: LET DL2=DL+14.7 508 LET SH2=SH+14.7: LET SL2=SL+14.7 510 FOR R=(DH2/SL2) TO (DL2/SH2) STEP RR 511 IF F>225 THEN GO TO 621 520 IF R>4 AND D<=DH AND D>=DL AND S<=SH AND S>=SL THEN LET R=R+.0015 550 LET S2=F/(CAP6*(100-R-C*(R^.7752-1)+1.6719)) 560 LET D2=R*S2 570 LET S=S2-14.7: LET D=D2-14.7 574 IF D>1440 THEN NEXT R 576 IF D120000 THEN LET R=R-.4 585 IF D2*103.869-S2*92.824>106000 THEN NEXT R 586 IF DSH+100 THEN LET R=R-.4 590 LET S3=(S-SL)/((SH-SL)*.0039215686): LET D3=(D-DL)/((DH-DL)*.0057142857) 600 IF S>=SL AND S<=SH AND D>=DL AND D<=DH THEN PLOT S3,D3 610 NEXT R 620 NEXT F 625 GO TO 800 630 IF 480=1200 THEN GO TO 650 640 GO TO 673 650 FOR D=1170 TO 1440 655 LET D2=D+14.7 660 LET S2=(D2*103.869-106000)/92.824: LET S=S2-14.7 665 LET S3=(S-SL)/((SH-SL)/255): LET D3=(D-DL)/((DH-DL)/175) 670 IF S>=SL AND S<=SH AND D>=DL AND D<=DH THEN PLOT S3,D3 671 NEXT D 672 IF SH<741 THEN PRINT AT 2,2;"STEP ";N 673 FOR S=SL TO SH 675 LET DN=1440 676 LET S3=(S-SL)/((SH-SL)/255): LET D3=(DN-DL)/((DH-DL)/175) 677 LET S2=S+14.7 678 IF S2>=((D+14.7)*103.869-106000)/92.824 AND D3<175 AND S<=SH AND S>=SL THEN PLOT S3,D3 680 NEXT S 682 IF DL>=561 AND DL<800 AND SH>741 THEN GO SUB 5000 684 IF DL<560 AND SH>741 THEN GO SUB 5600 690 IF DH>1440 AND SH>739 THEN PRINT AT 1,3;"MAX DISCHARGE PRESSURE" 695 IF DH=1450 AND SL>=500 AND CAP=.000496 THEN GO SUB 5200 697 LET LINE=LINE+10: IF DL<550 THEN GO TO 6000 698 COPY : CLS 699 GO TO (8340+LINE) 799 STOP 820 READ AA 825 REM //////GRAPH PLOT/////// 830 FOR M=0 TO 255 STEP XX: FOR A=AA TO 0 STEP -YY: PLOT M,A: NEXT A: NEXT M 835 IF AA=174 THEN FOR Y=0 TO 255 STEP 4: IF AA=174 THEN PLOT Y,0: NEXT Y 840 FOR O=0 TO 255 STEP 5*XX: FOR P=175 TO 0 STEP -2: PLOT O,P: NEXT P: NEXT O 848 READ TT 850 FOR Q=0 TO 255 STEP 2: FOR T=TT TO 0 STEP -5*YY: PLOT Q,T: NEXT T: NEXT Q 860 FOR I=0 TO 255 STEP 10*XX: FOR W=175 TO 0 STEP -1: PLOT I,W: NEXT W: NEXT I 868 READ LL 870 FOR K=0 TO 255: FOR L=LL TO 0 STEP -10*YY: PLOT K,L: NEXT L: NEXT K 872 GO TO 630 873 DATA 175,175,175 874 DATA 174,171,171 875 DATA 173,167,167 876 DATA 175,163,163 879 STOP 880 GO TO 630 999 STOP 1000 IF N=0 THEN LET C=32.69: IF N=0 THEN LET F10=32 1001 IF N=1 THEN LET C=34.19 1002 IF N=2 THEN LET C=32.69 1003 IF N=3 THEN LET C=34.19 1004 IF N=4 THEN LET C=35.69 1005 IF N=5 THEN LET C=37.18 1006 IF N=6 THEN LET C=38.68 1007 IF N=7 THEN LET C=40.18 1008 IF N=8 THEN LET C=38.68 1009 IF N=9 THEN LET C=40.18 1010 IF N=10 THEN LET C=41.67 1011 IF N=11 THEN LET C=43.17 1012 IF N=12 THEN LET C=44.67 1013 IF N=13 THEN LET C=46.16 1014 IF N=14 THEN LET C=47.66 1015 IF N=15 THEN LET C=49.16 1016 IF N=16 THEN LET C=52.15 1017 IF N=17 THEN LET C=55.14 1018 IF N=18 THEN LET C=58.18 1019 IF N=19 THEN LET C=61.13 1020 LET CAP=.000496: LET CAP6=CAP*600*.01 1030 RETURN 1100 IF N=0 THEN LET C=32.22: IF N=0 THEN LET F10=32: LET STEP=400 1101 IF N=1 THEN LET C=33.47 1102 IF N=2 THEN LET C=34.71 1103 IF N=3 THEN LET C=35.95 1104 IF N=4 THEN LET C=37.19 1105 IF N=5 THEN LET C=38.44 1106 IF N=6 THEN LET C=39.68 1107 IF N=7 THEN LET C=40.93 1108 IF N=8 THEN LET C=42.17 1109 IF N=9 THEN LET C=43.41 1110 IF N=10 THEN LET C=44.65 1111 IF N=11 THEN LET C=45.90 1112 IF N=12 THEN LET C=47.14 1113 IF N=13 THEN LET C=48.38 1114 IF N=14 THEN LET C=49.62 1115 IF N=15 THEN LET C=50.87 1116 IF N=16 THEN LET C=53.85 1117 IF N=17 THEN LET C=55.84 1118 IF N=18 THEN LET C=58.32 1119 IF N=19 THEN LET C=60.81 1120 LET CAP=.000602: LET CAP6=CAP*600*.01 1130 RETURN 5000 REM //////LABEL//////// 5100 PRINT AT 13,7;"CONSUMERS POWER" 5101 PRINT AT 14,7;"ST. CLAIR STATION" 5102 PRINT AT 15,7;"DELAVAL HV16C-6/600 RPM" 5103 PRINT AT 16,7;"SINGLE STAGE" 5104 PRINT AT 17,7;"6 CLASS C9H-" 5105 PRINT AT 18,7;"11.5"" CYLINDER" 5110 RETURN 5200 REM ////LABEL///// 5210 PRINT AT 19,10;"FOR USE WITH HEADEND" 5212 OVER 1 5215 PRINT AT 19,10;"____________________" 5216 OVER 0 5220 PRINT AT 20,10;"SUC. VALVES REMOVED" 5224 OVER 1 5225 PRINT AT 20,10;"___________________" 5226 OVER 0 5230 PRINT AT 21,10;"IN #1 AND #2 COMP." 5234 OVER 1 5235 PRINT AT 21,10;"__________________" 5240 OVER 0 5260 RETURN 5299 STOP 5695 PRINT AT 2,10;"(MMSCF @ 14.7 PSIA" 5696 PRINT AT 3,14;"and 60 Deg F)" 5699 RETURN 5700 LPRINT "CONSUMERS POWER"' 5705 LPRINT "ST CLAIR STATION" 5710 GO TO 5700 5799 STOP 6000 REM /////////////////////COPY POKES FOR SHORT SCREEN/////////////////// 6010 POKE 50000,243 6020 POKE 50001,6 6030 POKE 50002,103 6040 POKE 50003,33 6050 POKE 50004,0 6060 POKE 50005,64 6070 POKE 50006,205 6080 POKE 50007,8 6090 POKE 50008,10 6100 POKE 50009,201 6110 RANDOMIZE USR 50000 6120 CLS : GO TO 699 8101 LET F10=45 8102 LET STEP=500 8110 LET QQ=200 8120 LET RR=-.003 8130 LET Z1=.01 8140 LET F1=25: LET F2=300 8150 LET R=100 8160 LET SN=0 8170 LET SS=25 8180 LET DD=50 8190 LET W$="N" 8191 LET D=1450 8192 LET S=200 8200 LET SOS=900 8298 LET SAS=0 8299 GO TO 8600 8300 REM //////FULL GRAPH\\\\\\\\\\\\ 8320 LET LINE=0 8340 LET DH=DH: LET DL=DH-(291.667/320)*(SH-SL): LET SL=SL: LET SH=SL+(320/291.667)*(DH-DL) 8345 GO TO X00 8350 LET DH=DL-(DH-DL)/175: LET DL=DH-(291.667/320)*(SH-SL): LET SL=SL: LET SH=SL+(320/291.667)*(DH-DL) 8355 GO TO X00 8360 LET DH=DL-(DH-DL)/175: LET DL=DH-(291.667/320)*(SH-SL): LET SL=SL: LET SH=SL+(320/291.667)*(DH-DL) 8365 GO TO X00 8370 LET DH=DL-(DH-DL)/175: LET DL=DH-(291.667/320)*(SH-SL): LET SL=SL: LET SH=SL+(320/291.667)*(DH-DL) 8375 GO TO X00 8380 LPRINT : LPRINT : LPRINT : LPRINT 8390 LET DH=DDH: LET SL=SL+(SH-SL)-1/16*(SH-SL): LET SH=SL+SHL 8395 IF SH>820 THEN GO TO 8405 8400 RESTORE : GO TO 8320 8405 RESTORE 8410 FOR N=N+1 TO 18 8420 IF CAP=.000496 THEN GO SUB 1000 8430 IF CAP=.000602 THEN GO SUB 1100 8435 LET CAP6=CAP*600*.01 8440 LET DH=DDH: LET SL=SSL: LET SH=SL+SHL: LET DL=DH-(291.667/320)*(SH-SL) 8450 LET N=N 8460 IF N<=18 THEN GO TO 8300 8470 NEXT N 8499 STOP 8500 LET W$="Y" 8530 LET T$="Y" 8550 GO TO 8967 8601 PRINT "ENTER # OF HORSEPOWER CALCUTIONS" 8610 LET J=4 8620 PRINT "LOWEST HP",: LET HP=3800: PRINT HP 8630 PRINT "HP INTERVAL",: LET QQ=200: PRINT QQ 8640 FOR H=HP TO ((HP-QQ)+(J*QQ)) STEP QQ 8650 PRINT H' 8660 NEXT H 8740 PRINT "ENTER STEP 0<=N<=19": LET N=0: PRINT "Starting at Step #";N 8745 LPRINT : LPRINT 8760 PRINT "GAS INJECTION OR GAS WITHDRAWAL? ENTER I OR W" 8765 GO SUB 1000: GO TO 8800 8770 IF INKEY$="I" THEN GO SUB 1000: GO TO 8800 8780 IF INKEY$="W" THEN GO SUB 1100: GO TO 8800 8790 GO TO 8770 8805 LET COMP=2 8840 PRINT "LOW SUC LIMIT",: LET SL=200: PRINT SL: LET SSL=SL 8841 PRINT "HIGH SUCTION LIMIT-AUTO OR MAN" 8842 IF INKEY$="A" THEN GO TO 8846 8843 IF INKEY$="M" THEN GO TO 8850 8844 GO TO 8846 8845 GO TO 8842 8846 LET SH=SL+320: PRINT "HIGH SUC LIMIT",: PRINT SH: GO TO 8870 8850 PRINT "HIGH SUC LIMIT",: INPUT SH: PRINT SH: GO TO 8870 8880 PRINT "HIGH DISC LIMIT",: LET DH=1450: PRINT DH: LET DDH=DH: LET SHL=SH-SL 8890 PRINT "LOW DISC-ENTER AUTO OR MAN" 8900 IF INKEY$="A" THEN GO TO 8930 8910 IF INKEY$="M" THEN GO TO 8940 8915 GO TO 8930 8920 GO TO 8900 8930 LET DL=DH-(291.667/320)*(SH-SL): PRINT "LOW DISC LIMIT",DL: GO TO 8945 8940 PRINT "LOW DISC LIMIT",: INPUT DL: PRINT DL: 8950 PRINT "PRESSURE INCREMENT-X AXIS",: LET XX=256/((SH-SL)/5): PRINT "5 PSI/";XX;" PIXILS OR 5 PSI/PRINTED DOT" 8960 PRINT "PRESSURE INCREMENT-Y AXIS",: LET YY=176/(((293.333/320)*(SH-SL))/5): PRINT "5 PSI/";INT YY;" PIXILS OR 5 PSI/DOT" 8961 PRINT "EXTRA WIDE HP LINES? Y OR N" 8962 LET T$="Y" 8964 IF T$="N" THEN GO TO 8967 8965 IF T$="Y" THEN GO SUB 8500 8966 IF INKEY$<>"Y" OR INKEY$<>"N" THEN GO TO 8962 8967 PRINT ''''"PRESS ANY KEY TO CONTINUE" 8968 PAUSE 0 8970 CLS 8980 IF COMP=2 THEN LET X00=300: GO TO 8300 8990 GO TO 8760 ```