1      character*5 function tk4014(ix,iy)
2      integer highx,highy,lowx,lowy,extrax,extray,extra
3c
4c     tektronix-4014
5c
6c     highx  = <bit-7> ... <bit-11> von ix
7c     highy  = <bit-7> ... <bit-11> von iy
8c     lowx   = <bit-2> ... <bit-6>  von ix
9c     lowy   = <bit-2> ... <bit-6>  von iy
10c     extrax = <bit-0> ... <bit-1>  von ix
11c     extray = <bit-0> ... <bit-1>  von iy
12c
13      highx=mod(ix/128,32)
14      highy=mod(iy/128,32)
15      lowx=mod(ix/4,32)
16      lowy=mod(iy/4,32)
17      extrax=mod(ix,4)
18      extray=mod(iy,4)
19c
20c     extra  <bit-0> <bit-1>  extrax
21c            <bit-2> <bit-3>  extray
22c
23      extra=4*extray+extrax
24c
25c
26c     tag bits <bit-6> <bit-5>
27c                 0       1      highx/y
28c                 1       0      lowx
29c                 1       1      lowy/extra
30c
31c
32      highx=highx+32
33c     set the 5. bit (beginning with bit 0)
34      highy=highy+32
35      lowx=lowx+64
36c     set the 6. bit (beginning with bit 0)
37      lowy=lowy+32+64
38c     set the 5.+6. bit (beginning with bit 0)
39      extra=extra+32+64
40c     set the 5.+6. bit (beginning with bit 0)
41c
42      tk4014=char(highy)//char(extra)//char(lowy)//
43     &        char(highx)//char(lowx)
44      return
45      end
46