--- title: "Tax 2068" id: 50626 type: "computer_media" slug: "tax-2068" url: "http://localhost/computer_media/tax-2068/" markdown_url: "http://localhost/computer_media/tax-2068.md" published_at: "2023-06-23T11:26:01+00:00" modified_at: "2026-04-03T07:59:23+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2019/02/20230809-041332.jpg" excerpt: "A complete two-part 1983 U.S. federal income tax calculator covering income, deductions, bracket lookup, credits, and final refund computation." 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: "Practical Programs Inc." slug: "practical-programs-inc" taxonomy: "post_tag" url: "http://localhost/tag/practical-programs-inc/" - 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/" genre: - name: "Finance" slug: "finance" taxonomy: "genre" url: "http://localhost/type/finance/" - name: "Tax" slug: "tax" taxonomy: "genre" url: "http://localhost/type/tax/" media_type: "Program" download_url: "https://archive.org/download/timex-sinclair-software-archive/Tax%202068%20%281983%29%28Practical%20Progrms%29%28TS2068%29%28US%29%28Program%29.zip" mediadate: "1983" producer_company: - id: 11189 title: "Practical Programs Inc." type: "company" url: "http://localhost/company/practical-programs-inc/" media_type_tags: "Finance, Tax" --- Tax 2068 is a two-part U.S. federal income tax computation program for the 1983 tax year, split across two cassette sides. Part 1 handles income entry (wages, dividends, interest, capital gains, other income), adjustments to income (IRA, Keogh, alimony, moving expenses, etc.), and itemized deductions broken into medical, taxes, interest, contributions, and miscellaneous categories. Part 2 performs the actual tax calculation using bracket tables encoded as colon-delimited numeric strings in long string variables, parsed at runtime into a DIM array by a dedicated subroutine. The program supports all five IRS filing statuses with corresponding standard deductions, income averaging (Schedule G), tax credits, other taxes, and withholding payments to compute a final refund or amount owed. Deduction category labels are stored compactly in string variables and parsed similarly into a string array for display. *** ## Program Analysis ### Program Structure The program is split into two independent parts, each saved to a separate side of a cassette tape. Part 1 (lines 1–9030) collects income, adjustments, and deductions. At line 3100 it instructs the user to write down two carry-forward values (`AI` and `DE`) and load Part 2. Part 2 (lines 1–9030 in the second listing) accepts those two values as manual input, then performs tax bracket lookup, income averaging, credits, other taxes, and payment reconciliation to produce a final refund or balance-due figure. ### Data Encoding and Parsing Both parts use a compact colon-delimited string encoding for tabular data. In Part 1, lines 14–15 hold deduction category labels in `C$` and `D$`; subroutine 5500 walks the string character by character, splitting on `:` and `;` to populate the string array `V$()`. In Part 2, lines 4 and 6 hold the IRS tax bracket tables as long numeric strings in `B$` and `C$`; subroutine 5000 parses these into the numeric array `V()` (dimensioned to 126). This avoids storing large DATA blocks and saves memory. ### Tax Bracket Lookup (Part 2) Subroutine 3700 implements the bracket search loop. The variable `H` is used as a pointer into the `V()` array. An initial base tax `TX` is read, then the loop (lines 3740–3800) reads triplets of upper-limit, base-tax, and marginal-rate values. The filing status determines the starting offset in the array: status 2, 3, and 5 begin at offset 42; status 4 at offset 84; status 1 at offset 0. For married-filing-separately (status 3), income and base tax are halved before lookup and the result is not doubled back — this appears to be a potential bug in the bracket calculation. ### Income Averaging (Schedule G) Lines 3440–3680 implement income averaging. The user enters taxable income for 1979–1982 (net of exemptions). The base income `BI` is 30% of the four-year sum. The tax is computed twice via subroutine 3700: once on `BI` alone to get `TB`, and once on `0.2*IA + BI` where `IA` is the averageable income. The final tax is `4*(TX-TB)+TB_tax`, approximating the Schedule G formula. If `IA` does not exceed $3,000, income averaging is suppressed. ### Input and Navigation Idiom Throughout both parts, the program uses the pattern at lines such as 770, 1430, 1920, 2860, and 4080: ``` IF INKEY$="" THEN GO TO [same line] LET A$=INKEY$ ``` This busy-waits for a keypress then dispatches on the character with a cascade of `IF A$="x" THEN GO SUB / GO TO` statements. This is a standard menu-driven navigation technique, avoiding INPUT for single-character commands. ### String Array Label Display (Part 1, Subroutine 2880) Lines 2880–2920 display a deduction label stored in `V$(I)` by splitting it into a left portion (characters 1–4), a middle character (position 5), and a right portion (position 6 onward). The middle character’s code is incremented by 128 (line 2904–2906) to produce an inverse-video character for visual emphasis on screen. This is a deliberate display technique using `CODE` and `CHR$` arithmetic. ### Capital Gains Calculation (Part 1) Lines 840–1040 implement Schedule D capital gains. Short-term (`NS`) and long-term (`NL`) net gains are combined. The 60% long-term deduction is applied when the net is positive. When the net is negative, a $3,000 loss limit is enforced (line 952), and short-term and long-term carryforward amounts `S1` and `S2` are computed and displayed (lines 1000–1006). ### Variable Summary | Variable | Meaning | | --- | --- | | `AI` | Adjusted gross income (carry-forward between parts) | | `DE` | Total itemized deductions (carry-forward between parts) | | `NI` | Taxable income (after deductions and exemptions) | | `TX` | Computed tax from bracket table | | `XT` | Total tax (TX + additional tax AT) | | `FS` | Filing status (1–5) | | `SD` | Standard deduction ($2300/$3400/$1700 by status) | | `EX` | Number of exemptions | | `H` | Array pointer used in bracket table parsing | | `V()` | Numeric array holding parsed bracket table values (Part 2) | | `V$()` | String array holding deduction category labels (Part 1) | ### Notable Anomalies - Line 200 in Part 1 loops `FOR I=14 TO ND` when displaying existing dividends, but the array `D()` is indexed 1–10 elsewhere; starting at 14 would always be out of range and the loop body never executes for any realistic `ND` value — likely a typo for `FOR I=1 TO ND`. - Lines 910 and 920 in the capital gains section are unreachable: line 910 is only reached when `NG<0`, but its condition `IF NS>0` combined with the prior logic at line 880 means line 920 can never be reached through normal flow, and the `GO TO 940` at line 912 skips line 920 entirely regardless. - Line 1422 in Part 1 is a bare line number with no statement — a harmless no-op. - The “DISABILITY” label is misspelled as “DISIBILITY” at line 1732. - Part 2 lines 3700–3702 set `H=42` for both filing status 2 and status 3, even though status 3 (married filing separately) uses halved brackets — the halving at lines 3784–3786 compensates, but the offset logic conflates two distinct tax schedules. ### Save/Reload Pattern Both parts end with a lines-9000 block (`CLS : CLEAR : SAVE "TAX x" : RUN`) providing a convenient way to re-save the program to tape after any modifications, immediately followed by `RUN` to restart. ## Source Code ``` 1 REM "TAX 1" 3 PRINT AT 11,9;"PLEASE WAIT" 4 LET GI=0 5 LET AD=0 6 LET DE=0 7 LET TX=0 8 LET P=0 9 LET TT=0 12 DIM V$(21,20) 13 DIM V(21) 14 LET C$=" 1 MEDICINE:: 4A DOCTORS, ETC.: 4B TRANSPORT.: 4C OTHER MEDICAL: 8 INCOME TAXES: 9 PROPERTY:10A SALES TAXES:10B VEHICLE:11 OTHER TAXES:13A BANK MORT:13B IND. MORT:14 CREDIT CARDS:15 OTHER INTER.:17ABCASH CONT.:18 OTHER CONT.:19 PRIOR YEARS:;" 15 LET D$="21 CASUALTY:22 DUES-UN. AND PR.:23 TAX FEE:24 OTHER DEDUC.:;" 22 LET H$="NO" 24 LET EX=1 25 LET NN=0 26 LET FS=1 28 LET SD=2300 30 DIM I(10) 31 LET ND=0 32 DIM D(10) 33 LET NS=0 34 LET NL=0 35 LET IG=0 36 DIM S(10) 37 DIM L(10) 38 LET IL=0 39 DIM O(10) 40 LET W2=0 41 LET IN=0 42 LET D=0 43 LET EC=0 44 LET CG=0 45 LET IO=0 47 LET MV=0 48 LET BS=0 49 LET IR=0 50 LET K=0 51 LET SP=0 52 LET AL=0 53 LET MP=0 54 LET DS=0 55 LET M=0 56 LET T=0 57 LET ID=0 58 LET CO=0 59 LET MS=0 60 LET LO=0 62 LET B=0 65 LET H=0 66 LET F$=C$ 68 CLS 72 GO SUB 5500 74 LET F$=D$ 76 GO SUB 5500 78 GO TO 1360 80 CLS 84 PRINT AT 1,0;"7.TYPE TOTAL WAGES" 94 PRINT AT 4,0;" ";W2 120 INPUT W2 124 PRINT AT 4,0;" ";W2;" " 170 RETURN 180 CLS 184 PRINT AT 1,0;"9.TYPE DIVIDEND" 185 PRINT "TYPE 0 TO QUIT" 186 PRINT 190 IF ND=0 THEN GO TO 220 200 FOR I=14 TO ND 210 PRINT " ";D(I) 212 NEXT I 220 LET D=0 230 FOR I=1 TO 10 240 INPUT D(I) 245 PRINT D(I);" " 250 IF D(I)=0 THEN GO TO 280 260 LET D=D+D(I) 270 NEXT I 280 LET ND=I-1 290 RETURN 300 CLS 302 PRINT AT 1,0;"8.TYPE INTEREST" 306 PRINT "TYPE 0 TO QUIT" 308 PRINT 310 IF NN=0 THEN GO TO 350 320 FOR I=1 TO NN 330 PRINT " ";I(I) 332 NEXT I 340 PRINT AT 3,0 350 LET IN=0 360 FOR I=1 TO 10 370 INPUT I(I) 375 PRINT " ";I(I);" " 380 IF I(I)=0 THEN GO TO 410 390 LET IN=IN+I(I) 400 NEXT I 410 LET NN=I-1 420 RETURN 430 CLS 432 PRINT AT 1,0;"OTHER INCOME" 436 PRINT 440 PRINT "10TAX REFUND ";O(1) 450 PRINT "11ALIMONY REC. ";O(2) 460 PRINT "12BUSINESS INC.";O(3) 470 PRINT "14OTHER GAIN ";O(4) 480 PRINT "15SUPP. GAIN ";O(5) 490 PRINT "16/17PENSION ";O(6) 500 PRINT "18RENTS, ROYAL.";O(7) 510 PRINT "19FARM INCOME ";O(8) 520 PRINT "20UNEMP. COM. ";O(9) 530 PRINT "21OTHER INCOME ";O(10) 531 PRINT 532 PRINT " RETURN" 533 PRINT 534 PRINT "TYPE BLACK LETTER" 535 PRINT 536 IF INKEY$="" THEN GO TO 536 538 LET A$=INKEY$ 540 IF A$="R" THEN GO TO 593 541 IF A$<>"T" THEN GO TO 546 542 PRINT "TAX REFUND" 543 INPUT O(1) 544 PRINT AT 3,15;O(1);" " 545 GO TO 590 546 IF A$<>"A" THEN GO TO 551 547 PRINT "ALIMONY REC." 548 INPUT O(2) 549 PRINT AT 4,15;O(2);" " 550 GO TO 590 551 IF A$<>"B" THEN GO TO 556 552 PRINT "BUSINESS INC." 553 INPUT O(3) 554 PRINT AT 5,15;O(3);" " 555 GO TO 590 556 IF A$<>"O" THEN GO TO 561 557 PRINT "OTHER GAIN" 558 INPUT O(4) 559 PRINT AT 6,15;O(4);" " 560 GO TO 590 561 IF A$<>"S" THEN GO TO 566 562 PRINT "SUPP. GAIN" 563 INPUT O(5) 564 PRINT AT 7,15;O(5);" " 565 GO TO 590 566 IF A$<>"P" THEN GO TO 571 567 PRINT "PENSION" 568 INPUT O(6) 569 PRINT AT 8,15;O(6);" " 570 GO TO 590 571 IF A$<>"E" THEN GO TO 576 572 PRINT "RENTS, ROYAL." 573 INPUT O(7) 574 PRINT AT 9,15;O(7);" " 575 GO TO 590 576 IF A$<>"F" THEN GO TO 581 577 PRINT "FARM INC." 578 INPUT O(8) 579 PRINT AT 10,15;O(8);" " 580 GO TO 590 581 IF A$<>"U" THEN GO TO 586 582 PRINT "UNEMP. COM." 583 INPUT O(9) 584 PRINT AT 11,15;O(9);" " 585 GO TO 590 586 IF A$<>"I" THEN GO TO 590 587 PRINT "OTHER INCOME" 588 INPUT O(10) 589 PRINT AT 12,15;O(10);" " 590 PRINT AT 18,0;" " 591 PRINT AT 17,0 592 GO TO 536 593 LET IO=0 594 FOR I=1 TO 10 596 LET IO=IO+O(I) 598 NEXT I 600 RETURN 610 CLS 612 PRINT 614 PRINT "1983 TAX: INCOME" 616 PRINT "TYPE BLACK LETTERS" 620 PRINT 622 PRINT " 7WAGES, SAL.",W2 630 PRINT " 8INTEREST",IN 640 LET DV=D-EC 642 IF DV<0 THEN LET DV=0 650 PRINT " 9DIVIDEND",DV 660 PRINT "(";D;"-";EC;")" 670 PRINT " (EXCL.)",EC 680 PRINT "13CAP. GAIN",CG 690 PRINT " OTHER INCOME",IO 700 LET GI=W2+DV+IN+IO+CG 710 IF GI<0 THEN LET GI=0 720 PRINT 722 PRINT "22TOTAL INCOME",GI 740 PRINT 742 PRINT " RETURN" 750 PRINT AT 21,0;"COPR 1983 PRACTIC PROG" 770 IF INKEY$="" THEN GO TO 770 772 LET A$=INKEY$ 780 IF A$="R" THEN RETURN 790 IF A$="W" THEN GO SUB 80 792 IF A$="D" THEN GO SUB 180 800 IF A$="I" THEN GO SUB 300 802 IF A$="O" THEN GO SUB 430 804 IF A$="C" THEN GO SUB 840 810 IF A$="E" THEN GO SUB 830 820 GO TO 610 830 CLS 832 PRINT 834 PRINT "EXCLUSION" 836 INPUT EC 837 PRINT " ";EC 838 RETURN 840 CLS 842 PRINT 844 PRINT "D.CAPITAL GAIN" 850 PRINT 852 PRINT "I. SHORT",NS 860 PRINT 862 PRINT "II.LONG",NL 870 LET NG=NS+NL 880 IF NG<0 THEN GO TO 910 890 LET GG=NG 892 IF NL0 THEN LET CG=.5*NG 912 GO TO 940 920 IF NL>0 THEN LET CG=NG 922 GO TO 940 930 LET CG=NS+.5*NL 940 IF CG>-3000 THEN GO TO 1010 950 LET CF=CG+3000 952 LET CG=-3000 960 LET S1=NS+3000 970 IF S1>0 THEN LET S1=0 980 IF S15 THEN GO TO 3260 3270 IF FS=1 THEN GO TO 3280 3272 IF FS=2 THEN GO TO 3290 3274 IF FS=3 THEN GO TO 3300 3276 IF FS=4 THEN GO TO 3280 3278 IF FS=5 THEN GO TO 3290 3280 LET SD=2300 3282 RETURN 3290 LET SD=3400 3292 RETURN 3300 LET SD=1700 3302 RETURN 3310 PRINT "ADJ. INC." 3320 INPUT AI 3330 RETURN 3340 CLS 3342 PRINT 3344 PRINT "DEDUCTIONS" 3350 INPUT DE 3355 PRINT " ";DE 3360 IF DE>SD THEN RETURN 3370 PRINT "DEDUCTION3000 THEN GO TO 3640 3630 PRINT "NO AVERAGING" 3640 PRINT "TYPE ANY KEY" 3650 IF INKEY$="" THEN GO TO 3650 3660 LET A$="" 3670 IF IA<3000 THEN GO SUB 3690 3680 RETURN 3690 PRINT AT 20,0;"TAXES BEING CALCULATED" 3692 LET H$="NO" 3700 IF FS=2 THEN LET H=42 3702 IF FS=3 THEN LET H=42 3704 IF FS=5 THEN LET H=42 3710 IF FS=4 THEN LET H=84 3712 LET TX=V(H) 3713 IF FS=1 THEN LET H=0 3720 IF H$="YES" THEN GO TO 3740 3722 IF NI>50000 THEN GO TO 3740 3724 IF NI>3000 THEN GO TO 3730 3726 LET NI=25*INT (NI/25)+12.5 3728 GO TO 3740 3730 LET NI=50*INT (NI/50)+25 3740 FOR I=1 TO 20 3750 LET LL=UL 3760 LET H=H+1 3762 LET UL=V(H) 3764 LET H=H+1 3766 LET TX=V(H) 3768 LET H=H+1 3770 LET PC=V(H) 3772 LET UL=UL*100 3780 IF FS=3 THEN GO TO 3784 3782 GO TO 3790 3784 LET UL=UL/2 3786 LET TX=TX/2 3790 IF NI