#IrDAlog.bas
open "com1:",9600, ir as #5  
while 1
gosub AD
Ualt =U
draw -1
for x=1 to 158
gosub AD
draw x-1,150-Ualt/2,x,150-U/2
Ualt=U
t$=str$(U)+"    "
draw t$,75,60,2
next x
wend
close #5
end

sub AD
U=-1
while U=-1
  U =get$(#5,0)
wend
return

