home *** CD-ROM | disk | FTP | other *** search
/ Brotikasten / BROTCD01.iso / geos / geos26.d64 / konverter (.txt) < prev    next >
Commodore BASIC  |  1995-08-05  |  4KB  |  151 lines

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