home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Brotikasten
/
BROTCD01.iso
/
geos
/
geos26.d64
/
konverter
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-08-05
|
4KB
|
151 lines
1000 REM * GEOWRITE TEXTKONVERTER *
1010 REM * F.W. (C)03.1989 *
1020 POKE53280,2:POKE53281,9:POKE646,7
1030 DIMZ$(255),K(23)
1040 GOSUB2080
1050 GOSUB1960
1060 PRINT" 1 = GEOS-TEXT ERZEUGEN":PRINT
1070 PRINT" 2 = TABELLE AENDERN":PRINT
1080 PRINT" 3 = TABELLE LADEN":PRINT
1090 PRINT" 4 = TABELLE SPEICHERN":PRINT
1100 PRINT" 5 = ENDE":PRINT
1110 PRINT:PRINT" BITTE WAEHLEN !"
1120 GETW$:W=VAL(W$):IFW<1ORW>5THEN1120
1130 GOSUB1960
1140 OPEN1,8,15,"I:0":GOSUB2050
1150 ONWGOSUB1170,1770,1860,1910,2130
1160 CLOSE1:GOTO1050
1170 PRINT" BITTE GEBEN SIE DEN NAMEN DES ZU"
1180 PRINT" KONVERTIERENDEN TEXTES EIN !"
1190 PRINT:INPUTAT$
1200 GOSUB1960
1210 PRINT" WIEVIELE ZEICHEN PRO SEITE (1-4580) ?":PRINT
1220 INPUTAZ
1230 IFAZ<1ORAZ>4580THEN1200
1240 OPEN2,8,2,AT$+",R":GOSUB2050
1250 M$="TEXT-DUMMY"
1260 PRINT#1,"S:";M$+"*"
1270 OPEN3,8,3,M$+STR$(SZ+1)+",S,W":GOSUB2050
1280 FORI=0TO23
1290 PRINT#3,CHR$(K(I));:NEXTI
1300 P=0
1310 GET#2,T$:IFT$=""THENT$=CHR$(0)
1320 S=ST AND64:T=ASC(T$)
1330 IFT<161ORT>170THEN1430
1340 T1=T:T=69
1350 IFT1=161THENT1=79:GOTO1420
1360 IFT1=165THENT1=65:GOTO1420
1370 IFT1=166THENT1=85:GOTO1420
1380 IFT1=168THENT1=207:GOTO1420
1390 IFT1=169THENT1=193:GOTO1420
1400 IFT1=170THENT1=213:GOTO1420
1410 IFT1=167THENT1=83:T=T1
1420 PRINT#3,Z$(T1);
1430 PRINT#3,Z$(T);
1440 IFSTHEN1460
1450 P=P+1:IFP<AZTHEN1310
1460 PRINT#3,CHR$(0);:CLOSE3
1470 X$=M$+STR$(SZ+1):GOSUB1610
1480 E$=C$:F$=D$
1490 X$="DUMMY":GOSUB1610
1500 OPEN5,8,5,"#":GOSUB2050
1510 PRINT#1,"U1";5;0;ASC(C$);ASC(D$)
1520 PRINT#1,"B-P";5;SZ*2+2
1530 PRINT#5,E$;F$;
1540 PRINT#1,"U2";5;0;ASC(C$);ASC(D$)
1550 CLOSE5:SZ=SZ+1:GOSUB1960
1560 PRINT" ANZAHL SEITEN: ";SZ
1570 IFSZ=63ANDS=0THENPRINT:PRINT" TEXT ZU LANG !":GOTO1590
1580 IFS=0THEN1270
1590 PRINT#1,"S:";M$;"*"
1600 CLOSE2:RETURN
1610 OPEN4,8,4,"#":GOSUB2050
1620 A$=CHR$(18):B$=CHR$(1)
1630 A=ASC(A$):B=ASC(B$)
1640 PRINT#1,"U1";4;0;A;B
1650 GET#4,A$,B$
1660 FORI=0TO7
1670 K=0:PRINT#1,"B-P";4;I*32+3
1680 PRINT#1,"B-P";4;I*32+3
1690 GET#4,C$,D$
1700 IFD$=""THEND$=CHR$(0)
1710 FORJ=1TOLEN(X$)
1720 GET#4,W$
1730 IFW$=MID$(X$,J,1)THENK=K+1:NEXTJ
1740 IFK=LEN(X$)THEN1760
1750 NEXTI:GOSUB2050:GOTO1630
1760 CLOSE4:RETURN
1770 INPUT" QUELLCODE-NUMMER ";Q
1780 IFQ<0ORQ>255THEN1770
1790 PRINT:PRINT" ZUGEORDNETER GEOS-CODE: ";ASC(Z$(Q))
1800 NC=ASC(Z$(Q))
1810 PRINT:PRINT" NEUER GEOS-CODE: ":PRINT
1820 INPUT" (RETURN=UEBERNEHMEN, 0=ENDE)";NC
1830 IFNC<1ORNC>255THEN1850
1840 Z$(Q)=CHR$(NC):GOSUB1960:GOTO1770
1850 RETURN
1860 INPUT" NAME DER TABELLE";NT$
1870 OPEN2,8,2,NT$+",S,R":GOSUB2050
1880 FORI=0TO255
1890 GET#2,Z$(I):NEXTI
1900 CLOSE2:RETURN
1910 INPUT" NAME FUER DIE NEUE TABELLE";NT$
1920 OPEN2,8,2,NT$+",S,W":GOSUB2050
1930 FORI=0TO255
1940 PRINT#2,Z$(I);:NEXTI
1950 CLOSE2:RETURN
1960 PRINTCHR$(147)
1970 PRINTTAB(9);"**********************"
1980 PRINTTAB(9);"* *"
1990 PRINTTAB(9);"* TEXT-KONVERTER *"
2000 PRINTTAB(9);"* *"
2010 PRINTTAB(9);"**********************"
2020 PRINTTAB(9);"* F.W.(C)03.1989 *"
2030 PRINTTAB(9);"**********************"
2040 PRINT:PRINT:RETURN
2050 INPUT#1,F,FT$,FT,FS
2060 IFF<>0THENPRINT:PRINT" ";FT$:STOP
2070 RETURN
2080 RESTORE:FORI=0TO255
2090 READZ:Z$(I)=CHR$(Z):NEXTI
2100 READZ:IFZ=-1THEN2120
2110 PRINT:PRINT" FEHLER IN DATAS":STOP
2120 FORJ=0TO23:READK(J):NEXTJ:RETURN
2130 GOSUB1960
2140 PRINT" SICHER ? (J/N)"
2150 GETA$:IFA$=""THEN2150
2160 IFA$="J"THENSYS64738
2170 IFA$="N"THENRUN
2180 END
2190 REM DEKODIER-DATEN
2200 DATA32,32,32,32,32,32,32,32,32,32
2210 DATA32,32,32,13,32,32,32,32,32,32
2220 DATA32,32,32,32,32,32,32,32,32,32
2230 DATA32,32,32,33,34,35,36,37,38,39
2240 DATA40,41,42,43,44,45,46,47,48,49
2250 DATA50,51,52,53,54,55,56,57,58,59
2260 DATA60,61,62,63,64,97,98,99,100,101
2270 DATA102,103,104,105,106,107,108,109,110,111
2280 DATA112,113,114,115,116,117,118,119,120,121
2290 DATA122,91,92,93,94,13,96,65,66,67
2300 DATA68,69,70,71,72,73,74,75,76,77
2310 DATA78,79,80,81,82,83,84,85,86,87
2320 DATA88,89,90,123,124,125,126,127,32,32
2330 DATA32,32,32,32,32,32,32,32,32,32
2340 DATA32,32,32,32,32,32,32,32,32,32
2350 DATA32,32,32,32,32,32,32,32,32,32
2360 DATA32,32,32,32,32,32,32,32,32,32
2370 DATA32,32,32,32,32,32,32,32,32,32
2380 DATA32,32,32,32,32,32,32,32,32,32
2390 DATA32,32,32,65,66,67,68,69,70,71
2400 DATA72,73,74,75,76,77,78,79,80,81
2410 DATA82,83,84,85,86,87,88,89,90,123
2420 DATA124,125,126,127,32,32,32,32,32,32
2430 DATA32,32,32,32,32,32,32,32,32,32
2440 DATA32,32,32,32,32,32,32,32,32,32
2450 DATA32,32,32,32,32,32,-1
2460 REM KOPF-DATEN
2470 DATA24,0,48,1,64,0,144,0,224,0
2480 DATA48,1,48,1,48,1,48,1,48,1
2490 DATA23,9,0,0