h56040
s 00729/00000/00000
d D 1.1 83/03/15 21:10:09 tes 1 0
c date and time created 83/03/15 21:10:09 by tes
e
u
4
U
t
T
I 1
#-h-  dd6211.c            local   06/27/82  14:57:02
#-h-  dd6211.rat          local   01/20/82  09:30
subroutine dd6211 (contrl, intin, rlin, intout, rlout)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: GSS-CORE device driver for Ramtek 6211 terminal        #
#                                                                      #
#     Input Parameters:                                                #
#            contrl(1-3) - An integer array with following information #
#                          contrl(1) - opcode for driver function      #
#                          contrl(2) - length of integer array intin   #
#                          contrl(3) - length of real input array rlin #
#                                                                      #
#            intin   -     Array of integer input parameters           #
#                                                                      #
#            rlin    -     Array of real input parameters              #
#                                                                      #
#     Output Parameters:                                               #
#            contrl(4-6) - contrl(4) - length of integer array intout  #
#                          contrl(5) - length of integer array rlout   #
#                          contrl(6) - count of any other control parms#
#                                                                      #
#             rlout  -     Array of integer output parameters          #
#                                                                      #
#     Routines Called:                                                 #
#             Dr6211 - move/draw for Ramtek 6211 terminal              #
#             gdevot - put out a character to the device               #
#             gdstot - put out a character string to the device        #
#             dc6211 - color changing on ramtek terminal               #
#             dm6211 - emulate markers for ramtek terminal             #
#             itoch  - convert integer to character string             #
#             gimnmx - bounds checking function for integers           #
#             inside - find point inside polygon                       #
#                                                                      #
########################################################################
 
include mgsdef
 
# local defines
define(X_LIMITS_RAM6211,639.)             # Terminal width
define(Y_LIMITS_RAM6211,479.)             # Terminal heigth
define(OUTLINE,1)                         # Is the polygon outlined?
 
integer contrl(1),intin(1),intout(1)
real rlin(1),rlout(1)
 
integer opcode, i, ipos, len, icnvt(3), gimnmx, solid(8),
        txtout(7), litwid(5), lithgt(5), bighgt(5), bigwid(5),
        lstyle(8), setup1(66), setup2(57), stopgr(22), newfrm(13),
        bcolor(7), box(5), flood(6),
        ginok, tries, line(16), report(6), curoff(5), curon(5)
 
real temp, xcoord, ycoord, xy(2)
 
integer cl6211(48)
 
include mgscom
 
common /cm6211/ cl6211
 
equivalence (xy(1), xcoord), (xy(2), ycoord)
 
#            Set narrow text width [CDW]
data litwid / LBRACK, BIGC, BIGD, BIGW, RBRACK /
 
#            Set small text heigth [CDH]
data lithgt / LBRACK, BIGC, BIGD, BIGH, RBRACK /
 
#            Set large text width [SDW]
data bigwid / LBRACK, BIGS, BIGD, BIGW, RBRACK /
 
#            Set large text heigth [SDH]
data bighgt / LBRACK, BIGS, BIGD, BIGH, RBRACK /
 
#            Text output  /[TEXT <SP> " /
data txtout /LBRACK, BIGT, BIGE, BIGX, BIGT, SPACE, DQUOTE/
 
#            Line style /[PSET <SP> 0 ]/
data lstyle /LBRACK, BIGP, BIGS, BIGE, BIGT, SPACE, DIG0, RBRACK/
 
#            Set a solid line style
data solid /LBRACK, BIGP, BIGS, BIGE, BIGT, SPACE, DIG0, RBRACK/
 
#            Flood a panels interior
data flood / LBRACK, BIGF, BIGI, BIGL, BIGL, RBRACK/
 
#
#            Set up -
#               Turn cgl on            [CGLON]
#               Turn off the alpha plane [VGRAPH]
#               Turn off command echo  [TTYOFF]
#               Initialize the device  [INIT]
#               Enable graphic mode    [GRAPH]
#               Set replacement mode   [CAD]
#                                      [SVSC 7]
#                                      [SSC 7]
#                                      [GPLANE 3]
#               Set color table 2
#                  [LCLUT 2,00,03,0C,30,3C,0F,33,3F,
#                           3F,33,0F,3C,30,0C,03,00]
data setup1/ LBRACK, BIGC, BIGG, BIGL, BIGO, BIGN, RBRACK,
             LBRACK, BIGV, BIGG, BIGR, BIGA, BIGP, BIGH, RBRACK,
             LBRACK, BIGT, BIGT, BIGY, BIGO, BIGF, BIGF, RBRACK,
             LBRACK, BIGI, BIGN, BIGI, BIGT, RBRACK,
             LBRACK, BIGG, BIGR, BIGA, BIGP, BIGH, RBRACK,
             LBRACK, BIGC, BIGA, BIGD, RBRACK,
             LBRACK, BIGS, BIGV, BIGS, BIGC, SPACE, DIG7, RBRACK,
             LBRACK, BIGS, BIGS, BIGC, SPACE, DIG7, RBRACK,
             LBRACK, BIGG, BIGP, BIGL, BIGA, BIGN, BIGE, SPACE, DIG3, RBRACK/
 
data setup2/ LBRACK, BIGL, BIGC, BIGL, BIGU, BIGT, SPACE, DIG2, COMMA,
             DIG0, DIG0, COMMA, DIG0, DIG3, COMMA, DIG0, BIGC, COMMA,
             DIG3, DIG0, COMMA, DIG3, BIGC, COMMA, DIG0, BIGF, COMMA,
             DIG3, DIG3, COMMA, DIG3, BIGF, COMMA, DIG3, BIGF, COMMA,
             DIG3, DIG3, COMMA, DIG0, BIGF, COMMA, DIG3, BIGC, COMMA,
             DIG3, DIG0, COMMA, DIG0, BIGC, COMMA, DIG0, DIG3, COMMA,
             DIG0, DIG0, RBRACK/
 
#            Stop graphics - /[VBOTH][TTYON][CGLOFF]/
data stopgr /LBRACK, BIGV, BIGB, BIGO, BIGT, BIGH, RBRACK,
             LBRACK, BIGT, BIGT, BIGY, BIGO, BIGN, RBRACK,
             LBRACK, BIGC, BIGG, BIGL, BIGO, BIGF, BIGF, RBRACK/
 
#            Erase the screen  /[ERASE][EWIN]/
data newfrm /LBRACK, BIGE, BIGR, BIGA, BIGS, BIGE, RBRACK,
             LBRACK, BIGE, BIGW, BIGI, BIGN, RBRACK/
 
#            Change the background color [SBG <SP> 0 ]
data bcolor /LBRACK, BIGS, BIGB, BIGG, SPACE, DIG0, RBRACK /
 
#            Create a box  [BOX <SP>
data box /LBRACK, BIGB, BIGO, BIGX, SPACE/
 
#           Turn the cursor on:  [SVC]
data curon / LBRACK, BIGS, BIGV, BIGC, RBRACK/
 
#           Turn the cursor off:  [CVC]
data curoff / LBRACK, BIGC, BIGV, BIGC, RBRACK/
 
#           Report the cursor position:  [RCUR]
data report / LBRACK, BIGR, BIGC, BIGU, BIGR, RBRACK/
 
 
opcode=contrl(OPCODE)
 
#
#  opcode move and draw
#
if  ((opcode == DRAW) | (opcode == MOVE)) {
   if ((opcode == DRAW) & (ndclrp ~= ndclrl))   { # Change the color
      i = ndclrl
      call dc6211 (i)
      }
   call dr6211 (opcode, rlin)
   }
#
#  opcode text
#
else if (opcode == TEXT) {
   if (ndclrp ~= ndclrt)  {  # Need to change the color
      i = ndclrt
      call dc6211 (i)
      }
 
   # On this device the letters [, ], and " can not appear
   # in a text string as ascii characters, they must be found
   # and converted into a star
 
   call gdstot (7,txtout)
 
   for (i=1; i<=contrl(INTEGER_IN_LENGTH); i=i+1)  { # Check each char
 
      if (intin(i) == RBRACK | intin(i) == LBRACK | intin(i) == DQUOTE)  {
         # One of the three non-print chars
         call gdevot (STAR)
         }
      else  {
         call gdevot (intin(i))
         }
      }
   call gdevot (DQUOTE)
   call gdevot (RBRACK)
   }
 
#
#  opcode marker
#
else if (opcode == MARKER) {
 
     if (ndclrp ~= ndclrm)  {  # Need a different color to do a marker
        i = ndclrm
        call dc6211 (i)
        }
      # Set the line stlye to be solid
      call gdstot ( 8, solid)
      call dm6211 (intin, rlin)
 
      # Restore the users line style if it was not solid
      if (ndlntp ~= 1) {
         lstyle(7) = ndlntp + DIG0 - 1
         call gdstot ( 8, lstyle)
         }
      }
 
#
#   polygon edge style
#
else if (opcode == SET_POLYGON_EDGE_STYLE)  {
   ndedgs = intin(1)
   }
 
#
#   polygon
#
else if ( opcode == POLYGON)  {
   if (ndedgs == OUTLINE)  i = ndclrl  # Outline in current line color
   else                    i = ndclrf
 
   call dc6211 ( i)   # Set the polygon edge color
   # Set the line type to be solid
   call gdstot (8, solid)
 
   j = intin(1)   # Get the start of x-coordinates
   k = intin(2)   # Get the start of the y coordinates
   xcoord = rlin(j)
   ycoord = rlin(k)
   call dr6211 (MOVE, xy)  # Move to the first point
   for (i=2; i<=contrl(3); i=i+1)  {
      j = j + 1
      k = k + 1
      xcoord = rlin(j)
      ycoord = rlin(k)
      call dr6211 (DRAW, xy)
      }
   i = intin(1)
   j = intin(2)
   call inside ( contrl(3), rlin(i), rlin(j), xcoord, ycoord)
   call dr6211 (MOVE, xy)  # Move inside the polygon
 
   i = ndclrf
   call dc6211 (i)  # Set the interior fill color
 
   call gdstot (6, flood)
 
   # Restore the users dash pattern if it is not solid
   if (ndlntp ~= 1)  {
      lstyle(7) = ndlntp + DIG0 - 1
      call gdstot (8, lstyle)
      }
   }
 
#
#  opcode filled bar
#
else if (opcode == BAR_FILL) {
   if ( ndclrf ~= ndclrp )  {  # Need another color for the bar
      i = ndclrf
      call dc6211 (i)
      }
   call dr6211 (MOVE, rlin)  # Move to the lower left corner
 
   call gdstot (5, box)    # Use the box command on the terminal
 
   ipos = rlin(3) * X_LIMITS_RAM6211
   len = itoch (ipos, icnvt, 3, ierror)
   call gdstot (len,icnvt)
   call gdevot (COMMA)
   ipos = rlin(4) * X_LIMITS_RAM6211
   len = itoch (ipos, icnvt, 3, ierror)
   call gdstot (len, icnvt)
   call gdevot (RBRACK)
   }
 
#
#  opcode set fill color
#
else if (opcode == SET_FILL_COLOR) {
   ndclrf = gimnmx(intin(1), 0, 7)
   intout(1) = ndclrf      # Communicate which pattern was selected
   }
 
#
#  opcode text size
#
else if (opcode == TEXT_SIZE) {
   if (rlin(1) >= .021875)  { # Use the large character width
      call gdstot (5, bigwid)
      rlout(1) = .021875     # 14. / X_LIMITS_RAM6211
      }
   else {
      call gdstot (5, litwid)
      rlout(1) = .0109375    # 7. / X_LIMITS_RAM6211
      }
   # Now set text heigth
   if (rlin(2) >= .025)  {  # Use the large character heigth
      call gdstot (5, bighgt)
      rlout(2) = .025    #16. / X_LIMITS_RAM6211
      }
   else {
      call gdstot (5, lithgt)
      rlout(2) = .0125   # 8. / X_LIMITS_RAM6211
      }
   }
 
#
#  opcode line style
#
else if (opcode == LINESTYLE) {
   ndlntp  = gimnmx( intin(1), 1, 6)
   intout(1) = ndlntp
   lstyle(7) = ndlntp + DIG0 - 1
   call gdstot (8, lstyle)
   }
 
#
#    opcode new_frame
#
else if (opcode == NEW_FRAME) {
    call gdstot (13, newfrm)  # Clear the screen
    }
 
#
#   Set background color
#
else if (opcode == SET_BACKGROUND_COLOR) {
   intout(1) = gimnmx (intin(1), 0, 7)
   bcolor(6) = intout(1) + DIG0
   call gdstot ( 7, bcolor)
   }
 
#
#  Set line color
#
else if (opcode == SET_LINE_COLOR)  {
   ndclrl = gimnmx( intin(1), 0, 7)
   intout(1) = ndclrl
   }
 
#
#  Set text color
#
else if (opcode == SET_TEXT_COLOR)  {
   ndclrt = gimnmx ( intin(1), 0, 7)
   intout(1) = ndclrt
   }
 
#
#  Set marker color
#
else if (opcode == SET_MARKER_COLOR)  {
   ndclrm = gimnmx ( intin(1), 0, 7)
   intout(1) = ndclrm
   }
 
#
# Set device color
#
else if (opcode == COLOR)  {
   # Determine the new color index and place it in common
   # The command is given in BGR, not RGB
 
   i = gimnmx( intin(1), 0, 7)  # Index to set
   j = min1( rlin(3)*100./25., 3.)  # Place the blue in 0 - 3 range
   cl6211(3*i+1) = j + DIG0   	# This one is always in range 0 - 3
   j = min1( rlin(2)*100./25., 3.)  # Place green in 0 - 3 range
   k = min1( rlin(1)*100./25., 3.)  # Place red in 0 - 3 range
   j = j*4 + k  # Combine the red and green for 0 - 15 value
   i = 3*i + 2  # Calculate the subscript
   if (j > 9)  {  # Value will be in A - F range
      cl6211(i) = j + 55
      }
   else        {  # Just the integer number itself
      cl6211(i) = j + DIG0
      }
 
   call gdstot (9, setup2)  # Send the color table with the new index
   call gdstot (48, cl6211)
   }
 
#
#   inquire color index
#
else if (opcode == INQUIRE_COLOR_INDEX)  {
   # The color table is stored in BGR, not RGB
   i = gimnmx (intin(1), 0, 7)
   k = cl6211(3*i+1) - DIG0   # Get into range 0-3
   rlout(3) = float(k)/3.     # Get into range 0. - 1.
   k = cl6211(3*i+2)          # Get the color
   if (k <= DIG9)  {  # This is a number
      k = k - DIG0
      }
   else {  # It is a A - F
      k = k - 55
      }
   j = mod( k/4, 4)    # Need 2 bits
   rlout(2) = float(j)/3.
   j = mod( k, 4)  # Need the last 2 bits
   rlout(1) = float(j)/3.
   }
 
#
# opcode set_device_parameters
#
else if (opcode == SET_DEVICE_PARAMETERS) {
 
   # set up device capability array
 
   devcap(TEXT_CAP) = YES      # Text capability
   devcap(LINESTYLE_CAP) = 6   # Capable of 6 different linestyle
   devcap(COLOR_CAP) = 16      # Capable of 16 different colors
   devcap(TEXT_SIZE_CAP) = 100 # Capable of many different text sizes
   devcap(GIN_CAP) = YES       # Capable of graphic input
   devcap(MARKER_CAP) = 5      # Capable of 5 different markers
   devcap(POLYGON_FILL_CAP) = YES  # Capable of filling polygons
   devcap(BAR_FILL_CAP) = 16   # Capable of filling a rectangle
 
   # Initialize Device Driver globals
 
   zdlgax = X_LIMITS_RAM6211  # Set the length of the longest axis in device
                                #    units
   zdxlng = 1.0              # Set x and y axis lengths in NDC units
   zdylng = 0.75             # Y_LIMITS_RAM6211/X_LIMITS_RAM6211
 
   ndlntp = 1                # Default line type is solid
   ndclrl = 1                # Default line color is red
   ndclrm = 1                # Default marker color is red
   ndclrt = 1                # Default text color is red
   ndclrf = 1                # Default panel fill is red
   ndclrp = -1               # No color is active now
   ndedgs = OUTLINE          # Outline polygons with current line color
 
   zdxpos = 0.0              # Default position is at home
   zdypos = 0.0
   zdtxsz = 7.0 / X_LIMITS_RAM6211 # Set character width in common
   zdtysz = 8.0 / X_LIMITS_RAM6211 # Set character height in common
 
   do i = 1, 48  {  # Put the default color map in common
      cl6211(i) = setup2(i+9)
      }
 
   # initialize the terminal
   call gdstot (66, setup1)
   call gdstot (57, setup2)   # Initialize the color map
   }
 
#
#    get point
#
else if (opcode == GET_POINT) {
 
   contrl(4) = 0  # Initialize the output count
   tries = 0
   repeat {
      ginok = YES
      # Enable gin
      call gdstot (5, curon)
      call gdevot (NEWLINE)  # Force the buffer out
 
      call gdevin (k)          # Get one character to end the locate attempt
      call gdstot (5, curoff)  # Turn off the cursor
      call gdstot (6, report)  # Ask for the report
      call gdevot (NEWLINE)    # Force the buffer out
      call gdstin (16, line, i) # Get the report:   xxxxx,yyyyy
      if (i < 11)  ginok = NO  # If did not get enough - bad point
      tries = tries + 1
 
      }  until (ginok == YES | tries >= 3)
 
   # decode the data
   if (ginok == YES) {
      call chtoi (line, 1, i, istop)
      rlout(1) = i / X_LIMITS_RAM6211
      call chtoi (line, 7, i, istop)
      rlout(2) = i / X_LIMITS_RAM6211
      intout(1) = k  # return the key struck
      contrl(4) = 1
      }
   }
 
#
#     inquire screen size
#
else if (opcode == INQUIRE_SCREEN_SIZE) {
      rlout(1) = zdxlng
      rlout(2) = zdylng
      rlout(3) = X_LIMITS_RAM6211
      }
 
#
#  opcode escape
#
else if (opcode == ESCAPE) {
      j = contrl(INTEGER_IN_LENGTH)
      call gdstot (j, intin)
      }
#
#     stop graphics
#
else if (opcode == STOP_GRAPHICS) {
      call gdstot (22, stopgr)       # Terminate graphics
      }
 
return
end
#-t-  dd6211.rat          local   01/20/82  09:30
#-h-  dm6211.rat          local   03/24/82  11:21
subroutine dm6211 (marker,rlin)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: Place a marker at the current location on 6211 type    #
#               devices                                                #
#                                                                      #
#     Input Parameters:                                                #
#            marker - marker symbol index (1-5)                        #
#            rlin   - x/y location for marker                          #
#     Output Parameters:                                               #
#            none                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            dr6211 - RAMTEK 6211 move/draw routine                    #
#                                                                      #
########################################################################
 
include mgsdef
 
define (MARK_PERIOD,1)
define (MARK_PLUS,2)
define (MARK_STAR,3)
define (MARK_O,4)
define (MARK_X,5)
define (FULLSZ,.0125)
define (HALFSZ,.00625)
define (FPERSZ,.005)
define (HPERSZ,.0025)
 
integer marker
real rlin(1)
 
real fsize, hsize, x1, x2, y1, y2
real rxy(2), rxy1, rxy2
 
include mgscom
 
# The following equivalence statements are used to decrease the amount of code
#    necessary to access specific array elements. The arrays and the
#    variables equivalenced are listed below:
#
#       rxy(1) :: rxy1
#       rxy(2) :: rxy2
 
equivalence (rxy(1), rxy1), (rxy(2), rxy2)
 
 
   if (marker == MARK_PERIOD) {
      fsize = FPERSZ
      hsize = HPERSZ
      }
   else {
      fsize = FULLSZ
      hsize = HALFSZ
      }
 
   x1 = rlin(1) - hsize        #clip marker to device limits
   x2 = x1 + fsize
   y1 = rlin(2) - hsize
   y2 = y1 + fsize
   if ((amin1(x1,y1) < 0.0) | (x2 > zdxlng) | (y2 > zdylng)) return
 
   # output appropriate marker centered on location
 
   rxy1 = x1
   rxy2 = y1
   call dr6211 (MOVE, rxy)   # move to lower left corner of character cell
 
   if (marker == MARK_PERIOD | marker == MARK_O) {
      rxy1 = x2
      call dr6211 (DRAW, rxy)
      rxy2 = y2
      call dr6211 (DRAW, rxy)
      rxy1 = x1
      call dr6211 (DRAW, rxy)
      rxy2 = y1
      call dr6211 (DRAW, rxy)
      }
   else {
      if (marker == MARK_X | marker == MARK_STAR) {
         rxy1 = x2
         rxy2 = y2
         call dr6211 (DRAW, rxy)
         rxy2 = y1
         call dr6211 (MOVE, rxy)
         rxy1 = x1
         rxy2 = y2
         call dr6211 (DRAW, rxy)
         }
      if (marker == MARK_PLUS | marker == MARK_STAR) {
         rxy2 = y1 + hsize
         call dr6211 (MOVE, rxy)
         rxy1 = x2
         call dr6211 (DRAW, rxy)
         rxy1 = x1 + hsize
         rxy2 = y1
         call dr6211 (MOVE, rxy)
         rxy2 = y2
         call dr6211 (DRAW, rxy)
         }
      }
   call dr6211 (MOVE, rlin)     # Return the cursor position to the original
                                #    value
   return
end
#-t-  dm6211.rat          local   03/24/82  11:21
#-h-  dr6211.rat          local   01/20/82  09:30
subroutine dr6211 (opcode, rlin)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: GSS-CORE device driver move/draw for HP6211            #
#                                                                      #
#     Input Parameters:                                                #
#           opcode - driver function, either move/draw                 #
#                                                                      #
#            rlin    -     Array of real input parameters              #
#                                                                      #
#     Output Parameters: none                                          #
#                                                                      #
#     Routines Called:                                                 #
#            gdstot - put a character string to a device               #
#            gdevot - put a character to a device                      #
#            itoch  - convert an integer into a string of characters   #
#                                                                      #
########################################################################
 
include mgsdef
 
integer opcode
real rlin(1)
 
integer len, xcoord, ycoord, movdrw(6), iconvt(3)
 
include mgscom
 
data movdrw /LBRACK, BIGL, BIGI, BIGN, BIGE, LPAREN/ # [LINE(
 
   movdrw(6) = LPAREN                      # Always prepare to do a move
   if (opcode == DRAW) movdrw(6) = SPACE   # Change it for a draw
 
   zdxpos = rlin(1)
   zdypos = rlin(2)
   xcoord = int (zdxpos*zdlgax)       # convert coords to device space
   ycoord = int (zdypos*zdlgax)
 
   call gdstot (6, movdrw)
   len = itoch (xcoord,iconvt,3,ierr)
   call gdstot (len,iconvt)
   call gdevot (COMMA)
   len = itoch (ycoord,iconvt,5,ierr)
   call gdstot (len,iconvt)
   if (opcode == MOVE) call gdevot (RPAREN)
   call gdevot (RBRACK)
   return
end
#-t-  dr6211.rat          local   01/20/82  09:30
#-h-  dc6211.rat          local   03/24/82  11:21
subroutine dc6211 (color)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: Change the color on the Ramtek 6211 terminal           #
#                                                                      #
#     Input Parameters:                                                #
#            color - color to change to                                #
#     Output Parameters:                                               #
#            none                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            gdstot - output a string to the current device            #
#                                                                      #
########################################################################
 
include mgsdef
 
integer color
 
integer fcolor(7)
 
include mgscom
 
#    Set the foreground color
data fcolor / LBRACK, BIGS, BIGF, BIGG, SPACE, DIG0, RBRACK/  #  [SFG <SP> 0]
 
   ndclrp = color    # Set the current color
 
   fcolor(6) = color + DIG0
   call gdstot (7, fcolor)
   return
end
#-t-  dc6211.rat          local   03/24/82  11:21
#-t-  dd6211.c            local   06/27/82  14:57:02
E 1
