    begin
      string (255) file
      string (1) key
      integer   adr, adr1, pos, conad, type, start,end, flag, pattern, j, cnt
      integer  dummy1,dummy2
    !  %externallongrealfnspec cputime %alias "S#CPUTIME"
      longreal  call overhead, t0, t inline, t call
    !  %externalroutinespec emas3string(%stringname vec,val)
    !  %externalroutinespec emas3integer(%stringname vec,%integername val)
    !%external %routine %spec CONNECT %alias "s#connect"(%string (255) FILE,
    !   %integer MODE, HOLE, PROT, %integername CONAD, TYPE, START, END, FLAG)
      externalintegerfnspec  connect (string (127) file, integername  start, length,
                                      integer  flags)
     externalintegerfnspec  readin(string (*)name  file,
                                   integer  extraPages,
                                   integername  base,top,fend,limit)

      externalroutinespec  prompt(string (255) prompt string)
      externalintegerfnspec  search(integer  start,finish,key)
      externalintegerfnspec  count(integer  start,finish,key)
    !  t0 = cputime
    !  call overhead = cputime - t0
      prompt("File:")
      read(file)
      start = 0
      flag = readin(file,0,dummy1,conad,end,dummy2)
      write(flag,0)and   newline and  stop  unless  flag=0
      cycle
        prompt("Key?")
        read(key)
        pattern = char no(key,1)
    !    t0 = cputime
        cnt = count(conad+start,end,pattern) {%for j = 999,-1,0
    !    t call = cputime - t0 - call overhead
    !   t0 = cputime
    !   %for j = 999, -1, 0 %cycle
    !      adr = conad+start
    !      adr = adr + 1 %while adr <= conad+end %and byteinteger(adr) # pattern
    !   %repeat
    !   t inline = cputime - t0 - call overhead
    !   print fl(t inline,8); print fl(t call,8); newline
    !   %if adr1 = 0 %then printstring("Not Found") %else %c
    !     write(adr-conad-start,0) %and write(adr1-conad-start,10)
        write(cnt,0)
        new line
      repeat
    endofprogram