home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / ASM4QC.ZIP / ASM4QC.DOC < prev    next >
Text File  |  1990-12-01  |  50KB  |  1,783 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                       ASM4QC, Assembly routines for QuickC
  17.               Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  18.                            Redistributed by permission
  19.  
  20.  
  21.                               Program documentation
  22.                             Updated December 1, 1990
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.                                Table of Contents:
  33.  
  34.                 1.0 Read this Section First......................2
  35.                 2.0 Overview of this Package.....................2
  36.                 3.0 Using ASM4QC.................................3
  37.                 4.0 Conventions Used in Function Descriptions....4
  38.                 5.0 Complete Function Descriptions...............5
  39.                 6.0 Product Support.............................27
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                   Page 1 of 27
  65.  
  66.  
  67.  
  68.  
  69.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  70.  
  71.  
  72.  
  73.  
  74.  
  75.       1.0  Read this Section First:
  76.            This section contains important information regarding this
  77.            package.
  78.  
  79.            1.1  ASM4QC 2.02 is now distributed as freeware. Although it
  80.                 still retains its copyright, you are free to use and
  81.                 distribute ASM4QC as long as no fee is charged (with the
  82.                 exception of a reasonable distribution fee). If you would
  83.                 like to obtain complete source code for all of the library
  84.                 routines, send $29.00 plus $3.00 shipping (California
  85.                 residents add local sales tax) to the following address
  86.                 (See the ORDRFORM file). IMPORTANT: SoftCircuits reserves
  87.                 all rights to the source code and it may not be distributed
  88.                 in an uncompiled form under any circumstances. Send orders
  89.                 to:
  90.  
  91.                      SoftCircuits Programming
  92.                      P.O. Box 16262
  93.                      Irvine, CA 92713
  94.  
  95.            1.2  ASM4QC functions were developed for use with Microsoft
  96.                 QuickC, Microsoft C, and Borland International's Turbo C.
  97.                 They should work with any compatible C compiler using the
  98.                 small, medium, compact, or large memory model running on an
  99.                 IBM-standard personal computer.
  100.  
  101.            1.3  While error checking is an important part any computer
  102.                 program, it can compromise performance and limit
  103.                 flexibility. Since ASM4QC functions were designed to be as
  104.                 fast as possible, they assume that the programmer knows
  105.                 what he or she is doing and may behave unpredictably if
  106.                 invalid arguments are received. The programmer is
  107.                 responsible for deciding if error checking is needed and,
  108.                 if so, implementing it.
  109.  
  110.            1.4  ASM4QC routines use variables that must first be
  111.                 initialized before many of the functions can work
  112.                 correctly. This is done by calling the initvideo() function
  113.                 at the beginning of each program. See the description for
  114.                 initvideo() in section 5.0 for additional information.
  115.  
  116.       2.0  Overview of this Package:
  117.            ASM4QC is a library of assembly language functions that are
  118.            designed to be called from programs written in C. These
  119.            functions provide high performance, low level video routines
  120.            designed for text mode applications.
  121.  
  122.            2.1  To view a demonstration of some ASM4QC functions, you can
  123.                 run the DEMO4QC.EXE program included in this package.
  124.  
  125.            2.2  Using ASM4QC functions in your C programs provides the
  126.                 following advantages:
  127.  
  128.  
  129.  
  130.                                   Page 2 of 27
  131.  
  132.  
  133.  
  134.  
  135.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  136.  
  137.  
  138.  
  139.  
  140.                 2.2.1   You can quickly and easily code professional video
  141.                         routines that would be very time consuming and/or
  142.                         impossible with C alone.
  143.  
  144.                 2.2.2   Since these routines have been written in assembly
  145.                         language and meticulously optimized for both speed
  146.                         and efficiency, they race at the fastest speed
  147.                         possible on your computer while adding very little
  148.                         to the size of the resulting executable file.
  149.  
  150.            2.3  Note that ASM4QC is not meant to replace the graphics
  151.                 library that is included with QuickC. The QuickC graphics
  152.                 library is a powerful set of graphics functions which have
  153.                 limited use in text mode applications. In addition, the
  154.                 size of your executable file will be increased considerably
  155.                 if the QuickC library is included in your program.
  156.  
  157.            2.4  The ASM4QC package contains the following files:
  158.  
  159.                      ASM4QCS.LIB -- ASM4QC library (small memory model)
  160.                      ASM4QCM.LIB -- ASM4QC library (medium memory model)
  161.                      ASM4QCC.LIB -- ASM4QC library (compact memory model)
  162.                      ASM4QCL.LIB -- ASM4QC library (large memory model)
  163.                      ASM4QC.H    -- ASM4QC header file
  164.                      ASM4QC.DOC  -- Documentation (this file)
  165.                      DEMO4QC.EXE -- ASM4QC demo program
  166.                      DEMO4QC.C   -- DEMO4QC C source code
  167.                      GETKEY.COM  -- Getkey() utility
  168.  
  169.                 If you purchased the source code, the following files are
  170.                 also included:
  171.  
  172.                      ASM4QC.INC   -- Assembly language include file
  173.                      DATA4QC.ASM  -- Global data management routines
  174.                      STDVIDEO.ASM -- Standard video routines
  175.                      EXTVIDEO.ASM -- Extended video routines
  176.                      WINDOW.ASM   -- Windowing routines
  177.                      KBDIO.ASM    -- Keyboard input/output routines
  178.                      MAKEFILE     -- Assembler make file
  179.  
  180.       3.0  Using ASM4QC:
  181.            This section outlines the recommended method for developing C
  182.            programs that use ASM4QC functions.
  183.  
  184.            3.1  The first step is to make the ASM4QC library part of your
  185.                 program list (or project file). You must be sure to use the
  186.                 ASM4QC library that corresponds to the memory model being
  187.                 used by your compiler (see section 2.4) or your program
  188.                 will fail.
  189.  
  190.            3.2  If you are using QuickC version 1.0, be sure to turn on
  191.                 screen swapping inside the debug menu.
  192.  
  193.  
  194.  
  195.  
  196.                                   Page 3 of 27
  197.  
  198.  
  199.  
  200.  
  201.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  202.  
  203.  
  204.  
  205.  
  206.            3.3  Be sure to include the ASM4QC header file. Your programs
  207.                 can now call ASM4QC functions the same way they would call
  208.                 any C function. You should always call initvideo() before
  209.                 calling any other ASM4QC function. Section 5.0 gives a
  210.                 complete description of each function and shows the
  211.                 arguments that each function receives and returns.
  212.  
  213.            3.4  If you would like to add formatting to ASM4QC print
  214.                 functions (like that provided with printf()), you can
  215.                 create the following printsaf() function. It accepts
  216.                 arguments identical to those accepted by printf(), and uses
  217.                 an ASM4QC function to write to the screen.
  218.  
  219.                 #include <stdarg.h>
  220.                 #include "asm4qc.h"
  221.  
  222.                 void printsaf(va_list arg_list, ...)
  223.                 {
  224.                      va_list arg_ptr;
  225.                      char *format;
  226.                      char buffer[81]; /* Increase this value if strings */
  227.                                       /* might be longer than 80 chars */
  228.                      va_start(arg_ptr,arg_list);
  229.                      format = arg_list;
  230.                      vsprintf(buffer,format,arg_ptr);
  231.                      printsa(buffer); /* use printsa to write string */
  232.                 }
  233.  
  234.       4.0  Conventions Used in Function Descriptions:
  235.            Section 5.0 gives a complete description of each function in
  236.            alphabetical order. This section describes the conventions used
  237.            in those descriptions.
  238.  
  239.            4.1  Module:
  240.                 Names the assembly source code module and object module
  241.                 that define the function.
  242.  
  243.            4.2  #include:
  244.                 Names the header file that declares the function. The
  245.                 header file should be included to insure proper prototyping
  246.                 and definitions.
  247.  
  248.            4.3  Prototype:
  249.                 Shows how the prototype of the function appears in the
  250.                 specified include file. It shows the types of values that
  251.                 the function accepts and returns.
  252.  
  253.            4.4  Usage:
  254.                 This serves as a descriptive quick reference to the
  255.                 arguments the function accepts and returns.
  256.  
  257.            4.5  Description:
  258.                 Describes the operation of the function.
  259.  
  260.  
  261.  
  262.                                   Page 4 of 27
  263.  
  264.  
  265.  
  266.  
  267.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  268.  
  269.  
  270.  
  271.  
  272.            4.6  Return value:
  273.                 Describes the value that the function returns, if any.
  274.  
  275.            4.7  Example:
  276.                 Examples are sometimes included to illustrate the use of a
  277.                 function.
  278.  
  279.            4.8  Also see:
  280.                 Lists references to additional information that is relevant
  281.                 to the function.
  282.  
  283.  
  284.       5.0  Complete Function Descriptions:
  285.  
  286.       beep() - Beep:
  287.  
  288.            Module:   kbdio
  289.            #include  "asm4qc.h"
  290.  
  291.            Prototype:
  292.            void beep(int,int);
  293.  
  294.            Usage:
  295.            beep(frequency,duration);
  296.  
  297.            Description:
  298.            Sounds the computer's internal speaker. frequency specifies the
  299.            frequency of the tone in hertz (cycles per second). duration
  300.            specifies the tone duration in 18ths of a second (a duration of
  301.            18 is about 1 second). Note that frequency and duration are not
  302.            affected by different computer speeds. Note that beep() accepts
  303.            integer arguments only. Real numbers (such as 4.5) will cause
  304.            unpredictable results.
  305.  
  306.            Return value:
  307.            No return value.
  308.  
  309.  
  310.       biosprintsa() - BIOS print string with attribute:
  311.  
  312.            Module:   stdvideo
  313.            #include  "asm4qc.h"
  314.  
  315.            Prototype:
  316.            void biosprintsa(char *);
  317.  
  318.            Usage:
  319.            biosprintsa("This is a string");
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.                                   Page 5 of 27
  329.  
  330.  
  331.  
  332.  
  333.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  334.  
  335.  
  336.  
  337.  
  338.            Description:
  339.            This function uses ROM BIOS to write a string to the screen
  340.            starting at the position of the text cursor. The string is
  341.            written using the current color attribute. No formatting, as in
  342.            printf(), is provided. However, biosprintsa() gives special
  343.            treatment to the following escape sequences:
  344.  
  345.                 \a   Alert (beep)             \t   Tab
  346.                 \b   Backspace                \'   Single quote
  347.                 \n   New line (CR-LF)         \"   Double quote
  348.                 \r   Carriage return          \\   Backslash
  349.  
  350.                 \xdd  ASCII dd, where dd is a hexadecimal number.
  351.                 \ddd  ASCII ddd, where ddd is an octal number.
  352.  
  353.            In contrast, the printsa() function would only print the ASCII
  354.            character that results from the escape sequence. However,
  355.            printsa() is much faster.
  356.  
  357.            Return value:
  358.            No return value.
  359.  
  360.            Also see:
  361.            color(), setcurs().
  362.  
  363.  
  364.       cls() - Clear screen:
  365.  
  366.            Module:   stdvideo
  367.            #include  "asm4qc.h"
  368.  
  369.            Prototype:
  370.            void cls(void);
  371.  
  372.            Usage:
  373.            cls();
  374.  
  375.            Description:
  376.            This function clears the entire screen using the default color
  377.            attribute. If you want to clear only a portion of the screen,
  378.            use the scroll() function. If you want to set the color of the
  379.            screen border, use setborder().
  380.  
  381.            Return value:
  382.            No return value.
  383.  
  384.            Also see:
  385.            scroll(), setborder(), color().
  386.  
  387.  
  388.       _color(), color() - Set default color:
  389.  
  390.            Module:   data4qc
  391.            #include  "asm4qc.h"
  392.  
  393.  
  394.                                   Page 6 of 27
  395.  
  396.  
  397.  
  398.  
  399.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  400.  
  401.  
  402.  
  403.  
  404.  
  405.            Prototype:
  406.            int _color(int);
  407.            #define color(f,b) _color(foreback(f,b))
  408.  
  409.            Usage:
  410.            previous_color = _color(attribute);
  411.            previous_color = color(foreground,background);
  412.  
  413.            Description:
  414.            Sets the default color attribute. The color() macro accepts a
  415.            foreground and background argument, while _color() requires a
  416.            single, combined attribute value.
  417.  
  418.            ASM4QC.H defines the following color constants:
  419.  
  420.                 BLACK     BLUE      GREEN     CYAN      RED
  421.                 MAGENTA   YELLOW    WHITE     BOLD      BLINKING
  422.  
  423.            BOLD and BLINKING are only valid for foreground colors. You can
  424.            combine them with the plus sign (ex: BOLD+BLINKING+YELLOW). The
  425.            default color attribute will be WHITE,BLACK until your program
  426.            changes it.
  427.  
  428.            Return value:
  429.            This function returns the previous color attribute combined into
  430.            a single attribute value. This makes it possible for functions
  431.            to change the default color and then restore it when they are
  432.            finished.
  433.  
  434.            Example:
  435.            This example sets the default color attribute to bright white
  436.            characters on a blue background. It then clears the screen and
  437.            prints a message.
  438.  
  439.                 #include "asm4qc.h"
  440.  
  441.                 main()
  442.                 {
  443.                      initvideo();   /* always call this first */
  444.                      color(BOLD+WHITE,BLUE);  /* set color */
  445.                      cls();         /* clear the screen */
  446.                      setvoff(1,1);  /* position logical cursor */
  447.                      prints("Hello world");   /* display message */
  448.                 }
  449.  
  450.            Also see:
  451.            foreback(), setbackcolor(), setforecolor().
  452.  
  453.  
  454.       curscol() - Get cursor column:
  455.  
  456.            Module:   stdvideo
  457.            #include  "asm4qc.h"
  458.  
  459.  
  460.                                   Page 7 of 27
  461.  
  462.  
  463.  
  464.  
  465.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  466.  
  467.  
  468.  
  469.  
  470.  
  471.            Prototype:
  472.            int curscol(void);
  473.  
  474.            Usage:
  475.            cursor_column = curscol();
  476.  
  477.            Description:
  478.            This function returns the current cursor column.
  479.  
  480.            Return value:
  481.            The current cursor column.
  482.  
  483.            Also see:
  484.            cursrow(), setcurs(), voffcol().
  485.  
  486.  
  487.       cursrow() - Get cursor row:
  488.  
  489.            Module:   stdvideo
  490.            #include  "asm4qc.h"
  491.  
  492.            Prototype:
  493.            int cursrow(void);
  494.  
  495.            Usage:
  496.            cursor_row = cursrow();
  497.  
  498.            Description:
  499.            This function returns the current cursor row.
  500.  
  501.            Return value:
  502.            The current cursor row.
  503.  
  504.            Also see:
  505.            curscol(), setcurs(), voffrow().
  506.  
  507.  
  508.       edstring() - Edit string:
  509.  
  510.            Module:   kbdio
  511.            #include  "asm4qc.h"
  512.  
  513.            Prototype:
  514.            int edstring(char *,int);
  515.  
  516.            Usage:
  517.            actual_length = edstring(string_buffer,max_length);
  518.  
  519.            Description:
  520.            This function is identical to kbded() except that kbded() always
  521.            clears string_buffer before allowing input, and edstring()
  522.            allows you to edit the original contents of string_buffer. See
  523.            kbded() for more information.
  524.  
  525.  
  526.                                   Page 8 of 27
  527.  
  528.  
  529.  
  530.  
  531.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  532.  
  533.  
  534.  
  535.  
  536.  
  537.            Return value:
  538.            Length of the entered string (not counting the return key or
  539.            terminating null), or -1 if the user pressed escape.
  540.  
  541.            Also see:
  542.            initvideo(), kbded().
  543.  
  544.  
  545.       foreback() - Get attribute from foreground and background arguments:
  546.  
  547.            #include  "asm4qc.h"
  548.  
  549.            Prototype:
  550.            #define foreback(f,b)
  551.                      ((f & 0x0F) | ((f & 0x10) << 3) | ((b & 0x07) << 4));
  552.  
  553.            Usage:
  554.            color_attribute = foreback(foreground,background);
  555.  
  556.            Description:
  557.            The foreback() macro can be used as an argument to any function
  558.            that requires a single color attribute value. It allows you to
  559.            specify the foreground and background colors as separate
  560.            arguments. See color() for valid arguments.
  561.  
  562.            Return value:
  563.            The combined color attribute value.
  564.  
  565.            Also see:
  566.            color(), setbackcolor(), setforecolor().
  567.  
  568.  
  569.       frame() - Draw frame:
  570.  
  571.            Module:   extvideo
  572.            #include  "asm4qc.h"
  573.  
  574.            Prototype:
  575.            void frame(int,int,int,int);
  576.  
  577.            Usage:
  578.            frame(top,bottom,left,right);
  579.  
  580.            Description:
  581.            This function draws a frame on the screen using the current
  582.            color attribute. The arguments define the frame coordinates.
  583.            Note that the top row and left-most column are specified with 1
  584.            and not 0.
  585.  
  586.            Return value:
  587.            No return value.
  588.  
  589.  
  590.  
  591.  
  592.                                   Page 9 of 27
  593.  
  594.  
  595.  
  596.  
  597.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  598.  
  599.  
  600.  
  601.  
  602.            Also see:
  603.            initvideo(), color(), setframetype().
  604.  
  605.  
  606.       getkey(), getasciicode(), getscancode() - Get keystroke:
  607.  
  608.            Module:   kbdio
  609.            #include  "asm4qc.h"
  610.  
  611.            Prototype:
  612.            int getkey(void);
  613.            #define getasciicode() (getkey() & 0x00FF)
  614.            #define getscancode() (getkey() >> 8)
  615.  
  616.            Usage:
  617.            key_pressed = getkey();
  618.            ascii_code = getasciicode();
  619.            scan_code = getscancode();
  620.  
  621.            Description:
  622.            The getkey() function retrieves a keystroke from the keyboard.
  623.            It is most effective when accessing control keys because it
  624.            returns them in a single call, whereas getch() requires two
  625.            calls to retrieve extended keys. getkey() returns the scan code
  626.            in the upper byte, and the ASCII code in the lower byte.
  627.  
  628.            The GETKEY.COM utility program can be used to display the return
  629.            code, as returned by getkey(), for any key pressed. ASM4QC.H
  630.            defines constants for many control keys and also defines the
  631.            getasciicode() and getscancode() macros, which are variations of
  632.            getkey(). getasciicode() returns just the ASCII code, or 0 if a
  633.            control key was pressed, and getscancode() returns only the
  634.            key's scan code.
  635.  
  636.            Return value:
  637.            Keyboard character as explained above.
  638.  
  639.            Also see:
  640.            kbdflush().
  641.  
  642.  
  643.       getvconfig() - Get video configuration
  644.  
  645.            Module:   data4qc
  646.            #include  "asm4qc.h"
  647.  
  648.            Prototype:
  649.            void getvconfig(struct vconfig *);
  650.  
  651.            Usage:
  652.            struct vconfig vdata;    /* declare structure of type vconfig */
  653.            getvconfig(&vdata);
  654.  
  655.  
  656.  
  657.  
  658.                                   Page 10 of 27
  659.  
  660.  
  661.  
  662.  
  663.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  664.  
  665.  
  666.  
  667.  
  668.            Description:
  669.            This function returns information about the current video
  670.            configuration. The argument is the address of a structure of
  671.            type vconfig which is defined in the ASM4QC.H header file. Note
  672.            that the values placed in the structure describe the video
  673.            configuration at the time initvideo() was last called.
  674.  
  675.            On return, the structure contains the following values:
  676.                 vdata.vsegment  - Video segment used by ASM4QC
  677.                 vdata.vmode     - Video mode
  678.                 vdata.vpage     - Video page
  679.                 vdata.textrows  - Number of text rows
  680.                 vdata.textcols  - Number of text columns
  681.                 vdata.snowcheck - Snow checking (1 = enabled, 0 = disabled)
  682.                 vdata.vcombo    - Video display combination code
  683.  
  684.            Video display combination codes:
  685.                  0 - No display
  686.                  1 - MDA w/mono display
  687.                  2 - CGA w/color display
  688.                  3 - (not used)
  689.                  4 - EGA w/color display
  690.                  5 - EGA w/mono display
  691.                  6 - PGA w/color display
  692.                  7 - VGA w/analog mono display
  693.                  8 - VGA w/analog color display
  694.                  9 - (not used)
  695.                 10 - (not used)
  696.                 11 - MCGA w/analog mono display
  697.                 12 - MCGA w/analog color display
  698.                 -1 - Unknown display combination
  699.  
  700.            Return value:
  701.            No return value.
  702.  
  703.            Example:
  704.            This example reports information about the current display
  705.            configuration:
  706.  
  707.                 #include <stdio.h>
  708.                 #include "asm4qc.h"
  709.  
  710.                 struct vconfig vdata;    /* declare vconfig structure */
  711.  
  712.                 main()
  713.                 {
  714.                      initvideo();        /* always call this first */
  715.                      getvconfig(&vdata); /* remember to pass address */
  716.  
  717.                      printf("Video segment: %04X\n",vdata.vsegment);
  718.                      printf("Video mode: %d\n",vdata.vmode);
  719.                      printf("Video page: %d\n",vdata.vpage);
  720.                      printf("Number of rows: %d\n",vdata.textrows);
  721.                      printf("Number of columns: %d\n",vdata.textcols);
  722.  
  723.  
  724.                                   Page 11 of 27
  725.  
  726.  
  727.  
  728.  
  729.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  730.  
  731.  
  732.  
  733.  
  734.                      printf("Snow checking: %d\n",vdata.snowcheck);
  735.                      printf("Display combination: %d\n",vdata.vcombo);
  736.                 }
  737.  
  738.            Also see:
  739.            initvideo().
  740.  
  741.  
  742.       hidecurs() - Hide cursor:
  743.  
  744.            Module:   stdvideo
  745.            #include  "asm4qc.h"
  746.  
  747.            Prototype:
  748.            void hidecurs(void);
  749.  
  750.            Usage:
  751.            hidecurs();
  752.  
  753.            Description:
  754.            This function hides the text cursor without changing its size or
  755.            location. The cursor can later be restored with restorecurs().
  756.  
  757.            Return value:
  758.            No return value.
  759.  
  760.            Also see:
  761.            restorecurs(), setcurs().
  762.  
  763.  
  764.       hscroll() - Horizontal scroll:
  765.  
  766.            Module:   extvideo
  767.            #include  "asm4qc.h"
  768.  
  769.            Prototype:
  770.            void hscroll(int,int,int,int,int);
  771.  
  772.            Usage:
  773.            hscroll(columns,top,bottom,left,right);
  774.  
  775.            Description:
  776.            This function works exactly like scroll() except that hscroll()
  777.            scrolls from side to side. columns specifies the number of
  778.            columns that the contents of the window will be scrolled. If
  779.            columns is positive, the text is scrolled left. If columns is
  780.            negative, the text is scrolled right. If columns is 0, the
  781.            window is cleared. When you only need to clear a window, it is
  782.            preferable to use scroll() because scroll() is noticeable
  783.            faster, especially when snow checking is enabled. See scroll()
  784.            for additional information.
  785.  
  786.            Return value:
  787.            No return value.
  788.  
  789.  
  790.                                   Page 12 of 27
  791.  
  792.  
  793.  
  794.  
  795.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  796.  
  797.  
  798.  
  799.  
  800.  
  801.            Also see:
  802.            initvideo(), scroll(), color().
  803.  
  804.  
  805.       initvideo() - Initialize video:
  806.  
  807.            Module:   data4qc
  808.            #include  "asm4qc.h"
  809.  
  810.            Prototype:
  811.            int initvideo(void);
  812.  
  813.            Usage:
  814.            is_color = initvideo();
  815.  
  816.            Description:
  817.            ASM4QC routines use variables that must first be initialized
  818.            before many of the functions can work correctly. initvideo()
  819.            initializes these variables. Your programs should always call
  820.            initvideo() before calling any other ASM4QC function.
  821.            initvideo() should also be called after any changes are made to
  822.            the display environment.
  823.  
  824.            Returns:
  825.            This function returns TRUE (1) if the video hardware supports
  826.            color, or FALSE (0) to indicate that color is not supported.
  827.            Note that a composite monitor using a color graphics adapter
  828.            will cause initvideo() to return TRUE even though composite
  829.            monitors are unable to display color. For this reason, it is
  830.            recommended that your programs allow users with composite
  831.            monitors to suppress color in your programs. This is exactly
  832.            what QuickC's /b option does.
  833.  
  834.            Also see:
  835.            getvconfig(), setsnowcheck(), setvsegment()
  836.  
  837.  
  838.       kbded() - Keyboard editor:
  839.  
  840.            Module:   kbdio
  841.            #include  "asm4qc.h"
  842.  
  843.            Prototype:
  844.            int kbded(char *,int);
  845.  
  846.            Usage:
  847.            actual_length = kbded(string_buffer,max_length);
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.                                   Page 13 of 27
  857.  
  858.  
  859.  
  860.  
  861.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  862.  
  863.  
  864.  
  865.  
  866.            Description:
  867.            Allows the user to enter and edit keyboard input. max_length
  868.            specifies the maximum string length to be accepted. The entered
  869.            string will be placed in string_buffer. It is the programmers
  870.            responsibility to see that string_buffer is large enough to hold
  871.            a string of max_length + 1 (the terminating null). kbded() makes
  872.            use of the following editing keys:
  873.  
  874.                 Text characters keys          Home
  875.                 Backspace                     End
  876.                 Return                        Left
  877.                 Escape                        Right
  878.                 Delete                        Control-left
  879.                 Insert                        Control-right
  880.  
  881.            The input is echoed to the screen at the location of the text
  882.            cursor. If escaped is pressed, kbded() returns -1 and a null
  883.            string in string_buffer. kbded() always starts by filling
  884.            string_buffer with ASCII zeros. If you want to edit a buffer
  885.            without first erasing its contents, use edstring().
  886.  
  887.            Return value:
  888.            Length of entered string (not counting the return key or
  889.            terminating null), or -1 if the user pressed escape.
  890.  
  891.            Also see:
  892.            edstring(), initvideo(), setcurs().
  893.  
  894.  
  895.       kbdflush() - Keyboard flush:
  896.  
  897.            Module:   kbdio
  898.            #include  "asm4qc.h"
  899.  
  900.            Prototype:
  901.            void kbdflush(void);
  902.  
  903.            Usage:
  904.            kbdflush();
  905.  
  906.            Description:
  907.            This function flushes out any keystrokes waiting in the keyboard
  908.            buffer.
  909.  
  910.            Return value:
  911.            No return value.
  912.  
  913.            Also see:
  914.            getkey().
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.                                   Page 14 of 27
  923.  
  924.  
  925.  
  926.  
  927.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  928.  
  929.  
  930.  
  931.  
  932.       pause() - Suspend program execution:
  933.  
  934.            Module:   kbdio
  935.            #include  "asm4qc.h"
  936.  
  937.            Prototype:
  938.            void pause(int);
  939.  
  940.            Usage:
  941.            pause(duration);
  942.  
  943.            Description:
  944.            This function simply suspends program execution for the length
  945.            of time specified by the duration argument. Each 18 counts of
  946.            duration is equal to about 1 second. The length of time is not
  947.            affected by different computer speeds. Note that pause() accepts
  948.            integer arguments only. Real numbers (such as 4.5) will cause
  949.            unpredictable results.
  950.  
  951.            Return value:
  952.            No return value.
  953.  
  954.  
  955.       printa() - Print attribute:
  956.  
  957.            Module:   extvideo
  958.            #include  "asm4qc.h"
  959.  
  960.            Prototype:
  961.            void printa(int,int);
  962.  
  963.            Usage:
  964.            printa(color,count);
  965.  
  966.            Description:
  967.            This function is ideal for creating a moving highlight bar for
  968.            menus. It writes a color to the screen without changing the text
  969.            it covers. The color is specified by the color argument. The
  970.            starting location is specified by the video offset (see
  971.            setvoff()) and the number of columns covered is specified by the
  972.            count argument. The foreback() macro can be used as the color
  973.            argument.
  974.  
  975.            Return value:
  976.            No return value.
  977.  
  978.            Also see:
  979.            foreback(), initvideo(), setvoff().
  980.  
  981.  
  982.       prints() - Print string:
  983.  
  984.            Module:   extvideo
  985.            #include  "asm4qc.h"
  986.  
  987.  
  988.                                   Page 15 of 27
  989.  
  990.  
  991.  
  992.  
  993.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  994.  
  995.  
  996.  
  997.  
  998.  
  999.            Prototype:
  1000.            void prints(char *);
  1001.  
  1002.            Usage:
  1003.            prints("This is a string");
  1004.  
  1005.            Description:
  1006.            This function will write a string to the screen in much the same
  1007.            way as printsa(), only this function writes the string using the
  1008.            color attribute that's already at that screen location. See
  1009.            printsa() for additional information.
  1010.  
  1011.            Return value:
  1012.            No return value.
  1013.  
  1014.            Also see:
  1015.            initvideo(), printsa(), setvoff().
  1016.  
  1017.  
  1018.       printsa() - Print string with attribute:
  1019.  
  1020.            Module:   extvideo
  1021.            #include  "asm4qc.h"
  1022.  
  1023.            Prototype:
  1024.            void printsa(char *);
  1025.  
  1026.            Usage:
  1027.            printsa("This is a string");
  1028.  
  1029.            Description:
  1030.            This function writes a string to the screen using the current
  1031.            color attribute. This function provides exceptional performance
  1032.            by writing directly into video RAM. The string will be written
  1033.            to the location specified by the video offset value (see
  1034.            setvoff()). No formatting, as in printf(), is provided. Note
  1035.            that printsa() is not affected by, nor does it affect the actual
  1036.            text cursor.
  1037.  
  1038.            Return value:
  1039.            No return value.
  1040.  
  1041.            Also see:
  1042.            initvideo(), color(), setvoff().
  1043.  
  1044.  
  1045.       reada() - Read attribute:
  1046.  
  1047.            Module:   extvideo
  1048.            #include  "asm4qc.h"
  1049.  
  1050.            Prototype:
  1051.            int reada(int,int);
  1052.  
  1053.  
  1054.                                   Page 16 of 27
  1055.  
  1056.  
  1057.  
  1058.  
  1059.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.            Usage:
  1066.            attribute = reada(row,column);
  1067.  
  1068.            Description:
  1069.            This function returns the attribute at the screen location
  1070.            specified by row, column.
  1071.  
  1072.            Return value:
  1073.            The attribute as described above.
  1074.  
  1075.            Also see:
  1076.            initvideo(), readc().
  1077.  
  1078.  
  1079.       readc() - Read character:
  1080.  
  1081.            Module:   extvideo
  1082.            #include  "asm4qc.h"
  1083.  
  1084.            Prototype:
  1085.            char readc(int,int);
  1086.  
  1087.            Usage:
  1088.            character = readc(row,column);
  1089.  
  1090.            Description:
  1091.            This function returns the character at the screen location
  1092.            specified by row, column.
  1093.  
  1094.            Return value:
  1095.            The character as described above.
  1096.  
  1097.            Also see:
  1098.            initvideo(), reada().
  1099.  
  1100.  
  1101.       repch() - Repeat character:
  1102.  
  1103.            Module:   stdvideo
  1104.            #include  "asm4qc.h"
  1105.  
  1106.            Prototype:
  1107.            void repch(char,int);
  1108.  
  1109.            Usage:
  1110.            repch(character,count);
  1111.  
  1112.            Description:
  1113.            This function prints one character to the screen at the location
  1114.            of the text cursor. The character is repeated for the number of
  1115.            times specified by the count argument and is written using the
  1116.            current color attribute. Note that this function does not update
  1117.            the position of the text cursor.
  1118.  
  1119.  
  1120.                                   Page 17 of 27
  1121.  
  1122.  
  1123.  
  1124.  
  1125.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.            Return value:
  1132.            No return value.
  1133.  
  1134.            Also see:
  1135.            color(), setcurs().
  1136.  
  1137.  
  1138.       restorecurs() - Restore cursor:
  1139.  
  1140.            Module:   stdvideo
  1141.            #include  "asm4qc.h"
  1142.  
  1143.            Prototype:
  1144.            void restorecurs(void);
  1145.  
  1146.            Usage:
  1147.            restorecurs();
  1148.  
  1149.            Description:
  1150.            This function restores the text cursor after it was hidden by
  1151.            the hidecurs() function.
  1152.  
  1153.            Return value:
  1154.            No return value.
  1155.  
  1156.            Also see:
  1157.            hidecurs().
  1158.  
  1159.  
  1160.       restorewin() - Restore window:
  1161.  
  1162.            Module:   window
  1163.            #include  "asm4qc.h"
  1164.  
  1165.            Prototype:
  1166.            void restorewin(int *,int,int,int,int);
  1167.  
  1168.            Usage:
  1169.            restorewin(buffer,top,bottom,left,right);
  1170.  
  1171.            Description:
  1172.            This function restores the section of screen specified by the
  1173.            last 4 arguments with the contents of buffer. buffer should have
  1174.            previously been used in a call to savewin().
  1175.  
  1176.            Return value:
  1177.            No return value.
  1178.  
  1179.            Also see:
  1180.            initvideo(), savewin().
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.                                   Page 18 of 27
  1187.  
  1188.  
  1189.  
  1190.  
  1191.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  1192.  
  1193.  
  1194.  
  1195.  
  1196.       savewin() - Save window:
  1197.  
  1198.            Module:   window
  1199.            #include  "asm4qc.h"
  1200.  
  1201.            Prototype:
  1202.            void savewin(int *,int,int,int,int);
  1203.  
  1204.            Usage:
  1205.            savewin(buffer,top,bottom,left,right);
  1206.  
  1207.            Description:
  1208.            This function saves the section of screen specified by the last
  1209.            4 arguments. The section of screen can be as small as 1
  1210.            character. Note that the top row and left-most column are
  1211.            specified with 1 and not 0. The data will be stored in buffer.
  1212.            savewin() can be used prior to creating a pop-up window. The
  1213.            pop-up window can then be closed by restoring the contents of
  1214.            the buffer back to the screen using restorewin().
  1215.  
  1216.            It is the programmers responsibility to see that buffer is large
  1217.            enough to hold the contents of the window, and that the window
  1218.            coordinates are valid. Not doing so may cause the program to
  1219.            fail. The buffer should be of type int, and the number of
  1220.            elements needed is equal to:
  1221.  
  1222.                 ((bottom - top) + 1) * ((right - left) + 1)
  1223.  
  1224.            Return value:
  1225.            No return value.
  1226.  
  1227.            Example:
  1228.            This example creates a pop-up window that displays a message
  1229.            until the user presses a key.
  1230.  
  1231.                 #include "asm4qc.h"
  1232.  
  1233.                 #define TOP    5
  1234.                 #define BOTTOM 9
  1235.                 #define LEFT   27
  1236.                 #define RIGHT  56
  1237.  
  1238.                 /* declare buffer to hold information under the window */
  1239.                 int buffer[((BOTTOM - TOP) + 1) * ((RIGHT - LEFT) + 1)];
  1240.  
  1241.                 main()
  1242.                 {
  1243.                      /* create bold white characters on blue */
  1244.                      /* if display supports color */
  1245.                      if(initvideo())
  1246.                           color(BOLD+WHITE,BLUE);
  1247.  
  1248.                      /* save information under window */
  1249.                      savewin(buffer,TOP,BOTTOM,LEFT,RIGHT);
  1250.  
  1251.  
  1252.                                   Page 19 of 27
  1253.  
  1254.  
  1255.  
  1256.  
  1257.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.                      /* clear the window */
  1264.                      scroll(0,TOP,BOTTOM,LEFT,RIGHT);
  1265.  
  1266.                      /* put a double frame around the window */
  1267.                      frame(TOP,BOTTOM,LEFT,RIGHT);
  1268.  
  1269.                      /* print message */
  1270.                      setvoff(TOP+2,LEFT+7);
  1271.                      prints("Hello  world");
  1272.  
  1273.                      getkey();      /* wait till user presses a key */
  1274.  
  1275.                      /* close the window */
  1276.                      restorewin(buffer,TOP,BOTTOM,LEFT,RIGHT);
  1277.                 }
  1278.  
  1279.            Also see:
  1280.            initvideo(), restorewin().
  1281.  
  1282.  
  1283.       scroll() - Scroll window:
  1284.  
  1285.            Module:   stdvideo
  1286.            #include  "asm4qc.h"
  1287.  
  1288.            Prototype:
  1289.            void scroll(int,int,int,int,int);
  1290.  
  1291.            Usage:
  1292.            scroll(lines,top,bottom,left,right);
  1293.  
  1294.            Description:
  1295.            The last 4 arguments specify the coordinates of a window on the
  1296.            screen. Note that the top row and left-most column are specified
  1297.            with 1 and not 0. The contents of this window will be scrolled
  1298.            the number of lines specified by the lines argument. If lines is
  1299.            a positive value, then the window will scroll up. If lines is
  1300.            negative, then the window will scroll down. If lines is 0, then
  1301.            the window will be cleared. The current color attribute
  1302.            specifies the color of the new lines scrolled into the window if
  1303.            it is scrolled, or the color attribute of the entire window if
  1304.            it is cleared. To scroll horizontally, use hscroll().
  1305.  
  1306.            Return value:
  1307.            No return value.
  1308.  
  1309.            Also see:
  1310.            hscroll(), color().
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.                                   Page 20 of 27
  1319.  
  1320.  
  1321.  
  1322.  
  1323.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  1324.  
  1325.  
  1326.  
  1327.  
  1328.       setborder() - Set screen border:
  1329.  
  1330.            Module:   stdvideo
  1331.            #include  "asm4qc.h"
  1332.  
  1333.            Prototype:
  1334.            void setborder(void);
  1335.  
  1336.            Usage:
  1337.            setborder();
  1338.  
  1339.            Description:
  1340.            This function sets the color of the screen border to the current
  1341.            background color.
  1342.  
  1343.            Return value:
  1344.            No return value.
  1345.  
  1346.            Also see:
  1347.            color().
  1348.  
  1349.  
  1350.       setcurs() - Set cursor position:
  1351.  
  1352.            Module:   stdvideo
  1353.            #include  "asm4qc.h"
  1354.  
  1355.            Prototype:
  1356.            void setcurs(int,int);
  1357.  
  1358.            Usage:
  1359.            setcurs(row,column);
  1360.  
  1361.            Description:
  1362.            The setcurs() function positions the text cursor. The arguments
  1363.            specify the screen coordinates that the cursor is to be placed,
  1364.            where 1,1 specifies the top, left corner of the screen.
  1365.  
  1366.            Return value:
  1367.            No return value.
  1368.  
  1369.            Also see:
  1370.            curscol(), cursrow(), hidecurs(), restorecurs(), setvoff().
  1371.  
  1372.  
  1373.       setbackcolor() - Set default background color:
  1374.  
  1375.            Module:   data4qc
  1376.            #include  "asm4qc.h"
  1377.  
  1378.            Prototype:
  1379.            int setbackcolor(int);
  1380.  
  1381.  
  1382.  
  1383.  
  1384.                                   Page 21 of 27
  1385.  
  1386.  
  1387.  
  1388.  
  1389.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  1390.  
  1391.  
  1392.  
  1393.  
  1394.            Usage:
  1395.            previous_background = setbackcolor(background);
  1396.  
  1397.            Description:
  1398.            This function sets the default background color.
  1399.  
  1400.            Return value:
  1401.            Returns the previous background color.
  1402.  
  1403.            Also see:
  1404.            color(), foreback(), setforecolor().
  1405.  
  1406.  
  1407.       setdefvenv() - Set default video environment:
  1408.  
  1409.            Module:   data4qc
  1410.            #include  "asm4qc.h"
  1411.  
  1412.            Prototype:
  1413.            int setdefvenv(void);
  1414.  
  1415.            Usage:
  1416.            mode_was_reset = setdefvenv();
  1417.  
  1418.            Description:
  1419.            This function examines the current video environment. If it
  1420.            finds the default text mode, video page 0, 25 text rows and 80
  1421.            text columns, then it simply returns FALSE (0). Otherwise it
  1422.            resets the video environment to the default text mode, calls
  1423.            initvideo(), and returns TRUE (1). Important: initvideo() must
  1424.            have previously been called in order for this function to work
  1425.            reliably.
  1426.  
  1427.            Return value:
  1428.            Returns TRUE (1) if the video mode was reset, FALSE (0)
  1429.            otherwise.
  1430.  
  1431.            Also see:
  1432.            initvideo().
  1433.  
  1434.  
  1435.       setforecolor() - Set default foreground color:
  1436.  
  1437.            Module:   data4qc
  1438.            #include  "asm4qc.h"
  1439.  
  1440.            Prototype:
  1441.            int setforecolor(int);
  1442.  
  1443.            Usage:
  1444.            previous_foreground = setforecolor(foreground);
  1445.  
  1446.            Description:
  1447.            This function sets the default foreground color.
  1448.  
  1449.  
  1450.                                   Page 22 of 27
  1451.  
  1452.  
  1453.  
  1454.  
  1455.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.            Return value:
  1462.            Returns the previous foreground color.
  1463.  
  1464.            Also see:
  1465.            color(), foreback(), setbackcolor().
  1466.  
  1467.  
  1468.       setframetype(), setdoubleframe(), setsingleframe() - Set frame type:
  1469.  
  1470.            Module:   extvideo
  1471.            #include  "asm4qc.h"
  1472.  
  1473.            Prototype:
  1474.            void setframetype(char,char,char,char,char,char);
  1475.            #define setdoubleframe() \
  1476.                 setframetype('\xCD','\xBA','\xC9','\xBB','\xC8','\xBC')
  1477.            #define setsingleframe() \
  1478.                 setframetype('\xC4','\xB3','\xDA','\xBF','\xC0','\xD9')
  1479.  
  1480.            Usage:
  1481.            setframetype(top,side,topleft,topright,bottomleft,bottomright);
  1482.            setdoubleframe();
  1483.            setsingleframe();
  1484.  
  1485.            Description:
  1486.            The frame() function creates a double line border by default.
  1487.            setframetype() allows you to customize the characters used by
  1488.            the frame() function. The setdoubleframe() and setsingleframe()
  1489.            macros can be used to set standard frame types.
  1490.  
  1491.            Return value:
  1492.            No return value.
  1493.  
  1494.            Also see:
  1495.            frame().
  1496.  
  1497.  
  1498.       setsnowcheck() - Set snow check status:
  1499.  
  1500.            Module:   data4qc
  1501.            #include  "asm4qc.h"
  1502.  
  1503.            Prototype:
  1504.            void setsnowcheck(int);
  1505.  
  1506.            Usage:
  1507.            setsnowcheck(OFF);
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.                                   Page 23 of 27
  1517.  
  1518.  
  1519.  
  1520.  
  1521.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  1522.  
  1523.  
  1524.  
  1525.  
  1526.            Description:
  1527.            The IBM Color Graphics Adapter will snow (flicker spots
  1528.            randomly) if video memory is accessed too quickly. When snow
  1529.            checking is enabled, ASM4QC functions slow down in a manner that
  1530.            eliminates snow. initvideo() automatically enables snow checking
  1531.            if it determines that a CGA is the active adapter.
  1532.  
  1533.            Since a number of CGA adapters don't snow, and some users might
  1534.            not mind snow, setsnowcheck() provides a way for your programs
  1535.            to disable snow checking. A non-zero argument enables snow
  1536.            checking and a zero argument disables it. You can use the ON or
  1537.            OFF constants, defined in ASM4QC.H, as arguments. Calling this
  1538.            function with a non-zero argument is generally not recommended
  1539.            because snow checking slows down many ASM4QC functions and will
  1540.            cause unpredictable results if enabled on monochrome systems.
  1541.  
  1542.            Return value:
  1543.            No return value.
  1544.  
  1545.            Also see:
  1546.            initvideo(),
  1547.  
  1548.  
  1549.       setvmode() - Set video mode:
  1550.  
  1551.            Module:   stdvideo
  1552.            #include  "asm4qc.h"
  1553.  
  1554.            Prototype:
  1555.            int setvmode(int);
  1556.  
  1557.            Usage:
  1558.            previous_video_mode = setvmode(video_mode);
  1559.  
  1560.            Description:
  1561.            This function sets the video mode. Be sure to run initvideo()
  1562.            again after changing the video mode.
  1563.  
  1564.            Return value:
  1565.            Returns the previous video mode.
  1566.  
  1567.            Also see:
  1568.            initvideo(), vmode().
  1569.  
  1570.  
  1571.       setvoff() - Set video offset:
  1572.  
  1573.            Module:   data4qc
  1574.            #include  "asm4qc.h"
  1575.  
  1576.            Prototype:
  1577.            void setvoff(int,int);
  1578.  
  1579.  
  1580.  
  1581.  
  1582.                                   Page 24 of 27
  1583.  
  1584.  
  1585.  
  1586.  
  1587.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  1588.  
  1589.  
  1590.  
  1591.  
  1592.            Usage:
  1593.            setvoff(row,column);
  1594.  
  1595.            Description:
  1596.            This function sets the video offset for ASM4QC functions that
  1597.            write directly to video memory. The video offset works like a
  1598.            logical cursor. The row and column arguments function exactly
  1599.            the same as setcurs(), where 1,1 is the upper, left corner of
  1600.            the screen. Note that setvoff() does not affect, and is not
  1601.            affected by, the actual text cursor.
  1602.  
  1603.            Return value:
  1604.            No return value.
  1605.  
  1606.            Also see:
  1607.            setcurs(), voffcol(), voffrow().
  1608.  
  1609.  
  1610.       setvsegment() - Set video segment:
  1611.  
  1612.            Module:   data4qc
  1613.            #include  "asm4qc.h"
  1614.  
  1615.            Prototype:
  1616.            int setvsegment(int);
  1617.  
  1618.            Usage:
  1619.            previous_vsegment = setvsegment(vsegment);
  1620.  
  1621.            Description:
  1622.            This function sets the video segment for ASM4QC functions that
  1623.            write directly into video memory. initvideo() will automatically
  1624.            set the video segment according to the video hardware
  1625.            configuration. setvsegment() can be used to override this value.
  1626.            You can use either of two constants defined in ASM4QC.H as an
  1627.            argument to this function. They are COLOR_SEG and MONO_SEG, and
  1628.            they contain the video segment for color and monochrome text
  1629.            modes respectively.
  1630.  
  1631.            Return value:
  1632.            The previous video segment value.
  1633.  
  1634.            Also see:
  1635.            initvideo().
  1636.  
  1637.  
  1638.       vmode() - Video mode:
  1639.  
  1640.            Module:   stdvideo
  1641.            #include  "asm4qc.h"
  1642.  
  1643.            Prototype:
  1644.            int vmode(void);
  1645.  
  1646.  
  1647.  
  1648.                                   Page 25 of 27
  1649.  
  1650.  
  1651.  
  1652.  
  1653.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  1654.  
  1655.  
  1656.  
  1657.  
  1658.            Usage:
  1659.            video_mode = vmode();
  1660.  
  1661.            Description:
  1662.            This function returns the current video mode.
  1663.  
  1664.            Return value:
  1665.            The current video mode.
  1666.  
  1667.            Also see:
  1668.            setvmode().
  1669.  
  1670.  
  1671.       voffcol() - Video offset column:
  1672.  
  1673.            Module:   stdvideo
  1674.            #include  "asm4qc.h"
  1675.  
  1676.            Prototype:
  1677.            int voffcol(void);
  1678.  
  1679.            Usage:
  1680.            video_offset_col = voffcol();
  1681.  
  1682.            Description:
  1683.            This function returns the column coordinate of the current
  1684.            logical cursor (video offset).
  1685.  
  1686.            Return value:
  1687.            The current video offset column.
  1688.  
  1689.            Also see:
  1690.            curscol(), cursrow(), setvoff(), voffrow().
  1691.  
  1692.  
  1693.       voffrow() - Video offset row:
  1694.  
  1695.            Module:   stdvideo
  1696.            #include  "asm4qc.h"
  1697.  
  1698.            Prototype:
  1699.            int voffrow(void);
  1700.  
  1701.            Usage:
  1702.            video_offset_row = voffrow();
  1703.  
  1704.            Description:
  1705.            This function returns the row coordinate of the current logical
  1706.            cursor (video offset).
  1707.  
  1708.            Return value:
  1709.            The current video offset row.
  1710.  
  1711.  
  1712.  
  1713.  
  1714.                                   Page 26 of 27
  1715.  
  1716.  
  1717.  
  1718.  
  1719.           ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
  1720.  
  1721.  
  1722.  
  1723.  
  1724.            Also see:
  1725.            curscol(), cursrow(), setvoff(), voffcol().
  1726.  
  1727.  
  1728.       vpage() - Video page:
  1729.  
  1730.            Module:   stdvideo
  1731.            #include  "asm4qc.h"
  1732.  
  1733.            Prototype:
  1734.            int vpage(void);
  1735.  
  1736.            Usage:
  1737.            video_page = vpage();
  1738.  
  1739.            Description:
  1740.            This function returns the current video page.
  1741.  
  1742.            Return value:
  1743.            The current video page.
  1744.  
  1745.  
  1746.       6.0  Product Support:
  1747.            Your questions and comments can be sent to the address below. We
  1748.            are unable to provide phone support at this time, but your
  1749.            questions and comments are very important to us and we are
  1750.            committed to providing knowledgeable support in a timely manner.
  1751.  
  1752.            If you think you've found a problem with ASM4QC, please include
  1753.            as much information as you can (version number, etc.). If
  1754.            possible, send us a copy of your C source code that causes the
  1755.            problem. Thank you for your support!
  1756.  
  1757.                                SoftCircuits Programming
  1758.                                P.O. Box 16262
  1759.                                Irvine, CA 92713
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.                                   Page 27 of 27
  1781.  
  1782.  
  1783.