Payroll

Date: 1985
Type: Program
Platform(s): TS 1000

This program is a complete payroll management system for up to eight employees, developed for International Correspondence Schools (ICS/Intext) of Scranton, PA and copyrighted 1985. It handles employee file maintenance (add, change, remove), payroll calculation including federal withholding using a bracket table, FICA deductions with a maximum earnings cap, state tax, and two configurable “other” deductions. The system maintains year-to-date, quarterly, and per-pay-period running totals across three parallel accumulator arrays (D, U, L), and produces a formatted payroll register with hard-copy output via the COPY command. Menu navigation uses a computed GOSUB (line 80: LET Z=Y*2000 / GOSUB Z) to dispatch to subroutines at lines 2000, 4000 (payroll run), and 6000 (payroll register), depending on menu selection.


Program Analysis

Program Structure

The program is organized as a hierarchy of menu-driven subroutines. Execution begins at line 10 with a REM, immediately calls two initialization subroutines, then enters a main dispatch loop.

  1. Line 20: GOSUB 9000 — initialization (skips a tax-table entry block via GOTO 9480 and immediately returns).
  2. Line 40: GOSUB 8000 — displays the main menu and reads choice into Y.
  3. Line 60: if Y=4, branches to line 100 (save-to-tape sequence); otherwise line 70–90 compute Z=Y*2000 and execute GOSUB Z, dispatching to lines 2000, 4000, or 6000.

Computed GOSUB Dispatch

The central dispatch idiom at lines 70–80 (LET Z=Y*2000 / GOSUB Z) maps menu choices 1–3 to subroutine entry points 2000, 4000, and 6000 respectively. This avoids a chain of IF … THEN GOSUB statements and is a compact technique for table-driven control flow in BASIC.

Employee Data Storage

Up to eight employees are stored in parallel arrays indexed 1–8:

ArrayContent
N$(X)Employee name
T$(X)Salary type: “S” (salaried) or “H” (hourly)
R(X)Hourly rate or annual salary
P$(X)Pay period: W/B/S/M (weekly/biweekly/semi-monthly/monthly)
M$(X)Marital status: “S” or “M”
E(X)Number of exemptions
O$(X)Social Security number (stored as string)
G(X), T(X), K(X)YTD regular pay, OT pay, extra income
I(X), S(X), F(X)YTD FICA, state W/H, federal W/H
O(X), Q(X)YTD other deductions 1 and 2
K(X)YTD extra income accumulator

Federal Tax Bracket Calculation

The tax table uses three parallel arrays A(), B(), C() with 56 entries covering all pay periods and marital statuses. The subroutine at line 6010 computes taxable income (INC) by subtracting a per-exemption allowance scaled to pay period. Lines 4280–4345 then walk the bracket table to find the applicable bracket and compute federal withholding as FED = B(X-1) + C(X-1) * (INC - A(X-1)). An exemption value of 999 is used as a special sentinel to suppress withholding entirely.

Notably, the block that populates the tax arrays (lines 9200–9250) is entirely bypassed: line 9135 executes GOTO 9480, skipping over the INPUT loop. This means the A(), B(), C() arrays are never filled at runtime and will contain all zeros — a significant functional bug. It appears this data entry section was intended to be run once, or the arrays were expected to be pre-loaded from tape.

FICA Calculation

FICA is computed at line 4350 as FICA = PAY * PCT. The variable PCT is referenced but never assigned anywhere in the listing, meaning it defaults to zero — another functional deficiency. The program does correctly implement a FICA maximum earnings cap: line 4352 zeroes FICA when YTD FICA accumulator I(Y) has reached MAX, and line 4354 clamps the deduction to the remaining allowable amount. The variable MAX is similarly never initialized in the visible code.

Accumulator Arrays

Three sets of eight accumulators track payroll totals at different time horizons:

  • D(1)–D(8): current pay period totals (reset implicitly at line 4005 via DIM D(8) each payroll run)
  • U(1)–U(8): quarterly totals (reset at end of quarter via DIM U(8) at line 7145)
  • L(1)–L(8): year-to-date totals (never explicitly reset in the listing)

The accumulator update subroutine at line 9600 increments all three sets from the same payroll run variables, maintaining consistency across periods.

Pay Period Normalization

For salaried employees, lines 4200–4230 derive the per-period pay from the annual salary by dividing by 52 (weekly), 26 (biweekly), 24 (semi-monthly), or 12 (monthly). Exemption allowances in the tax subroutine (line 6010) are similarly scaled: $20/week, $40/biweekly, $43.33/semi-monthly, $86.67/monthly — approximating the standard IRS withholding allowance values of the era.

Rounding

Dollar amounts are consistently rounded to two decimal places using the idiom INT(X*100+.5)/100 at lines 4235, 4236, and 4345, avoiding floating-point display artifacts.

Hard Copy and Tape Save

The program makes extensive use of COPY to print the current screen to a printer at multiple confirmation points. The tape save sequence (lines 100–130) prompts the user to set the tape, waits for a keypress, executes SAVE "PAYROLL", then displays a decorative title screen with a border and institutional information before pausing and returning to the menu.

Notable Bugs and Anomalies

  • Subroutine 8500 is called at line 2527 but the listing only contains lines 8510 onward — the 8500 label is absent, so GOSUB 8500 falls through to line 8510, which happens to be the correct code. This works by accident due to BASIC’s line-number resolution.
  • Line 3500 is referenced in the “remove employee” flow (lines 3790, 3900) but does not exist; line 3505 is the actual start of that subroutine. Depending on interpreter behavior this may cause an error or fall through to 3505.
  • Line 2170 is referenced at line 2220 but does not exist; execution would likely fall to line 2180 (INPUT U$), which is the intended behavior.
  • The GOSUB 3500 at line 2030 similarly targets a non-existent line, falling through to 3505.
  • Variables PCT and MAX (used for FICA rate and cap) are never assigned, rendering FICA calculation non-functional without prior initialization from tape data.
  • The HARD COPY loop at lines 4710–4738 has no “Y” branch guard — it loops back to 4710 after copying, but the second copy prompt re-enters the same loop structure, potentially repeating indefinitely if the user keeps entering “Y”.

Maintenance Menu Dispatch

The maintenance submenu (lines 8300–8400) returns to caller with Y set to 1–4, and the caller at lines 2025–2070 uses a chain of IF Y=N THEN GOSUB statements to dispatch to add (2100), change (2600), or remove (3500) routines. Choice 4 exits directly via RETURN.

Content

Appears On

Related Products

Correspondence course that included TS 1500, recorder, instruction booklets, briefcase.

Related Articles

Related Content

Image Gallery

Source Code

  10 REM PAYROLL
  20 GOSUB 9000
  40 GOSUB 8000
  60 IF Y=4 THEN GOTO 100
  70 LET Z=Y*2000
  80 GOSUB Z
  90 GOTO 40
 100 CLS 
 101 PRINT AT 10,0;"SET TAPE, PRESS ANY KEY"
 110 IF INKEY$="" THEN GOTO 110
 115 CLS 
 120 SAVE "PAYROL%L"
 121 PRINT "% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % "
 122 FOR X=1 TO 20
 123 PRINT "% ";TAB 31;"% "
 124 NEXT X
 125 PRINT "% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % "
 126 PRINT AT 3,9;"PAYROLL PROGRAM";AT 5,14;"FOR";AT 7,1;"COMPUTER ASSISTED BOOKKEEPING";AT 14,2;"INTERNATIONAL CORRESPONDENCE";AT 15,12;"SCHOOLS";AT 17,6;"SCRANTON, PA. 18515";AT 19,4;"COPYRIGHT ICS INTEXT 1985"
 127 PAUSE 20000
 130 GOTO 40
 1000 PRINT AT 20,0;"ENTER OTHER INCOME"
 1010 INPUT XIN
 1020 PRINT AT 10,0;"EXTRA INCOME   ";XIN
 1030 RETURN 
 2000 REM 
 2020 GOSUB 8300
 2025 IF Y=4 THEN RETURN 
 2030 IF Y=3 THEN GOSUB 3500
 2040 IF Y=2 THEN GOSUB 2600
 2050 IF Y=1 THEN GOSUB 2100
 2070 GOTO 2000
 2100 REM 
 2110 CLS 
 2120 PRINT AT 2,6;"ADD EMPLOYEES TO FILE";AT 4,0;"EMPLOYEE NAME"
 2140 INPUT S$
 2150 PRINT AT 4,15;S$;AT 6,0;"SALARY TYPE";AT 20,1;"S=SALARY  H=HOURLY"
 2160 PRINT AT 6,0;"SALARY TYPE"
 2180 INPUT U$
 2190 PRINT AT 6,15;U$
 2200 IF U$="H" OR U$="S" THEN GOTO 2230
 2210 PRINT AT 19,1;"INVALID TYPE RE-ENTER"
 2220 GOTO 2170
 2230 PRINT AT 19,0;Z$;AT 20,0;Z$
 2240 IF U$="S" THEN GOTO 2270
 2250 PRINT AT 8,0;"HOURLY RATE "
 2260 GOTO 2280
 2270 PRINT AT 8,0;"YEARLY SALARY "
 2280 INPUT V
 2290 PRINT AT 8,15;V;AT 10,0;"PAY PERIOD ";AT 19,0;"W=WEEKLY B=BIWEEKLY";AT 20,0;"S=SEMI-MONTHLY M=MONTHLY"
 2320 INPUT W$
 2340 PRINT AT 10,15;W$
 2350 IF W$="W" OR W$="B" OR W$="S" OR W$="M" THEN GOTO 2380
 2370 GOTO 2320
 2380 PRINT AT 18,0;Z$;Z$;Z$;Z$;AT 12,0;"MARITAL STATUS ";AT 20,1;"S=SINGLE  M=MARRIED"
 2410 INPUT X$
 2420 PRINT AT 12,15;X$
 2430 IF X$="M" OR X$="S" THEN GOTO 2460
 2450 GOTO 2410
 2460 PRINT AT 19,1;Z$;AT 20,1;Z$;AT 14,0;"NO. EXEMPTIONS"
 2470 INPUT EX
 2480 PRINT AT 14,15;EX;AT 16,0;"SOC.SEC.NO"
 2500 INPUT C$
 2515 PRINT AT 16,15;C$;AT 18,0;"ALL CORRECT ? (Y/N)"
 2516 INPUT L$
 2517 IF L$="N" THEN GOTO 2100
 2518 IF L$="Y" THEN GOTO 2522
 2520 PRINT AT 19,1;"INVALID RE-ENTER"
 2521 GOTO 2516
 2522 PRINT AT 21,0;"HARD COPY? (Y/N)"
 2523 INPUT Y$
 2524 PRINT AT 18,0;Z$;Z$;Z$;Z$
 2525 IF Y$="N" THEN GOTO 2527
 2526 COPY 
 2527 GOSUB 8500
 2530 PRINT AT 19,1;"MORE EMPLOYEES ? (Y/N)"
 2540 INPUT Y$
 2550 IF Y$="Y" THEN GOTO 2100
 2560 IF Y$="N" THEN RETURN 
 2570 PRINT AT 18,1;"INVALID RE-ENTER"
 2580 GOTO 2540
 2600 REM 
 2610 CLS 
 2620 PRINT AT 0,6;"CHANGE EMPLOYEE DATA"
 2622 FOR X=1 TO 8
 2624 PRINT X;" ";N$(X, TO 12),
 2626 NEXT X
 2640 PRINT AT 21,0;"ENTER NO. OF EMPLOYEE (0 TO END)"
 2650 INPUT Y
 2660 IF Y=0 THEN RETURN 
 2670 IF Y>0 AND Y<11 THEN GOTO 2700
 2680 PRINT AT 19,1;"INVALID NO. , RE-ENTER"
 2690 GOTO 2650
 2700 CLS 
 2720 PRINT AT 4,0;"EMPLOYEE NAME";AT 4,15;N$(Y);AT 19,1;"ENTER NEW INFORMATION, IF NO ";AT 20,1;"CHANGE JUST PRESS THE ENTER KEY"
 2730 INPUT S$
 2740 IF S$<>"" THEN PRINT AT 4,15;S$;Z$
 2750 PRINT AT 6,0;"SALARY TYPE";AT 6,15;T$(Y)
 2760 INPUT U$
 2770 IF U$="" THEN GOTO 2810
 2775 PRINT AT 6,15;U$
 2780 IF U$="H" OR U$="S" THEN GOTO 2810
 2790 PRINT AT 18,1;"INVALID TYPE RE-ENTER"
 2800 GOTO 2760
 2810 PRINT AT 18,0;Z$
 2815 IF T$(Y)="H" THEN PRINT AT 8,1;"HOURLY RATE ";AT 8,15;R(Y)
 2820 IF T$(Y)="S" THEN PRINT AT 8,1;"YEARLY SALARY ";AT 8,15;R(Y)
 2821 GOTO 2830
 2830 PRINT AT 18,1;"ENTER NEW RATE, SALARY OR 0";Z$;Z$;Z$
 2840 INPUT V
 2850 IF V<>0 THEN PRINT AT 8,15;V;Z$
 2860 PRINT AT 10,0;"PAY PERIOD     ";P$(Y);AT 18,0;Z$
 2870 INPUT W$
 2880 IF W$="" THEN GOTO 2910
 2885 PRINT AT 10,15;W$
 2890 IF W$="W" OR W$="B" OR W$="S" OR W$="M" THEN GOTO 2910
 2895 PRINT AT 18,1;"INVALID RE-ENTER"
 2900 GOTO 2870
 2910 PRINT AT 18,0;Z$;AT 12,0;"MARITAL STATUS ";M$(Y)
 2920 INPUT X$
 2925 IF X$="" THEN GOTO 2960
 2927 PRINT AT 12,15;X$
 2930 IF X$="M" OR X$="S" THEN GOTO 2960
 2940 PRINT AT 18,1;"INVALID RE-ENTER"
 2950 GOTO 2920
 2960 PRINT AT 18,0;Z$;AT 14,0;"NO. EXEMPS.";AT 14,15;E(Y)
 2970 INPUT EX
 2990 PRINT AT 14,15;EX;AT 16,0;"SOC.SEC.NO.    ";O$(Y)
 3000 INPUT C$
 3010 IF C$<>"" THEN PRINT AT 16,15;C$;Z$
 3020 PRINT AT 18,0;"ALL CORRECT? (Y/N)"
 3030 INPUT L$
 3040 IF L$="N" THEN GOTO 2600
 3050 IF L$="Y" THEN GOTO 3072
 3060 PRINT AT 18,0;"INVALID RE-ENTER  "
 3070 GOTO 3030
 3072 PRINT AT 21,0;"HARD COPY? (Y/N)"
 3074 INPUT Y$
 3080 PRINT AT 18,0;Z$;Z$;Z$;Z$
 3085 IF Y$="N" THEN GOTO 3090
 3087 COPY 
 3090 IF S$<>"" THEN LET N$(Y)=S$
 3100 IF U$<>"" THEN LET T$(Y)=U$
 3110 IF V<>0 THEN LET R(Y)=V
 3120 IF W$<>"" THEN LET P$(Y)=W$
 3130 IF X$<>"" THEN LET M$(Y)=X$
 3135 LET E(Y)=EX
 3140 IF C$<>"" THEN LET O$(Y)=C$
 3150 GOTO 2600
 3505 CLS 
 3510 PRINT AT 0,8;"REMOVE EMPLOYEE"
 3512 FOR X=1 TO 8
 3514 PRINT X;" ";N$(X, TO 12),
 3516 NEXT X
 3530 PRINT AT 20,0;"ENTER NO. OF EMPLOYEE TO DELETE"
 3540 INPUT Y
 3545 IF Y=0 THEN RETURN 
 3550 IF Y>0 AND Y<9 THEN GOTO 3600
 3560 PRINT AT 19,1;"INVALID NO. , RE-ENTER"
 3570 GOTO 3540
 3600 CLS 
 3615 PRINT AT 9,0;Z$;AT 4,0;"EMPLOYEE NAME";AT 4,15;N$(Y);AT 6,0;"SALARY TYPE";AT 6,15;T$(Y) 
 3650 IF T$(Y)="H" THEN PRINT AT 8,0;"HOURLY RATE "
 3660 IF T$(Y)="S" THEN PRINT AT 8,0;"YEARLY SALARY "
 3670 PRINT AT 8,15;R(Y);AT 10,0;"PAY PERIOD ";AT 10,15;P$(Y);AT 12,0;"MARITAL STATUS ";M$(Y);AT 14,0;"NO. EXEMPTIONS ";E(Y);AT 16,0;"SOC.SEC.NO.   ";O$(Y);AT 19,0;"IS THIS THE EMPLOYEE YOU WANT   DELETED? (ENTER Y OR N)"
 3770 INPUT X$
 3780 IF X$="Y" THEN GOTO 3810
 3790 IF X$="N" THEN GOTO 3500
 3795 PRINT AT 18,1;"INVALID REPLY, RE-ENTER"
 3798 GOTO 3770
 3810 LET N$(Y)="            "
 3820 LET T$(Y)=" "
 3830 LET R(Y)=0 
 3831 LET G(Y)=0 
 3832 LET T(Y)=0 
 3833 LET I(Y)=0 
 3834 LET S(Y)=0 
 3835 LET F(Y)=0 
 3836 LET O(Y)=0 
 3837 LET Q(Y)=0 
 3840 LET M$(Y)=" "
 3850 LET E(Y)=0
 3860 LET O$(Y)="           "
 3865 LET K(Y)=0
 3870 PRINT AT 18,0;Z$;Z$;Z$;AT 19,0;"DO YOU WANT TO DELETE MORE      EMPLOYEES? (Y OR N)"
 3880 INPUT X$
 3885 LET Y=0
 3890 IF X$="N" THEN RETURN 
 3900 IF X$="Y" THEN GOTO 3500
 3910 PRINT AT 18,1;"INVALID ENTRY, RE-ENTER"
 3920 GOTO 3880
 3990 RETURN 
 4005 DIM D(8)
 4010 CLS 
 4015 PRINT AT 0,0;"COMPANY NAME"
 4017 INPUT B$
 4018 PRINT AT 0,0;B$;Z$
 4020 PRINT AT 1,0;"TODAY""S DATE MM/DD/YY"
 4030 INPUT D$
 4040 PRINT AT 1,13;D$;Z$
 4050 PRINT AT 2,0;"PERIOD END DATE MM/DD/YY"
 4060 INPUT E$
 4062 PRINT AT 2,16;E$;Z$
 4064 FOR X=1 TO 8
 4065 PRINT X;" ";N$(X, TO 12),
 4066 NEXT X
 4070 PRINT AT 20,0;"ENTER EMPLOYEE NO."
 4075 INPUT Y
 4080 IF Y=0 THEN RETURN 
 4085 CLS 
 4087 PRINT TAB 6;B$
 4090 PRINT "TODAY""S DATE: ";D$
 4095 PRINT "PERIOD ENDING:";E$
 4100 PRINT AT 7,0;"EMPLOYEE";AT 7,10;N$(Y)
 4113 PRINT AT 8,0;"SOC.SEC.NO.";AT 8,12;O$(Y)
 4115 IF T$(Y)="S" THEN GOTO 4200
 4120 PRINT AT 20,0;"ENTER REG. HOURS"
 4130 INPUT HOURS
 4132 PRINT AT 20,0;"ENTER OT HOURS  "
 4133 INPUT OTH
 4135 PRINT AT 9,0;"REG. HOURS"
 4140 PRINT AT 9,11;HOURS
 4145 PRINT AT 9,16;"OT HOURS ";OTH
 4160 LET REG=HOURS*R(Y)
 4185 LET OT=OTH*1.5*R(Y)
 4190 GOTO 4235
 4200 IF P$(Y)="W" THEN LET PAY=R(Y)/52
 4210 IF P$(Y)="B" THEN LET PAY=R(Y)/26
 4220 IF P$(Y)="S" THEN LET PAY=R(Y)/24
 4230 IF P$(Y)="M" THEN LET PAY=R(Y)/12
 4232 LET REG=PAY
 4233 LET OT=0
 4235 LET REG=INT (REG*100+.5)/100
 4236 LET OT=INT (OT*100+.5)/100
 4237 GOSUB 1000
 4239 LET PAY=OT+REG+XIN
 4241 IF P$(Y)="W" THEN LET M=1
 4250 IF P$(Y)="B" THEN LET M=15
 4260 IF P$(Y)="S" THEN LET M=29
 4270 IF P$(Y)="M" THEN LET M=43
 4280 IF M$(Y)="M" THEN LET M=M+7
 4285 GOSUB 6010
 4290 FOR X=M TO M+6
 4300 IF INC<=A(X) THEN GOTO 4320
 4310 NEXT X
 4320 IF X=M OR E(Y)=999 THEN LET FED=0
 4330 IF X=M OR E(Y)=999 THEN GOTO 4350
 4340 LET FED=B(X-1)+C(X-1)*(INC-A(X-1))
 4345 LET FED=INT (FED*100+.5)/100
 4350 LET FICA=PAY*PCT
 4352 IF I(Y)>=MAX THEN LET FICA=0
 4353 IF FICA=0 THEN GOTO 4380
 4354 IF FICA+I(Y)>MAX THEN LET  FICA=MAX-I(Y)
 4355 LET FICA=INT (FICA*100+.5)/100
 4380 PRINT AT 11,0;"REG.PAY";AT 11,9;REG;AT 11,17;"OT PAY";AT 11,25;OT
 4500 PRINT AT 13,0;"GROSS PAY";AT 13,15;PAY
 4510 PRINT AT 14,0;"FEDERAL TAX";AT 14,15;FED
 4512 PRINT AT 20,0;"ENTER STATE W/H ";Z$
 4514 INPUT ST
 4520 PRINT AT 15,0;"STATE TAX ";AT 15,15;ST
 4525 PRINT AT 20,0;Z$
 4530 PRINT AT 16,0;"FICA ";AT 16,15;FICA
 4540 PRINT AT 20,0;"ENTER OTHER 1 "
 4550 INPUT D1
 4555 PRINT AT 17,0;"OTHER 1"
 4560 PRINT AT 17,15;D1
 4580 PRINT AT 20,0;"ENTER OTHER 2"
 4590 INPUT D2
 4595 PRINT AT 18,0;"OTHER 2"
 4600 PRINT AT 18,15;D2
 4610 LET TOTD=FICA+FED+ST+D1+D2
 4620 LET NET=PAY-TOTD
 4630 PRINT AT 19,0;"NET PAY";AT 19,15;NET
 4640 PRINT AT 20,0;"IS ALL DATA CORRECT? (Y/N)"
 4650 INPUT Y$
 4660 IF Y$<>"Y" THEN GOTO 4870
 4665 LET G(Y)=G(Y)+REG
 4668 LET T(Y)=T(Y)+OT
 4670 LET I(Y)=I(Y)+FICA
 4675 LET S(Y)=S(Y)+ST
 4680 LET F(Y)=F(Y)+FED
 4690 LET O(Y)=O(Y)+D1
 4700 LET Q(Y)=Q(Y)+D2
 4705 LET K(Y)=K(Y)+XIN
 4710 PRINT AT 21,0;"HARD COPY? (Y/N)"
 4720 INPUT Y$
 4730 IF Y$="N" THEN GOTO 4740
 4735 PRINT AT 20,0;Z$;Z$
 4736 COPY 
 4738 GOTO 4710
 4740 CLS 
 4750 PRINT AT 4,10;"YTD TOTALS";AT 6,0;"EMPLOYEE  ";N$(Y);TAB 0;"SOC.SEC.NO.   ";O$(Y);TAB 0;"REGULAR   ";G(Y);TAB 0;"OT PAY     ";T(Y);TAB 0;"EXTRA INC. ";K(Y);TAB 0;"GROSS     ";G(Y)+T(Y)+K(Y);AT 12,0;"FED. W/H  ";F(Y);TAB 0;"STATE W/H ";S(Y);TAB 0;"FICA      ";I(Y);TAB 0;"OTHER 1   ";O(Y);TAB 0;"OTHER 2   ";Q(Y);TAB 0;"NET PAY    ";G(Y)+T(Y)+K(Y)-(F(Y)+S(Y)+I(Y)+O(Y)+Q(Y));AT 21,0;"HARD COPY? (Y/N)"
 4850 INPUT Y$
 4860 IF Y$="N" THEN GOTO 4868
 4861 PRINT AT 21,0;Z$
 4862 COPY 
 4865 GOTO 4750
 4868 GOSUB 9600
 4870 PRINT AT 21,0;"ANOTHER EMPLOYEE? (Y/N)"
 4880 INPUT Y$
 4890 IF Y$="N" THEN GOTO 5999
 4900 CLS 
 4910 GOTO 4064
 5999 RETURN 
 6000 GOTO 7000
 6010 IF P$(Y)="W" THEN LET INC=PAY-E(Y)*20
 6020 IF P$(Y)="B" THEN LET INC=PAY-E(Y)*40
 6030 IF P$(Y)="S" THEN LET INC=PAY-E(Y)*43.33
 6040 IF P$(Y)="M" THEN LET INC=PAY-E(Y)*86.67
 6050 RETURN 
 7010 CLS 
 7020 PRINT TAB 8;"PAYROLL REGISTER";TAB 10;"FOR PAY PERIOD";TAB 8;B$;TAB 8;"TODAY""S DATE:";D$;TAB 8;"PERIOD END. :";E$
 7030 GOSUB 7800
 7040 PRINT AT 5,15;D(1);AT 6,15;D(2);AT 7,15;D(8);AT 9,15;D(1)+D(2)+D(8);AT 11,15;D(3);AT 12,15;D(4);AT 13,15;D(5);AT 14,15;D(6);AT 15,15;D(7);AT 17,0;"NET PAY        ";D(1)+D(2)+D(8)-(D(3)+D(4)+D(5)+D(6)+D(7))
 7050 COPY 
 7060 PAUSE 32767
 7065 CLS 
 7100 PRINT TAB 8;"PAYROLL REGISTER";TAB 10;"FOR QUARTER";TAB 8;B$
 7110 GOSUB 7800
 7120 PRINT AT 5,15;U(1);AT 6,15;U(2);AT 7,15;U(8);AT 9,15;U(1)+U(2)+U(8);AT 11,15;U(3);AT 12,15;U(4);AT 13,15;U(5);AT 14,15;U(6);AT 15,15;U(7)
 7130 COPY 
 7135 PRINT AT 21,0;"END OF QUARTER? (Y/N)"
 7140 INPUT Y$
 7145 IF Y$="Y" THEN DIM U(8)
 7150 CLS 
 7200 PRINT TAB 8;"PAYROLL REGISTER";TAB 10;"FOR YEAR";TAB 8;B$
 7210 GOSUB 7800
 7220 PRINT AT 5,15;L(1);AT 6,15;L(2);AT 7,15;L(8);AT 9,15;L(1)+L(2)+L(8);AT 11,15;L(3);AT 12,15;L(4);AT 13,15;L(5);AT 14,15;L(6);AT 15,15;L(7)
 7230 COPY 
 7240 PAUSE 32767
 7250 GOTO 7990
 7800 PRINT AT 5,0;"REGULAR PAY";AT 6,0;"OVERTIME PAY";AT 7,0;"EXTRA INCOME";AT 9,0;"GROSS PAY";AT 11,0;"FEDERAL W/H";AT 12,0;"STATE W/H";AT 13,0;"FICA";AT 14,0;"OTHER 1";AT 15,0;"OTHER 2"
 7990 RETURN 
 8010 CLS 
 8020 PRINT AT 5,10;"PAYROLL MENU"
 8030 PRINT AT 8,5;"1. MASTER EMPLOYEE FILE"
 8040 PRINT AT 11,5;"2. RUN PAYROLL"
 8045 PRINT AT 14,5;"3. PRINT PAYROLL REGISTER"
 8050 PRINT AT 17,5;"4. SAVE TO TAPE"
 8070 PRINT AT 21,3;"ENTER NUMBER OF CHOICE"
 8080 INPUT Y
 8090 IF Y>0 AND Y<5 THEN GOTO 8120
 8100 PRINT AT 19,1;"INVALID ENTRY, RE-ENTER"
 8110 GOTO 8080
 8120 RETURN 
 8300 REM 
 8310 CLS 
 8320 PRINT AT 5,8;"MAINTENANCE MENU"
 8330 PRINT AT 8,5;"1. ADD EMPLOYEES TO FILE"
 8340 PRINT AT 11,5;"2. CHANGE EMPLOYEE DATA"
 8350 PRINT AT 14,5;"3. REMOVE EMPLOYEE"
 8355 PRINT AT 17,5;"4. RETURN TO MAIN MENU"
 8360 PRINT AT 21,4;"ENTER NUMBER OF CHOICE"
 8370 INPUT Y
 8380 IF Y>0 AND Y<5 THEN RETURN 
 8390 PRINT AT 19,1;"INVALID ENTRY, RE-ENTER"
 8400 GOTO 8370
 8510 FOR X=1 TO 8
 8520 IF N$(X)(1 TO 10)="          " THEN GOTO 8540
 8530 NEXT X
 8533 PRINT AT 21,0;"FILE IS FULL - PRESS ENTER"
 8535 PAUSE 32767
 8540 LET N$(X)=S$
 8550 LET T$(X)=U$
 8560 LET R(X)=V 
 8570 LET P$(X)=W$
 8575 LET M$(X)=X$
 8580 LET E(X)=EX
 8590 LET O$(X)=C$
 8600 RETURN 
 9000 REM 
 9135 GOTO 9480
 9200 FOR X=1 TO 56
 9205 PRINT AT 0,0;X
 9210 INPUT A(X)
 9220 INPUT B(X)
 9230 INPUT C(X)
 9240 NEXT X
 9250 STOP 
 9480 RETURN 
 9600 REM 
 9610 LET D(1)=D(1)+REG
 9620 LET D(2)=D(2)+OT
 9630 LET D(3)=D(3)+FED
 9640 LET D(4)=D(4)+ST
 9650 LET D(5)=D(5)+FICA
 9660 LET D(6)=D(6)+D1
 9670 LET D(7)=D(7)+D2
 9680 LET D(8)=D(8)+XIN
 9710 LET U(1)=U(1)+REG
 9720 LET U(2)=U(2)+OT
 9730 LET U(3)=U(3)+FED
 9740 LET U(4)=U(4)+ST
 9750 LET U(5)=U(5)+FICA
 9760 LET U(6)=U(6)+D1
 9770 LET U(7)=U(7)+D2
 9780 LET U(8)=U(8)+XIN
 9810 LET L(1)=L(1)+REG
 9820 LET L(2)=L(2)+OT
 9830 LET L(3)=L(3)+FED
 9840 LET L(4)=L(4)+ST
 9850 LET L(5)=L(5)+FICA
 9860 LET L(6)=L(6)+D1
 9870 LET L(7)=L(7)+D2
 9880 LET L(8)=L(8)+XIN
 9890 RETURN 

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

People

No people associated with this content.

Scroll to Top