home *** CD-ROM | disk | FTP | other *** search
/ ftp.update.uu.se / ftp.update.uu.se.2014.03.zip / ftp.update.uu.se / pub / rainbow / msdos / decus / RB140 / grlibfor.arj / GRAPHICS.DOC < prev    next >
Text File  |  1988-12-11  |  53KB  |  1,353 lines

  1.                Scribblers Notes for Graphics Toolkit
  2.                =====================================
  3.  
  4. Copyright (c) 
  5. 1984 Digital Equipment Co. ALL RIGHTS RESERVED.
  6.  
  7. Introduction
  8. ------------
  9.  
  10.  
  11. o These libraries are in the process of development and no respo
  12. nsibility can
  13.   be taken for results. 
  14.  
  15. o In lieu of proper doc
  16. umentation, use RAINBOW GRAPHICS OPTION, PROGRAMMER'S 
  17.   REFERENCE GU
  18. IDE o/n AA-AE36A-TV as a reference. The Library is based on the
  19.   sou
  20. rce examples shewn in this manual.
  21.  
  22. o The libraries were developed
  23.  on Rainbow 100B's and although support
  24.   has been put in for 100a's 
  25. there is a differences in that the number 
  26.   of colours and monocrome
  27.  intensities that can be simultaneously
  28.   displayed and the number th
  29. at are available to be displayed.
  30.  
  31.   Any feedback is welcome. Help
  32.  always is.
  33.  
  34.  
  35. Usage
  36. -----
  37.  
  38. o COORDINATES:
  39.  
  40.   The c
  41. oordinate system is based from the bottem left corner (0,0).
  42.  
  43.   Th
  44. e X-axis is measured in pixels (0- 383 medium resolution)
  45.                                    (0- 799 
  46. high resolution)
  47.   The Y-axis is measured in pixels (0-239)
  48.  
  49.   
  50. Be aware, though, that the both Line & Graphic text writing is done by a
  51.  
  52.   'cell' concept. 
  53.   
  54.   A Graphic Text cell is 10 x 8 pixels 
  55. oriented to the bottom LH corner.
  56.   A basic Text cell is 7 x 8 pixels
  57.  oriented to the upper right quadrant
  58.   therefore descenders (e.g the
  59.  hook of the letter y) will appear below the 
  60.   general base line of 
  61. the text string.
  62.  
  63.   To convert from NDC coordinates as used by GSX
  64. , use the following
  65.   factors:-
  66.               X coordinate (high resolution)    
  67. = X divided by 41
  68.               X coordinate (medium resolution)  = X divided by
  69.  86
  70.               Y coordinate                      = Y divided by 137
  71.  
  72. o CHARACTER SCALING:
  73.  
  74.  
  75.   Text writes can be scaled. The minimum dimension of a character 
  76. is 7 x 8 
  77.   pixels. The scale factor is temporary and will be refined
  78.  later. 
  79.   The width is calculated to match the height and so avoid t
  80. he long spindly 
  81.   characters one sees with GSX.
  82.  
  83.   Odd number 
  84. scale values give a multiple of 7 scan lines, even values are 3 
  85.   sc
  86. an lines higher than the nearest lower odd value.
  87.  
  88.   e.g.        scale 
  89. value          height          width
  90.                 t_sca_          (scan lines)      (pixels)
  91.               -----------        
  92. -----------      --------
  93.  
  94.                    1                  7              8
  95.                    2                  10
  96.                    3                  14
  97.                    4                  17
  98.  
  99.                    5                  21
  100.                    6                  24
  101.                    7                  28
  102.                    8                  31
  103.                    9                  35
  104.  
  105. o C
  106. OLOUR SCALING:
  107.  
  108.   The colour mixer (hue) scale for RGB intensities
  109.  is measured in (0-15)
  110.  
  111.   To convert from NDC colour scale values 
  112. as used by GSX, use the following
  113.   factor:-
  114.               colour_scale   = N
  115. DC_colour_scale divided by 63
  116.  
  117. o MARKER TYPES:
  118.  
  119.   Polymarker
  120. s are vector drawn shapes and the default size is that of a graphic
  121.  
  122.  character cell. 
  123.  
  124.   <m_col_>    colour number of Marker colour
  125.  
  126.  <m_type_>     marker type, see table below.
  127.   <m_sca_>    Marker scale, 
  128. see graphic text characters.
  129.   <m_tab_>    table of Marker shapes (stro
  130. ked characters)
  131.  
  132.   Polymarker types are predefined in <m_tab_> as 
  133. :-
  134.  
  135.   Number    shape        Description
  136.  
  137.  
  138.         \|/
  139.     0        -
  140. *-        Star shape
  141.         /|\
  142.  
  143.          |
  144.     1        -+-        Crosshair
  145.  
  146.          |
  147.  
  148.                 \ /
  149.     2         X        Tracking Cross
  150.         / \
  151.  
  152.  
  153.  
  154.     3                up    chevron (point on centre line)
  155.          /\
  156.  
  157.          \/
  158.  
  159.     4                down  chevron (point on centre line)
  160.  
  161.  
  162.         \
  163.     5    
  164.      >        right chevron (point on centre line)
  165.         /
  166.  
  167.           /
  168.  
  169.     6         <        left  chevron (point on centre line)
  170.           \
  171.  
  172.  
  173.  
  174.     7        []        open box (1 cell size)
  175.  
  176.  
  177.  
  178.         /\
  179.     8        \/
  180.         slanted open box
  181.  
  182.  
  183.  
  184.     9                indescribable (place with LA
  185. 50 graphics)
  186.  
  187.  
  188.  
  189.    10                indescribable (place with LA50 grap
  190. hics)
  191.  
  192.  
  193.          /\
  194.    11        /||\        up arrow
  195.          ||
  196.  
  197.  
  198.          ||
  199.    12        \||/        down arrow
  200.          \/
  201.  
  202.  
  203.    13        <=
  204. =        left arrow
  205.  
  206.  
  207.  
  208.    14        ==>        right arrow
  209.  
  210. ;ASSER
  211. T.ASM
  212. ;********************************************************************
  213. ;*                                                                  *
  214. ;*      f u n c t i o n     gdc_nb()                                *
  215. ;*                                                                  *
  216.  
  217. ;*      gdc_not_busy will put a harmless command into the GDC and   *
  218.  
  219. ;*      wait for the command to be read out of the command FIFO.    *
  220. ;
  221. *      This means that the GDC is not busy doing a write or read   *
  222. ;*      
  223. operation.                                                  *
  224. ;*                                                                  *
  225. ;*      entry:          none                                        *
  226. ;*      exit:           ax = 
  227. 0 if more than approx 74ms elapsed     *
  228. ;*                      without "gdc not busy"                      
  229. *
  230. ;********************************************************************
  231.  
  232. ;********************************************************************
  233. ;*                                                                  *
  234. ;*      f u n c t i o n      g_off_()                                *
  235.  
  236. ;*                                                                  *
  237. ;*      purpose:        disable graphics output                     *
  238. ;*                                                                  *
  239. ;********************************************************************
  240.  
  241.  
  242.  
  243. ;********************************************************************
  244. ;*                                                                  *
  245. ;*      f u n c t i o n      g_on_()                                 *
  246. ;*                                                                  
  247. *
  248. ;*      purpose:        enable graphics output                      *
  249. ;*                                                                  *
  250. ;********************************************************************
  251.  
  252.  
  253.  
  254. ;********************************************************************
  255. ;*                                                                  *
  256. ;*      f u n c t i o n s     a_mode_()                              *
  257. ;*                                                                  *
  258.  
  259. ;*      purpose:        set mode register to the value held in      *
  260. ;*                      gbm
  261. od                                       *
  262. ;*                                                                  *
  263. ;********************************************************************
  264.  
  265.  
  266. ;*****************************************************************************
  267. ;*                                                                           *
  268. ;*       f u n c t i o
  269.  n     a_fgbg_()                                        *
  270. ;*                                                                           *
  271. ;*       purpose:        Load the Foreground;Back
  272. ground Register             *
  273. ;*                                                                           *
  274. ;*****************************************************************************
  275.  
  276. ;*****************************************************************************
  277. ;*                                                                           *
  278. ;*       F U 
  279. N C T I O N    a_alups_()                                        *
  280. ;*                                                                           *
  281. ;*       purpose:        Set the ALU ; 
  282. Plane Select Register                 *
  283. ;*                                                                           *
  284. ;*****************************************************************************
  285.  
  286. ;*****************************************************************************
  287. ;*                                                                           *
  288. ;*       
  289. F U N C T I O N    a_gbmsk_()                                        *
  290. ;*                                                                           *
  291. ;*       purpose:        Set the gr
  292. aphics board mask to values held          *
  293. ;*                       in gbmskl_ and gbmskh_                              *
  294.  
  295. ;*                                                                           *
  296. ;*****************************************************************************
  297.  
  298. ;*****************************************************************************
  299. ;*                                                                           *
  300. ;*       F U N C T I O N    a_wmode
  301. _()                         *
  302. ;*                                                                           *
  303. ;*       purpose:       Juggle fgbg reg. & alups reg. t
  304. o make GDC            *
  305. ;*                      write the correct colours in the correct             *
  306. ;
  307. *                      manner to the bit map.                               *
  308. ;*                                                                           *
  309. ;*****************************************************************************
  310.  
  311. ;CIRCLE.ASM
  312. ;
  313. ************************************************************************
  314. ;*                                                                      *
  315. ;*      F U N C T I O N    circle_(centre_x, centre_y, radi
  316. us)           *
  317. ;*                                                                      *
  318. ;*      purpose:        draw a circle in either high or med
  319. ium res      *
  320. ;*                      by computing 'xy' points and then use           *
  321. ;*                      po
  322. lyfill[] to join them all up.                 *
  323. ;*                                                                      *
  324. ;*      entry:          8[bp] 'x' c
  325. entre co-ordinate.                   *
  326. ;*                      10[bp] 'y' centre co-ordinate.                  *
  327. ;*                      
  328. 12[bp] radius of circle on the 'y' axis.        *
  329. ;*                                                                      *
  330. ;************************************************************************
  331.  
  332. ;************************************************************************
  333.  
  334. ;*                                                                      *
  335. ;*      F U N C T I O N    arc_(x, y, radius, start_deg, end_d
  336. eg)        *
  337. ;*                                                                      *
  338. ;*      purpose:        draw the ARC specified. Start & end
  339.  degrees     *
  340. ;*                      are specified as integers in the range:         *
  341. ;*                              
  342. 0 to 359                                *
  343. ;*                                                                      *
  344. ;*      entry:           8[bp]  centre 'x'                              *
  345. ;*                      10
  346. [bp]  centre 'y'                              *
  347. ;*                      12[bp]  radius                                  *
  348. ;*                      14[bp]  arc star
  349. ting vector                     *
  350. ;*                      16[bp]  arc ending vector                       *
  351. ;*                                                                      *
  352. ;************************************************************************
  353.  
  354.  
  355. ;************************************************************************
  356. ;*                                                                      *
  357. ;*      F U N C T I O N    segment_(x, y, radius, st
  358. art_deg, end_deg)    *
  359. ;*                                                                      *
  360. ;*      purpose:        draw the SEGMENT as i
  361. n arc() above but join     *
  362. ;*                      the ends of the arc to the centre poi
  363. nt.        *
  364. ;*                                                                      *
  365. ;************************************************************************
  366.  
  367. ;COLOR.ASM
  368.  
  369. ;************************************************************************
  370. ;*                                                                      *
  371. ;*              
  372. f u n c t i o n   color_(index, red, green, blue)        *
  373. ;*                                                                      *
  374. ;*  p
  375. urpose: change a color in the colormap.                            *
  376. ;*  entry:     8[bp] colour
  377.  index -- 0 to 15                            *
  378. ;*            10[bp] red value       0 to 15                            *
  379. ;*            12[
  380. bp] green value     0 to 15                            *
  381. ;*            14[bp] blue value      0 to 15                            *
  382.  
  383. ;*                                                                      *
  384. ;*  exit:    none                                                       *
  385. ;*                                                                      *
  386. ;************************************************************************
  387.  
  388. ;************************************************************************
  389. ;*                                                                      *
  390.  
  391. ;*              f u n c t i o n   grey_(index, value)                    *
  392. ;*                                                                      *
  393. ;*  purpos
  394. e: Change the colour maps grey scale. This is provided for    *
  395. ;*           d
  396. ual monitor systems which need to vary the grey scale     *
  397. ;*           indepe
  398. ndently from the colour scales.                      *
  399. ;*           Also used to set grey levels
  400.  on monochrome only systems.   *
  401. ;*                                                                      *
  402. ;*  entry:   08[bp] colour
  403.  index....0 to 15                             *
  404. ;*           10[bp] grey value......0 to 15                             *
  405. ;*                                                                      *
  406.  
  407. ;************************************************************************
  408. ;********************************************************************
  409. ;                                                                   *
  410. ;       s u b r o u t i n e    a s s e r t _ c o l
  411.  o r m a p        *
  412. ;                                                                   *
  413. ;       colormap is located at clmpda which is de
  414. fined in           *
  415. ;       openws()                                                    *
  416. ;                                                                   *
  417. ;       entry:          clmpda holds n
  418. ew colour data to be loaded   *
  419. ;       exit:           none                                        *
  420. ;                                                                   *
  421. ;********************************************************************
  422.  
  423.  
  424.     PROCDEF    a_cmap_
  425.  
  426. ;************************************************************************
  427. ;*                                                                      *
  428. ;*      s u b r o u t i
  429.  n e     chk_col_                                 *
  430. ;*                                                                      *
  431. ;*      purpose:        check and set line, tex
  432. t, fill or marker        *
  433. ;*                      colours.                                        *
  434. ;*                                                                      *
  435. ;*      entry:          al
  436.  contains colour to be set to.                *
  437. ;*                                                                      *
  438. ;************************************************************************
  439.  
  440. /************************************************************************/
  441. /*                                                                      
  442. */
  443. /*      F U N C T I O N    ld_font_(font_fn, font_number)                */
  444. /*                         
  445. char *font_fn;                                */
  446. /*                         int  font_number;                            */
  447. /*                                                                      */
  448. /*      pu
  449. rpose:        load data in a file into one of the graphics    */
  450. /*                      font 
  451. arrays.                                    */
  452. /*                                                                      */
  453. /*      entry:          font_fn is the name of the file
  454. .                */
  455. /*                      font_number number to be loaded. [0 to 3]       */
  456. /*                                                                      */
  457.  
  458. /*      exit:           NULL if font loaded OK.                         */
  459. /*                      EOF if font data f
  460. ile could not be found.       */
  461. /*                                                                      */
  462. /************************************************************************/
  463. /************************************************************************/
  464. /*                                                                      */
  465.  
  466. /*      F U N C T I O N    ld_wsdets_()                                  */
  467. /*                                                                      */
  468. /*      purpose:        l
  469. oad workstation data from file                 */
  470. /*                                                                      */
  471. /*      entry:          <ws_numb
  472. er_> number to be loaded. [1 to 6]      */
  473. /*                                                                      */
  474. /*      exit:           NULL 
  475. workstation loaded OK.                     */
  476. /*                      EOF if workstation file could not be
  477.  found.     */
  478. /*                                                                      */
  479. /************************************************************************/
  480.  
  481. /************************************************************************/
  482. /*                                                                      */
  483. /*      F U N C
  484.  T I O N    malloc_(bytes)                               */
  485. /*                         int bytes;                                   */
  486. /*                                                                      */
  487. /*      
  488. purpose:        allocate temp memory in stack space             */
  489. /*                                                                      */
  490. /*      e
  491. ntry:          bytes  #bytes to alloc                          */
  492. /*                                                                      */
  493. /*      exit:           NULL no 
  494. core.                                   */
  495. /*                      offset (in DS) of allocated memory.             */
  496. /*                                                                      */
  497.  
  498. /************************************************************************/
  499.  
  500.  
  501.  
  502. /************************************************************************/
  503. /*                                                                      */
  504. /*      F U N C T I O N    free_(
  505. area)                                  */
  506. /*                                                                      */
  507. /*      purpose:        release stack space memory afte
  508. r malloc_ call   */
  509. /*                                                                      */
  510. /*      entry:          area  mem pointer of are
  511. a given by malloc_      */
  512. /*                                                                      */
  513. /*      exit:           none.                                           */
  514. /*                                                                      */
  515.  
  516. /************************************************************************/
  517.  
  518.  
  519.  
  520. /************************************************************************/
  521. /*                                                                      */
  522. /*      F U N C T I O N    cono
  523. ut_(char)                                */
  524. /*                                                                      */
  525. /*      purpose:        output character to console
  526.                      */
  527. /*                                                                      */
  528. /*      entry:          char to be output                               */
  529. /*                                                                      */
  530. /
  531. *      exit:           none.                                           */
  532. /*                                                                      */
  533. /************************************************************************/
  534.  
  535. ;CXY2CP.ASM
  536. ;UPDATE
  537.  HISTORY
  538. ;********************************************************************
  539. ;*                                                                  *
  540. ;*      f u n c t i o n s    cxy2cp_()  a_cur_
  541. ()                      *
  542. ;*                                                                  *
  543. ;*      CXY2CP takes the x_start and y_start values and
  544.  converts    *
  545. ;*      them to a GDC cursor position and sends it to the 
  546. GDC.      *
  547. ;*      The computed values are stored at curl0 to curl2.           *
  548.  
  549. ;*                                                                  *
  550. ;*      A_CUR takes the values at curl0 to curl2 and sends them
  551.      *
  552. ;*      to the GDC.                                                 *
  553. ;*                                                                  *
  554. ;*      entry:          x_start = x pixe
  555. l location                  *
  556. ;*                      y_start = y pixel location                  *
  557. ;*      exit:           cu
  558. rl0 to curl2 set to GDC cursor values     *
  559. ;*                                                                  *
  560. ;********************************************************************
  561.  
  562. ;FILL
  563. .ASM
  564.  
  565. ;************************************************************************
  566. ;*                                                                      *
  567. ;*      F U N C T I O N     polyfill_(count, ar
  568. ray)                      *
  569. ;*                          int count, *array;                          *
  570. ;*                                                                      *
  571. ;*      purpose:        Fil
  572. l an area with a pattern specified by        *
  573. ;*                      f_type and f_style whi
  574. ch is defined as a        *
  575. ;*                      series of 'xy' points [array] whose lengt
  576. h      *
  577. ;*                      is 'count' 'xy' pairs.                          *
  578. ;*                                                                      *
  579. ;*      entry:          8[bp
  580. ] number of 'xy' pairs in 'array'.          *
  581. ;*                     10[bp] pointer to the 'xy
  582. ' pairs.                *
  583. ;*                                                                      *
  584. ;************************************************************************
  585.  
  586.  
  587. ;************************************************************************
  588. ;*                                                                      *
  589. ;*              F U N C
  590.  T I O N    bar_(array)  int *array;              *
  591. ;*                                                                      *
  592. ;*  purpose:    set 
  593. a user defined screen rectangle to a user           *
  594. ;*              defined color.                                          *
  595.  
  596. ;*  entry:      6[bp] has the pointer to the 'xy' array                 *
  597. ;*                                                                      *
  598.  
  599. ;*              0[array] has the start x in pixels                      *
  600. ;*              6[array] has the s
  601. tart y in scan lines                  *
  602. ;*              4[array] has the stop x in pixels                       *
  603.  
  604. ;*              2[array] has the stop y in scan lines                   *
  605. ;*              f_col is the co
  606. lor to fill the bar with.                *
  607. ;*                                                                      *
  608. ;*      NOTE:   both 'y' values 
  609. are relative to a bottom left origin    *
  610. ;*                                                                      *
  611. ;************************************************************************
  612.  
  613. +ARCHI
  614. VE+ getkey.c       703 11/16/1984 13:07:26
  615. ;GOPT.ASM
  616. ;********************************************************************
  617. ;                                                                   *
  618.  
  619. ;       p r o c e d u r e   gropt_()                                *
  620. ;                                                                   *
  621. ;       purpose:        test if 
  622. Graphics Option is present.         *
  623. ;       entry:          none.                                       *
  624. ;       exit:           
  625. ax = 0          option present.             *
  626. ;                       dax = -1        option not present.         *
  627.  
  628. ;       register usage: ax                                          *
  629. ;       the following globals are set:-                             *
  630.  
  631. ;           swisg_      1 = graphics option present                 *
  632. ;                       0 = no                                      *
  633. ;           
  634. sw100a_     1 = this is Rainbow model 100a              *
  635. ;                       0 = no, 100b                                *
  636.  
  637. ;           gintvect_   = appropriate hardware interrupt vector     *
  638. ;********************************************************************
  639. ;
  640. GTEXT.ASM
  641.  
  642. ;************************************************************************
  643. ;*                                                                      *
  644. ;*      F U N C T I O N    gtext_(x, y, s
  645. tring)                          *
  646. ;*                         int x, y;                                    *
  647. ;*                         char *string;                                *
  648. ;*                                                                      *
  649.  
  650. ;*      purpose:        print a string of text at a specific 'xy'       *
  651. ;*                      po
  652. sition. X & Y are defined as pixel locations  *
  653. ;*                      at the bottom le
  654. ft of the character cell.       *
  655. ;*                                                                      *
  656. ;*      entry:            6[bp] 'x' posit
  657. ion                            *
  658. ;*                        8[bp] 'y' position                            *
  659. ;*                       10[bp] pointer to NULL te
  660. rminated string       *
  661. ;*                                                                      *
  662. ;************************************************************************
  663.  
  664.  
  665. ;************************************************************************
  666. ;*                                                                      *
  667. ;*        
  668. f u n c t i o n   gchar_(char)                                 *
  669. ;*                                                                      *
  670. ;*  purpose:    write gra
  671. phics text                                     *
  672. ;*  entry:      6[bp] character to be written                           *
  673. ;*                                                                      
  674. *
  675. ;*  conditions: 1) text cursor is correctly placed                      *
  676. ;*              2) f
  677. gbg and alups already defined                       *
  678. ;*              3) text font has been selected
  679.                           *
  680. ;************************************************************************
  681.  
  682. ;******************************************************************
  683. ;*                                                                *
  684. ;*                      stroke font character set                 *
  685.  
  686. ;*                                                                *
  687. ;******************************************************************
  688. ;
  689. ;the following tables are vertice information
  690.  for a stroked character
  691. ;set the x,y coordinate information is repre
  692. sented by 4 bit 2's 
  693. ;complement numbers in the range of +-7 x, +-7 y
  694. . end of character
  695. ;is represented by -8 x, -8 y and dark vector is r
  696. epresented by -8 x,
  697. ; 0 y.
  698. ;
  699. ;       bit     7 6 5 4 3 2 1 0
  700. ;               |
  701.      | |     |
  702. ;                \   ;   \   ;
  703. ;                  x       y
  704. ;
  705. ;characters are cur
  706. rently mapped into the positive quadrant,
  707. ;with the origin at the low
  708. er left corner of an upper case character,
  709. ;therfore, lowercase chara
  710. cters will descend below the line specified
  711. ;for the character.
  712.  
  713.  
  714. ;************************************************************************
  715. ;*                                                                      *
  716. ;*      F U N C T I O N     ltext_(x, y, string)                          *
  717. ;
  718. *                          int x, y;  char *string;                    *
  719. ;*                                                                      *
  720. ;*      entry:            8[bp] 'x' co
  721. -ordinate                         *
  722. ;*                       10[bp] 'y' co-ordinate                         *
  723. ;*                       12[bp] pointer 
  724. to string array.                *
  725. ;*                                                                      *
  726. ;************************************************************************
  727.  
  728. ;MARKER.ASM
  729.     SEGDEF    D
  730. ATA
  731. ;The x,y coordinate information is represented by 3 bit 2's 
  732. ;
  733. complement numbers in the range of +-3 x, +-3 y. end of character
  734. ;is
  735.  represented by bit 8 being set on the last vector byte.
  736. ;
  737. ;       bit
  738.      7 6 5 4 3 2 1 0 
  739. ;               |   |   | |   | 
  740. ;               |    \ /   \ /  
  741. ;              
  742. end    x     y   
  743.  
  744. ;************************************************************************
  745. ;*                                                                      *
  746. ;*      F U N C T I O N     polymark_
  747. (count, array)                     *
  748. ;*                          int count, *array;                          *
  749. ;*                                                                      *
  750. ;*      entr
  751. y:            8[bp] number of markers to show               *
  752. ;*                       10[bp] pointer to array
  753.  of 'xy' points at      *
  754. ;*                               which to place markers.                *
  755. ;*                                                                      *
  756.  
  757. ;************************************************************************
  758. ;The x,y coordinate information is represented by 3 bit 2's 
  759.  
  760. ;complement numbers in the range of +-3 x, +-3 y. end of character
  761. ;i
  762. s represented by bit 8 being set on the last vector byte.
  763. ;
  764. ;       bi
  765. t     7 6 5 4 3 2 1 0 
  766. ;               |   |   | |   | 
  767. ;               |    \ /   \ /  
  768. ;
  769.               end    x     y   
  770.  
  771.  
  772.  
  773. ;**************************************************************************
  774. ;*                                                                        *
  775. ;*  F U N C T I O N  
  776. rq_locator_(dev, x_strt, y_strt, char, x_end, y_end) *
  777. ;*                   int  dev,
  778.  x_strt, y_strt;                            *
  779. ;*                   char *char;                                          *
  780. ;*                   int  *x_end, *y_end
  781. ;                                 *
  782. ;*                                                                        *
  783. ;*      purpose:        Place a moveable cross_hair on the di
  784. splay at     *
  785. ;*                      [x_strt, y_strt] and move it around with the      *
  786.  
  787. ;*                      arrow keys until a character is typed or a        *
  788. ;*                      Function key
  789.  pressed (not arrow or SEL).          *
  790. ;*                      The keystroke and the final 'xy
  791. ' positions are    *
  792. ;*                      returned in 'char', 'x_end' & 'y_end'.            *
  793.  
  794. ;*                      The cross_hair is then removed.                   *
  795. ;*                      The cross_hair is ass
  796. umed to be marker type 1     *
  797. ;*                                                                        *
  798. ;*      entry:  8[bp]  included f
  799. or GSX86MWC.OLB compatibility.           *
  800. ;*              10[bp] starting 'x' co-ordina
  801. te                           *
  802. ;*              12[bp] starting 'y' co-ordinate                           *
  803. ;*              14[bp] pointe
  804. r to returned character                      *
  805. ;*              16[bp] pointer to ending 'x' co-ordi
  806. nate                  *
  807. ;*              18[bp] pointer to ending 'y' co-ordinate                  *
  808. ;*                                                                        *
  809.  
  810. ;**************************************************************************
  811.  
  812.  
  813. ;************************************************************************
  814. ;*                                                                      *
  815. ;*      F U N C T I O N     st_locator_(x
  816. , y)                            *
  817. ;*                          int  *x, *y;                                *
  818. ;*                                                                      *
  819. ;*      purpose:        Updates '
  820. x' &;or 'y' if an arrow key was        *
  821. ;*                      pressed. Updates Lmul if SEL
  822. ECT was pressed.    *
  823. ;*                      Returns '\0' in AX if SELECT or no characte
  824. r    *
  825. ;*                      was typed, otherwise, returns the character.    *
  826. ;*                                                                      *
  827.  
  828. ;************************************************************************
  829.  
  830. /*************************************************/
  831. /* MSOPEN                                        */
  832. /* msopen(device,control_pack
  833. et,buffer,          */
  834. /*        buffer_byte_size,mouse_type);          */
  835. /* returns
  836.  TRUE if mouse avail, else FALSE       */
  837. /*************************************************/
  838. msopen(device,mptr,bpt
  839. r,bcnt,mtype)
  840. /***********************************************/
  841. /*   Mouse close                               */
  842. /***********************************************/
  843. msclose(mptr
  844. )
  845. MOUSE_PACKET      *mptr;
  846.  
  847. /*****************************************************/
  848. /* Serial Microsoft Mouse har
  849. dware dependent code    */
  850. /*****************************************************/
  851.  
  852. /*-------------------------- Microsoft Mouse 3 byte p
  853. acket
  854. ;
  855. ;
  856. ;    First byte
  857. ;
  858. ;    +----+----+----+----+----+----+----
  859. +----+
  860. ;    | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
  861. ;    +----+----+----
  862. +----+----+----+----+----+
  863. ;      |    |    |    |    |    |    |    |
  864. ;      |    
  865. |    |    |    |    |    |    +---- X6  Delta X
  866. ;      |    |    |    |    |    |    
  867. +--------- X7  Delta X
  868. ;      |    |    |    |    |    +-------------- Y6  Delta Y
  869. ;      |    
  870. |    |    |    +------------------- Y7  Delta Y
  871. ;      |    |    |    +------------------------ Right Mouse Button
  872.  
  873. ;      |    |    +----------------------------- Left Mouse Button
  874. ;      |    +---------------------------------- 1 = first byte 
  875. (synchronize)
  876. ;      +--------------------------------------- 7 bit ascii (MUST MASK)
  877.  
  878. ;    Second byte
  879.  
  880. ;
  881. ;    +----+----+----+----+----+----+----+----+
  882. ;    | D7 | D6 | D5 | D4 
  883. | D3 | D2 | D1 | D0 |
  884. ;    +----+----+----+----+----+----+----+----+
  885. ;      |    
  886. |    |    |    |    |    |    |
  887. ;      |    |    |    |    |    |    |    +---- X0  D
  888. elta X
  889. ;      |    |    |    |    |    |    +--------- X1  Delta X
  890. ;      |    |    
  891. |    |    |    +-------------- X2  Delta X
  892. ;      |    |    |    |    +------------------- X3  Delta X
  893.  
  894. ;      |    |    |    +------------------------ X4  Delta X
  895. ;      |    |    +----------------------------- X5  Delta X
  896. ;    
  897.   |    +---------------------------------- 0 = data byte (not first)
  898. ;      +--------------------------------------- 7 bit ascii   (MUST MA
  899. SK)
  900.  
  901. ;    Third byte
  902. ;
  903. ;    +----+----+----+----+----+----+----+----+
  904.  
  905. ;    | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
  906. ;    +----+----+----+----+----+
  907. ----+----+----+
  908. ;      |    |    |    |    |    |    |    |
  909. ;      |    |    |    |
  910.     |    |    |    +---- Y0  Delta Y
  911. ;      |    |    |    |    |    |    +--------- Y1 
  912.  Delta Y
  913. ;      |    |    |    |    |    +-------------- Y2  Delta Y
  914. ;      |    |    |    
  915. |    +------------------- Y3  Delta Y
  916. ;      |    |    |    +------------------------ Y4  Delta Y
  917. ;      |    |    
  918. +----------------------------- Y5  Delta Y
  919.  ;      |    +---------------------------------- 0 = data byte (not first)
  920.  ;      +---------------------------------------
  921.  7 bit ascii   (MUST MASK)
  922. ;
  923.  */
  924.  
  925. /***********************************************/
  926. /*   Microsoft Mo
  927. use packet decode             */
  928. /***********************************************/
  929. CONDITION_PACKET *msdecode(mptr)
  930. M
  931. OUSE_PACKET *mptr;
  932. ;OPENWS.ASM
  933. ;****************************************************************    [1]
  934. ;*                                *    [1]
  935. ;*        
  936. Workstation definitions                *    [1]
  937. ;*                                *    [1]
  938. ;****************************************************************    [1]
  939.  
  940.  
  941.  
  942. ;  PRESERVE ORDER - SEE LD_WSDETS_                    [1]
  943. ;  ===============================                    [1]
  944.  
  945. ws_d
  946. ata_   DQ      0,0,0
  947.            DD      0
  948. p1_        DQ      0,0
  949. ws_number_ DB      1        
  950. ;workstation number (see ld_wsdets_)    [1]
  951. ws_wmo_    DB      1        ;write 
  952. mode                [1]
  953. gbmod_     DB      1        ;graphics bd mode register        [1]
  954. f
  955. gbg_      DB      1
  956. alups_     DB      1
  957. gbmskl_    DB      1        ;graphics bd mas
  958. k register -  low byte    [1]
  959. gbmskh_    DB      1        ;    "    "    "  - high by
  960. te    [1]
  961. gdcml_     DB      1        ;GDC mask register bits -  low byte    [1]
  962.  
  963. gdcmh_     DB      1        ;    "    "    - high byte    [1]
  964. curl0_     DB      1        ;cu
  965. rsor        -  low byte        [1]
  966. curl1_     DB      1        ;  location    - middle b
  967. yte        [1]
  968. curl2_     DB      1        ;     storage    - high bytes & dot addr    [
  969. 1]
  970. ymax_      DW      1
  971. xmax_      DW      1
  972. twdir_     DB      1        ;direction 
  973. for text mode writing    [1]
  974. nmritl_    DB      1        ;number of GDC writes 
  975. -  low byte    [1]
  976. nmrith_    DB      1        ;    "    "     - high byte    [1]
  977. sh
  978. _p_lin_  DW      1        ;shift factor for one line of words    [1]
  979. wd_p_lin_
  980.   DW      1        ;words/scan line for curr resolution    [1]
  981. x_start_   DW      
  982. 1
  983. y_start_   DW      1
  984. x_stop_    DW      1
  985. y_stop_    DW      1
  986. g_strt
  987. x_   DW      1
  988. scr_top_   DB      1
  989. scr_bot_   DB      1
  990.                 ;scroll map
  991.  shadow area            [1]
  992. scrltb_    DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  993.  
  994.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  995. clmpda_    DQ      0,0,0,0
  996. pat
  997. tbl_    DQ      0,0,0,0
  998. ;------------------------                        [1]
  999. ; LINE DRAWING CONSTANTS                        [1]
  1000.  
  1001. ;------------------------                        [1]
  1002. l_col_     DB      1        ;colour                    [1]
  1003. l_type_    DB      1        
  1004. ;line type                [1]
  1005. l_wid_     DB      1        ;line width                [1]
  1006. ;------------------------                        [1
  1007. ]
  1008. ;  AREA FILL CONSTANTS                            [1]
  1009. ;------------------------                        [1]
  1010. f_col_     DB      1        
  1011. ;colour                    [1]
  1012. f_type_    DB      1        ;fill type                [1]
  1013. f_style_   DB
  1014.       1        ;fill style                [1]
  1015. f_patrn_   DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,
  1016. 0,0,0,0
  1017. ;------------------------                        [1]
  1018. ;  TEXT WRITE CONSTANTS                            [1]
  1019. ;------------------------                        [1]
  1020.  
  1021. t_col_     DB      1        ;colour                    [1]
  1022. t_font_    DB      1        ;font index                
  1023. [1]
  1024. t_sca_     DB      1        ;sizing scale                [1]
  1025. t_dir_     DB      1        ;wr
  1026. iting direction            [1]
  1027. t_x_       DW      1
  1028. t_y_       DW      1
  1029. ;------------------------                        [1]
  1030.  
  1031. ;  MARKER CONSTANTS                            [1]
  1032. ;------------------------                        [1]
  1033. m_col_     DB      1        ;colou
  1034. r                    [1]
  1035. m_type_    DB      1        ;marker type (index 0-14 to m_tab_)    [1]
  1036.  
  1037. m_sca_     DB      1        ;marker sizing scale            [1]
  1038. m_tab_     DQ      0,0,
  1039. 0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1040.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1041.  
  1042. ;------------------------                        [1]
  1043. ;  TEXT FONT TABLES                            [1]
  1044. ;------------------------                        [1]
  1045.  
  1046. tfonts
  1047. _    DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1048.            DQ      0,0,0,0,0,0,0,0,0,0,
  1049. 0,0,0,0,0,0
  1050.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1051.            DQ      0,0,0,
  1052. 0,0,0,0,0,0,0,0,0,0,0,0,0
  1053.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1054.  
  1055.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1056.            DQ      0,0,0,0,0,0,0,0,0,0,0
  1057. ,0,0,0,0,0
  1058.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1059.            DQ      0,0,0,0
  1060. ,0,0,0,0,0,0,0,0,0,0,0,0
  1061.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1062.            
  1063. DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1064.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,
  1065. 0,0,0,0
  1066.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1067.            DQ      0,0,0,0,0,
  1068. 0,0,0,0,0,0,0,0,0,0,0
  1069.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1070.            D
  1071. Q      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1072.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0
  1073. ,0,0,0
  1074.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1075.            DQ      0,0,0,0,0,0
  1076. ,0,0,0,0,0,0,0,0,0,0
  1077.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1078.            DQ
  1079.       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1080.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,
  1081. 0,0,0
  1082.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1083.            DQ      0,0,0,0,0,0,
  1084. 0,0,0,0,0,0,0,0,0,0
  1085.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1086.            DQ      
  1087. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1088.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1089. ,0
  1090.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1091.            DQ      0,0,0,0,0,0,0,0
  1092. ,0,0,0,0,0,0,0,0
  1093.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1094. ;------------------------                        [
  1095. 1]
  1096. ;  WORK AREAS                                [1]
  1097. ;------------------------                        [1]
  1098. old_int_off  DW    1
  1099. old_
  1100. int_seg  DW    1
  1101. int_done     DB    1
  1102. gintvect_    DW    288h        ;graphi
  1103. cs hardware int vector location    [1]
  1104. ;------------------------                        [1]
  1105. ; SWITCHES                                [1]
  1106.  
  1107. ;------------------------                        [1]
  1108. swisg_        DB    0        ;1 = graphics option present    [1]
  1109.  
  1110. sw100a_     DB    0        ;1 = 100a, 0 = 100b        [1]
  1111. swgopen_    DB    0        ;1
  1112.  = workstation opened        [1]
  1113. swgon_        DB    0        ;1 = graphics open fo
  1114. r business    [1]
  1115.  
  1116. ;------------------------                        [1]
  1117. ;4k general purpose storage for xy
  1118.  points etc.,
  1119. ;gives a max of 1024 'xy' points for polylines.
  1120. ;[Wh
  1121. y not, we've got lots of room in the D seg]
  1122. ;------------------------                        [1]
  1123. gp_buff_   
  1124. DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1125.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,
  1126. 0,0,0,0
  1127.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1128.            DQ      0,0,0,0,0,
  1129. 0,0,0,0,0,0,0,0,0,0,0
  1130.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1131.            D
  1132. Q      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1133.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0
  1134. ,0,0,0
  1135.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1136.            DQ      0,0,0,0,0,0
  1137. ,0,0,0,0,0,0,0,0,0,0
  1138.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1139.            DQ
  1140.       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1141.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,
  1142. 0,0,0
  1143.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1144.            DQ      0,0,0,0,0,0,
  1145. 0,0,0,0,0,0,0,0,0,0
  1146.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1147.            DQ      
  1148. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1149.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1150. ,0
  1151.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1152.            DQ      0,0,0,0,0,0,0,0
  1153. ,0,0,0,0,0,0,0,0
  1154.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1155.            DQ      0
  1156. ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1157.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  1158. 0
  1159.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1160.            DQ      0,0,0,0,0,0,0,0,
  1161. 0,0,0,0,0,0,0,0
  1162.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1163.            DQ      0,
  1164. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1165.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1166.  
  1167.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1168.            DQ      0,0,0,0,0,0,0,0,0
  1169. ,0,0,0,0,0,0,0
  1170.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1171.            DQ      0,0
  1172. ,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1173.            DQ      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1174.  
  1175. ;********************************************************************
  1176. ;*                                                                  *
  1177. ;*      f u n c t i o n      openws_(number)                         *
  1178. ;*                                                                  *
  1179.  
  1180. ;*      purpose:        initialize the graphics option              *
  1181. ;*                                                                  *
  1182. ;*      
  1183. entry:          8[bp]  graphics display type                *
  1184. ;*                      1 medium res monochrom
  1185. e                     *
  1186. ;*                      2 high res monochrome                       *
  1187. ;*                      3 medium res colour                        
  1188. *
  1189. ;*                      4 high res colour                        *
  1190. ;*                      5 medium res dual monitor                   *
  1191.  
  1192. ;*                      6 high res dual monitor                     *
  1193. ;*                                                                  *
  1194. ;*      exit:           all shadow 
  1195. bytes initialized                *
  1196. ;*                      NULL if work_station open                   *
  1197. ;*                      othe
  1198. rwise EOF                               *
  1199. ;*                                                                  *
  1200. ;********************************************************************
  1201.  
  1202.  
  1203. ;*****************************************************************************
  1204. ;                                                                            *
  1205. ;        f u n c 
  1206. t i o n    a_patrn_()                                        *
  1207. ;                                                                            *
  1208. ;        purpose:       Load the Pattern Mul
  1209. tiplier and Pattern Register     *
  1210. ;                       for line drawing.                                    *
  1211. ;                                                                            *
  1212.  
  1213. ;        caution:       You must load the Pattern Multiplier before          *
  1214. ;                       
  1215. loading the Pattern Register                         *
  1216. ;                                                                            *
  1217. ;*****************************************************************************
  1218. ;
  1219. ;The following
  1220.  are some register values and the corresponding output patterns 
  1221. ;whe
  1222. n the repeat factor is:
  1223. ;
  1224. ;                 1            2                    3
  1225. ;    0FFh         |--------|   |----------------
  1226. |   |------------------------|
  1227. ;    0AAh         |- - - - |   |--  --  --  --  |   |---   ---   ---
  1228.    ---   |
  1229. ;    0F0h         |----    |   |--------        |   |------------            |
  1230. ;    0CDh         |-
  1231. -  -- -|   |----    ----  --|   |------      ------   ---|
  1232. ;
  1233. ;********************************************************************
  1234. ;*                                                                  *
  1235.  
  1236. ;*      f u n c t i o n s     init_scrol_(),  a_scrmap_()             *
  1237. ;*                                                                  *
  1238. ;*
  1239.       purpose:        initialize the scroll map                   *
  1240. ;*                      assert scroll map as
  1241.  defined in scrltb      *
  1242. ;*                                                                  *
  1243. ;********************************************************************
  1244.  
  1245.  
  1246. ;******************************************************************************
  1247. ;                                                                             *
  1248. ;               
  1249. f u n c t i o n    hscroll_(direction, count)                 *
  1250. ;                                                                             *
  1251. ;       move th
  1252. e current entire screen to right or left a WORD address.       *
  1253. ;                                                                             *
  1254.  
  1255. ;       entry:  4[bp] = direction [0 = left, anything else = right]           *
  1256. ;
  1257.                6[bp] = count inDWs [16 pixels]                               *
  1258. ;       exit:   g_strtx updated to
  1259.  new start position WORD boundary           *
  1260. ;                                                                             *
  1261. ;******************************************************************************
  1262.  
  1263. ;******************************************************************************
  1264. ;*
  1265.                                                                             *
  1266. ;*              f u n c t i o n    vscroll_(direction, count)                 *
  1267. ;*                                                                            *
  1268.  
  1269. ;*      entry:    8[bp] direction  0 = DOWN  anything else = UP               *
  1270. ;*               
  1271. 10[bp] number of times to scroll the region                  *
  1272. ;*                                                                            *
  1273. ;******************************************************************************
  1274. ;*****************************************
  1275.  
  1276. ;si = scrltb   cx = no. of lines to scroll
  1277. ;*****************************************
  1278. ;******************************************************************************
  1279. ;*                                                                            *
  1280.  
  1281. ;*      F U N C T I O N     polyline_(pnts, array)                            *
  1282. ;*                          int pnts, 
  1283. *array;                                 *
  1284. ;*                                                                            *
  1285. ;*      purpose:        Draw a line joining the points 
  1286. defined in 'array'     *
  1287. ;*                                                                            *
  1288. ;*      entry:            4[bp] number of points
  1289.  to join                      *
  1290. ;*                        6[bp] array containing 'xy' points                  *
  1291. ;*                                                                            *
  1292.  
  1293. ;******************************************************************************
  1294.  
  1295.  
  1296. ;******************************************************************************
  1297. ;                                                                             *
  1298. ;        F U N C T I O N    line_(array)    in
  1299. t *array;                       *
  1300. ;                                                                             *
  1301. ;        purpose:        Draw a vector                                        *
  1302. ;                                                                             *
  1303. ;
  1304.         entry:          8[bp] points to xy array layed out as:               *
  1305. ;                                                                             *
  1306. ;                        L
  1307. x_st = starting x location                          *
  1308. ;                        Ly_st = starting y location                          *
  1309.  
  1310. ;                        Lx_sp= ending x location                             *
  1311. ;                        Ly_sp= ending y location                             *
  1312.  
  1313. ;                                                                             *
  1314. ;******************************************************************************
  1315.  
  1316. ;*****************************************************************************
  1317. ;*                                                                           *
  1318. ;*      F U N C T I O N    point_(x, 
  1319. y)                                       *
  1320. ;*                                                                           *
  1321. ;*      purpose:        Draw a pixel                                         *
  1322. ;*                                                                           *
  1323. ;*      e
  1324. ntry:          4[bp] x location                                     *
  1325. ;*                      6[bp] y location                                     *
  1326. ;*                                                                           *
  1327. ;
  1328. *****************************************************************************
  1329. ;************************************************************************
  1330. ;*                                                                      *
  1331. ;*              F U N C T I O N    rectangle_(array)  int *
  1332. array;        *
  1333. ;*                                                                      *
  1334. ;*  purpose:    draw a rectangle by defining the 
  1335. top right and          *
  1336. ;*              bottom left points.                                     *
  1337. ;*  entry:      6[bp] 
  1338. has the pointer to the 'xy' array                 *
  1339. ;*                                                                      *
  1340. ;*              0[array] bottom 
  1341. left 'x'                                *
  1342. ;*              2[array] bottom left 'y'                                *
  1343. ;*              4[array] top r
  1344. ight 'x'                                  *
  1345. ;*              6[array] top right 'y'                                  *
  1346. ;*                                                                      *
  1347. ;*      NOTE:   
  1348. both 'y' values are relative to a bottom left origin    *
  1349. ;*                                                                      *
  1350. ;************************************************************************
  1351.  
  1352. 
  1353.