home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / QBAS / QGRAFX.ZIP / QGRAFX.DOC < prev    next >
Text File  |  1990-06-07  |  26KB  |  567 lines

  1.                
  2.                        QGRAFX DEMO - Version 2.0
  3.            
  4.                      Copyright 1990, Nybble Software
  5.                    Joseph E. Cates & E. Gordon King, Jr.
  6.  
  7.  
  8.    ──────────────────────────────────────────────────────────────────────────────
  9.  
  10.    WHAT IS QGRAFX?
  11.  
  12.         QGRAFX is a library of EGA/VGA graphics routines developed by Nybble
  13.    Software for use with Microsoft QuickBasic 4.0 or 4.5 to supplement
  14.    QuickBasic's limited graphics capabilities.  The QGRAFX package consists
  15.    of the following:
  16.  
  17.         1) Library of 35 Assembly Language Object Files Documented Below
  18.         2) Library of 10 QuickBasic Routines with Source Code
  19.         3) QGRAFX FONT EDITOR with Complete QuickBasic Source Code
  20.         4) QGRAFX DEMO With Complete QuickBasic Source Code
  21.         5) Sample QuickBasic Code For Producing Stroke Fonts
  22.         6) Image Converter to Capture Screen Images in QIMAGE Format with
  23.            Complete QuickBasic Source Code
  24.         7) Complete Data for Stroke Font Used in QGRAFX DEMO
  25.         8) Three Sample BitMap Fonts and the QGRAFX Demo Font
  26.         9) Complete Documentation
  27.  
  28.   
  29.    RUNNING THE QGRAFX DEMO:
  30.  
  31.         A QGRAFX demo program is included to demonstrate many of the routines
  32.    described below.  The entire demo program is written in standard Microsoft
  33.    QuickBasic 4.5 using the QGRAFX library, as an example of the power of the
  34.    routines.  To run the QGRAFX demo, type QGRAFX on the command line.  The
  35.    binary data file (BINARY.BIN) included in the package must be present in
  36.    the default directory.
  37.         The QGRAFX demo is designed to run in SCREEN 9 (640 x 350 x 16),
  38.    however to demonstrate the routines compatibility with other modes, the
  39.    demo may be ran in other QuickBasic screen modes by including the screen
  40.    command line option:  QGRAFX /S=## where ## = QuickBasic mode number.  The
  41.    only meaningful screen modes are 9, 10, 11, 12.  Screen mode 8 can also be
  42.    used, although most of the screen will not be visible.
  43.  
  44.  
  45.    COMPATIBILITY:
  46.  
  47.         The subroutines are compatible with the 640 x 350 EGA graphics modes
  48.    and the 640 x 480 VGA graphics modes.  In general, the routines are NOT
  49.    compatible with 256 MCGA/VGA color modes or lower-resolution CGA emulation
  50.    modes.  The routines have been tested on a number of brands of PC and PS/2
  51.    based EGA and VGA boards with no problems.  A safe bet is that if the
  52.    demo runs without problems on a specific card/monitor combination, then all
  53.    the routines will run without trouble also.
  54.  
  55.  
  56.    ERROR CHECKING:
  57.  
  58.         The QGRAFX routines only contain error checking for bad values that
  59.    would lead to certain errors.  The error checking is limited for two
  60.    important reasons.  First, error checking can be done almost as efficiently
  61.    in QuickBasic for most applications.  Secondly, extensive error checking
  62.    always seems to ruin that one special feature you wanted.  Therefore,
  63.    coordinates are generally left unchecked to allow writing across video
  64.    pages, writing off the bottom of the screen, wrapping images around the
  65.    screen, and other bad habits.
  66.  
  67.  
  68.    ORDERING INFORMATION:
  69.  
  70.       A complete order form is available with the files in this package.  If
  71.    that file is not available, the library can be obtained for $20 plus $2
  72.    postage and handling ($4 P&H on foreign orders please) from:
  73.                     
  74.                            NYBBLE SOFTWARE
  75.                            P.O. Box 7213
  76.                            Tuscaloosa, AL 35486
  77.  
  78.       Any questions or comments about the QGRAFX library and associated
  79.    programs can be directed to the above address or to jbaschab@ua1vm.bitnet.
  80.    Please include a self-addressed stamped envelope for any mailed questions.
  81.  
  82.  
  83.    SATISFACTION GUARANTEED:
  84.  
  85.       If for ANY reason you are not completely satisfied with the QGRAFX
  86.    package, simply return a statement saying ALL your copies of the QGRAFX
  87.    package have been permanently destroyed, and your purchase price will be
  88.    gladly refunded.
  89.   
  90.   
  91.    ROUTINE LIST:
  92.  
  93.       Information on each of the routines included in the QGRAFX library is
  94.    listed below.  The first line gives the complete call format for the
  95.    routine, followed by a brief explanation of the purpose, and finally a
  96.    description of the passed arguments.
  97.  
  98.    Note:  This is not the documentation included with the actual library, which
  99.           is more thorough.  Without delving too deeply into details, the infor-
  100.           mation below should give a feel for the QGRAFX library routines and
  101.           their potential applications.
  102.  
  103.    ┌───────────────────────────────────────────────────────────────────────────┐
  104.    │                        TEXT AND CHARACTER ROUTINES                        │
  105.    └───────────────────────────────────────────────────────────────────────────┘
  106.  
  107.    QCHAR(CharCode%, XStart%, YStart%, FgdClr%, BgdClr%)
  108.        Assembly Language routine optimized to display a single character
  109.        in EGA/VGA graphics modes at a pixel address in any combination of
  110.        fore- and background colors.
  111.  
  112.        CharCode% = ASC code of character
  113.          XStart% = X pixel address of upper-left corner of character
  114.          YStart% = Y pixel address of upper-left corner of character
  115.          FgdClr% = Character foreground color
  116.          BgdClr% = Character background color
  117.  
  118.  
  119.    QCHAR2(CharCode%, XStart%, YStart%, FgdClr%, BgdClr%, Mode%, VideoSeg%)
  120.        Assembly Language routine optimized to display a single character
  121.        in EGA/VGA graphics modes at a pixel address in any combination of
  122.        fore- and background colors with optional mode and video segment.
  123.  
  124.        CharCode% = ASC code of character
  125.          XStart% = X pixel address of upper-left corner of character
  126.          YStart% = Y pixel address of upper-left corner of character
  127.          FgdClr% = Character foreground color (greater 15, color not updated)
  128.          BgdClr% = Character background color (greater 15, color not updated)
  129.            Mode% = Display mode (0 = SET, 1 = AND, 2 = OR, 3 = XOR)
  130.        VideoSeg% = Video buffer start, to allow use on multiple pages
  131.  
  132.  
  133.    QCHARPAT(DataSeg%, DataPtr%, XStart%, YStart%, FgdClr%, BgdClr%, CharHeight%)
  134.        Assembly Language routine to display a character from the bitmap pattern
  135.        stored at the passed address at a pixel address in any combination of fore-
  136.        and background colors.  Handy for font editing programs.
  137.  
  138.           DataSeg% = Segment for start of pattern data
  139.           DataPtr% = Offset for start of pattern data
  140.            XStart% = X pixel address of upper-left corner of start of string
  141.            YStart% = Y pixel address of upper-left corner of start of string
  142.            FgdClr% = String foreground color (greater 15, color not updated)
  143.            BgdClr% = String background color (greater 15, color not updated)
  144.        CharHeight% = Character height in pixel rows
  145.  
  146.  
  147.    QTEXT(Text$, XStart%, YStart%, FgdClr%, BgdClr%)
  148.        Assembly Language routine to display a string in EGA/VGA graphics
  149.        modes at a pixel address in any combination of fore- and background
  150.        colors.
  151.  
  152.          Text$ = String to display
  153.        XStart% = X pixel address of upper-left corner of start of string
  154.        YStart% = Y pixel address of upper-left corner of start of string
  155.        FgdClr% = String foreground color
  156.        BgdClr% = String background color
  157.  
  158.  
  159.    QTEXT2(Text$, StrLen%, XStart%, YStart%, FgdClr%, BgdClr%, Mode%,
  160.            Special%, VideoSeg%)
  161.        Assembly Language routine to display a string in EGA/VGA graphics
  162.        modes at a pixel address in any combination of fore- and background
  163.        colors.
  164.  
  165.            Text$ = String to display
  166.          StrLen% = Length of string to display (0 = full length)
  167.          XStart% = X pixel address of upper-left corner of start of string
  168.          YStart% = Y pixel address of upper-left corner of start of string
  169.          FgdClr% = String foreground color (greater 15, color not updated)
  170.          BgdClr% = String background color (greater 15, color not updated)
  171.            Mode% = Display mode (0 = SET, 1 = AND, 2 = OR, 3 = XOR)
  172.         Special% = Bit 1 --> Display String in Lower Case (0=No 1=Yes)
  173.                    Bit 2 --> Display String in Upper Case (0=No 1=Yes)
  174.                    Bit 3 --> Trim trailing spaces in string (0=No 1=Yes)
  175.                    Bit 4 --> Trim leading spaces in string (0=No 1=Yes)
  176.        VideoSeg% = Video buffer start, to allow use on multiple pages
  177.  
  178.  
  179.    QTEXTHGT(Text$, XStart%, YStart%, FgdClr%, BgdClr%, CharHeight%)
  180.        Assembly Language routine to display a string in EGA/VGA graphics
  181.        modes at a pixel address in any combination of fore- and background
  182.        colors in specified system font height (8, 14, or 16).
  183.    
  184.              Text$ = String to display
  185.            XStart% = X pixel address of upper-left corner of start of string
  186.            YStart% = Y pixel address of upper-left corner of start of string
  187.            FgdClr% = String foreground color (greater 15, color not updated)
  188.            BgdClr% = String background color (greater 15, color not updated)
  189.        CharHeight% = Character system font height
  190.  
  191.  
  192.    QTEXTRC(Text$, Row%, Column%, FgdClr%, BgdClr%)
  193.        Assembly Language routine to display a string in EGA/VGA graphics
  194.        modes at a specified row and column in any combination of fore- and
  195.        background colors.
  196.      
  197.                Text$ = String to display
  198.                 Row% = Row address of start of string
  199.              Column% = Column address of start of string
  200.              FgdClr% = String foreground color (greater 15, color not updated)
  201.              BgdClr% = String background color (greater 15, color not updated)
  202.  
  203.  
  204.    QTEXTROT(Text$, StrLen%, XStart%, YStart%, FgdClr%, BgdClr%, NumRot%,
  205.             Mode%, VideoSeg%)
  206.        Assembly Language routine to display a string in EGA/VGA graphics
  207.        modes at a pixel address in any combination of fore- and background
  208.        colors with option to rotate to any multiple of 90 degrees.
  209.      
  210.            Text$ = String to display
  211.          StrLen% = Length of string to display (0 = full length)
  212.          XStart% = X pixel address of upper-left corner of start of string
  213.          YStart% = Y pixel address of upper-left corner of start of string
  214.          FgdClr% = String foreground color (greater 15, color not updated)
  215.          BgdClr% = String background color (greater 15, color not updated)
  216.          NumRot% = Number of 90 degree rotations (0 = 0 deg, 1 = 90 deg, etc.)
  217.            Mode% = Display mode (0 = SET, 1 = AND, 2 = OR, 3 = XOR)
  218.        VideoSeg% = Video buffer start, to allow use on multiple pages
  219.  
  220.  
  221.    SETHGT(CharHeight%)
  222.        Assembly Language routine to change default system font height.  Once
  223.        the default is changes, QuickBasic PRINT commands and the QGRAFX
  224.        commands will both use the new font.
  225.  
  226.        CharHeight% = Character set height (8, 14, or 16)
  227.  
  228.  
  229.    ┌───────────────────────────────────────────────────────────────────────────┐
  230.    │                       PIXEL, LINE, AND BOX ROUTINES                       │
  231.    └───────────────────────────────────────────────────────────────────────────┘
  232.  
  233.    QBOX(x1%, y1%, x2%, y2%, FgdClr%, Fill%)
  234.        Assembly Language routine to draw a box in EGA/VGA graphics modes
  235.        in specified color.
  236.    
  237.            x1% = X pixel address of upper-left corner of box
  238.            y1% = Y pixel address of upper-left corner of box
  239.            x2% = X pixel address of lower-right corner of box
  240.            y2% = Y pixel address of lower-right corner of box
  241.        FgdClr% = Box color
  242.          Fill% = Filled box flag (0 = No Fill, 1 = Fill)
  243.  
  244.  
  245.    QLINE(x1%, y1%, x2%, y2%, FgdClr%)
  246.        Assembly Language routine to draw a line in EGA/VGA graphics modes
  247.        in specified color.
  248.     
  249.            x1% = X pixel address of start of line
  250.            y1% = Y pixel address of start of line
  251.            x2% = X pixel address of end of line
  252.            y2% = Y pixel address of end of line
  253.        FgdClr% = Line color
  254.  
  255.  
  256.    QLINE2(x1%, y1%, x2%, y2%, LineColor%, Mode%, VideoSeg%)
  257.        Assembly Language routine to draw a line in EGA/VGA graphics modes
  258.        in specified color in any display mode.
  259.      
  260.               x1% = X pixel address of start of line
  261.               y1% = Y pixel address of start of line
  262.               x2% = X pixel address of end of line
  263.               y2% = Y pixel address of end of line
  264.        LineColor% = Line color
  265.             Mode% = Display mode (0 = SET, 1 = AND, 2 = OR, 3 = XOR)
  266.         VideoSeg% = Video buffer start, to allow use on multiple pages
  267.  
  268.  
  269.    QLINESTP(x1%, y1%, xstep%, ystep%, LineColor%, Mode%, VideoSeg%)
  270.        Assembly Language routine to draw a line in EGA/VGA graphics modes
  271.        in specified color in any display mode.
  272.      
  273.               x1% = X pixel address of start of line
  274.               y1% = Y pixel address of start of line
  275.            xstep% = X pixel step    
  276.            ystep% = Y pixel step     
  277.        LineColor% = Line color
  278.             Mode% = Display mode (0 = SET, 1 = AND, 2 = OR, 3 = XOR)
  279.         VideoSeg% = Video buffer start, to allow use on multiple pages
  280.  
  281.  
  282.    QPSET(x1%, y1%, PixelColor%, Mode%)
  283.        Assembly Language routine to set a single pixel in EGA/VGA graphics
  284.        modes to specified color in any display mode.
  285.       
  286.                x1% = X pixel address
  287.                y1% = Y pixel address
  288.        PixelColor% = Line color
  289.              Mode% = Display mode (0 = SET, 1 = AND, 2 = OR, 3 = XOR)
  290.  
  291.  
  292.    ┌───────────────────────────────────────────────────────────────────────────┐
  293.    │                          IMAGE HANDLING ROUTINES                          │
  294.    └───────────────────────────────────────────────────────────────────────────┘
  295.  
  296.    QGET(x1%, y1%, x2%, y2%, ArraySeg%, ArrayPtr%)
  297.        Assembly Language routine to GET an image in EGA/VGA graphics modes
  298.        and store in an array in QuickBasic image format.  Exactly duplicates
  299.        QuickBasic's GET for EGA/VGA modes about 20 - 30% faster.
  300.       
  301.              x1% = X pixel address of upper-left corner of image
  302.              y1% = Y pixel address of upper-left corner of image
  303.              x2% = X pixel address of bottom-right corner of image
  304.              y2% = Y pixel address of bottom-right corner of image
  305.        ArraySeg% = Segment for start of storage buffer
  306.        ArrayPtr% = Offset for start of storage buffer
  307.  
  308.  
  309.    QGET2(x1%, y1%, x2%, y2%, ArraySeg%, ArrayPtr%, BitPlaneMask%, VideoSeg%)
  310.        Assembly Language routine to GET an image in EGA/VGA graphics modes
  311.        and store in an array in QuickBasic image format with option to only
  312.        get specified bit planes.
  313.           
  314.                  x1% = X pixel address of upper-left corner of image
  315.                  y1% = Y pixel address of upper-left corner of image
  316.                  x2% = X pixel address of bottom-right corner of image
  317.                  y2% = Y pixel address of bottom-right corner of image
  318.            ArraySeg% = Segment for start of storage buffer
  319.            ArrayPtr% = Offset for start of storage buffer
  320.        BitPlaneMask% = Mask for bit planes to retrieve, (can retrieve any
  321.                        combination of bit planes)
  322.            VideoSeg% = Video buffer start, to allow use on multiple pages
  323.  
  324.  
  325.    QPUT(x1%, y1%, ArraySeg%, ArrayPtr%, Mode%)
  326.        Assembly Language routine to PUT an image in EGA/VGA graphics modes
  327.        on the screen.  Exactly duplicates QuickBasic's PUT in EGA/VGA modes
  328.        about 20 - 30% faster.
  329.       
  330.              x1% = X pixel address of upper-left corner of image
  331.              y1% = Y pixel address of upper-left corner of image
  332.        ArraySeg% = Segment for start of storage buffer
  333.        ArrayPtr% = Offset for start of storage buffer
  334.            Mode% = Display mode (0 = SET, 1 = AND, 2 = OR, 3 = XOR)
  335.  
  336.  
  337.    QPUT2(x1%, y1%, ArraySeg%, ArrayPtr%, Mode%, BitPlaneMask%, VideoSeg%)
  338.        Assembly Language routine to PUT an image in EGA/VGA graphics modes
  339.        on the screen with option to put image in specified bit planes.
  340.           
  341.                  x1% = X pixel address of upper-left corner of image
  342.                  y1% = Y pixel address of upper-left corner of image
  343.            ArraySeg% = Segment for start of storage buffer
  344.            ArrayPtr% = Offset for start of storage buffer
  345.                Mode% = Display mode (0 = SET, 1 = AND, 2 = OR, 3 = XOR)
  346.        BitPlaneMask% = Mask for bit planes to retrieve, (can retrieve any
  347.                        combination of bit planes)
  348.            VideoSeg% = Video buffer start, to allow use on multiple pages
  349.  
  350.  
  351.    QPUTPART(x1%, y1%, xpart%, ypart%, ArraySeg%, ArrayPtr%, Mode%)
  352.        Assembly Language routine to PUT an image in EGA/VGA graphics modes
  353.        on the screen with option to only place a portion of the image.
  354.           
  355.              x1% = X pixel address of upper-left corner of image
  356.              y1% = Y pixel address of upper-left corner of image
  357.           xpart% = Horizontal width of image to actually place
  358.           ypart% = Height in pixel rows of image to actually place
  359.        ArraySeg% = Segment for start of storage buffer
  360.        ArrayPtr% = Offset for start of storage buffer
  361.            Mode% = Display mode (0 = SET, 1 = AND, 2 = OR, 3 = XOR)
  362.  
  363.  
  364.    CREATEIMAGE(x1%, y1%, x2%, y2%, ReturnCode%)
  365.        QuickBasic routine to store a screen image in EGA/VGA graphics modes
  366.        in the QIMAGE format.  The QIMAGE format saves each image as a series
  367.        of horizontal lines of varying length and color.
  368.  
  369.                x1% = X pixel address of upper-left corner of image
  370.                y1% = Y pixel address of upper-left corner of image
  371.                x2% = X pixel address of bottom-right corner of image
  372.                y2% = Y pixel address of bottom-right corner of image
  373.        ReturnCode% = Return code for any errors converting image
  374.  
  375.  
  376.    QIMAGE(ArraySeg%, ArrayPtr%, Mode%, VideoSeg%)
  377.        Assembly Language routine to display an image stored in horizontal line
  378.        format at the x, y pixel address stored in the image array in EGA/VGA
  379.        graphics modes.
  380.  
  381.        ArraySeg% = Segment for start of storage buffer
  382.        ArrayPtr% = Offset for start of storage buffer
  383.            Mode% = Display mode (0 = SET, 1 = AND, 2 = OR, 3 = XOR)
  384.        VideoSeg% = Video buffer start, to allow use on multiple pages
  385.  
  386.  
  387.    QIMAGE2(x1%, y1%, Height%, ArraySeg%, ArrayPtr%, Mode%, VideoSeg%)
  388.        Assembly Language routine to display an image stored in horizontal line
  389.        format at specified x, y pixel address in EGA/VGA graphics modes.
  390.  
  391.              x1% = X pixel address of upper-left corner of image
  392.              y1% = Y pixel address of upper-left corner of image
  393.        ArraySeg% = Segment for start of storage buffer
  394.        ArrayPtr% = Offset for start of storage buffer
  395.            Mode% = Display mode (0 = SET, 1 = AND, 2 = OR, 3 = XOR)
  396.        VideoSeg% = Video buffer start, to allow use on multiple pages
  397.  
  398.  
  399.    ┌───────────────────────────────────────────────────────────────────────────┐
  400.    │                          COLOR CHANGING ROUTINES                          │
  401.    └───────────────────────────────────────────────────────────────────────────┘
  402.  
  403.    QCHANGE1(x1%, y1%, x2%, y2%, NewColor%, BitPlane%)
  404.        Assembly Language routine to change all colors in a specified rectangular
  405.        region which are ON in a specified bit plane to a new color in EGA/VGA
  406.        graphics modes.
  407.     
  408.              x1% = X pixel address of upper-left corner of region
  409.              y1% = Y pixel address of upper-left corner of region
  410.              x2% = X pixel address of bottom-right corner of region
  411.              y2% = Y pixel address of bottom-right corner of region
  412.        NewColor% = New color
  413.        BitPlane% = Bit plane containing pixels to change
  414.  
  415.  
  416.    QCHANGE2(x1%, y1%, x2%, y2%, NewColor%, OldColor%)
  417.        Assembly Language routine to change all old color pixels in a specified
  418.        rectangular region which are ON in a specified bit plane to a new color
  419.        in EGA/VGA graphics modes.
  420.    
  421.              x1% = X pixel address of upper-left corner of region
  422.              y1% = Y pixel address of upper-left corner of region
  423.              x2% = X pixel address of bottom-right corner of region
  424.              y2% = Y pixel address of bottom-right corner of region
  425.        NewColor% = New color
  426.        OldColor% = Old color
  427.  
  428.  
  429.    ┌───────────────────────────────────────────────────────────────────────────┐
  430.    │                                 FONT ROUTINES                             │
  431.    └───────────────────────────────────────────────────────────────────────────┘
  432.  
  433.    DISPCHAR(Char%, Row%, Column%, FgdClr%, BgdClr%, Array%())
  434.        QuickBasic routine to display a single character from the bitmap font
  435.        stored in the given array at row and column in the given colors without
  436.        installing the font.
  437.  
  438.           Char% = ASC code of character to display
  439.            Row% = Screen row to display string
  440.         Column% = Screen column to display string
  441.         FgdClr% = Foreground color of character
  442.         BgdClr% = Background color of character
  443.        Array%() = Array containing bitmap font data
  444.  
  445.  
  446.    INSTALLFONT(Array%())
  447.        QuickBasic routine to install the bitmap font stored in the given
  448.        array as the current graphics font in EGA/VGA graphics modes.
  449.  
  450.        Array%() = Array containing font
  451.  
  452.  
  453.    LOADFONT(Array%(), filename$)
  454.        QuickBasic routine to load the bitmap font from disk and place in the
  455.        given array.
  456.  
  457.         Array%() = Array to contain font data
  458.        filename$ = Name of file from which to load font data
  459.  
  460.  
  461.    SAVEFONT(Array%(), filename$)
  462.        QuickBasic routine to save the bitmap font stored in the given array
  463.        to a disk file.
  464.  
  465.         Array%() = Array containing font
  466.        filename$ = Name of file to save font data
  467.  
  468.  
  469.    ┌───────────────────────────────────────────────────────────────────────────┐
  470.    │                          MISCELLANEOUS ROUTINES                           │
  471.    └───────────────────────────────────────────────────────────────────────────┘
  472.  
  473.    BLINK(BlinkFlag%)
  474.        Assembly Language routine to set the intensity bit plane as either
  475.        intensity or blink.  Enables blinking of all intensity colors.
  476.  
  477.        BlinkFlag% = Blank Flag (0 = Intensity, 1 = Blink)
  478.  
  479.  
  480.    GETSIZE%(x1%, y1%, x2%, y2%, ScreenMode%, NumPlanes%)
  481.        QuickBasic function to return the size in bytes of the array required
  482.        to hold GET/PUT image data in EGA/VGA modes for specified number of
  483.        bit planes.
  484.     
  485.                x1% = X pixel address of upper-left corner of image
  486.                y1% = Y pixel address of upper-left corner of image
  487.                x2% = X pixel address of bottom-right corner of image
  488.                y2% = Y pixel address of bottom-right corner of image
  489.        ScreenMode% = QuickBasic screen mode
  490.         NumPlanes% = Number of bit planes to store (0 for all)
  491.  
  492.  
  493.    QPALETTE(Attribute%, Register%)
  494.        Assembly Language routine to assign a specified attribute (color) to
  495.        specified color register.  (Use to bypass PALETTE bug in some QuickBasic
  496.        screen modes.)
  497.  
  498.        Attribute% = Attribute (color) to point to register
  499.         Register% = Register number to assign to color
  500.  
  501.  
  502.    QRDPAL%(Attribute%)
  503.        Assembly Language function to return current register associated with the
  504.        specified color attribute.
  505.  
  506.        Attribute% = Attribute (color) value
  507.  
  508.  
  509.    QRDPIXEL%(x%, y%)
  510.        Assembly Language function to return color of specified pixel.
  511.  
  512.        x% = X pixel address
  513.        y% = Y pixel address
  514.  
  515.  
  516.    QRDCHAR%(row%, col%)
  517.        Assembly Language function to return the ASC code of the character at the
  518.        specified screen row and column in graphics modes.  The character is found
  519.        by matching the pixel values with stored graphics character definitions.
  520.  
  521.        row% = Screen row from which to return character
  522.        col% = Screen column from which to return character
  523.  
  524.  
  525.    QSCROLL(row1%, col1%, row2%, col2%, NumLines%, Attribute%)
  526.        Assembly Language routine to scroll a specified region of the screen
  527.        in either text or graphics modes.
  528.  
  529.             row1% = Row of upper-left corner of window
  530.             col1% = Column of upper-left corner of window
  531.             row2% = Row of lower-right corner of window
  532.             col2% = Column of lower-right corner of window
  533.         NumLines% = Number lines to scroll (+ scroll up  - scroll down)
  534.        Attribute% = Color attribute of added blank lines
  535.  
  536.  
  537.    QSEARCH%(x1%, y1%, x2%, y2%, Color%)
  538.        Assembly Language function to return a flag for whether the color appears
  539.        in a specified rectangular region of the screen.
  540.     
  541.              x1% = X pixel address of upper-left corner of region
  542.              y1% = Y pixel address of upper-left corner of region
  543.              x2% = X pixel address of bottom-right corner of region
  544.              y2% = Y pixel address of bottom-right corner of region
  545.           Color% = Color for search
  546.  
  547.                          
  548.    QSETDAC(DACReg%, Blue%, Green%, Red%)
  549.        Assembly Language routine to assign blue, green, red color value to a
  550.        VGA/MCGA DAC register.  A color can then be pointed to the DAC register
  551.        using QPALETTE. (Use to bypass PALETTE bug in some QuickBasic screen
  552.        modes.)
  553.  
  554.        DACReg% = Register number to assign color
  555.          Blue% = Blue component (0 - 63)
  556.         Green% = Green component (0 - 63)
  557.           Red% = Red component (0 - 63)
  558.  
  559.  
  560.    REFRESH(RefreshFlag%)
  561.        Assembly Language Routine to Disable/Enable refreshing of EGA/VGA
  562.        screen in graphics modes.  Screen remains black while refresh is
  563.        disabled.
  564.  
  565.        RefreshFlag% = Blank Flag (0 = Disable, 1 = Enable)
  566.  
  567.