home *** CD-ROM | disk | FTP | other *** search
- 10 rem rs232 kommunikationsprogramm
- 20 rem geschrieben von m. mueller 88
- 30 rem -------------------------------
- 40 rem (c) 1988 by 64'er
- 50 :
- 60 print chr$(147);"moment..."
- 100 open 2,2,0,chr$(6)+chr$(0)
- 110 dim s(255):rem array fuer umwandlung c-64 zeichensatz ->ascii
- 120 for i=0 to 64: s(i)=i:next:rem steuer-, interpunktionszeichen u. zahlen
- 130 for i=65 to 90: s(i)=i+32:next:rem c-64kleinbuchstaben nach ascii
- 140 for i=91 to 192:s(i)=i:next:rem sonnstige zeichen
- 150 for i=193 to 218:s(i)=i-128:next:rem c64grossbuchstaben nach ascii
- 160 for i=219 to 255:s(i)=i:next:rem sonstige zeichen
- 170 s(20)=8:rem code fuer del nach ascii code fuer bs
- 200 :
- 210 dim a(255):rem array fuer umwandlung ascii zeichensatz->c 64
- 220 for i=0 to 64:a(i)=i:next
- 230 for i=65 to 90:a(i)=i+128:next:rem ascii grossbuchstaben nach c 64
- 240 for i=91 to 96:a(i)=i:next:rem wie zeile 140
- 250 for i=97 to 122:a(i)=i-32:next:rem ascii kleinbuchstaben ->c 64close
- 260 for i=123 to 255:a(i)=i:next
- 270 a(8)=20:rem ascii code fuer bs nach c 64 code fuer del
- 280 :
- 290 print chr$(147);:gosub 900
- 300 :
- 310 get a$:if a$="" then 400
- 320 print#2,chr$(s(asc(a$)));:print a$;:gosub 900
- 330 if a$=chr$(13) then print#2,chr$(10);:rem wenn cr, dann noch lf senden
- 340 goto 310
- 400 get#2,a$:if a$="" then 310
- 410 print chr$(a(asc(a$)));:gosub 900:goto 400
- 900 poke 212,0:rem anfuehrungszeichenmodus aus
- 910 return
-