1 REM +------------------------------+ 2 REM ! *** REGCASPR.BAS *** ! 3 REM ! VER. 1.5 1981-07-24 ! 4 REM ! (c)------- Jan Kristensen ! 5 REM ! Ekebergveien 88 ! 6 REM ! N-3080 HOLMESTRAND ! 7 REM ! NORGE ! 8 REM ! Tlf (033) 52521 ! 9 REM +------------------------------+ 10 DIM X$=8%,G$=1% : T1%=65008% : ; CHR$(12%) 11 ONERRORGOTO 11 : ; 'Angi DIMENSJON for RAD(MAX10) & KOLLONE(MAX26) '; : INPUT C%,G1% : C%=C%-1% : IF G1%>120% 11 12 N%=PEEK(65064%)*256%+PEEK(65063%)-PEEK(65057%)*256%-PEEK(65056%) : N%=N%-710% 13 DIM N$=140%,N1$=140% : G%=INT(N%/((C%+1%)*(G1%+6%))) : G%=G%-5% : X1$=CHR$(127%) 14 IF G%<1% 11 : DIM P$(G%,C%)=G1% : X$='L'+NUM$(C%+1%)+NUM$(G1%) 15 ; CHR$(12%,7%)CUR(10%,29%)J%' brukt'CUR(11%,29%)G%' roms'CUR(7%,18%)'0. TABUL-' : ; TAB(21%)'ERING' 16 ; CUR(3%,4%)'1. INMATNING (REC)'CUR(2%,32%)'DATO'CUR(5%,4%)'2. AVLESNING (PLAY)' 17 ; TAB(32%)'TID' : ; CUR(7%,4%)'3. S\KNING' 18 ; : ; TAB(4%)'4. LISTING'TAB(30%)'POSTER'CUR(10%,18%)'9. PRINT'CUR(11%,21%)'INDEX'CUR(11%,4%)'5. ENDRING' 19 ; CUR(13%,4%)'6. SORTERING' 20 ; CUR(15%,4%)'7. ENDRE DATO & TID' : ; : ; TAB(4%)'8. PRINT UT DATO/TID' 21 ; CUR(1%,0%)STRING$(39%,127%)CUR(18%,0%)STRING$(40%,127%); 22 ; CUR(0%,1%)'TAB:'T9%' >>REGISTER<< KODE:'X$ 23 FOR I%=1% TO 17% : ; CUR(I%,0%)X1$CUR(I%,39%)X1$CUR(I%,28%)X1$ : NEXT I% 24 FOR I%=29% TO 38% : ; CUR(5%,I%)X1$CUR(8%,I%)X1$CUR(12%,I%)X1$ : NEXT I% 25 ; CUR(19%,11%)'VELG ET SIFFER (0-9)' 26 ; CUR(7%,30%)T$+':'+RIGHT$(NUM$(100%+S1%),3%)CUR(3%,30%)D$ 27 B%=INP(56%) : IF B%=48% B%=58% 28 IF B%<49% OR B%>58% GOSUB 116 ELSE ON B%-48% GOTO 30,44,52,61,65,76,107,127,131,136 : GOTO 15 29 GOTO 26 30 GET G$ : POKE 32131%,702% 31 ; CUR(20%,0%)'Vil du spare p} KASSETT svar med (J)'; : GET G$ : IF G$='J' 40 32 IF J%<0% J%=0% 33 ; CHR$(12%,7%) : J%=1%+J% : A8%=0% : IF J%>G% 83 : X%=J% 34 FOR K%=0% TO C% : N$=STRING$(G1%,42%) : N$=N$+' '+'rad.'+NUM$(K%+1%) 35 GOSUB 91 : IF ASC(N$)=13% AND K%=0% J%=J%-1% ELSE 36 : GOTO 15 36 GOSUB 95 : P$(J%,K%)=N$ : H%=J% : A8%=A8%+2% : NEXT K% : GOSUB 38 37 GOTO 39 38 FOR A9%=2% TO 17% : ; CUR(A9%,2%)SPACE$(25%) : NEXT A9% : RETURN 39 GOTO 33 40 ; : ; 'STILL INN KASSETTEN for OPPTAK og TRYKK p} en TANGENT n}r du er klar'; : GET G$ 41 POKE 32145%,716%,705%,711%,722%,709%,722%,32% : PREPARE X$ ASFILE 1% : ; #1%,J% 42 FOR R%=1% TO J% : FOR K%=0% TO C% : ; #1%,P$(R%,K%); : ; #1% : ; CUR(13%,31%)'LAGRET'CUR(14%,31%)R% 43 ; CUR(15%,31%)'Poster'; : NEXT K% : NEXT R% : CLOSE 1% : GOTO 15 44 GET G$ : POKE 32387%,702% 45 ; CUR(20%,0%)'STILL INN KASSETTEN p} PLAY og' : ; 'TRYKK p} en TANGENT.' : GET G$ 46 ONERRORGOTO 97 47 POKE 32401%,712%,709%,718%,724%,709%,722% : OPEN X$ ASFILE 1% : INPUT #1%,J% : J%=J%+H% 48 ; CUR(13%,29%)(G%-H%)' roms'CUR(14%,29%)J%-H%'brukes'CUR(15%,30%)'av filen' : IF J%>G% J%=G% 49 FOR R%=H%+1% TO J% : FOR K%=0% TO C% : INPUTLINE #1,N1$ : ; CUR(10%,29%)R%' brukt' 50 P$(R%,K%)=LEFT$(N1$,LEN(N1$)-2%) : NEXT K% : NEXT R% : CLOSE 1% : H%=J% 51 GOTO 14 52 GET G$ : POKE 32643%,702% 53 ; CUR(20%,0%)'Skriv den S\KTE TEKSTEN:'; : INPUTLINE N$ 54 IF ASC(N$)=13% ; CHR$(12%) : GOTO 15 55 P1%=0% : FOR R%=1% TO J% : FOR K%=0% TO C% 56 P%=INSTR(1,P$(R%,K%),LEFT$(N$,LEN(N$)-2%)) : IF P%=0% 59 57 GOSUB 85 : P1%=1% : GET G$ : GOSUB 38 : IF ASC(G$)=13% ; CHR$(12%) : GOTO 15 58 IF ASC(G$)=42% U%=1% : GOSUB 85 : ; : U%=0% 59 NEXT K% : NEXT R% : IF P1%>0% ; CUR(20,0)SPACE$(39) : GOTO 53 ELSE ; CUR(20,0)'ER IKKE I REGISTERET'SPACE$(20%); 60 ; CHR$(7%) : FOR I=1 TO 4000 : NEXT I : ; CUR(20%,0%)SPACE$(39%) : GOTO 53 61 GET G$ 62 FOR R%=1% TO J% : GOSUB 85 : GET G$ : GOSUB 38 : IF ASC(G$)=13% ; CHR$(12%) : GOTO 15 63 IF ASC(G$)=42% U%=1% : GOSUB 85 : U%=0% 64 NEXT R% : GOTO 15 65 GET G$ : POKE 32171%,702% 66 ONERRORGOTO 15 : ; CUR(29%,0%)'Vilket POSTnr. vil du endre i '; : INPUT N$ 67 IF ASC(N$)<14% 15 : R%=VAL(N$) 68 IF R%<1% OR R%>J% 66 69 FOR K%=0% TO C% : ; : ; TAB(LEN(NUM$(X%))+4%)P$(R%,K%); : NEXT K% : ; 70 FOR K%=0% TO C% : ; : GOSUB 98 : IF K%<>0% 72 71 IF N$='BORT' 74 72 IF ASC(N$)=0% ; P$(R%,K%) ELSE P$(R%,K%)=N$ 73 NEXT K% : GOTO 66 74 J%=J%-1% : FOR R%=R% TO J% : FOR K%=0% TO C% : P$(R%,K%)=P$(R%+1%,K%) 75 NEXT K% : NEXT R% : H%=J% : GOTO 66 76 GET G$ : POKE 32427%,702% : ; CUR(19%,0%)SPACE$(38%) 77 ONERRORGOTO 77 : ; CUR(19%,0%)'ETTER VILKEN RAD 1 -';C%+1%; : INPUT N$ : IF VAL(N$)<1% OR VAL(N$)>C%+1% 77 78 C1%=VAL(N$)-1% : POKE 32431%,723%,719%,722%,724%,709%,722%,709%,722%,32% 79 FOR I%=1% TO J%-1% : FOR N%=I%+1% TO J% : IF P$(I%,C1%)
0% 86 ELSE GOSUB 38 : ; CUR(2%,2%)'Nr.'R%CUR(3%,2%)SPACE$(25%) 86 FOR K%=0% TO C% : IF U%>0% ; #U%' '; : GOTO 87 ELSE ; #U%CHR$(127%); : GOTO 89 87 IF R%<10% ; #U%TAB(T9%)' 'R%' '; ELSE IF R%<100% ; #U%TAB(T9%)' 'R%' '; ELSE ; #U%TAB(T9%)R%' '; 88 GOTO 90 89 ; #U%TAB(2%)' '; : GOTO 90 90 ; #U%P$(R%,K%) : NEXT K% : IF C%>0% ; #U% : RETURN ELSE RETURN 91 ; CUR(2%+A8%,0%)'Nr.'X%' 'N$ : ; TAB(LEN(NUM$(X%))+4%); : N1$=N$ : INPUTLINE N$ : ; 92 IF ASC(N$)=13% 94 ELSE N$=LEFT$(N$,LEN(N$)-2%) 93 IF LEN(N$)>G1% ; : ; TAB(23%)'FOR LANG TEKST';CHR$(7%) : N$=N1$ : GOTO 91 94 RETURN 95 IF ASC(N$)=13% N$=SPACE$(G1%) 96 RETURN 97 J%=H% : ; CUR(22%,10%)'FEIL P] AVLESNING !'CHR$(7%) : FOR I=0 TO 5000 : NEXT I : GOTO 15 98 ; P$(R%,K%) : N$=P$(0%,0%) : G$=' ' : G2%=LEN(P$(R%,K%)) : A%=0% 99 GET G$ : IF ASC(G$)=13% 105 : IF ASC(G$)<>8% 102 100 IF LEN(N$)=0% 99 101 ; G$;SPACE$(1%);G$; : N$=LEFT$(N$,LEN(N$)-1%) : GOTO 99 102 IF ASC(G$)<>9% 104 : IF A%+1%>G2% 99 : A%=A%+1% 103 G$=MID$(P$(R%,K%),A%,1%) 104 ; G$; : N$=N$+G$ : GOTO 99 105 IF LEN(N$)<=G1% 106 : N$=LEFT$(N$,G1%) : ; CHR$(7%)' FOR LANG TEKST !' 106 ; : RETURN 107 GET G$ : POKE 32683%,702% : ; CUR(20%,8%)'D for dato ___ T for tid' 108 ; TAB(8%); : GET G$ : IF G$='D' 109 : IF G$='T' 111 ELSE 15 109 POKE 32693%,708%,705%,724%,719% : ; TAB(8%)'DDMM]]'; : INPUT V$ : IF LEN(V$)>6% 109 110 D$=LEFT$(V$,2%)+'-'+MID$(V$,3%,2%)+'-'+RIGHT$(V$,5%) : GOTO 15 111 ONERRORGOTO 111 : POKE 32700%,724%,713%,708% : ; TAB(23%)'TT,MM,SS'; : INPUT H1%,M1%,S1% : GOSUB 112 : GOTO 15 112 Z=H1%*3600+M1%*60+S1% : Z1%=Z*50/256 113 Z%= NOT (50*(Z-Z1%/50%*256)) 114 Z1%= NOT Z1% 115 POKE 65008%,Z%,Z1%,SWAP%(Z1%) : RETURN 116 D%=0% 117 IF (PEEK(T1%) AND 4%)=0% 116 118 FOR I%=0% TO 2% : Z%(I%)=255% XOR PEEK(T1%+I%) : NEXT I% 119 Z=((Z%(2)*256)+Z%(1))*5.12+Z%(0)/50 120 IF Z>86400 THEN Z=Z-86400 : D%=D%+1 : GOTO 120 121 H1%=Z/3600 : Z=Z-3600*H1% : M1%=Z/60 : S1%=Z-60%*M1% 122 IF D%<>0% GOSUB 112 123 T$=RIGHT$(NUM$(100%+H1%),3%)+':'+RIGHT$(NUM$(100%+M1%),3%) : RETURN 124 POKE 32454%,724%,754%,761%,747%,747%,672%,672% 125 POKE 32582%,682%,672%,742%,751%,754%,672%,672% 126 POKE 32710%,720%,722%,713%,718%,724%,709%,722% : RETURN 127 GET G$ : GOSUB 124 : POKE 31955%,702% : GET G$ : IF ASC(G$)=42% U%=1% ELSE U%=0% 128 OPEN 'PR:' ASFILE U% 129 ; #U%TAB(T9%/2%)CHR$(14%)'DATO:'+D$+' Kl.'+T$':'RIGHT$(NUM$(100%+S1%),3%) 130 ; #U%CHR$(15%) : ; #U% : CLOSE U% : U%=0% : GOTO 15 131 GET G$ : POKE 32057%,702% : GOSUB 124 : GET G$ : IF ASC(G$)=42% U%=1% ELSE U%=0% 132 OPEN 'PR:' ASFILE U% 133 IF T9%=0% T8%=2% ELSE T8%=T9% 134 ; #U%TAB(T8%)' NR. NAVN FIL LOC. Kass.nr.' : ; #U%TAB(T8%)' ================================' : ; #U% 135 CLOSE 1% : U%=0% : GOTO 15 136 GET G$ : POKE 32657%,702% : ; CUR(7%,20%)SPACE$(8%)CUR(8%,21%)SPACE$(7%)CUR(7%,21%)'TAB'; : INPUT T9% : GOTO 15