
                               					20-May-1983 10:30:06	VAX-11 FORTRAN V3.2-37              Page   1
								 5-May-1983 08:52:12	CAD$VOLSET:[GARY.STATS.SOURCE]CRTAXIS.FOR;18

0001    !
0002    !			  COPYRIGHT (c) 1982 BY
0003    !	      MOSTEK CORPORATION, CARROLLTON TX
0004    !
0005    ! This software is furnished under a license and may be used and  copied
0006    ! only  in  accordance  with  the  terms  of  such  license and with the
0007    ! inclusion of the above copyright notice.  This software or  any  other
0008    ! copies  thereof may not be provided or otherwise made available to any
0009    ! other person.  No title to and ownership of  the  software  is  hereby
0010    ! transferred.
0011    !
0012    ! The information in this software is subject to change  without  notice
0013    ! and  should  not  be  construed  as  a commitment by MOSTEK
0014    ! CORPORATION.
0015    !
0016    ! MOSTEK assumes no responsibility for the use or  reliability  of  its
0017    ! software on equipment which is not supplied by MOSTEK.
0018    !
0019     
0020    !++
0021    ! FACILITY:
0022    !   MOSTEK CORPORATION
0023    !
0024    ! ABSTRACT: CRT_AXIS  an X or Y axis on a VT-100 compatible terminal
0025    !   
0026    !
0027    ! ENVIRONMENT: VAX/VMS unpriv
0028    !   
0029    !
0030    ! AUTHOR: Gary Smith, CREATION DATE: 3/14/1983
0031    !
0032    ! MODIFIED BY:
0033    !
0034    !--
0035    !
0036    ! TABLE OF CONTENTS:
0037    !
0038    !
0039    ! INCLUDE FILES: none
0040    !
0041    !
0042    ! MACROS: none
0043    !
0044    !
0045    ! EQUATED SYMBOLS: none
0046    !
0047    !
0048    ! EXTERNAL REFERENCES:
0049    !
0050     
0051    !++
0052    ! FUNCTIONAL DESCRIPTION: CRT_AXIS takes the information and produces an
0053    !                         axis on the screen
0054    !
0055    !
0056    !
0057    ! FORMAL PARAMETERS:

                               					20-May-1983 10:30:06	VAX-11 FORTRAN V3.2-37              Page   2
								 5-May-1983 08:52:12	CAD$VOLSET:[GARY.STATS.SOURCE]CRTAXIS.FOR;18

0058    !        X_ORG      - The X coordinate of the axis origin.
0059    !        Y_ORG      - The Y coordinate of the axis origin.
0060    !        TITLE      - The label associated with this axis.
0061    !        AXIS_LEN   - The length of the axis (in inches).
0062    !        ORIENT     - The orientation of the axis (either 'H' or 'V')
0063    !        AXIS_MIN   - The value of the lowest point on the axis.
0064    !        AXIS_DELTA - The axis increment per inch.
0065    !
0066    !
0067    !
0068    ! IMPLICIT INPUTS: none
0069    !
0070    !
0071    !
0072    ! IMPLICIT OUTPUTS: a plot on the screen
0073    !
0074    !
0075    !
0076    ! ROUTINE VALUE and
0077    ! COMPLETION CODES: none
0078    !
0079    !
0080    !
0081    ! SIDE EFFECTS: none to date
0082    !
0083    !
0084    !
0085    !--
0086          SUBROUTINE CRT_AXIS(X_ORG,Y_ORG,TITLE,AXIS_LEN,ORIENT,
0087         .     AXIS_MIN,AXIS_DELTA,FORM)
0088     
0089          INTEGER HOURS
0090          CHARACTER*(*) TITLE, FORM, ORIENT*1
0091          REAL X_ORG, Y_ORG, AXIS_LEN, AXIS_MIN, AXIS_DELTA, FP_LABEL
0092          LOGICAL HOUR
0093    C----------------------------------------------------------------------*
0094    C      COMMON BLOCK                                                    *
0095    C----------------------------------------------------------------------*
0096          COMMON /SYSINFO/ IX_NEW,IY_NEW,X_ORIGIN,Y_ORIGIN,SCALE_FACTOR,
0097         .     X_RESOL,Y_RESOL,X_CURRENT,Y_CURRENT
0098    C----------------------------------------------------------------------*
0099    C      LOCAL VARIABLES                                                 *
0100    C----------------------------------------------------------------------*
0101          CHARACTER*9 TICK_MARK, AXIS_SYMB
0102          CHARACTER*7 LABEL      
0103          REAL DELTA_X, DELTA_Y, X_OFFSET, Y_OFFSET, X_LABEL, Y_LABEL
0104          INTEGER NUM_STEPS, NUM_BETWEEN
0105          DATA RND /1.0005/, SMALL /1.E-30/
0106    C...... First set up the parameters that depend upon orientation
0107          HOUR = .FALSE.
0108          IF(ORIENT.EQ.'H') THEN
0109            DELTA_X = 1.
0110            DELTA_Y = 0.
0111            X_OFFSET = -0.4
0112            Y_OFFSET = -0.3875
0113            X_LABEL = 0.5 * (AXIS_LEN - .1*LENGTH(TITLE))
0114            Y_LABEL = -1.0

CRT_AXIS                       					20-May-1983 10:30:06	VAX-11 FORTRAN V3.2-37              Page   3
								 5-May-1983 08:52:12	CAD$VOLSET:[GARY.STATS.SOURCE]CRTAXIS.FOR;18

0115            TICK_MARK = 'UPPER_T'
0116            AXIS_SYMB = 'SCAN5'
0117            NUM_STEPS = AXIS_LEN
0118            NUM_BETWEEN = 9
0119            HOUR = ( INDEX(FORM, '$HOUR') .NE. 0 )
0120            IF ( HOUR ) FORM = '(F5.2)'
0121          ELSE
0122            DELTA_X = 0.
0123            DELTA_Y = 1.
0124            X_OFFSET = -1.
0125            Y_OFFSET = 0.
0126            X_LABEL = -1.
0127            Y_LABEL = AXIS_LEN+2.
0128            TICK_MARK = 'RIGHT_T'
0129            AXIS_SYMB = 'V_BAR'
0130            NUM_STEPS = AXIS_LEN
0131            NUM_BETWEEN = 1
0132            END IF
0133            FP_LABEL = AXIS_MIN - AXIS_DELTA
0134    C...... Now set up the special variables needed
0135          AXIS_LABEL = AXIS_MIN
0136          X_AXIS = X_ORG
0137          Y_AXIS = Y_ORG
0138    C...... Plot a CROSS at the axis origin
0139          CALL CRT_SYMBOL_SPECIAL(X_AXIS,Y_AXIS,'CROSS')
0140    C...... Run through the number of tick marks
0141          DO 100 I = 1,NUM_STEPS
0142            FP_LABEL = FP_LABEL + AXIS_DELTA
0143            IF ( HOUR ) THEN
0144               FP_SAVE = FP_LABEL
0145               HOURS = FP_LABEL / 60
0146               FMINUTES = FP_LABEL - HOURS * 60
0147               HOURS = JMOD(HOURS, 24)
0148               FP_LABEL = HOURS + FMINUTES / 100.0 + 0.0001
0149               AXIS_LABEL = FP_LABEL
0150             END IF
0151            LABEL = '         '
0152            ENCODE (7,FORM,LABEL)  AXIS_LABEL
0153            IF ( HOUR ) THEN
0154               LABEL(3:3) = ':'
0155               FP_LABEL = FP_SAVE
0156            END IF
0157            CALL CRT_SYMBOL(X_AXIS+X_OFFSET,Y_AXIS+Y_OFFSET,LABEL)
0158    C...... Between tick marks plot the axis symbol
0159            DO 50 J = 1,NUM_BETWEEN
0160              X_AXIS = X_AXIS + .1*DELTA_X
0161              Y_AXIS = Y_AXIS + .3875*DELTA_Y
0162              CALL CRT_SYMBOL_SPECIAL(X_AXIS,Y_AXIS,AXIS_SYMB)
0163     50       CONTINUE
0164            X_AXIS = X_AXIS + .1*DELTA_X
0165            Y_AXIS = Y_AXIS + .3875*DELTA_Y
0166            AXIS_LABEL = AXIS_LABEL + AXIS_DELTA
0167            CALL CRT_SYMBOL_SPECIAL(X_AXIS,Y_AXIS,TICK_MARK)
0168    100     CONTINUE
0169    C...... Clean up at the end
0170          LABEL = '         '
0171          IF ( HOUR ) THEN

CRT_AXIS                       					20-May-1983 10:30:06	VAX-11 FORTRAN V3.2-37              Page   4
								 5-May-1983 08:52:12	CAD$VOLSET:[GARY.STATS.SOURCE]CRTAXIS.FOR;18

0172             FP_LABEL = FP_LABEL + AXIS_DELTA
0173             HOURS = FP_LABEL / 60
0174             FMINUTES = FP_LABEL - HOURS * 60
0175             HOURS = JMOD(HOURS, 24)
0176             FP_LABEL = HOURS + FMINUTES / 100.0 + 0.0001
0177             AXIS_LABEL = FP_LABEL
0178          END IF
0179          ENCODE (7,FORM,LABEL)  AXIS_LABEL
0180            IF ( HOUR ) THEN
0181               LABEL(3:3) = ':'
0182               FP_LABEL = FP_SAVE
0183            END IF
0184          CALL CRT_SYMBOL(X_AXIS+X_OFFSET,Y_AXIS+Y_OFFSET,LABEL)
0185          CALL CRT_SYMBOL(X_ORG+X_LABEL, Y_ORG+Y_LABEL,
0186         .     TITLE(1:LENGTH(TITLE)))
0187          RETURN
0188          END




PROGRAM SECTIONS

    Name				 Bytes   Attributes

  0 $CODE                                  765   PIC CON REL LCL   SHR   EXE   RD NOWRT LONG
  1 $PDATA                                  51   PIC CON REL LCL   SHR NOEXE   RD NOWRT LONG
  2 $LOCAL                                 288   PIC CON REL LCL NOSHR NOEXE   RD   WRT LONG
  3 SYSINFO                                 36   PIC OVR REL GBL   SHR NOEXE   RD   WRT LONG

    Total Space Allocated                 1140


ENTRY POINTS

    Address  Type  Name                                        References

  0-00000000       CRT_AXIS                                       86     


VARIABLES

    Address  Type  Name                            Attributes  References

 AP-0000001C@ R*4  AXIS_DELTA                                     86        91       133       142       166       172     
  2-00000050  R*4  AXIS_LABEL                                    135=      149=      152       166(2)=   177=      179     
 AP-00000010@ R*4  AXIS_LEN                                       86        91       113       117       127       130     
 AP-00000018@ R*4  AXIS_MIN                                       86        91       133       135     
  2-00000009  CHAR AXIS_SYMB                                     101       116=      129=      162A    

  2-00000028  R*4  DELTA_X                                       103       109=      122=      160       164     
  2-0000002C  R*4  DELTA_Y                                       103       110=      123=      161       165     
  2-00000064  R*4  FMINUTES                                      146=      148       174=      176     
 AP-00000020@ CHAR FORM                                           86        90       119       120=      152       179     
  2-00000020  R*4  FP_LABEL                                       91       133=      142(2)=   144       145       146     
							         148=      149       155=      172(2)=   173       174     
							         176=      177       182=    

CRT_AXIS                       					20-May-1983 10:30:06	VAX-11 FORTRAN V3.2-37              Page   5
								 5-May-1983 08:52:12	CAD$VOLSET:[GARY.STATS.SOURCE]CRTAXIS.FOR;18


  2-00000060  R*4  FP_SAVE                                       144=      155       182     
  2-00000024  L*4  HOUR                                           92       107=      119=      120       143       153     
							         171       180     
  2-0000001C  I*4  HOURS                                          89       145=      146       147(2)=   148       173=    
							         174       175(2)=   176     
  2-0000005C  I*4  I                                             141=    
  3-00000000  I*4  IX_NEW                          COMM           96     

  3-00000004  I*4  IY_NEW                          COMM           96     
  2-00000068  I*4  J                                             159=    
  2-00000012  CHAR LABEL                                         102       151=      152       154=      157A      170=    
							         179       181=      184A    
  2-00000044  I*4  NUM_BETWEEN                                   104       118=      131=      159     
  2-00000040  I*4  NUM_STEPS                                     104       117=      130=      141     

 AP-00000014@ CHAR ORIENT                                         86        90       108     
  2-00000048  R*4  RND                                           105D    
  3-00000010  R*4  SCALE_FACTOR                    COMM           96     
  2-0000004C  R*4  SMALL                                         105D    
  2-00000000  CHAR TICK_MARK                                     101       115=      128=      167A    

 AP-0000000C@ CHAR TITLE                                          86        90       113A      185(2)A 
  2-00000054  R*4  X_AXIS                                        136=      139A      157       160(2)=   162A      164(2)= 
							         167A      184     
  3-0000001C  R*4  X_CURRENT                       COMM           96     
  2-00000038  R*4  X_LABEL                                       103       113=      126=      185     
  2-00000030  R*4  X_OFFSET                                      103       111=      124=      157       184     

 AP-00000004@ R*4  X_ORG                                          86        91       136       185     
  3-00000008  R*4  X_ORIGIN                        COMM           96     
  3-00000014  R*4  X_RESOL                         COMM           96     
  2-00000058  R*4  Y_AXIS                                        137=      139A      157       161(2)=   162A      165(2)= 
							         167A      184     
  3-00000020  R*4  Y_CURRENT                       COMM           96     

  2-0000003C  R*4  Y_LABEL                                       103       114=      127=      185     
  2-00000034  R*4  Y_OFFSET                                      103       112=      125=      157       184     
 AP-00000008@ R*4  Y_ORG                                          86        91       137       185     
  3-0000000C  R*4  Y_ORIGIN                        COMM           96     
  3-00000018  R*4  Y_RESOL                         COMM           96     



LABELS

    Address   Label                                            References

  0-000001F1  50                                                 159       163#    
  0-00000220  100                                                141       168#    

CRT_AXIS                       					20-May-1983 10:30:06	VAX-11 FORTRAN V3.2-37              Page   6
								 5-May-1983 08:52:12	CAD$VOLSET:[GARY.STATS.SOURCE]CRTAXIS.FOR;18

FUNCTIONS AND SUBROUTINES REFERENCED

  Type  Name                                                   References

        CRT_SYMBOL                                               157       184       185     
        CRT_SYMBOL_SPECIAL                                       139       162       167     
   I*4  LENGTH                                                   113       185     
   I*4  LIB$INDEX                                                119     


  +----------------------------------------------+
  |           KEY TO REFERENCE FLAGS             |
  |   =   - Value Modified                       |
  |   #   - Defining Reference                   |
  |   A   - Actual Argument, possibly modified   |
  |   D   - Data Initialization                  |
  |  (n)  - Number of occurrences on line        |
  +----------------------------------------------+



COMMAND QUALIFIERS

  FORTRAN /DEBUG/OBJECT=OBJ:CRTAXIS/LIST=LIS:CRTAXIS/CONT=99/CROSS/NOOPT SRC:CRTAXIS

  /CHECK=(NOBOUNDS,OVERFLOW,NOUNDERFLOW)
  /DEBUG=(SYMBOLS,TRACEBACK)
  /STANDARD=(NOSYNTAX,NOSOURCE_FORM)
  /SHOW=(NOPREPROCESSOR,NOINCLUDE,MAP)
  /F77  /NOG_FLOATING  /I4  /NOOPTIMIZE  /WARNINGS  /NOD_LINES  /CROSS_REFERENCE  /NOMACHINE_CODE  /CONTINUATIONS=99


COMPILATION STATISTICS

  Run Time:           2.97 seconds
  Elapsed Time:       6.85 seconds
  Page Faults:        211
  Dynamic Memory:     824 pages
