include  "inc:util.imp"
include  "inc:fs.imp"

begin ; !CSD142B checkout aid, RWT Jan 86

constinteger  tbe=8,rd=4,rc=2,rbf=1


routine  load
integer  i
{}printsymbol('*')
  for  i = 1,1,10000 cycle ; repeat 
{}printsymbol('*')
  eths = 16_40; !Reset station
  for  i = 1,1,1000 cycle ; repeat 
  twait
  ethc = 16_02
  twait
  newline
end 

routine  restart
integer  i
  eths = 16_40
  for  i = 1,1,1000 cycle ; repeat 
  eths = 6
  etheropen(lsap,rdte<<8+rsap)
end 

routine  run
bytearray  buf(1:600)
integer  count
  cycle 
    exitif  testsymbol>=0
    if  dtx&1#0 start 
      count = etherread(0,buf(1),600)
      phex4(count)
      space and  phex2(buf(count)) for  count = 1,1,20
      newline
    finish 
  repeat 
end 

set terminal mode(nopage)
load
run
restart

endofprogram