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
/
schreibmaschine
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
12KB
|
383 lines
1 rem ***************************
2 rem * schreibmaschine 10/86 *
3 rem * bertram hafner *
4 rem * bischof-ulrich-str.12 *
5 rem * 8934 grossaitingen *
6 rem ***************************
9 clr
10 rem maske
11 poke53280,0:poke53281,11:print"[147]"+chr$(14);:nb$="b-deutsch ":gosub349
14 gosub37:poke53272,(peek(53272)and240)+12:printchr$(14);chr$(8);
15 print"[144] [182][180][171][176][179][146][177][178] [172][146][154] [160][174][167][146][171][178][177][173][191][167][176][174][167][146][171][173][176][146][177][160][160][144] [187][146][155][170] 5 [144][170][187]1";
16 print" [182][180][187][177][179][179][146] [188][146][154] [163][183][184][162][185][175][164][160][160][164][175][185][162][146][184][183][163] [144] [190][146][155] 75[170][144][170][187]3";
17 print"[146] [182][180][169][171][146][178][174][173][190][160][146][160][154][208][201][195][193] [220][189][169][178][166][146][220][144] [160][146] [179][166][191][146][191][170] _";
18 print"[189][146]=[170] [173][176][146][171][176][166][179][160][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][160][146][160][185][155][162][144][146][184][183][170][187]5";
19 print" [170] [179][146][177][189][179][146]/[172][173][174][167][146] [166][168][174][167][146][171][177][176][146][160][160][146][155][176][191][146][178][167][144] [170] [160][146] [183][155][184][144][146][162][185][170] ";
20 print" [170] [177][146][178][173][176][179][146] [176][191] [155][173][146][177][173][166][177]> 1[144][188][160][146][191][178][177][173][179][146][170][187]6[160][146][191][166][191][167][146][169][170][187]7";
21 print" [170] [166][191][146]/[174][176] [160][146][155] [144][160][146][177][176][146][179] [170] [160][146][155][172][178][171][167][146][169][144][170][187]8";
22 print"[175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][146]";
26 print," bitte warten[144]"
27 print" [210][197][212][213][210][206][146]> [217]eilenschaltung und"
28 print," (mit f8) sofortiger [196]ruck"
29 print" [200][207][205][197]/[195][204][210][146]> [217]eile l:schen/einf@gen"
30 print" [195][212][210][204][146]> halten, bis gew@nschte":print," [211]chriftart erscheint"
31 print" [213]nterstreichen, [198]ett- ,[203]ursivschrift"
32 print" sind innerhalb der [217]eile wirksam,"
33 print" [211]chriftart und -breite nur yeilenweise."
35 nb$="m-schreib":gosub349:gosub37:goto43
37 open15,8,15:input#15,a1%:close15:ifa1%thenprint"[198]ehler beim [206]achladen":end
38 return
40 rem basic-ende
43 poke52,56:poke56,56:clr
45 rem haeufige var.
46 l%=5:r%=75:br%=0:b%=0:a%=1:k%=0:x%=0:n1%=0:n2%=0:rem reihenfolge n.aendern!
47 a$="":a1%=0:v%=0:f=55296:v=53248:s=54272:z%=1744:c%=0:cx%=0:cy%=0
48 v1=v+1:v6=v+16:v3=v+31:m1%=256:m2%=320:m3%=653:m4%=204:dr%=1:zl%=1
50 dimze(2):ze(0)=8:ze(1)=4:ze(2)=13.8:rem zeichenbreiten
51 dimz%(2):z%(0)=12:z%(1)=8:z%(2)=24:rem zeichenbreite kunst
52 dimm%(2),rt%(2):m%(0)=1:m%(1)=4:m%(2)=3:rt%(0)=12:rt%(1)=8:rt%(2)=24
80 rem bildschirm-druckercode-paare (max.58)
81 data0,125,25,122,26,121,27,92,29,91,58,124,59,123,60,59,62,58,89,90,90,89
82 data122,93
83 fori=0to23:reada:poke49610+i,a:next
100 rem sprite
101 fori=832to851:reada:pokei,a:next:fori=852to894:pokei,0:next
102 poke2040,13:pokev+39,15:pokev+21,1:pokev+29,1:pokev+27,1
110 rem druckercodes
112 dimd$(11):readsa%:poke50118,sa%
113 fori=0to11
114 reada:ifa<>-1thend$(i)=d$(i)+chr$(a):goto114
115 next
116 fori=0to5:fork=0to2:reada$:ifa$<>"*"thenpoke50119+4*i+k,val(a$)
117 nextk,i:rem an maschprg. uebergeben
120 rem ton
121 pokes+1,90:pokes+5,136:pokes+15,30:pokes+24,15
130 rem schriften/farben/glob
131 dimn$(12):fori=0to12:readn$(i):next
133 dimf$(7):fori=0to7:readf$(i):next
134 dimgl%(7):fori=0to7:readgl%(i):next
140 rem funktionen
141 deffnz(x)=32-(16+int(x/10))*(x>9):rem zehner
142 deffne(x)=x-int(x/10)*10+48:rem einer
143 deffna(x)=(zl%+66)*m1%+x:rem adr.im textspeicher
150 rem start
151 cx%=11:cy%=9:gosub303:print"[212]aste dr@cken!"
152 poke198,0:wait198,1:poke650,128:gosub421
200 rem **** hauptprogramm ****
203 poke198,0:poke204,0
204 sys49421:c%=peek(49454):ifpeek(198)=0thengosub371
206 ifpeek(v3)thengosub803
208 ifpeek(m3%)and6thengosub501:goto203
209 geta$:ifa$=""then208
210 a1%=asc(a$):ifa1%=160thena$=" ":goto210
211 ifa1%<32ora1%>218ora1%=95ora1%=92thengosub505:goto203
212 ifa1%>125thenifa1%<192thenifa1%<>186thengosub511:goto203
213 ifx%>118thengosub803:goto208
215 printf$(u%);a$;:pokefna(128+c%),u%:poke212,0:goto204
299 :
300 rem ___ unterprogramme ___
301 rem cursor setzen
302 cx%=0:cy%=18:rem home
303 poke211,cx%:poke214,cy%:sys58640:return:rem beliebig
310 rem cursorpos c%
313 sys49421:c%=peek(49454):return
320 rem neue zeile
321 sys49896:pokem4%,1:sys49421:gosub302:sys49848:sys49263:return
322 gosub321
323 poke49191,zl%+66:poke1243,fnz(zl%):poke1244,fne(zl%)
324 sys49192:sys49928:return
330 rem ascii/bildschirm
331 as=as+64*(as>63andas<96)+128*(as>191):return
335 rem schrift nachladen/vertauschen
336 k=0:fori=0to10:ifmid$(n$(k%),i+1,1)<>chr$(peek(34688+i))thenk=1
337 next:return
338 ifn$=n$(k%)thenreturn
339 gosub336:ifk=0ork%<2then347
340 sys50743:gosub336:ifk=0then347
341 nb$=n$(k%):gosub349:gosub431:ifa1%thenk%=0:n$=n$(0):return
345 ifk%=10andnr%<>1thennb$="b-griechisch ":gosub349:goto348
346 ifk%=11andnr%<>2thennb$="b-kyrillisch ":gosub349:goto348
347 ifnr%thennb$="b-deutsch ":gosub349
348 return
349 sys57812nb$,8,1:poke780,0:sys65493:return
350 rem schirmzeile loesch
353 poke204,1:fori=18to20:poke781,i:sys59903:next:gosub302:return
360 rem schirm loeschen
361 poke204,1:fori=9to23:poke781,i:sys59903:next:gosub302:return
370 rem zeichenzahl/grafiklaenge/zeilenende
371 sys49976
372 ifk%<2theno%=(r%-l%)*ze(br%):v%=(x%-(c%>x%)*(c%-x%))*8/ze(br%)+l%:goto381
373 n%=m1%*n2%+n1%:ifx%=0thenn%=0:goto375
374 ifk%=2thenifbr%=0thenn%=n%*.75:rem anpassung prop. an kunstschrift
375 v%=n%/z%(br%)+l%:o%=8*(r%-v%+x%)
377 ifc%>x%thenv%=(n%+(c%-x%)*(peek(34592)and31)*(1-(br%=0)*(k%=2)/4))/z%(br%)+l%
381 q%=o%/m2%:p%=o%-m2%*q%:p1%=p%/m1%
382 pokev,p%-m1%*p1%:pokev6,p1%:pokev1,q%*8+194
383 poke1084,fnz(v%)or128:poke1085,fne(v%)or128:return
385 rem globale einstellung
386 gosub321:gosub361:gosub302:pokev+21,0:poke198,0
387 print"[179][166][191][146][191][176][166][177] [177][173][176][146][174][179][146][177][166][166][171][176][146][179] [187][171][146][177][178]? ([187]1-[187]7,[189][169][178][166][146])"
388 ifpeek(653)and4thena1%=0:printn$(k%):goto392
389 geta$:ifa$=""then388
390 a1%=asc(a$)-132:ifa1%<1ora1%>7then399
391 print"[187]";str$(2*a1%-1+7*(a1%>4))
392 cx%=0:cy%=20:gosub303:print"[190][191][176][146] [173][146][177][173][166][177] ";zl%; "[191][173][174]";
393 inputb$:ifb$=""then399
394 a2%=val(b$):iflen(b$)>2orstr$(a2%)<>" "+b$ora2%<zl%then392
395 a3%=peek(fna(gl%(a1%))):ii=zl%:ifa2%>66thena2%=66
396 zl%=a2%:ifpeek(fna(248))=0thena2%=a2%-1:goto396
397 poke(fna(gl%(a1%))),a3%:ifzl%>iithenzl%=zl%-1:goto397
398 print"[169][191][176][179][146][178][191][146][166][166][173][177][178][177] [172][173][177][174][177] [173][146][177][173][166][177][176][146] !";:poke198,0:wait198,1
399 goto486
400 rem farbe in kopf
403 fori=dtoe:pokef+i,f%*15:next:return
410 rem print ab zl%
411 poke198,0:gosub322:gosub821:ifdr%=0thengosub606
412 a3%=zl%:ifpeek(198)thenpoke198,0:goto416
413 gosub371:ifx%=0thenifpeek(fna(504))=0then416
414 gosub701:ifa3%=zl%then416
415 goto412
416 gosub821:goto690
420 rem text loesch
421 nn$=" ":gosub496:gosub361
422 sys49330:gosub371:gosub302:sys49776:zl%=1:gosub323:poke198,0:gosub803:return
430 rem fehler
431 open15,8,15:input#15,a1%,b$,a2%,a3%:close15:ifa1%=0thenreturn
432 ifa1%=62theniflo%=1thenb$="[169][146][177][189][179][146] [176][146][173][167][146][171][179][146] [190][191][146][178][171][176][176][146][172][177][176][146]":goto437
433 ifa1%=62thenb$="[177][146][178][191][146][179][178][176][167][167][172][173][174][167][146] [177][173][176][146][166][177][179][177][176][146]"
434 ifa1%=72thenb$="[172][173][174][167][146] [190][191][146][166][166]"
435 ifa1%=74thenb$="[172][173][174][167][146] [177][173][176][146][166][177][179][177][176][146]"
436 ifa1%=63thenb$="[176][146][176][167][177] [190][177][178][179][177][191][177][176][146]"
437 gosub353:gosub302:printa1%;b$;
438 poke198,0:wait198,1:sys49192:return
450 rem load
451 in$="[166][191][146][176][172]> ":gosub491:ifnn$=" "then486
453 gosub496:gosub422:nb$="[211]-"+nn$:lo%=1:gosub349:gosub431:lo%=0
456 zl%=1:goto486
460 rem save
461 in$="[174][176][190][177]> ":gosub491:ifnn$=" "then486
462 gosub496:a$="[211]-"+nn$:ii=67
464 ii=ii+1:ifpeek(ii*m1%+248)<>0andii<135then464
465 ifpeek(ii*m1%+253)=0thenii=ii-1:ifii>1goto465
466 poke251,0:poke252,67:poke253,0:poke254,ii+1
467 fori=0to12:poke49573+i,asc(mid$(a$,i+1,1)):next
468 sys49586:gosub431:goto486
470 rem $
471 gosub361:cx%=0:cy%=10:gosub303
472 sys50538:gosub431:ifa1%=0thenprint" [173][146][177][173][166][177][176][146] [187][178][177][173]";
473 poke198,0:wait198,1:goto486
480 rem file loesch
481 in$="[187][173][166][177] [166][168][174][167][146][171][177][176][146]> ":gosub491:ifnn$=" "then486
482 a$="[211]-"+nn$:open1,8,15,"s:"+a$:close1
483 gosub431:goto486
485 rem zurueck
486 pokev+21,1:sys49776:gosub323:gosub821:poke198,0:gosub302:return
490 rem input
491 pokev,88:pokev1,204:pokev6,0:ifnn$=""thennn$=" "
492 gosub321:gosub361:gosub302:print"[146]";in$;"([176][146][176][167][177]) ":cy%=19:gosub303
493 printnn$;:fori=1to13:print"[157]";:next:inputa$:iflen(a$)>20then492
494 nn$=left$(a$+" ",11):return
495 rem nn$ schreiben
496 fori=0to10:as=asc(mid$(nn$,i+1,1))
498 gosub331:poke1275+i,as:next:return
500 rem tasten
501 sc%=peek(m3%):pokem4%,1
502 ifsc%and4then651:rem ctrl
503 ifsc%and2then515:rem c=
504 return
505 ifa1%=13then701
506 ifa1%=17then641
507 ifa1%=19then631
508 ifa1%=20then621
509 ifa1%=29then551
510 ifa1%=95then386
511 ifa1%<133thenreturn
512 ona1%-132goto561,571,611,591,563,573,581,606,701,514,514,514,646,514,636,626
513 ifa1%=157then556
514 return
515 fori=0to6:pokef+4+i*40,15:next:pokef+169,15:pokef+247,15:fori=1to80:next:poke198,0
516 ifpeek(m3%)and2then518
517 geta$:ifa$=""then516
518 fori=0to6:pokef+4+i*40,0:next:pokef+169,0:pokef+247,0:ifa$="k"then541
519 ifa$="u"then531
520 ifa$="f"then601
521 ifa$="l"then451
522 ifa$="s"then461
523 ifa$="i"then471
524 ifa$="d"then481
525 ifa$="t"then421
526 ifa$="p"then411
527 goto690
530 rem unter
531 u=1-u:u%=u%and254oru:d=2:e=3:f%=u:f%=u:gosub403:goto690
540 rem kursiv
541 ku=1-ku:u%=u%and253or(2*ku):d=82:e=83:f%=ku:gosub403:ifkuthenifk%>1then541
542 goto690
550 rem crsr rechts
551 gosub313:ifc%<119thenprint"";:sys49848
553 ifpeek(203)=2then551
554 return
555 rem crsr links
556 gosub313:ifc%then:print"[157]";:sys49848
558 ifpeek(203)=2then556
559 return
560 rem li rand
561 ifl%>r%-10then690
562 l%=l%+1:goto565
563 ifl%=0then690
564 l%=l%-1
565 poke1058,fnz(l%):poke1059,fne(l%)
566 ifpeek(203)<>4then690
567 ifpeek(653)and1then563
568 goto561
570 rem re rand
571 ifr%>79then690
572 r%=r%+1:goto575
573 ifr%<l%+10then690
574 r%=r%-1
575 poke1098,fnz(r%):poke1099,fne(r%)
576 ifpeek(203)<>5then690
577 ifpeek(653)and1then573
578 goto571
580 rem breit
581 br%=br%+1:ifbr%=3thenbr%=0
582 ifbr%=2thenifk%=1ork%=2then581
583 gosub823:goto690
590 rem blocksatz
591 b%=1-b%:gosub828:goto690
600 rem fett
601 fe%=1-fe%:u%=u%and251or(4*fe%):d=42:e=43:f%=fe%:gosub403
602 iffe%thenifbr%=2thenifk%<3then601
603 goto690
605 rem druck ein/aus
606 dr%=1-dr%:d=272:e=d+4:f%=dr%:gosub403:goto690
610 rem abstand
611 a%=a%+1:ifa%=4thena%=0
613 gosub829:goto690
620 rem del
621 gosub313:ifc%thenprint"[157]";:sys49848:sys49263:sys49530:ifpeek(203)=0then621
622 return
625 rem inst
626 gosub313:pokem4%,1:sys49848:sys49263:sys49455:ifpeek(203)=0then626
628 return
630 rem home (zei loeschen)
631 sys49375:sys49192:sys49928:gosub821:gosub302:return
635 rem clr (zeile einfuegen)
636 ifzl%=67then690
637 gosub313:pokem4%,1:sys49848:sys49263:sys49291:sys49192:sys49896
638 gosub302:return
640 rem crsr down
641 gosub313:ifc%<80thenprint"";:sys49848:return
642 ifzl%=67goto690
643 zl%=zl%+1:gosub322:ifpeek(203)=7then642
644 gosub822:gosub302:return
645 rem crsr up
646 gosub313:ifc%>39thenprint"[145]";:sys49848:return
647 ifzl%=1goto690
648 zl%=zl%-1:gosub322:ifpeek(203)=7thenifzl%>1then648
649 gosub822:gosub302:return
650 rem schriftart
651 k%=k%+1:ifk%=13thenk%=0
652 pokefna(120),k%:gosub680
660 fori=1to200:next:ifpeek(653)=4then651
665 nr%=peek(15064):ifk%>1ornr%thengosub338
670 n$=n$(k%)
675 ifk%=1ork%=2thenifbr%=2thengoto581
676 ifk%>1thenifkuthengoto541
677 goto690
680 fori=0to10:as=asc(mid$(n$(k%),i+1,1))
682 gosub331:poke1116+i,as:next:return
689 :
690 fori=1to100:next:gosub371:gosub803:return
700 rem ___ druck
701 gosub321:o%=0:mc%=0:ifb%=0orx%=0then715
702 rem block
703 d%=0:fori=0tox%-1:if(peek(z%+i)and127)=32thend%=d%+1:rem space-zahl
704 next:ifd%=0then790
705 ifk%>2then711
706 ifk%=2theno%=((r%-l%)*z%(br%)-n%)/5:goto708:rem bei prop
707 o%=(r%-l%)*ze(br%)/8-x%:rem bei pica,nlq
708 ifo%>d%oro%<0goto790
709 ifk%<3then715
710 rem block kunst
711 s%=peek(34592):lb%=s%and31:nn%=(r%-l%)*rt%(br%):mb%=lb%+(nn%-n%)/d%
712 ifmb%<5ormb%>23goto790
713 mc%=nn%-n%-(mb%-lb%)*d%:n%=nn%:n2%=n%/m1%:n1%=n%-n2%*m1%
715 ifdr%=0then730
716 close2:open2,4,sa%:poke781,2:sys65481:ifstthen795
717 print#2,d$(10)chr$(0)d$(11)chr$(0);:print#2,d$(9)+chr$(l%);:rem rand
718 ifx%=0thenprint#2,d$(0);:goto730
719 ifk%>2then741
720 print#2,d$(7)+chr$(9+3*a%);:rem abstand
721 ifk%=2thenprint#2,d$(11)chr$(1);:goto723:rem proport.
722 print#2,d$(8):rem pica
723 ifbr%thenprint#2,d$(br%);:rem breit/eng
724 ifk%=1thenprint#2,d$(10)+chr$(1):rem nlq
725 poke254,o%:sys50143:rem spaces fuer block/druckrout
728 print#2,d$(3);
730 ifzl%=67goto690
731 zl%=zl%+1:gosub323:ifa1%=13thengosub821:return
732 gosub830:return
740 rem kunstdruck
741 poke50442,mc%:ifb%thenpoke34592,(s%and224)+mb%:rem spacebreite aendern
750 print#2,d$(6)+chr$(1);:gosub780:print#2,chr$(0);
751 poke2,0:poke50320,0:poke50321,255:poke50318,0:sys50322:print#2,d$(0);
755 print#2,d$(6)+chr$(23);:ifpeek(50318)=0thenprint#2,d$(0);:goto760
756 gosub780:poke50321,0:sys50322:print#2,chr$(0)+d$(0);
760 print#2,d$(6)+chr$(1);:gosub780:print#2,chr$(0);:poke2,128:poke50320,255
761 poke50321,255:poke50318,0:sys50322:print#2,d$(0);d$(6)+chr$(2);
762 ifpeek(50318)=0thenprint#2,d$(0);:goto767
765 gosub780:poke50320,0:poke50321,0:sys50322:print#2,chr$(0)+d$(0);
767 print#2,d$(7)+chr$(7+4*a%)+d$(0);
770 ifb%thenpoke34592,s%:rem space normal
775 goto728
780 print#2,d$(5)+chr$(m%(br%))+chr$(n1%)+chr$(n2%);:return
790 gosub803:fork=1to8:b%=1-b%:rem kein blocksatz
791 d=232:e=d+4:f%=b%:gosub403:next:return
795 gosub353:print" [172][178][171][167][146][169][177][178] [177][173][176][146][174][167][146][171][176][166][179][146][177][176][146]!"
796 poke198,0:wait198,1:gosub353:gosub323:return
800 rem ton
803 pokes+4,20:pokes+4,21:return
820 rem kopfeinstellung
821 ifpeek(fna(248))=0thenreturn
822 poke1058,fnz(l%):poke1059,fne(l%)
823 poke1098,fnz(r%):poke1099,fne(r%)
824 forii=0to2:d=183+40*ii:e=d+4:f%=0:gosub403:next
825 d=183+40*br%:e=d+4:f%=1:gosub403
828 d=232:e=d+4:f%=b%:gosub403
829 forii=0to1:d=153+ii*40:e=d+3:f%=0:gosub403:pokef+d+a%,1:next
830 ifn$=n$(k%)thenreturn
831 gosub680:nr%=peek(15064):ifk%>1ornr%thengosub338
832 n$=n$(k%):return
900 rem sprite
901 data0,12,0,0,12,0,0,12,0,0,12,0,0,12,0,0,12,0,255,255
910 rem druckercodes
911 data14 :rem sek.adr. (ascii ungewandelt)
912 data10,-1 :rem line feed
913 data14,-1 :rem breitschrift
914 data15,-1 :rem komprimiert
915 data18,-1 :rem kompr.aus
916 data20,-1 :rem breit aus
917 data27,42,-1 :rem grafikmodi
918 data27,51,-1 :rem abstand n/216
919 data27,65,-1 :rem abstand n/72
920 data27,80,-1 :rem pica
921 data27,108,-1:rem linker rand
922 data27,120,-1:rem nlq
923 data27,112,-1:rem prop
925 data27,45,1 :rem unter
926 data27,45,0 :rem aus
927 data27,52,* :rem italic
928 data27,53,* :rem aus
929 data27,69,* :rem fett
930 data27,70,* :rem aus
935 rem tst
940 rem schriften
941 data"[208][201][195][193] ","[206].[204].[209]. ","[208]roportion.","[193][206][212][201][209][213][193] ","[198]raktur "
942 data"[208]lanschrift","[195]andice ","[212]own ","[208]encil "
943 data"[199]rafik ","[197][204][204][200][206][201][203][200] ","[203][201][210][201][204][195][203][201] ","[195]itta "
950 rem farben/glob
951 data"[146]","","[146][159]","[159]","[146]","","[146][158]","[158]"
952 data252,247,248,251,250,247,248,249
953 rem tst