      subroutine frames (ipr,j,icomp)                                   FRAM001
c ----------------------------------------------------------------------FRAM002
c     top, middle and botttom line of a frame in ascii chars            FRAM003
c     il+2 is the line width in characters                              FRAM004
c ----------------------------------------------------------------------FRAM005
c     This program module is part of the PhysiSoft X-ray Library        FRAM006
c     and may not be sold or reproduced for commercial purposes.        FRAM007
c     Although it has been tested carefully, there is no warranty       FRAM008
c     regarding accuracy or freedom from side-effects.                  FRAM009
c                   (C) 1986-1990 Bernhard Rupp                         FRAM010
c ----------------------------------------------------------------------FRAM011
      parameter (il=77)                                                 FRAM012
      character icomp*4, lh,lv,xl,xr,clt,crt,clb,crb                    FRAM013
                                                                        FRAM014
c --- definition of the frame components fchar (set 1:IBM, 2:ASCII) ----FRAM015
c     lh : line horizontal, lv : line vertical,   xl : cross left       FRAM016
c     xr : cross  right,    clt: corner left top, crt: corner right top FRAM017
c     clb: corner left bottom,  crb: corner right bottom                FRAM018
c ----------------------------------------------------------------------FRAM019
                                                                        FRAM020
      if (icomp.eq.'IBM ') then                                         FRAM021
         lh=char(205)                                                   FRAM022
         lv=char(179)                                                   FRAM023
         xl=char(198)                                                   FRAM024
         xr=char(181)                                                   FRAM025
         clt=char(213)                                                  FRAM026
         crt=char(184)                                                  FRAM027
         clb=char(212)                                                  FRAM028
         crb=char(190)                                                  FRAM029
      else                                                              FRAM030
         lh='-'                                                         FRAM031
         lv='|'                                                         FRAM032
         xl='+'                                                         FRAM033
         xr='+'                                                         FRAM034
         clt=xl                                                         FRAM035
         crt=xl                                                         FRAM036
         clb=xl                                                         FRAM037
         crb=xl                                                         FRAM038
      end if                                                            FRAM039
                                                                        FRAM040
      if (j.eq.1) then                                                  FRAM041
         write(ipr,'( 1x,80a1)') clt,(lh,i=1,il),crt                    FRAM042
      elseif(j.eq.2) then                                               FRAM043
         write(ipr,'(1x,80a1)') xl,(lh,i=1,il),xr                       FRAM044
      elseif(j.eq.3) then                                               FRAM045
         write(ipr,'(1x,80a1)') clb,(lh,i=1,il),crb                     FRAM046
      elseif(j.eq.4) then                                               FRAM047
         write(ipr,'(1x,80a1,/)') lv,(char(32),i=1,il),lv               FRAM048
      else                                                              FRAM049
         print*,'Invalid call to frames'                                FRAM050
      end if                                                            FRAM051
      end                                                               FRAM052
