Source Code
1 LET N=M-1: LET Y=1: LET Z=N+1: LET S=0: IF (Q$<Z$(1, TO 6))+(Q$>Z$(N, TO 6)) THEN GO TO 12
2 IF Z<Y THEN GO TO 9
3 LET C=INT ((Z+Y)/2): LET T$=Z$(C, TO 6)
4 IF T$=Q$ THEN LET S=C: GO TO 10
5 IF T$<Q$ THEN LET Y=C+1: GO TO 2
6 LET Z=C-1: GO TO 2
9 LET S=Z
10 IF Q$<>Z$(S, TO 6) THEN LET S=0
12 RETURN
15 DEF FN D(X)=INT (100*X+0.5)/100
16 DEF FN Q$(X,Q$)=Q$+(".00" AND X=INT X)+("0" AND ("0"+Q$)(LEN Q$)=".")
20 LET TR=0.065: LET B$=" ** YOUR BUSINESS NAME HERE **"
26 PAPER 6: BORDER 3: POKE 23658,8: CLS : POKE 23609,10
30 PRINT PAPER 5;" POINT OF SALE CASH REGISTER ";AT 1,0;" \* 1985 BY: I. AUERSBACHER ";AT 6,3;"ENTER TODAY'S DATE";AT 7,3;" (MM/DD/YYYY):"
32 INPUT D$
35 LET G=0: LET TTX=0
40 PAPER 3: BORDER 5: CLS : PRINT PAPER 1; INK 7;" POINT OF SALE CASH REGISTER ":
45 PRINT PAPER 7;AT 4,11;" MENU ";AT 7,6;"1- CASH REGISTER";AT 8,6;"2- ADD NEW ITEMS";AT 9,6;"3- DELETE ITEMS ";AT 10,6;"4- LPRINT STOCK ";AT 11,6;"5- SAVE TO TAPE ";AT 12,6;"6- EXIT PROGRAM ";AT 21,0;"OPTION NO?"
50 LET Q$=INKEY$: IF Q$="" THEN GO TO 50
55 IF CODE Q$<49 OR CODE Q$>54 THEN BEEP 0.3,-15: BEEP 0.3,-20: GO TO 50
56 LET X=INT VAL Q$: IF M=1 AND X=1 THEN BEEP .4,-20: GO TO 50
58 BEEP 0.06,25
59 PRINT INK 0;AT 6+X,3;CHR$ 144; INK 6;CHR$ 145: PAUSE 100: PAPER 7: BEEP .1,20
60 GO SUB 75*(X=1)+585*(X=2)+725*(X=3)+815*(X=4)+860*(X=5)+875*(X=6)
65 GO TO 40
75 CLS : PRINT B$: LPRINT : LPRINT : LPRINT B$
80 PRINT " DATE: ";D$: LPRINT " DATE: ";D$
85 PRINT : LPRINT
90 PRINT : LPRINT
100 LET TT=0: LET TX=0
120 INPUT FLASH 1;"ENTER CODE: ";Q$
125 IF Q$="" THEN GO TO 285
130 IF LEN Q$>6 THEN GO TO 120
135 IF LEN Q$<6 THEN LET Q$="00000"( TO 6-LEN Q$)+Q$
150 GO SUB 1: IF S<>0 THEN BEEP .03,25: GO TO 245
155 BEEP .4,-15: BEEP .5,-20: PRINT INK 2;" ";Q$;" NOT FOUND "
160 PRINT INK 2;" ITEM NAME: ";
165 INPUT A$: IF A$="" THEN PRINT FLASH 1;"CANCEL": GO TO 120
170 IF LEN A$>12 THEN LET A$=A$( TO 12)
175 PRINT INK 1;A$
180 PRINT INK 2;" ITEM COST: ";
185 INPUT Q$: IF Q$="" THEN BEEP 0.3,-20: GO TO 185
190 PRINT INK 1;Q$
205 LET X=LEN Q$: LET T=VAL Q$( TO X-(Q$(X)="T"))
210 LET G=G+T: LET TT=TT+T
220 IF X<7 THEN LET Q$=" "( TO 7-X)+Q$
225 PRINT " NF";TAB 8;A$;TAB 20+(Q$(7)="T");Q$: LPRINT " NF";TAB 8;A$;TAB 20+(Q$(7)="T");Q$
230 IF Q$(7)="T" THEN GO TO 270
235 GO TO 120
245 PRINT TAB 1;Z$(S, TO 6);" ";Z$(S,7 TO 18);TAB 20+(Z$(S,25)="T");Z$(S,19 TO )
246 LPRINT TAB 1;Z$(S, TO 6);" ";Z$(S,7 TO 18);TAB 20+(Z$(S,25)="T");Z$(S,19 TO )
250 LET T=VAL Z$(S ,19 TO 25-(Z$(S,25)="T"))
265 LET TT=TT+T: LET G=G+T: IF Z$(S,25)<>"T" THEN GO TO 110
270 LET T=FN D(T*TR)
275 LET TX=TX+T: LET TTX=TTX+T
280 GO TO 120
285 CLS : LET C=FN D(TT): LET Q$=FN Q$(C,STR$ C): BEEP .1,25
290 PRINT AT 4,7;"SUB TOT:";TAB 24-LEN Q$;Q$:
295 LET TX=FN D(TX): LET Q$=FN Q$(TX,STR$ TX)
300 PRINT TAB 7;"TAX DUE:";TAB 24-LEN Q$;Q$: LPRINT
305 LPRINT : LPRINT TAB 7;"TAX DUE:";TAB 24-LEN Q$;Q$
310 LET TT=FN D(TT+TX): LET Q$=FN Q$(TT,STR$ TT): PRINT
315 PRINT TAB 7; FLASH 1;"TOTAL:"; FLASH 0;TAB 24-LEN Q$;Q$
320 LPRINT TAB 7;"TOTAL:";TAB 24-LEN Q$;Q$
325 PRINT : LPRINT
330 PRINT TAB 7;"CASH TEND:";
340 INPUT Z
345 LET C=Z-TT: IF C<-0.001 THEN BEEP 0.7,-20: GO TO 340
350 LET Q$=FN Q$(Z,STR$ Z): PRINT TAB 24-LEN Q$;Q$: LPRINT TAB 7;"CASH TEND:";TAB 24-LEN Q$;Q$
355 LET C=FN D(C): LET Q$=FN Q$(C,STR$ C): PRINT TAB 7;"CHNG DUE :";TAB 24-LEN Q$;Q$
356 LPRINT TAB 7;"CHNG DUE :";TAB 24-LEN Q$;Q$
370 LPRINT : LPRINT : LPRINT " THANK YOU * HAVE A NICE DAY!"
375 FOR Z=1 TO 5: LPRINT
385 NEXT Z: PAUSE 10000
390 RETURN
490 LET N=M-1: LET S=N
500 LET S=INT (S/2)
505 IF S=0 THEN GO TO 580
510 LET W=N-S
515 LET Y=1
520 LET Z=Y
525 LET C=Z+S
535 IF Z$(Z)<=Z$(C) THEN GO TO 565
540 LET Q$=Z$(Z)
545 LET Z$(Z)=Z$(C)
550 LET Z$(C)=Q$
555 LET Z=Z-S
560 IF Z>=1 THEN GO TO 525
565 LET Y=Y+1
570 IF Y<=W THEN GO TO 520
575 GO TO 500
580 RETURN
585 CLS : LET A$=""
590 IF M>1200 THEN PRINT FLASH 1;" FILE FULL ": BEEP 1.5,-22: PAUSE 240: PRINT : GO TO 715
595 PRINT AT 2,8;"ADD DATA-->"
600 PRINT AT 4,1;"CODE NO: ";
605 INPUT Q$
610 IF Q$="" THEN GO TO 715
615 IF LEN Q$>6 THEN GO TO 605
620 IF LEN Q$<6 THEN LET Q$="00000"( TO 6-LEN Q$)+Q$
630 PRINT Q$: LET A$=A$+Q$
635 PRINT AT 5,1;"ITEM NAME: ";
640 INPUT Q$: IF Q$="" THEN BEEP .4,-15: BEEP .5,-20: GO TO 640
645 IF LEN Q$>12 THEN GO TO 640
650 IF LEN Q$<12 THEN LET Q$=Q$+" "( TO 12-LEN Q$)
660 PRINT Q$: LET A$=A$+Q$
665 PRINT AT 6,1;"ITEM COST: ";
670 INPUT Q$: IF Q$="" THEN BEEP 1,-20: GO TO 670
675 IF LEN Q$>7 THEN GO TO 670
680 IF LEN Q$<7 THEN LET Q$=" "( TO 7-LEN Q$)+Q$
685 PRINT Q$
690 LET A$=A$+Q$: LET Z$(M)=A$
700 LET M=M+1: PAUSE 50
710 GO TO 585
715 PRINT : PRINT : PRINT " "; FLASH 1;" SORTING ": GO SUB 490
720 RETURN
725 CLS : IF M=1 THEN RETURN
730 PRINT AT 3,0;"DELETE-->"
735 PRINT
740 PRINT "ENTER CODE NO. ";
745 INPUT Q$: IF Q$="" THEN : BEEP 0.07,22: GO TO 810
750 IF LEN Q$>6 THEN GO TO 745
755 IF LEN Q$<6 THEN LET Q$="00000"( TO 6-LEN Q$)+Q$
760 PRINT Q$: GO SUB 1
775 IF S<>0 THEN GO TO 795
780 PRINT Q$;" NOT FOUND"
785 PAUSE 220: GO TO 810
795 LET Z$(S, TO 6)="ZZZZZZ"
800 PRINT : PRINT TAB 1; FLASH 1;" SORTING ": GO SUB 490
805 LET M=M-1
810 RETURN
815 CLS
820 PRINT " CODE";TAB 10;"ITEM";TAB 23;"PRICE": LPRINT
822 LPRINT : LPRINT " CODE";TAB 10;"ITEM";TAB 23;"PRICE"
825 FOR Z=1 TO M-1
830 LET X$=Z$(Z)
835 PRINT " ";X$( TO 6);" ";X$(7 TO 18);TAB 21+(X$(25)="T");X$(19 TO )
836 LPRINT " ";X$( TO 6);" ";X$(7 TO 18);TAB 21+(X$(25)="T");X$(19 TO )
840 NEXT Z
845 PRINT : LPRINT : LPRINT
850 PAUSE 20000: RETURN
860 CLS : PRINT AT 5,2;"NAME OF THIS FILE?": INPUT Q$: PRINT
862 IF LEN Q$>10 OR Q$="" THEN BEEP 1.5,-20: GO TO 860
863 PRINT AT 7,2; PAPER 6;Q$
865 SAVE Q$ LINE 1000
867 PRINT FLASH 1;AT 9,2;" STOP RECORDER ": PAUSE 400
870 RETURN
875 CLS
880 PRINT : LPRINT : LPRINT
885 LET G=FN D(G): LET X=FN D(TTX): LET Q$=FN Q$(G,STR$ G):
890 LET A$=FN Q$(X,STR$ X)
895 PRINT : PRINT " DATE: ";D$
900 LPRINT " DATE: ";D$
905 PRINT : PRINT " TOTAL SALES: $";TAB 23-LEN Q$;Q$
906 LPRINT : LPRINT " TOTAL SALES: $";TAB 23-LEN Q$;Q$
910 PRINT " TOTAL TAXES: $";TAB 23-LEN A$;A$
912 LPRINT " TOTAL TAXES: $";TAB 23-LEN A$;A$
915 PRINT : LET G=FN D(G+X): LET Q$=FN Q$(G,STR$ G)
920 PRINT " GRAND TOTAL: $";TAB 23-LEN Q$;Q$
925 LPRINT : LPRINT " GRAND TOTAL: $";TAB 23-LEN Q$;Q$
930 PRINT : LPRINT : LPRINT
935 PRINT FLASH 1;AT 12,4;"PROGRAM TERMINATED": STOP : STOP
1000 BEEP 0.1,22: BEEP 0.1,20
1010 RESTORE : FOR Z=0 TO 7: READ Y,C: POKE USR "A"+Z,Y: POKE USR "B"+Z,C: NEXT Z: GO TO 20
2000 DATA 0,24,0,48,127,96,127,255,127,255,115,248,115,248,127,240
9000 LET M=1: DIM Z$(1200,25): GO TO 1000
9999 SAVE "cashreg" LINE 9000