' essai de connection sur kim1 TTY ' via port parallele LPT2 ' bit sortie en 14 = Error ' bit entree en 2 = D0 ' screen 9 cls dim mes(1000) Lp=&h278 Timer Off $event off 'l1: 'out lp+2,32 'locate 2,2 'k=inp(lp) and &h0001 '?using "recoit ###";k 'goto L1 pt=1 call emet(&h7F) l2: a$=inkey$ if a$<>"" then call emet(asc(a$)) a$="" end if '?pt; if (inp(Lp)and 01)=1 then call recoit end if if Pt>1 then ?mes(Pt); decr Pt end if goto L2 stop k!=0 x=1 Mtimer while k!<300000 If (inp(Lp) and &h0001)=1 then Pset(x,200),3 else Pset(x,100),2 end if k!=k!+1 incr x if x>600 then x=1 a$=inkey$ wend stop Sub Emet(car) ' 1 start shared Lp Out Lp+2,34 for t=0 to 100:next t Out LP+2,32 ' 8 data for i=7 to 0 step -1 if (car and 2^i)=2^i then Out Lp+2,34 '?"1"; for t=0 to 100:next t Out LP+2,32 else '?"0"; for t=0 to 100:next t end if next i ' 2 stop Out Lp+2,34 for t=0 to 100:next t for t=0 to 100:next t Out LP+2,32 '? end sub Sub Recoit shared LP,car,Pt,mes() car=0 for t=0 to 100:next t for i=7 to 0 step -1 if (Inp(lp) and 01)=1 then car=car+2^i for t=0 to 100:next t else for t=0 to 100:next t end if next i for t=0 to 100:next t for t=0 to 100:next t mes(Pt)=car Pt=Pt+1 end Sub