home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 27
/
64er_Magazin_Sonderheft_27_19xx_Markt__Technik_de_Disk_2_of_2_Side_B.d64
/
zeicheneditor
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-10-26
|
5KB
|
174 lines
1 rem ********************************
2 rem * zeicheneditor 9/86 *
3 rem * fuer schreibmaschine *
4 rem * hafner, grossaitingen *
5 rem ********************************
6 poke52,56:poke56,56:clr:dimz1(24),z2(24)
7 fori=0to73:reada:poke49152+i,a:next:sys49158:rem versch/save
8 data0,160,0,192,0,192,173,0,192,172,1,192,133,95,132,96,173,2,192,172,3
9 data192,133,90,132,91,173,4,192,172,5,192,133,88,132,89,76,191,163,32,32
10 data32,32,32,32,32,32,32,32,32,162,8,32,186,255,169,11,162,39,160,192,32
11 data189,255,169,251,162,0,160,160,32,216,255,96
12 a$="[145][145][145][145]":fori=1to6:poke41847+i,asc(mid$(a$,i,1)):next:poke1,54:rem ready
13 sa%=14:rem sek.adr. (ungewandelt)
14 na=135*256:nb=136*256:nc=nb+128
15 sys57812"b-deutsch*",8,1:poke780,0:sys65493
17 poke53272,(peek(53272)and240)+12
18 printchr$(14);:print"[147][217]eicheneditor f@r '[211][195][200][210][197][201][194][205][193][211][195][200][201][206][197]'"
19 un$=" [185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185]":printun$
20 print" (l)ade [217]eichensaty":print" (e)rstelle neuen [211]aty(l:scht [211]peicher)"
21 print" (a)ltes [217]eichen ;ndern":print" (n)eues [217]eichen erstellen"
22 print" (s)peichere [211]aty":print" ([208])roportionalschrift ;ndern"
23 poke198,0:wait198,1:geta$:ifa$="a"thengosub700:goto30
24 ifa$="p"thengosub1100:goto18
25 ifa$="e"thengosub900:goto18
26 ifa$="l"thengosub800:goto18
27 ifa$="s"thengosub1000:goto18
28 ifa$<>"n"then23
29 fori=1to8:a$(i)=" ":b$(i)=a$(i):next
30 print"[147] [170][183][183][183][183][183][183][183][170][183][183][183][183][183][183][183][170][183][183][183][183][183][183][183][170]"
31 fori=1to8:print"a$(";i;")=";chr$(34);a$(i);chr$(34):next
32 fori=1to8:print"b$(";i;")=";chr$(34);b$(i);chr$(34):next
33 print" [170][175][175][175][175][175][175][175][170][175][175][175][175][175][175][175][170][175][175][175][175][175][175][175][170]":print"goto40"
34 print,"beliebige [212]aste verwenden!"
35 print,"[217]eilen mit '[210][197][212][213][210][206]' beenden!"
36 print,"ebenso den [194]efehl'goto 40'![145][145][145][145]"
37 end
38 :
39 :
40 gosub600
51 print" ([208])robeausdruck"
52 print" (n)ochmal ;ndern"
53 print" (s)peichern im [211]aty"
55 poke198,0:wait198,1
56 geta$:ifa$="p"thengosub200:goto40
57 ifa$="s"thengosub500:goto18
58 ifa$="n"then30
59 goto56
199 :
200 rem ____ probeausdruck
202 gosub600:print" bitte warten"
205 fori=1to24:z1(i)=0:z2(i)=0:next
210 close1:open1,4,sa%
225 a2$=chr$(27)+"3"+chr$(24)
228 gosub400
230 goto300
235 print#1,chr$(27)+"*"+chr$(m%)+chr$(96)+chr$(0);:return
240 fori=1to4
241 fork=1to24:print#1,chr$(z1(k));:next
242 next:return
260 fori=1to4
261 fork=1to24:print#1,chr$(z2(k));:next
262 next
265 return
300 print#1,a2$;
301 m%=1:gosub235:gosub240:m%=4:gosub235:gosub240:m%=3:gosub235:gosub240:print#1,chr$(10);
305 m%=1:gosub235:gosub260:m%=4:gosub235:gosub260:m%=3:gosub235:gosub260:print#1,chr$(10);
320 return
399 :
400 rem ____ daten ausrechnen
410 fori=1to24:z1(i)=0
411 fork=1to8:x%=asc(mid$(a$(k),i,1))
412 if(x%and127)=32then420
415 z1(i)=z1(i)+2^(8-k)
420 nextk,i
460 fori=1to24:z2(i)=0
461 fork=1to8:x%=asc(mid$(b$(k),i,1))
462 if(x%and127)=32then470
465 z2(i)=z2(i)+2^(8-k)
470 nextk,i
480 return
499 :
500 rem ____ zeichen speichern
505 gosub600
510 cx%=0:cy%=20:gosub651
511 ifas>255thenprint"[145]";:goto510
515 l=land31:print"[217]eichenl;nge(0-24) ";l;"[157][157][157][157][157]";:inputl
516 ifl>24thenprint"[145]";:goto515
520 print"unterschiebbar links unten(j/n) ";f$;"[157][157][157]";:inputf$
521 iff$<>"j"andf$<>"n"thenprint"[145]";:goto520
525 print"n;chstes unterschiebbar(0/4/8/12) ";u;"[157][157][157][157][157]";:inputu
526 ifuand243thenprint"[145]";:goto525
528 l=l+u*16:iff$="j"thenl=l+32
530 gosub400:poke(na+as),l
540 fori=0to23:poke(136+i)*256+as,z1(i+1):next
550 fori=0to23:poke(136+i)*256+128+as,z2(i+1):next
560 return
599 :
600 rem ____ zeilen loeschen
601 fori=0to5:poke781,18+i:sys59903:next
605 poke211,0:poke214,19:sys58640
610 return
649 :
650 rem ____ eingabe bildschirmcode
651 poke211,cx%:poke214,cy%:sys58640:print"[212]aste des [217]eichens? ";
652 geta$:ifa$=""then652
653 a1%=asc(a$):ifa1%<32ora1%>218ora1%=95ora1%=92then652
654 ifa1%>125anda1%<192anda1%<>186then652
655 printa$:as=peek(1024+cx%+20+cy%*40):return
699 :
700 rem ____ altes zeichen lesen
701 print"[147]";:cx%=1:cy%=4:gosub651
703 print" bitte warten!"
705 l=peek(na+as):f=(land32):u=(land192)/16:iff=32thenf$="j"
706 l=(land31):ifl=0then760
710 fori=1to24:z1(i)=peek((135+i)*256+as):next
711 fori=1to24:z2(i)=peek((135+i)*256+128+as):next
715 fori=1to8:a$(i)="":b$(i)="":next
720 fori=1to8:fork=1to24:ifz1(k)and2^(8-i)thena$(i)=a$(i)+"o":goto725
722 a$(i)=a$(i)+" "
725 nextk,i
730 fori=1to8:fork=1to24:ifz2(k)and2^(8-i)thenb$(i)=b$(i)+"o":goto735
732 b$(i)=b$(i)+" "
735 nextk,i
750 return
760 fori=1to8:a$(i)=" ":b$(i)=a$(i):next:return
799 :
800 rem ____ lade satz
805 print"[147] ";:gosub951
810 sys57812n$,8,1:poke780,0:sys65493:return
899 :
900 rem ____ speicher loeschen
901 print"[147]";
905 print" ";:gosub951
910 input" [198]orm des [213]nterstrichs(0,1..255)";un:print" bitte warten"
920 fori=nato160*256-1:pokei,0:next
921 fori=1to11:poke135*256+128+i-1,asc(mid$(n$,i,1)):next:pokena+128+11,un
930 return
949 :
950 rem ____ schriftname
951 input"[206]ame der [211]chrift";n$
952 n$=left$(n$+" ",11):return
999 :
1000 rem ____ satz speichern
1005 print"[147] [211]ave> ([211]chriftname)"
1006 n$="":fori=0to10:n$=n$+chr$(peek(na+128+i)):next
1007 print" ";n$;"[157][157][157][157][157][157][157][157][157][157][157][157][157]";:inputn$:gosub952
1008 fori=0to10:pokena+128+i,asc(mid$(n$,i+1,1)):next
1009 print" [198]orm des [213]nterstrichs (0,1..255)":print" ";str$(peek(na+128+11));
1010 input"[157][157][157][157][157]";un:pokena+128+11,un
1015 ea1=0:ea2=160
1016 open2,8,15,"s:"+n$:close2
1020 fori=0to10:poke49191+i,asc(mid$(n$,i+1,1)):next
1021 poke251,0:poke252,135:poke49219,ea1:poke49221,ea2:rem anfangs-/endadresse
1022 sys49202:rem save
1025 return
1099 :
1100 rem ____ prop. aendern
1102 n$="[208]roportion.":gosub810
1105 print"[147] [217]eichenl;ngen der [208]roportionalschrift":print" an [196]rucker anpassen"
1110 print" (siehe [212]abelle im [196]ruckerhandbuch!)":printun$
1115 bc=0
1120 ifbc=28orbc=31then1140
1121 ifbc=91thenbc=122
1122 ifbc=123then1150
1125 poke1265,bc:print"";:l=peek(na+bc)
1130 print"[204];nge "+left$(str$(l)+" ",3);
1135 input"[157][157][157][157]";l:ifl>30orl<1then1125
1136 pokena+bc,l
1140 bc=bc+1:goto1120
1150 print"alles richtig[160](j/n)?"
1155 poke198,0:wait198,1:geta$:ifa$<>"j"anda$<>chr$(13)then1115
1160 ea1=140:ea2=135:gosub1016
1170 return