home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / MNO100.ZIP / MNOCALLS.DOC < prev    next >
Text File  |  1991-05-27  |  99KB  |  3,307 lines

  1.  
  2.  
  3.  
  4.  
  5.                         MNOCALLS, MNODRVR, MNOCONSL, MF
  6.  
  7.                        Version 1.00 Copyright (c) 1991, 
  8.                    by Stephen L. Reed, all rights reserved.
  9.  
  10.  
  11.  
  12.           Thank you for choosing to evaluate these shareware products.
  13.           If you are an individual using them or incorporating the
  14.           MNOCALLS DLL into your own applications, you are expected to
  15.           become a registered user.  Registration fee is $US 25.00. 
  16.           Please make your check or Postal Money Order payable to:
  17.  
  18.  
  19.                Stephen Reed Software
  20.                3034 Segovia St.
  21.                Coral Gables FL
  22.                33134  USA
  23.  
  24.  
  25.           Registered users will be notified of all subsequent releases,
  26.           and will be free to use the next version upgrade when it 
  27.           becomes available.
  28.  
  29.           For use by corporations and other institutions, please contact
  30.           Steve Reed for a licensing arrangement.  Source code is 
  31.           available.  MNOCALLS is a professional quality toolkit which
  32.           can add dual monitor abilities to any commercial product.
  33.  
  34.           You are encouraged to share this evaluation version, which has
  35.           complete functions and documentation, with anyone else,
  36.           provided that it is unmodified, whole and complete, and that it
  37.           is not combined with any other software.
  38.  
  39.           As is the case with most shareware, you may not charge more
  40.           than a small "disk fee" if you operate a software distribution
  41.           business.
  42.  
  43.           The author will distribute this release and subsequent
  44.           versions through the growing network of OS/2 bulletin boards
  45.           worldwide.
  46.  
  47.           Please leave comments for Steve Reed on Peter Norloff's
  48.           superb OS/2 Shareware BBS:  
  49.  
  50.  
  51.              703-385-0931 (2400 Courier)
  52.              703-385-4325 (HST DS)
  53.  
  54.  
  55.                                     - 1 -
  56.  
  57.           MNODRVR.SYS  MNOCALLS.DLL    
  58.           -------------------------
  59.  
  60.           This is a device driver and dynamic link library
  61.           to assist OS/2 developers who use dual monitors on non-
  62.           Micro Channel PC's.  (MDA adaptors are not yet available
  63.           for MC PS/2's.)
  64.  
  65.           You can use standard VIO functions to access the EGA\VGA
  66.           monitor and use the included MNO functions to access the
  67.           MDA monitor.          
  68.           
  69.           Twenty of the VIO library functions have been duplicated using
  70.           a Mno prefix.  They provide a convenient and consistent ability
  71.           to display character mode output on the monochrome monitor
  72.           (MDA) while at the same time, the primary VGA/EGA monitor is
  73.           used by the application and Presentation Manager.
  74.           
  75.           Both writing to, and reading from the screen is supported.
  76.  
  77.           All applications can access the MDA regardless of whether they
  78.           are foreground, background or detached processes.
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.                                     - 2 -
  112.  
  113.           CONTENTS
  114.           --------
  115.  
  116.           Registration .......................... 1
  117.           MNOCALLS Description .................. 2
  118.           Features .............................. 4
  119.           Requirements .......................... 4
  120.           Test Suite ............................ 4
  121.           MNOCONSL Description .................. 5
  122.           VIO Documentation Sources ............. 5
  123.           Simple Setup .......................... 6
  124.           Organized Setup ....................... 8
  125.           How To Use DLL's In Your Programs..... 10
  126.                                         
  127.           MnoGetCurPos ......................... 11
  128.           MnoSetCurPos ......................... 12
  129.           MnoGetCurType ........................ 14
  130.           MnoSetCurType ........................ 16
  131.           MnoGetPhysBuf ........................ 18
  132.           MnoGetAnsi ........................... 20
  133.           MnoSetAnsi ........................... 21
  134.           MnoReadCharStr ....................... 22
  135.           MnoReadCellStr ....................... 24
  136.           MnoScrollDn .......................... 26
  137.           MnoScrollUp .......................... 28
  138.           MnoScrollLf .......................... 30
  139.           MnoScrollRt .......................... 32
  140.           MnoWrtCharStr ........................ 34
  141.           MnoWrtCellStr ........................ 36
  142.           MnoWrtNAttr .......................... 38
  143.           Attribute Byte ....................... 40
  144.           MnoWrtNChar .......................... 41
  145.           MnoWrtNCell .......................... 43
  146.           MnoWrtCharStrAtt ..................... 45
  147.           MnoWrtTTY ............................ 47
  148.                                         
  149.           ANSI Escape Sequences ................ 48
  150.           Using MNOCONSL ....................... 53
  151.           Using MF ............................. 54
  152.           Detached Compilation ................. 55
  153.           MNOEXAMP, an example with CodeView ... 56
  154.           How to Set Up Dual Monitors .......... 57
  155.           Troubleshooting ...................... 58
  156.           Index ................................ 59
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.                                     - 3 -
  168.  
  169.           FEATURES
  170.           --------
  171.  
  172.           Two monitors simultaneously active, but controlled
  173.           independently.
  174.           
  175.           Parameters and return codes are identical to familiar Vio.
  176.           
  177.           MnoWrtTTY completely supports ANSI escape sequences.
  178.           
  179.           Complete control over cursor position, visibility and shape.
  180.           
  181.           Small binaries:  2K MNODRVR device driver, 11K MNOCALLS DLL.
  182.           
  183.           
  184.           REQUIREMENTS
  185.           ------------
  186.           
  187.           OS/2 version 1.2 or later.
  188.           
  189.           Microsoft C version 5.1 or later.
  190.           
  191.           Dual monitor configuration, such as VGA and MDA, or EGA and
  192.           MDA.  See the appendix for more information on how to set up a
  193.           dual monitor system if you do not already have one.
  194.  
  195.  
  196.           TEST SUITE
  197.           ----------
  198.  
  199.           MNOTEST.EXE is a test suite which executes each MNO function
  200.           and compares the equivalent VIO function on your dual monitor
  201.           system.  Complete source code is included.
  202.           
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.                                     - 4 -
  224.  
  225.           SAMPLE APPLICATION
  226.           ------------------
  227.  
  228.           MNOCONSL.EXE is a sample application which uses Mno functions
  229.           to provide an operating system display console on the MDA.
  230.  
  231.           You can see...
  232.  
  233.               A list of process names that is periodically updated to
  234.               show which tasks are currently executing.
  235.  
  236.               A count of total threads and those ready to execute.
  237.  
  238.               Percent CPU utilization.
  239.  
  240.               Amount of free memory available.
  241.  
  242.               Digital clock.
  243.  
  244.               Background message window.  MF.EXE is a filter provided
  245.               to pipe stdout from any background process to this
  246.               window, such as compilation error messages from a
  247.               batch file.     
  248.  
  249.               Source code is included for MF.EXE (MNOFILT.C).
  250.  
  251.               Source code is available for MNOCONSL.EXE, MNOCALLS.DLL,
  252.               and the MNODRVR.SYS device driver.  See the preceding
  253.               registration section.
  254.  
  255.           
  256.           ADDITIONAL HELPFUL VIO DOCUMENTATION
  257.           ------------------------------------
  258.  
  259.           Microsoft OS/2 Programmer's Reference Volumes 3 & 4.
  260.           
  261.           Or the similar IBM OS/2 Programming Tools and Information.
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.                                     - 5 -
  280.  
  281.           SETUP - Choose either Simple Setup or Organized Setup.
  282.                   Simple Setup uses only one subdirectory while the
  283.                   Organized Setup puts puts files into separate
  284.                   subdirectories.  
  285.           
  286.                   Try the Simple Setup if you are in a hurry.
  287.                   See the Troubleshooting section for common errors.
  288.  
  289.  
  290.           SIMPLE SETUP
  291.           ------------
  292.  
  293.            1. Create a MNOCALLS subdirectory and copy all the files into
  294.               it.
  295.               
  296.            2. Add the following line to your CONFIG.SYS:
  297.               
  298.                  DEVICE=C:\MNOCALLS\MNODRVR.SYS
  299.           
  300.               Or use whatever path which contains the MNOCALLS files.
  301.               Ensure that the following line is in your CONFIG.SYS:
  302.  
  303.                  IOPL=YES
  304.           
  305.            3. Add the MNOCALLS subdirectory to the LIBPATH in CONFIG.SYS.
  306.               For example:
  307.               
  308.                  LIBPATH=.;C:\MNOCALLS;C:\OS2\DLL;C:\
  309.               
  310.            4. Add the MNOCALLS subdirectory to the PATH in CONFIG.SYS.
  311.               For example:
  312.               
  313.                  SET PATH=C:\BND;D:\BINP;C:\OS2;... C:\MNOCALLS
  314.           
  315.            5. Reboot OS/2.
  316.               The device driver will display the message:
  317.           
  318.                  Monochrome Display Driver Version 1.00.
  319.                  Copyright (c) 1991, by Stephen L. Reed, All rights
  320.                  reserved.
  321.           
  322.            6. From a command line, execute MNOTEST.EXE to verify the
  323.               correct installation of the components. All twenty of the
  324.               MNOCALLS functions will be tested together with their Vio
  325.               equivalents. The objective of the tests is to manipulate
  326.               both the MDA and VGA/EGA monitors in the exact same
  327.               fashion.  After each brief step of the test sequence,
  328.               MNOTEST will compare both the video buffers and report any
  329.               errors detected.
  330.               
  331.               The test will terminate with the following message.
  332.               
  333.                  TEST SUCCESSFUL .. everything installed OK.
  334.  
  335.                                     - 6 -
  336.  
  337.            7. Erase MNOTEST.EXE and compile the source code to recreate 
  338.               it.  This step will verify the correct installation of
  339.               MNOCALLS.H, SYMTYPES.H, and MNOCALLS.LIB.
  340.               
  341.                  cl /AL /Lp /qc /c /G2 /W4 mnotest.c
  342.               
  343.                  link /ST:25000 /SE:256 mnotest,mnotest,mnotest,
  344.                     mnocalls.lib;
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.                                     - 7 -
  392.  
  393.           ORGANIZED SETUP
  394.           ---------------
  395.           
  396.            1. Create a DRIVERS subdirectory and copy the device driver
  397.               MNODRVR.SYS to it.  Or use another directory of your
  398.               choice.
  399.               
  400.            2. Add the following line to your CONFIG.SYS:
  401.               
  402.                  DEVICE=C:\DRIVERS\MNODRVR.SYS
  403.           
  404.               Or use whatever path which contains MNODRVR.SYS.
  405.               Ensure that the following line is in your CONFIG.SYS:
  406.  
  407.                  IOPL=YES
  408.           
  409.               This gives permission for MNOCALLS to disable interrupts
  410.               when it writes to the MDA from a background process.
  411.           
  412.            3. Create a DLL subdirectory and copy the library 
  413.               MNOCALLS.DLL to it.  Or use another directory of your
  414.               choice.
  415.               
  416.            4. Add the DLL subdirectory (or your substitute) to the
  417.               LIBPATH in CONFIG.SYS.
  418.               For example:
  419.  
  420.                  LIBPATH=.;C:\DLL;C:\OS2\DLL;C:\
  421.               
  422.            5. Copy MNOCALLS.H and SYMTYPES.H to the subdirectory where
  423.               you keep C language header files.
  424.               
  425.            6. Copy MNOCALLS.LIB to the subdirectory where you keep your
  426.               LIB files required by the linker.  MNOCALLS.LIB is not a
  427.               true object code library; it is an import definition file
  428.               which defines the MNOCALLS.DLL functions.
  429.           
  430.            7. Copy MNOTEST.C and MNOFILT.C to a new subdirectory or an
  431.               existing subdirectory of your choice.
  432.           
  433.            8. Create the MNO subdirectory and copy MNOCONSL.EXE,
  434.               MNOTEST.EXE and MF.EXE to it.  Or use another directory of
  435.               your choice.
  436.           
  437.            9. Add the MNO subdirectory (or your substitute) to the PATH
  438.               in CONFIG.SYS.
  439.           
  440.           10. Reboot OS/2.
  441.               The device driver will display the message:
  442.           
  443.                  Monochrome Display Driver Version 1.00.
  444.                  Copyright (c) 1991, by Stephen L. Reed, All rights
  445.                  reserved.
  446.  
  447.                                     - 8 -
  448.  
  449.           11. Execute MNOTEST.EXE to verify the correct installation of
  450.               the components. All twenty of the MNOCALLS functions will
  451.               be tested together with their Vio equivalents.  The object
  452.               of the tests is to manipulate both the MDA and VGA/EGA
  453.               monitors in the exact same fashion.  After each brief
  454.               step of the test sequence, MNOTEST will compare both the
  455.               video buffers and report any errors detected.
  456.               
  457.               The test will terminate with the following message.
  458.               
  459.                  TEST SUCCESSFUL .. everything installed OK.
  460.               
  461.           12. Erase MNOTEST.EXE and compile the source code to recreate
  462.               it.  This step will verify the correct installation of
  463.               MNOCALLS.H, SYMTYPES.H, and MNOCALLS.LIB.
  464.               
  465.                  cl /AL /Lp /qc /c /G2 /W4 mnotest.c
  466.               
  467.                  link /ST:25000 /SE:256 mnotest,mnotest,mnotest,
  468.                     mnocalls.lib;
  469.  
  470.           13. Rerun the installation test (step 11) using your compiled
  471.               version of MNOTEST.EXE.  This will confirm that your
  472.               compile and link procedures work properly.
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.                                     - 9 -
  504.  
  505.           HOW TO USE DLL'S IN YOUR PROGRAMS
  506.           ---------------------------------
  507.  
  508.  
  509.           You incorporate DLL functions into your C language programs in
  510.           the same way as you use the built-in system functions.
  511.  
  512.           1.  Include the headers.
  513.  
  514.                  #define     INCL_BASE     // Or whatever else you need.
  515.                  #include    <os2.h>
  516.  
  517.                  #include    "SYMTYPES.H"  // Some type definitions.
  518.  
  519.                  #include    "MNOCALLS.H"  // DLL function prototypes.
  520.  
  521.  
  522.           2.  Use the MNO functions according to your requirements.
  523.  
  524.                  USHORT fStatus ;
  525.  
  526.                                            // Draw a vertical line.
  527.  
  528.                  fStatus    = MnoWrtCharStr ("│",1,23,11,0 ) ;
  529.  
  530.  
  531.           3.  Compile using the large programming model.  The /qc option
  532.               is used for quick compiles, but is not required.  Also the
  533.               option /W4 is used for the most strict warning message 
  534.               level, but is not required.
  535.  
  536.                  cl /AL /Lp /qc /c /G2 /W4 myprog.c
  537.               
  538.  
  539.           4.  Link using the MNOCALLS.LIB import library.  The /ST option
  540.               specifies a stack of at least 25K and the /SE option allows
  541.               for up to 256 segments.  You may experiment with lower 
  542.               values for your applications if you desire.
  543.  
  544.           
  545.                  link /ST:25000 /SE:256 myprog,myprog,myprog,
  546.                     mnocalls.lib;
  547.  
  548.           5.  Ensure that a DLL subdirectory listed in your LIBPATH
  549.               contains MNOCALLS.DLL and you are ready to execute your
  550.               program.
  551.  
  552.           6.  Registered users may distribute only the MNOCALLS.DLL and
  553.               MNODRVR.SYS files with their applications royalty-free
  554.               worldwide.  Permission is also granted to include portions
  555.               of this document in the application setup instructions, so
  556.               that end-users can configure their dual monitor systems 
  557.               for MNOCALLS.   
  558.  
  559.                                    - 10 -
  560.  
  561.                                THE MNO FUNCTIONS
  562.           
  563.  
  564.           1. Cursor Control.
  565.           ------------------
  566.           
  567.           
  568.           USHORT DLLFUN     MnoGetCurPos (
  569.              PUSHORT pusRow,
  570.              PUSHORT pusColumn,
  571.              HVIO    hvio ) 
  572.           
  573.              MnoGetCurPos gets the current position of the monochrome
  574.              adaptor cursor.
  575.           
  576.              pusRow:  
  577.                 The address of the variable which receives the cursor
  578.                 row position.  This is a value in the range 0 ... 24.
  579.           
  580.              pusColumn:
  581.                 The address of the variable which receives the cursor
  582.                 column position.  This is a value in the range 0 ... 79. 
  583.           
  584.              hvio:
  585.                 Must be 0.  This is only provided for syntatic
  586.                 compatibility with VIO functions.
  587.           
  588.              Returns:
  589.                 Normally returns 0. If the hvio parameter was not 0,
  590.                 then the error return is the value
  591.  
  592.                    ERROR_VIO_INVALID_HANDLE.
  593.           
  594.              Remarks:
  595.                 Even if the cursor is not visible, MnoGetCurPos will
  596.                 retrieve the position of where the cursor would be, if
  597.                 it were visible.  There are two common techniques for
  598.                 hiding the monochrome cursor.  One is to set the scan
  599.                 lines used by the cursor to zero.  The device driver uses
  600.                 a second approach, which is to move the cursor beyond the 
  601.                 boundaries of the screen.  However, the coordinates of
  602.                 the virtual cursor are kept in the driver and can be
  603.                 queried with this function.
  604.           
  605.              Example:
  606.           
  607.              USHORT usRow ;
  608.              USHORT usColumn ;
  609.              USHORT fStatus ;
  610.           
  611.              fStatus = MnoGetCurPos ( &usRow, &usColumn, 0 ) ;
  612.  
  613.  
  614.  
  615.                                    - 11 -        MnoGetCurPos
  616.  
  617.           USHORT DLLFUN     MnoSetCurPos (
  618.              USHORT usRow,
  619.              USHORT usColumn,
  620.              HVIO hvio )
  621.           
  622.              MnoSetCurPos sets the current position of the monochrome
  623.              adaptor cursor.
  624.           
  625.              usRow:  
  626.                 The variable which specifies the cursor row position.
  627.                 This must be a value in the range 0 ... 24.
  628.           
  629.              usColumn:
  630.                 The address of the variable which receives the cursor
  631.                 column position.  This is a value in the range 0 ... 79.
  632.           
  633.              hvio:
  634.                 Must be 0.  This is only provided for syntatic
  635.                 compatibility with VIO functions.
  636.           
  637.           
  638.              Returns:
  639.                 Normally returns 0. If the hvio parameter was not 0
  640.                 then the error returned is the value
  641.  
  642.                    ERROR_VIO_INVALID_HANDLE.
  643.              
  644.                 If usRow is greater than 24 then the error returned is
  645.                 the value
  646.  
  647.                    ERROR_VIO_ROW.
  648.           
  649.                 If usColumn is greater than 79 then the error returned is
  650.                 the value 
  651.  
  652.                    ERROR_VIO_COL.
  653.           
  654.              Remarks:
  655.                 Even if the cursor is not visible, MnoSetCurPos will set
  656.                 the position to where the cursor would be if it were
  657.                 visible.
  658.           
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.                                    - 12 -        MnoSetCurPos
  672.  
  673.              Example:
  674.           
  675.              USHORT usRow ;
  676.              USHORT usColumn ;
  677.              USHORT fStatus ;
  678.           
  679.              usRow = 1 ;
  680.              usColumn = 10 ;
  681.           
  682.              fStatus = MnoSetCurPos ( usRow, usColumn, 0 ) ;
  683.           
  684.              // This sets the cursor position to (1, 10),
  685.              // where the origin (0, 0) is defined as the upper left
  686.              // corner of the screen.
  687.           
  688.           
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.                                    - 13 -        
  728.  
  729.           USHORT DLLFUN     MnoGetCurType (
  730.              PVIOCURSORINFO pvioCursorInfo,
  731.              HVIO hvio )
  732.           
  733.              MnoGetCurType gets the Cursor Information structure which
  734.              contains the starting and ending cursor scan lines, and that
  735.              also contains an attribute that indicates if the cursor is
  736.              hidden.  
  737.           
  738.              pvioCursorInfo:
  739.                 This points to the structure...
  740.           
  741.                     typedef struct _VIOCURSORINFO 
  742.                        {
  743.                        USHORT yStart;
  744.                        USHORT cEnd;                
  745.                        USHORT cx;
  746.                        USHORT attr;
  747.                        }  VIOCURSORINFO;
  748.           
  749.                 yStart:
  750.                    This is a value from 0 to 13 which indicates which is
  751.                    the top line of the displayed cursor.  The monochrome
  752.                    cursor has 14 scan lines.  The uppermost scan line is
  753.                    number zero.
  754.           
  755.                 cEnd:
  756.                    This is a value from 0 to 13 which indicates which is
  757.                    the bottom line of the displayed cursor.  The
  758.                    bottommost scan line is number 13.
  759.           
  760.                 cx:
  761.                    Cursor width is always 1 since this is a text mode.
  762.           
  763.                 attr:
  764.                    Value 0xFFFF indicates the cursor is hidden.  Any 
  765.                    other value indicates the cursor is visible.
  766.           
  767.              hvio:
  768.                 Must be 0.  This is only provided for syntatic
  769.                 compatibility with VIO functions.
  770.           
  771.              Returns:
  772.                 Normally returns 0. If the hvio parameter was not 0 then
  773.                 the error returned is the value
  774.  
  775.                    ERROR_VIO_INVALID_HANDLE.
  776.              
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.                                    - 14 -        MnoGetCurType
  784.  
  785.              Example:
  786.           
  787.              VIOCURSORINFO vioCursorInfo ;
  788.           
  789.              USHORT fStatus ;
  790.           
  791.              fStatus = MnoGetCurType ( &vioCursorInfo, 0 ) ;
  792.           
  793.              // This gets the monochrome cursor type information.
  794.           
  795.           
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.                                    - 15 -
  840.  
  841.           USHORT DLLFUN     MnoSetCurType (
  842.              PVIOCURSORINFO pvioCursorInfo,
  843.              HVIO hvio )
  844.           
  845.              MnoGetCurType changes the shape of the monochrome cursor
  846.              and it can also be used to hide and reveal the cursor.
  847.           
  848.              pvioCursorInfo:
  849.                 This points to the structure...
  850.           
  851.                     typedef struct _VIOCURSORINFO 
  852.                        {
  853.                        USHORT yStart;
  854.                        USHORT cEnd;                
  855.                        USHORT cx;
  856.                        USHORT attr;
  857.                        }  VIOCURSORINFO;
  858.           
  859.                 yStart:
  860.                    This is a value from 0 to 13 which specifies which is
  861.                    to be the top line of the displayed cursor.  The
  862.                    monochrome cursor has 14 scan lines.  The uppermost 
  863.                    scan line is number zero.
  864.           
  865.                 cEnd:
  866.                    This is a value from 0 to 13 which specifies which is
  867.                    to be the bottom line of the displayed cursor.  The
  868.                    bottommost scan line is number 13.  The video adaptor
  869.                    can accept an ending value which is less than the
  870.                    starting value, in which case the cursor is displayed
  871.                    as two blocks. 
  872.           
  873.                 cx:
  874.                    Cursor width is always set to 1 since this is a text
  875.                    mode.
  876.           
  877.                 attr:
  878.                    Value 0xFFFF (decimal -1) specifies that the cursor
  879.                    is to be hidden.  Any other value specifies that the
  880.                    cursor is to be visible.  
  881.           
  882.              hvio:
  883.                 Must be 0.  This is only provided for syntatic
  884.                 compatibility with VIO functions.
  885.           
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.                                    - 16 -        MnoSetCurType
  896.  
  897.              Returns:
  898.                 Normally returns 0. If the hvio parameter was not 0 then
  899.                 the error returned is the value
  900.  
  901.                    ERROR_VIO_INVALID_HANDLE.
  902.              
  903.                 if cx is not 1, then the error returned is the value
  904.                 
  905.                    ERROR_VIO_INVALID_PARMS.
  906.  
  907.           
  908.           
  909.              Example:
  910.           
  911.              VIOCURSORINFO vioCursorInfo ;
  912.           
  913.              USHORT fStatus ;
  914.           
  915.              vioCursorInfo.yStart = 0 ;
  916.              vioCursorInfo.cEnd   = 13 ;
  917.              vioCursorInfo.cx     = 1 ;
  918.              vioCursorInfo.attr   = 0 ;
  919.           
  920.              fStatus = MnoSetCurType ( &vioCursorInfo, 0 ) ;
  921.           
  922.              // This sets the monochrome cursor as a full 14 scan lines 
  923.              // in height and it is made visible.
  924.           
  925.           
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.                                    - 17 -        
  952.  
  953.           2. Video Buffer Direct Access.
  954.           ------------------------------
  955.           
  956.           USHORT DLLFUN     MnoGetPhysBuf (
  957.              PVIOPHYSBUF pvioPhysBuf,
  958.              USHORT usReserved )
  959.           
  960.              MnoGetPhysBuf will obtain a selector to access the MDA video
  961.              buffer.              
  962.           
  963.              pvioPhysBuf:
  964.                 Points to the structure...
  965.           
  966.                     typedef struct _VIOPHYSBUF 
  967.                        {
  968.                        PBYTE pBuf ;
  969.                        ULONG cb ;
  970.                        SEL asel [1] ;
  971.                        }  VIOPHYSBUF ;
  972.           
  973.                 MnoGetPhysBuf will set the variable asel [0], and the
  974.                 other elements of the structure are ignored.
  975.           
  976.              usReserved:
  977.                 Ignored by MnoGetPhysBuf.
  978.           
  979.            
  980.              Returns:
  981.                 Normally returns 0. 
  982.           
  983.              Remarks:
  984.                 The selector will always have full read and write access
  985.                 when the calling process remains in the foreground. Use
  986.                 VioScrLock to force the process into the foreground until
  987.                 the selector is no longer needed.  When the process is in
  988.                 the background, MnoGetPhysBuf will obtain a valid
  989.                 read/write selector that will remain valid even if the
  990.                 process is switched to foreground.
  991.  
  992.                 When a foreground process is switched to background, OS/2
  993.                 protects the display buffer by changing the selector
  994.                 access rights from read/write to read-only.        
  995.                                                                       
  996.                 A detached process cannot use VioScrLock or
  997.                 MnoGetPhysBuf. It must use other Mno functions to write
  998.                 to the MDA video buffer.
  999.           
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.                                    - 18 -        MnoGetPhysBuf
  1008.  
  1009.              Example:
  1010.           
  1011.              VIOPHYSBUF vioPhysBuf ;
  1012.           
  1013.              USHORT fStatus ;
  1014.              USHORT fDetachStatus ;
  1015.              USHORT fAnsi ;
  1016.              BYTE   fLockStatus ;
  1017.              PCH    pchMonoBuffer ;
  1018.           
  1019.                          /*---------------------------------------------*/
  1020.                          /* Here is how to test for a detached process. */
  1021.                          /*---------------------------------------------*/
  1022.           
  1023.              fDetachStatus = MnoGetAnsi ( &fAnsi, 0 ) ;
  1024.           
  1025.              if ( fDetachStatus == ERROR_VIO_DETACHED )
  1026.                 {
  1027.                          /*---------------------------------------------*/
  1028.                          /* Use other Mno functions to manipulate the   */
  1029.                          /* MDA video buffer since we cannot detect     */
  1030.                          /* screen group switching.                     */
  1031.                          /*---------------------------------------------*/
  1032.                 }
  1033.              else
  1034.                 {
  1035.                          /*---------------------------------------------*/
  1036.                          /* If this is the foreground process,          */
  1037.                          /* then prevent screen group switching until   */
  1038.                          /* this function completes.                    */
  1039.                          /*---------------------------------------------*/
  1040.           
  1041.                 fStatus = VioScrLock (
  1042.                       LOCKIO_NOWAIT,
  1043.                       &fLockStatus,
  1044.                       0 ) ;
  1045.           
  1046.                 fStatus = MnoGetPhysBuf ( &vioPhysBuf, 0 ) ;
  1047.           
  1048.                 pchMonoBuffer = MAKEP ( vioPhysBuf.asel [0], 0 ) ;
  1049.  
  1050.                          /*---------------------------------------------*/
  1051.                          /* At this point, pchMonoBuffer is a read/write*/
  1052.                          /* pointer into the MDA video buffer, which is */
  1053.                          /* an array of 2000 character-attribute cells. */
  1054.                          /*---------------------------------------------*/
  1055.           
  1056.                 *pchMonoBuffer++ = 'A' ;        // Bright 'A' in the
  1057.                 *pchMonoBuffer   = 0x0F ;       // first buffer position.
  1058.           
  1059.                 if ( fLockStatus == LOCK_SUCCESS )
  1060.                    fStatus = VioScrUnLock ( 0 ) ;
  1061.                 }
  1062.           
  1063.                                    - 19 -
  1064.  
  1065.           3. ANSI Escape Sequence.
  1066.           ------------------------
  1067.           
  1068.           USHORT DLLFUN     MnoGetAnsi (
  1069.              PUSHORT pfAnsi,
  1070.              HVIO hvio )
  1071.           
  1072.              MnoGetAnsi determines if the processing of ANSI escape
  1073.              sequences by the MnoWrtTTY function is enabled.          
  1074.              
  1075.              pfAnsi:
  1076.                 Points to a flag to receive the setting of the ANSI
  1077.                 escape sequence indicator.  Value ANSI_ON means enabled,
  1078.                 and value ANSI_OFF means that escape sequences are
  1079.                 disabled and MnoWrtTTY will output them as-is to the
  1080.                 display.
  1081.           
  1082.              hvio:
  1083.                 Must be 0.  This is only provided for syntatic
  1084.                 compatibility with VIO functions.
  1085.           
  1086.              Returns:
  1087.                 Normally returns 0. If the hvio parameter was not 0 then
  1088.                 the error returned is the value
  1089.  
  1090.                    ERROR_VIO_INVALID_HANDLE.
  1091.  
  1092.                 If the process was initiated using the DETACH OS/2
  1093.                 command, then pfAnsi will contain the correct status.
  1094.                 And the value returned is
  1095.  
  1096.                    ERROR_VIO_DETACHED.
  1097.  
  1098.              Remarks:
  1099.                 The ANSI status of the EGA/VGA display is independent of
  1100.                 the monochrome display ANSI status.                 
  1101.           
  1102.              Example:
  1103.           
  1104.           
  1105.              USHORT fStatus ;
  1106.              USHORT fAnsi ;
  1107.           
  1108.              fStatus = MnoGetAnsi ( &fAnsi, 0 ) ;
  1109.  
  1110.                          // fAnsi is either ANSI_ON or ANSI_OFF.
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.                                    - 20 -        MnoGetAnsi
  1120.  
  1121.           USHORT DLLFUN     MnoSetAnsi (
  1122.              USHORT fAnsi,
  1123.              HVIO hvio )
  1124.           
  1125.              MnoSetAnsi specifies whether the processing of ANSI escape
  1126.              sequences by the MnoWrtTTY function is enabled.          
  1127.              
  1128.              fAnsi:
  1129.                 A flag to specify the setting of the ANSI escape sequence
  1130.                 indicator.  Value ANSI_ON means enabled, and value
  1131.                 ANSI_OFF means that escape sequences are disabled and
  1132.                 MnoWrtTTY will output them as-is to the display.
  1133.           
  1134.              hvio:
  1135.                 Must be 0.  This is only provided for syntatic
  1136.                 compatibility with VIO functions.
  1137.           
  1138.              Returns:
  1139.                 Normally returns 0. If the hvio parameter was not 0 then
  1140.                 the error returned is the value
  1141.  
  1142.                    ERROR_VIO_INVALID_HANDLE.
  1143.              
  1144.              Remarks:
  1145.                 The state of the monochrome display ANSI indicator is not
  1146.                 affected by VioSetAnsi for the VGA/EGA adaptor.
  1147.  
  1148.              Example:
  1149.           
  1150.           
  1151.              USHORT fStatus ;
  1152.              USHORT fAnsi ;
  1153.           
  1154.              fAnsi   = ANSI_ON ;
  1155.           
  1156.              fStatus = MnoSetAnsi ( fAnsi, 0 ) ;
  1157.           
  1158.              fStatus = MnoWrtTTY ( "\n\n\n\t\bSample Text\r\n", 18, 0 ) ;
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.                                    - 21 -        MnoSetAnsi 
  1176.  
  1177.           4. Video Buffer Read Functions.
  1178.           -------------------------------
  1179.  
  1180.           
  1181.           USHORT DLLFUN     MnoReadCharStr (
  1182.              PCH pchString,
  1183.              PUSHORT pcb,
  1184.              USHORT usRow,
  1185.              USHORT usColumn,
  1186.              HVIO hvio )
  1187.           
  1188.           
  1189.              MnoReadCharStr reads characters from the monochrome display
  1190.              starting at the specified row and column, and for a
  1191.              specified length.
  1192.           
  1193.              pchString: 
  1194.                 Points to a character array (buffer) which receives the
  1195.                 character string.  A null character is not appended.
  1196.           
  1197.              pcb:
  1198.                 Points to a variable which contains the length, in
  1199.                 characters, of the string to be read.  MnoReadCharStr
  1200.                 sets this variable to the actual length read, in case an
  1201.                 attempt was made to read past the end of the screen.
  1202.           
  1203.              usRow:  
  1204.                 The variable which specifies the starting row position.
  1205.                 This must be a value in the range 0 ... 24.
  1206.           
  1207.              usColumn:
  1208.                 The variable which specifies the starting column
  1209.                 position.  This is a value in the range 0 ... 79. 
  1210.           
  1211.              hvio:     
  1212.                 Must be 0.  This is only provided for syntatic
  1213.                 compatibility with VIO functions.
  1214.  
  1215.              Returns:
  1216.                 Normally returns 0. If the hvio parameter was not 0,
  1217.                 then the error return is the value
  1218.  
  1219.                    ERROR_VIO_INVALID_HANDLE.
  1220.  
  1221.                 If usRow is greater than 24 then the error return is the
  1222.                 value
  1223.  
  1224.                    ERROR_VIO_ROW.
  1225.  
  1226.                 If usColumn is greater than 79 then the error return is
  1227.                 the value
  1228.  
  1229.                    ERROR_VIO_COL.
  1230.  
  1231.                                    - 22 -        MnoReadCharStr
  1232.  
  1233.              Remarks:
  1234.                 The character string may wrap from one line to the next
  1235.                 one below, but MnoReadCharStr does not read past the end
  1236.                 of the screen.  The cursor position is not affected. 
  1237.  
  1238.              Example:
  1239.  
  1240.  
  1241.              USHORT   fStatus  = 0 ;
  1242.              USHORT   cText    = 0 ;
  1243.              UCHAR    achText [ 500 ]   = "" ;
  1244.  
  1245.  
  1246.                               // Read 30 characters starting at
  1247.                               // the 11th line and 2nd column.
  1248.  
  1249.              cText    = 30 ;
  1250.              fStatus  = MnoReadCharStr ( achText, &cText, 10, 1, 0 ) ;
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.                                    - 23 -        
  1288.  
  1289.           USHORT DLLFUN     MnoReadCellStr (
  1290.              PCH pchCellStr,
  1291.              PUSHORT pcb,
  1292.              USHORT usRow,
  1293.              USHORT usColumn,
  1294.              HVIO hvio )
  1295.           
  1296.              MnoReadCellStr reads characters and their attributes from
  1297.              the monochrome display starting at the specified row and
  1298.              column, and for a specified buffer length. 
  1299.           
  1300.           
  1301.              pchCellStr: 
  1302.                 Points to a character array (buffer) which receives the
  1303.                 character-attribute pairs (cells).  A null character is
  1304.                 not appended.
  1305.           
  1306.              pcb:
  1307.                 Points to a variable which contains the length, in 
  1308.                 bytes, of the cell string to be read.  MnoReadCellStr
  1309.                 sets this variable to the actual length read, in case an
  1310.                 attempt was made to read past the end of the screen.
  1311.           
  1312.              usRow:  
  1313.                 The variable which specifies the starting row position.
  1314.                 This must be a value in the range 0 ... 24.
  1315.           
  1316.              usColumn:
  1317.                 The variable which specifies the starting column 
  1318.                 position.  This is a value in the range 0 ... 79. 
  1319.           
  1320.              hvio:
  1321.                 Must be 0.  This is only provided for syntatic
  1322.                 compatibility with VIO functions.
  1323.  
  1324.              Returns:
  1325.                 Normally returns 0. If the hvio parameter was not 0,
  1326.                 then the error return is the value
  1327.  
  1328.                    ERROR_VIO_INVALID_HANDLE.
  1329.  
  1330.                 If usRow is greater than 24 then the error return is the
  1331.                 value
  1332.  
  1333.                    ERROR_VIO_ROW.
  1334.  
  1335.                 If usColumn is greater than 79 then the error return is
  1336.                 the value
  1337.  
  1338.                    ERROR_VIO_COL.
  1339.  
  1340.  
  1341.  
  1342.  
  1343.                                    - 24 -        MnoReadCellStr
  1344.  
  1345.              Remarks:
  1346.                 The character string may wrap from one line to the next
  1347.                 one below, but MnoReadCellStr does not read past the end
  1348.                 of the screen.  The character-attribute pair is called a
  1349.                 cell and the specified buffer length should be an even
  1350.                 number.  The cursor position is not affected. 
  1351.  
  1352.  
  1353.              Example:
  1354.  
  1355.  
  1356.              USHORT   fStatus  = 0 ;
  1357.              USHORT   cText    = 0 ;
  1358.              UCHAR    achText [ 500 ]   = "" ;
  1359.  
  1360.  
  1361.                               // Read 15 characters-attribute pairs
  1362.                               // starting at the 1st line and 5th 
  1363.                               // column.
  1364.  
  1365.              cText    = 30 ;
  1366.              fStatus  = MnoReadCellStr ( achText, &cText, 0, 4, 0 ) ;
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.                                    - 25 -      
  1400.  
  1401.           5. Video Buffer Scroll Functions.
  1402.           ---------------------------------
  1403.  
  1404.           
  1405.           USHORT DLLFUN     MnoScrollDn (
  1406.              USHORT usTopRow,
  1407.              USHORT usLeftCol,
  1408.              USHORT usBotRow,
  1409.              USHORT usRightCol,
  1410.              USHORT cbLines,
  1411.              PBYTE pCell,
  1412.              HVIO hvio )
  1413.           
  1414.              MnoScrollDn scrolls lines down within a specified rectangle
  1415.              on the screen.  A specified character-attribute pair (cell)
  1416.              is used to fill the new lines at the top of the rectangle.
  1417.           
  1418.           
  1419.              usTopRow:  
  1420.                 The variable which specifies the top row boundary of the
  1421.                 rectangle.  This must be a value in the range 0 ... 24.
  1422.                 If a value greater than 24 is specified, then 24 is
  1423.                 substituted without an error.
  1424.  
  1425.              usLeftCol:
  1426.                 The variable which specifies the left column boundary of
  1427.                 the rectangle.  This is a value in the range 0 ... 79. 
  1428.                 If a value greater than 79 is specified, then 79 is
  1429.                 substituted without an error.
  1430.           
  1431.              usBotRow:  
  1432.                 The variable which specifies the bottom row boundary of
  1433.                 the rectangle.  This must be a value in the range 
  1434.                 0 ... 24.  If a value greater than 24 is specified, then
  1435.                 24 is substituted without an error.
  1436.           
  1437.              usRightCol:
  1438.                 The variable which specifies the right column boundary of
  1439.                 the rectangle.  This is a value in the range 0 ... 79. 
  1440.                 If a value greater than 79 is specified, then 79 is
  1441.                 substituted without an error.
  1442.           
  1443.              cbLines:
  1444.                 The number of lines to scroll down.  If this number is
  1445.                 zero, then no scrolling is done.
  1446.           
  1447.              pCell:
  1448.                 Points to a two byte array containing the character-
  1449.                 attribute pair (cell).
  1450.           
  1451.              hvio:
  1452.                 Must be 0.  This is only provided for syntatic
  1453.                 compatibility with VIO functions.
  1454.  
  1455.                                    - 26 -        MnoScrollDn
  1456.  
  1457.              Returns:
  1458.                 Normally returns 0. If the hvio parameter was not 0,
  1459.                 then the error return is the value
  1460.  
  1461.                    ERROR_VIO_INVALID_HANDLE.
  1462.  
  1463.                 If usTopRow is greater than usBotRow then the error
  1464.                 value is
  1465.  
  1466.                    ERROR_VIO_ROW.
  1467.  
  1468.                 If usLeftCol is greater than usRightCol then the error
  1469.                 value is
  1470.  
  1471.                    ERROR_VIO_COL.
  1472.  
  1473.              Remarks:
  1474.                 The cursor position is not affected.           
  1475.  
  1476.  
  1477.              Example:
  1478.  
  1479.  
  1480.              USHORT   fStatus     = 0 ;
  1481.              BYTE     abCell [ 2 ] = { 0 } ;
  1482.  
  1483.                /* Erase monochrome display.   */
  1484.  
  1485.              abCell [ 0 ] = ' ' ;
  1486.              abCell [ 1 ] = 0x07 ;
  1487.  
  1488.              fStatus      = MnoScrollDn ( 0,
  1489.                                           0,
  1490.                                           0xFFFF,
  1491.                                           0xFFFF,
  1492.                                           0xFFFF,
  1493.                                           abCell,
  1494.                                           0 ) ;
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.                                    - 27 -
  1512.  
  1513.           USHORT DLLFUN     MnoScrollUp (
  1514.              USHORT usTopRow,
  1515.              USHORT usLeftCol,
  1516.              USHORT usBotRow,
  1517.              USHORT usRightCol,
  1518.              USHORT cbLines,
  1519.              PBYTE pCell,
  1520.              HVIO hvio )
  1521.           
  1522.              MnoScrollUp scrolls lines up within a specified rectangle
  1523.              on the screen.  A specified character-attribute pair (cell)
  1524.              is used to fill the new lines at the bottom of the
  1525.              rectangle.
  1526.           
  1527.              usTopRow:  
  1528.                 The variable which specifies the top row boundary of the
  1529.                 rectangle.  This must be a value in the range 0 ... 24.
  1530.                 If a value greater than 24 is specified, then 24 is
  1531.                 substituted without an error.
  1532.           
  1533.              usLeftCol:
  1534.                 The variable which specifies the left column boundary of
  1535.                 the rectangle.  This is a value in the range 0 ... 79. 
  1536.                 If a value greater than 79 is specified, then 79 is
  1537.                 substituted without an error.
  1538.           
  1539.              usBotRow:  
  1540.                 The variable which specifies the bottom row boundary of
  1541.                 the rectangle.  This must be a value in the range
  1542.                 0 ... 24.  If a value greater than 24 is specified, then
  1543.                 24 is substituted without an error.
  1544.           
  1545.              usRightCol:
  1546.                 The variable which specifies the right column boundary of
  1547.                 the rectangle.  This is a value in the range 0 ... 79. 
  1548.                 If a value greater than 79 is specified, then 79 is
  1549.                 substituted without an error.
  1550.           
  1551.              cbLines:
  1552.                 The number of lines to scroll up.  If this number is
  1553.                 zero, then no scrolling is done.
  1554.           
  1555.              pCell:
  1556.                 Points to a two byte array containing the character-
  1557.                 attribute pair (cell).
  1558.           
  1559.              hvio:
  1560.                 Must be 0.  This is only provided for syntatic
  1561.                 compatibility with VIO functions.
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.                                    - 28 -        MnoScrollUp
  1568.  
  1569.              Returns:
  1570.                 Normally returns 0. If the hvio parameter was not 0,
  1571.                 then the error return is the value
  1572.  
  1573.                    ERROR_VIO_INVALID_HANDLE.
  1574.  
  1575.                 If usTopRow is greater than usBotRow then the error
  1576.                 value is
  1577.  
  1578.                    ERROR_VIO_ROW.
  1579.  
  1580.                 If usLeftCol is greater than usRightCol then the error
  1581.                 value is
  1582.  
  1583.                    ERROR_VIO_COL.
  1584.  
  1585.              Remarks:
  1586.                 The cursor position is not affected.
  1587.  
  1588.  
  1589.              Example:
  1590.  
  1591.              USHORT   fStatus      = 0 ;
  1592.              BYTE     abCell [ 2 ] = { 0 } ;
  1593.  
  1594.  
  1595.              abCell [ 0 ] = '.' ;
  1596.              abCell [ 1 ] = 0x0F ;
  1597.  
  1598.                /*---------------------------------------------*/
  1599.                /* Scroll the box at  (row,col):               */
  1600.                /*                                             */
  1601.                /*            (0,74)----------+                */
  1602.                /*              |             |                */
  1603.                /*              |             |                */
  1604.                /*              |             |                */
  1605.                /*              +----------(24,79)             */
  1606.                /*                                             */
  1607.                /* Up 1 row.                                   */
  1608.                /*---------------------------------------------*/
  1609.  
  1610.              fStatus    = MnoScrollUp ( 0, 74, 24, 79, 1, abCell, 0 ) ;
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.                                    - 29 -
  1624.  
  1625.           USHORT DLLFUN     MnoScrollLf (
  1626.              USHORT usTopRow,
  1627.              USHORT usLeftCol,
  1628.              USHORT usBotRow,
  1629.              USHORT usRightCol,
  1630.              USHORT cbCol,
  1631.              PBYTE pCell,
  1632.              HVIO hvio )
  1633.           
  1634.              MnoScrollLf scrolls lines left within a specified rectangle
  1635.              on the screen.  A specified character-attribute pair (cell)
  1636.              is used to fill the new lines at the right of the rectangle.
  1637.           
  1638.              usTopRow:  
  1639.                 The variable which specifies the top row boundary of the
  1640.                 rectangle.  This must be a value in the range 0 ... 24.
  1641.                 If a value greater than 24 is specified, then 24 is
  1642.                 substituted without an error.
  1643.           
  1644.              usLeftCol:
  1645.                 The variable which specifies the left column boundary of
  1646.                 the rectangle.  This is a value in the range 0 ... 79. 
  1647.                 If a value greater than 79 is specified, then 79 is
  1648.                 substituted without an error.
  1649.           
  1650.              usBotRow:  
  1651.                 The variable which specifies the bottom row boundary of
  1652.                 the rectangle.  This must be a value in the range
  1653.                 0 ... 24.  If a value greater than 24 is specified, then
  1654.                 24 is substituted without an error.
  1655.           
  1656.              usRightCol:
  1657.                 The variable which specifies the right column boundary of
  1658.                 the rectangle.  This is a value in the range 0 ... 79. 
  1659.                 If a value greater than 79 is specified, then 79 is
  1660.                 substituted without an error.
  1661.           
  1662.              cbLines:
  1663.                 The number of lines to scroll left.  If this number is
  1664.                 zero, then no scrolling is done.
  1665.           
  1666.              pCell:
  1667.                 Points to a two byte array containing the character-
  1668.                 attribute pair (cell).
  1669.           
  1670.              hvio:
  1671.                 Must be 0.  This is only provided for syntatic
  1672.                 compatibility with VIO functions.
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.                                    - 30 -        MnoScrollLf 
  1680.  
  1681.              Returns:
  1682.                 Normally returns 0. If the hvio parameter was not 0,
  1683.                 then the error return is the value
  1684.  
  1685.                    ERROR_VIO_INVALID_HANDLE.
  1686.  
  1687.                 If usTopRow is greater than usBotRow then the error
  1688.                 value is
  1689.  
  1690.                    ERROR_VIO_ROW.
  1691.  
  1692.                 If usLeftCol is greater than usRightCol then the error
  1693.                 value is
  1694.  
  1695.                    ERROR_VIO_COL.
  1696.  
  1697.              Remarks:
  1698.                 The cursor position is not affected. 
  1699.  
  1700.  
  1701.              Example:
  1702.  
  1703.  
  1704.              USHORT   fStatus      = 0 ;
  1705.              BYTE     abCell [ 2 ] = { 0 } ;
  1706.  
  1707.  
  1708.              abCell [ 0 ] = '#' ;     // Fill character.
  1709.              abCell [ 1 ] = 0x0F ;
  1710.  
  1711.                /*---------------------------------------------*/
  1712.                /* Scroll the box at  (row,col):               */
  1713.                /*                                             */
  1714.                /*            (0,0)-----------+                */
  1715.                /*              |             |                */
  1716.                /*              |             |                */
  1717.                /*              |             |                */
  1718.                /*              +----------(5,79)              */
  1719.                /*                                             */
  1720.                /* Left 10 columns.                            */
  1721.                /*---------------------------------------------*/
  1722.  
  1723.              fStatus = MnoScrollLf ( 0, 0, 5, 79, 10, abCell, 0 ) ;
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.                                    - 31 -
  1736.  
  1737.           USHORT DLLFUN     MnoScrollRt (
  1738.              USHORT usTopRow,
  1739.              USHORT usLeftCol,
  1740.              USHORT usBotRow,
  1741.              USHORT usRightCol,
  1742.              USHORT cbCol,
  1743.              PBYTE pCell,
  1744.              HVIO hvio )
  1745.           
  1746.              MnoScrollRt scrolls lines right within a specified
  1747.              rectangle on the screen.  A specified character-attribute
  1748.              pair (cell) is used to fill the new lines at the left of
  1749.              the rectangle.
  1750.           
  1751.           
  1752.              usTopRow:  
  1753.                 The variable which specifies the top row boundary of the
  1754.                 rectangle.  This must be a value in the range 0 ... 24.
  1755.                 If a value greater than 24 is specified, then 24 is
  1756.                 substituted without an error.
  1757.           
  1758.              usLeftCol:
  1759.                 The variable which specifies the left column boundary of
  1760.                 the rectangle.  This is a value in the range 0 ... 79. 
  1761.                 If a value greater than 79 is specified, then 79 is
  1762.                 substituted without an error.
  1763.           
  1764.              usBotRow:  
  1765.                 The variable which specifies the bottom row boundary of
  1766.                 the rectangle.  This must be a value in the range
  1767.                 0 ... 24.  If a value greater than 24 is specified, then
  1768.                 24 is substituted without an error.
  1769.           
  1770.              usRightCol:
  1771.                 The variable which specifies the right column boundary of
  1772.                 the rectangle.  This is a value in the range 0 ... 79. 
  1773.                 If a value greater than 79 is specified, then 79 is
  1774.                 substituted without an error.
  1775.           
  1776.              cbLines:
  1777.                 The number of lines to scroll right.  If this number is
  1778.                 zero, then no scrolling is done.
  1779.           
  1780.              pCell:
  1781.                 Points to a two byte array containing the character-
  1782.                 attribute pair (cell).
  1783.           
  1784.              hvio:
  1785.                 Must be 0.  This is only provided for syntatic 
  1786.                 compatibility with VIO functions.
  1787.  
  1788.  
  1789.  
  1790.  
  1791.                                    - 32 -        MnoScrollRt
  1792.  
  1793.              Returns:
  1794.                 Normally returns 0. If the hvio parameter was not 0,
  1795.                 then the error return is the value
  1796.  
  1797.                    ERROR_VIO_INVALID_HANDLE.
  1798.  
  1799.                 If usTopRow is greater than usBotRow then the error
  1800.                 value is
  1801.  
  1802.                    ERROR_VIO_ROW.
  1803.  
  1804.                 If usLeftCol is greater than usRightCol then the error
  1805.                 value is
  1806.  
  1807.                    ERROR_VIO_COL.
  1808.  
  1809.              Remarks:
  1810.                 The cursor position is not affected. 
  1811.  
  1812.  
  1813.              Example:
  1814.  
  1815.  
  1816.              USHORT   fStatus      = 0 ;
  1817.              BYTE     abCell [ 2 ] = { 0 } ;
  1818.  
  1819.  
  1820.              abCell [ 0 ] = '.' ;     // Fill character.
  1821.              abCell [ 1 ] = 0x07 ;
  1822.  
  1823.                /*---------------------------------------------*/
  1824.                /* Scroll the box at  (row,col):               */
  1825.                /*                                             */
  1826.                /*            (0,0)-----------+                */
  1827.                /*              |             |                */
  1828.                /*              |             |                */
  1829.                /*              |             |                */
  1830.                /*              +----------(24,79)             */
  1831.                /*                                             */
  1832.                /* Right 80 columns.                           */
  1833.                /*---------------------------------------------*/
  1834.  
  1835.              fStatus  = MnoScrollRt ( 0,
  1836.                                       0,
  1837.                                       0xFFFF,
  1838.                                       0xFFFF,
  1839.                                       0xFFFF,
  1840.                                       abCell,
  1841.                                       0 ) ;
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.                                    - 33 -
  1848.  
  1849.           5. Video Buffer Write Functions.
  1850.           --------------------------------
  1851.           
  1852.           USHORT DLLFUN     MnoWrtCharStr (
  1853.              PCH pchStr,
  1854.              USHORT cb,
  1855.              USHORT usRow,
  1856.              USHORT usColumn,
  1857.              HVIO hvio )
  1858.           
  1859.              MnoWrtCharStr writes characters to the monochrome display
  1860.              starting at the specified row and column, and for a
  1861.              specified length.
  1862.  
  1863.              pchStr: 
  1864.                 Points to a character array (buffer) which contains the
  1865.                 character string to be written.  A null character
  1866.                 terminator is not required.
  1867.           
  1868.              cb:
  1869.                 Contains the length, in characters, of the string to be
  1870.                 written.
  1871.           
  1872.              usRow:  
  1873.                 The variable which specifies the starting row position.
  1874.                 This must be a value in the range 0 ... 24.
  1875.           
  1876.              usColumn:
  1877.                 The variable which specifies the starting column
  1878.                 position.  This is a value in the range 0 ... 79. 
  1879.           
  1880.              hvio:
  1881.                 Must be 0.  This is only provided for syntatic
  1882.                 compatibility with VIO functions.
  1883.  
  1884.              Returns:
  1885.                 Normally returns 0. If the hvio parameter was not 0,
  1886.                 then the error return is the value
  1887.  
  1888.                    ERROR_VIO_INVALID_HANDLE.
  1889.  
  1890.                 If usRow is greater than 24 then the error return is the
  1891.                 value
  1892.  
  1893.                    ERROR_VIO_ROW.
  1894.  
  1895.                 If usColumn is greater than 79 then the error return is
  1896.                 the value
  1897.  
  1898.                    ERROR_VIO_COL.
  1899.  
  1900.  
  1901.  
  1902.  
  1903.                                    - 34 -        MnoWrtCharStr
  1904.  
  1905.  
  1906.              Remarks:
  1907.                 The character string may wrap from one line to the next
  1908.                 one below, but MnoWriteCharStr does not write past the
  1909.                 end of the screen.  The cursor position is not affected.
  1910.  
  1911.              Example:
  1912.  
  1913.              USHORT   fStatus        = 0 ;
  1914.              UCHAR    szText [ 20 ]  = "hello world" ;
  1915.  
  1916.                              // Display string at 2nd row, 1st column.
  1917.  
  1918.              fStatus  = MnoWrtCharStr ( szText, 
  1919.                                         strlen ( szText ),
  1920.                                         1,
  1921.                                         0,
  1922.                                         0 );
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.                                    - 35 -
  1960.  
  1961.           USHORT DLLFUN     MnoWrtCellStr (
  1962.              PCH pchCellStr,
  1963.              USHORT cb,
  1964.              USHORT usRow,
  1965.              USHORT usColumn,
  1966.              HVIO hvio )
  1967.           
  1968.              MnoWrtCellStr writes characters and their attributes to the
  1969.              monochrome display starting at the specified row and column,
  1970.              and for a specified buffer length.
  1971.  
  1972.              pchCellStr: 
  1973.                 Points to a character array (buffer) which contains the
  1974.                 character-attribute pairs (cells) to be written.  A null
  1975.                 character string terminator is not required.
  1976.           
  1977.              cb:
  1978.                 Contains the length, in bytes, of the cell string to be
  1979.                 written.
  1980.           
  1981.              usRow:  
  1982.                 The variable which specifies the starting row position.
  1983.                 This must be a value in the range 0 ... 24.
  1984.           
  1985.              usColumn:
  1986.                 The variable which specifies the starting column 
  1987.                 position.  This is a value in the range 0 ... 79. 
  1988.           
  1989.              hvio:
  1990.                 Must be 0.  This is only provided for syntatic
  1991.                 compatibility with VIO functions.
  1992.  
  1993.              Returns:
  1994.                 Normally returns 0. If the hvio parameter was not 0,
  1995.                 then the error return is the value
  1996.  
  1997.                    ERROR_VIO_INVALID_HANDLE.
  1998.  
  1999.                 If usRow is greater than 24 then the error return is the
  2000.                 value
  2001.  
  2002.                    ERROR_VIO_ROW.
  2003.  
  2004.                 If usColumn is greater than 79 then the error return is
  2005.                 the value
  2006.  
  2007.                    ERROR_VIO_COL.
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.                                    - 36 -        MnoWrtCellStr
  2016.  
  2017.              Remarks:
  2018.                 The character string may wrap from one line to the next
  2019.                 one below, but MnoWrtCellStr does not write past the end
  2020.                 of the screen.  The character-attribute pair is called a
  2021.                 cell and the specified buffer length should be an even
  2022.                 number.  The cursor position is not affected.
  2023.  
  2024.  
  2025.              Example:
  2026.  
  2027.  
  2028.              USHORT   fStatus        = 0 ;
  2029.              UCHAR    szText [ 200 ] = "" ;
  2030.  
  2031.                              // Display string at 11th row, 2nd column.
  2032.  
  2033.              strcpy ( szText,
  2034.                       "T\07e\07s\07t\07 \07o\07f\07 \07"
  2035.                       "W\07r\07t\07C\07e\07l\07l\07S\07"
  2036.                       "t\07r\07" ) ;
  2037.  
  2038.  
  2039.              fStatus = MnoWrtCellStr ( szText,
  2040.                                        strlen ( szText ),
  2041.                                        10,
  2042.                                        1,
  2043.                                        0 ) ;
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.                                    - 37 -
  2072.  
  2073.           USHORT DLLFUN     MnoWrtNAttr (
  2074.              PBYTE pAttr,
  2075.              USHORT cb,
  2076.              USHORT usRow,
  2077.              USHORT usColumn,
  2078.              HVIO hvio )
  2079.           
  2080.              MnoWrtNAttr writes the specified attribute N times to the
  2081.              monochrome display starting at the specified row and column. 
  2082.  
  2083.           
  2084.              pAttr:
  2085.                 Points to a byte which contains the display attribute.
  2086.           
  2087.              cb:
  2088.                 Contains the desired repeat count.
  2089.           
  2090.              usRow:  
  2091.                 The variable which specifies the starting row position.
  2092.                 This must be a value in the range 0 ... 24.
  2093.           
  2094.              usColumn:
  2095.                 The variable which specifies the starting column
  2096.                 position.  This is a value in the range 0 ... 79. 
  2097.           
  2098.              hvio:
  2099.                 Must be 0.  This is only provided for syntatic
  2100.                 compatibility with VIO functions.
  2101.           
  2102.              Returns:
  2103.                 Normally returns 0. If the hvio parameter was not 0,
  2104.                 then the error return is the value
  2105.  
  2106.                    ERROR_VIO_INVALID_HANDLE.
  2107.           
  2108.                 If usRow is greater than 24 then the error return is the
  2109.                 value
  2110.  
  2111.                    ERROR_VIO_ROW.
  2112.  
  2113.                 If usColumn is greater than 79 then the error return is
  2114.                 the value
  2115.  
  2116.                    ERROR_VIO_COL.
  2117.  
  2118.              Remarks:
  2119.                 The repeated attribute may wrap from one line to the next
  2120.                 one below, but MnoWrtNAttr does not set attributes past
  2121.                 the end of the screen. The existing characters are not
  2122.                 changed and the cursor position is not affected.
  2123.  
  2124.  
  2125.  
  2126.  
  2127.                                    - 38 -        MnoWrtNAttr 
  2128.  
  2129.              Example:
  2130.  
  2131.  
  2132.  
  2133.              USHORT   fStatus     = 0 ;
  2134.              UCHAR szText [ 50 ]  = "" ;
  2135.              BYTE  bAttr          = 0x00 ;
  2136.  
  2137.              bAttr    = 0x70 ;
  2138.  
  2139.              strcpy ( szText, "hello world" ) ;
  2140.  
  2141.  
  2142.                     // Display 'hello world' on the 6th row
  2143.                     // and 11th column. 
  2144.  
  2145.  
  2146.              fStatus = MnoWrtCharStr ( szText,
  2147.                                        strlen ( szText ),
  2148.                                        5,
  2149.                                        10,
  2150.                                        0 ) ;
  2151.  
  2152.                     // Set the attributes for 'hello world'.
  2153.  
  2154.  
  2155.              fStatus = MnoWrtNAttr ( &bAttr,
  2156.                                      strlen ( szText ),
  2157.                                      5,
  2158.                                      10,
  2159.                                      0 ) ;
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.                                    - 39 -
  2184.  
  2185.                                          
  2186.  
  2187.                           
  2188.                                                                    
  2189.                         Monochrome Adapter Attribute Byte.         
  2190.                                                                       
  2191.           
  2192.                            Binary     Description
  2193.                                                                       
  2194.                            0... ....  No blinking                     
  2195.                            1... ....  Blinking                        
  2196.                            .... 0...  Normal foreground intensity    
  2197.                            .... 1...  Bright foreground intensity    
  2198.                            .... .001  Underlining                     
  2199.                            .000 ....  Black background               
  2200.                            .111 ....  White background               
  2201.                            .... .000  Black foreground               
  2202.                            .... .111  White foreground               
  2203.                                       
  2204.           
  2205.                         Hex combinations.
  2206.                                           
  2207.                            0x07       White on black
  2208.                            0x0F       Bright white on black
  2209.                            0x70       Reverse video (black on white)
  2210.                            0x01       White on black underlined
  2211.                            0x87       Blinking white on black
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.                                    - 40 -
  2240.  
  2241.           USHORT DLLFUN     MnoWrtNChar (
  2242.              PCH pchChar,
  2243.              USHORT cb,
  2244.              USHORT usRow,
  2245.              USHORT usColumn,
  2246.              HVIO hvio )
  2247.           
  2248.              MnoWrtNChar writes the specified character N times to the
  2249.              monochrome display starting at the specified row and
  2250.              column.
  2251.  
  2252.           
  2253.              pchChar:
  2254.                 Points to a character which is to be written.
  2255.           
  2256.              cb:
  2257.                 Contains the desired repeat count.
  2258.           
  2259.              usRow:  
  2260.                 The variable which specifies the starting row position.
  2261.                 This must be a value in the range 0 ... 24.
  2262.           
  2263.              usColumn:
  2264.                 The variable which specifies the starting column
  2265.                 position.  This is a value in the range 0 ... 79. 
  2266.           
  2267.              hvio:
  2268.                 Must be 0.  This is only provided for syntatic
  2269.                 compatibility with VIO functions.
  2270.  
  2271.              Returns:
  2272.                 Normally returns 0. If the hvio parameter was not 0,
  2273.                 then the error return is the value
  2274.  
  2275.                    ERROR_VIO_INVALID_HANDLE.
  2276.  
  2277.                 If usRow is greater than 24 then the error return is the
  2278.                 value
  2279.  
  2280.                    ERROR_VIO_ROW.
  2281.  
  2282.                 If usColumn is greater than 79 then the error return is
  2283.                 the value
  2284.  
  2285.                    ERROR_VIO_COL.
  2286.  
  2287.              Remarks:
  2288.                 The repeated character may wrap from one line to the next
  2289.                 one below, but MnoWrtNChar does not set attributes past
  2290.                 the end of the screen.  The existing attributes are not
  2291.                 changed and the cursor position is not affected.
  2292.  
  2293.  
  2294.  
  2295.                                    - 41 -        MnoWrtNChar    
  2296.  
  2297.              Example:
  2298.  
  2299.              USHORT   fStatus  = 0 ;
  2300.              USHORT   usRow    = 0 ;
  2301.              USHORT   usColumn = 0 ;
  2302.              BYTE     chChar   = ' ' ;
  2303.              PBYTE    pchChar  = &chChar ;
  2304.              USHORT   cChars   = 0 ;
  2305.  
  2306.  
  2307.                  // Set the last line of the display to all 'E'.
  2308.  
  2309.              chChar   = 'E' ;
  2310.              usRow    = 24 ;
  2311.              usColumn = 0 ;
  2312.              cChars   = 80 ;
  2313.  
  2314.              fStatus  = MnoWrtNChar ( pchChar,
  2315.                                       cChars,
  2316.                                       usRow,
  2317.                                       usColumn,
  2318.                                       0 ) ;
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.                                    - 42 -
  2352.  
  2353.           USHORT DLLFUN     MnoWrtNCell (
  2354.              PBYTE pCell,
  2355.              USHORT cb,
  2356.              USHORT usRow,
  2357.              USHORT usColumn,
  2358.              HVIO hvio )
  2359.           
  2360.              MnoWrtNCell writes the specified character-attribute pair
  2361.              (cell) N times to the monochrome display starting at the
  2362.              specified row and column.
  2363.  
  2364.           
  2365.              pCell:
  2366.                 Points to a two byte array which contains the character-
  2367.                 attribute pair (cell) that is to be written.
  2368.           
  2369.              cb:
  2370.                 Contains the desired repeat count.
  2371.           
  2372.              usRow:  
  2373.                 The variable which specifies the starting row position.
  2374.                 This must be a value in the range 0 ... 24.
  2375.           
  2376.              usColumn:
  2377.                 The variable which specifies the starting column
  2378.                 position.  This is a value in the range 0 ... 79. 
  2379.           
  2380.              hvio:
  2381.                 Must be 0.  This is only provided for syntatic
  2382.                 compatibility with VIO functions.
  2383.           
  2384.              Returns:
  2385.                 Normally returns 0. If the hvio parameter was not 0,
  2386.                 then the error return is the value
  2387.  
  2388.                    ERROR_VIO_INVALID_HANDLE.
  2389.  
  2390.                 If usRow is greater than 24 then the error return is the
  2391.                 value
  2392.  
  2393.                    ERROR_VIO_ROW.
  2394.  
  2395.                 If usColumn is greater than 79 then the error return is
  2396.                 the value
  2397.  
  2398.                    ERROR_VIO_COL.
  2399.  
  2400.              Remarks:
  2401.                 The repeated cell may wrap from one line to the next one
  2402.                 below, but MnoWrtNCell does not write past the end of the
  2403.                 screen.  The cursor position is not affected.
  2404.  
  2405.  
  2406.  
  2407.                                    - 43 -        MnoWrtNCell
  2408.  
  2409.              Example: 
  2410.  
  2411.  
  2412.  
  2413.              USHORT   fStatus      = 0 ;
  2414.              USHORT   cCells       = 0 ;
  2415.              USHORT   usRow        = 0 ;
  2416.              USHORT   usColumn     = 0 ;
  2417.              BYTE     abCell [ 2 ] = { 0 } ;
  2418.  
  2419.                   // Display ten 'A' starting at the 3rd row,
  2420.                   // 79th column, and wrapping onto the 4th row,
  2421.                   // through the eight column.  The attribute 
  2422.                   // has been set to the normal intensity.
  2423.  
  2424.              abCell [ 0 ] = 'A' ;
  2425.              abCell [ 1 ] = 0x07 ;
  2426.              cCells       = 10 ;
  2427.              usRow        = 2 ;
  2428.              usColumn     = 78 ;
  2429.  
  2430.              fStatus      = MnoWrtNCell ( abCell,
  2431.                                           cCells,
  2432.                                           usRow,
  2433.                                           usColumn,
  2434.                                           0 ) ;
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.                                    - 44 -        MnoWrtNCell
  2464.  
  2465.           USHORT DLLFUN     MnoWrtCharStrAtt (
  2466.              PCH pch,
  2467.              USHORT cb,
  2468.              USHORT usRow,
  2469.              USHORT usColumn,
  2470.              PBYTE pAttr,
  2471.              HVIO hvio )
  2472.           
  2473.              MnoWrtCharStrAtt writes the specified character string to
  2474.              the monochrome display starting at the specified row and
  2475.              column.
  2476.  
  2477.           
  2478.              pch:
  2479.                 Points to an array of characters (buffer) which contains
  2480.                 the string to be written.  A null character string 
  2481.                 terminator is not required.
  2482.           
  2483.              cb:
  2484.                 Contains the count of characters to be written.
  2485.           
  2486.              usRow:  
  2487.                 The variable which specifies the starting row position.
  2488.                 This must be a value in the range 0 ... 24.
  2489.           
  2490.              usColumn:
  2491.                 The variable which specifies the starting column
  2492.                 position.  This is a value in the range 0 ... 79. 
  2493.           
  2494.              hvio:
  2495.                 Must be 0.  This is only provided for syntatic
  2496.                 compatibility with VIO functions.
  2497.           
  2498.              Returns:
  2499.                 Normally returns 0. If the hvio parameter was not 0,
  2500.                 then the error return is the value
  2501.  
  2502.                    ERROR_VIO_INVALID_HANDLE.
  2503.  
  2504.                 If usRow is greater than 24 then the error return is the
  2505.                 value
  2506.  
  2507.                    ERROR_VIO_ROW.
  2508.  
  2509.                 If usColumn is greater than 79 then the error return is
  2510.                 the value
  2511.  
  2512.                    ERROR_VIO_COL.
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.                                    - 45 -        MnoWrtCharStrAtt  
  2520.  
  2521.              Remarks:
  2522.                 The specified attribute is used for each character.  The
  2523.                 string may wrap from one line to the next one below, but
  2524.                 MnoWrtCharStrAtt does not write past the end of the
  2525.                 screen.  The cursor position is not affected.
  2526.  
  2527.              Example:
  2528.  
  2529.              USHORT   fStatus       = 0 ;
  2530.              USHORT   usRow         = 0 ;
  2531.              USHORT   usColumn      = 0 ;
  2532.              BYTE     bAttr         = 0x07 ;
  2533.              UCHAR    szText [ 80 ] = "" ;
  2534.  
  2535.              strcpy ( szText, "Some sample text in reverse video" ) ;
  2536.              bAttr   = 0x70 ;
  2537.  
  2538.              fStatus = MnoWrtCharStrAtt ( szText,
  2539.                                           strlen ( szText ),
  2540.                                           0,
  2541.                                           5,
  2542.                                           &bAttr,
  2543.                                           0 ) ;
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.                                    - 46 -
  2576.  
  2577.           USHORT DLLFUN     MnoWrtTTY (
  2578.              PCH pch,
  2579.              USHORT cb,
  2580.              HVIO hvio )
  2581.           
  2582.              MnoWrtTTY writes the specified character string to the
  2583.              monochrome display starting at the current cursor position.
  2584.           
  2585.           
  2586.              pch:
  2587.                 Points to an array of characters (buffer) which contains
  2588.                 the string to be written.  A null character terminator is
  2589.                 not required.  ANSI escape sequences may be contained 
  2590.                 within the string.
  2591.           
  2592.           
  2593.              cb:
  2594.                 Contains the count of characters to be written.  If the
  2595.                 ANSI escape mode is enabled then count each escaped
  2596.                 character (i.e. '\t') as one character.      
  2597.           
  2598.              hvio:
  2599.                 Must be 0.  This is only provided for syntatic
  2600.                 compatibility with VIO functions.
  2601.           
  2602.              Returns:
  2603.                 Normally returns 0. If the hvio parameter was not 0,
  2604.                 then the error return is the value
  2605.  
  2606.                    ERROR_VIO_INVALID_HANDLE.
  2607.  
  2608.              Remarks:
  2609.                 The current default attribute is used for each character.
  2610.                 The string may wrap from one line to the next one below,
  2611.                 and MnoWrtTTY will scroll the screen up one line
  2612.                 repeatedly to accomodate line wrap on the last line of
  2613.                 the screen.  The cursor position is set to the immediate 
  2614.                 right of the last character written.  In the case where
  2615.                 the last character written by MnoWrtTTY is in the
  2616.                 rightmost column, then the cursor will appear on the
  2617.                 leftmost position on the next lower line, even if the
  2618.                 screen has to be scrolled upwards to accomodate it.   
  2619.  
  2620.  
  2621.                 MnoWrtTTY interprets the following special characters:
  2622.  
  2623.                    \n ... New line (cursor down one line)
  2624.                           Also known as line-feed
  2625.                    \r ... Carriage return (cursor to column 1)
  2626.                    \t ... Horizontal tab (every 8 columns)
  2627.                    \b ... Backspace
  2628.                    \a ... Bell (alert)
  2629.  
  2630.  
  2631.                                    - 47 -        MnoWrtTTY
  2632.  
  2633.           
  2634.                 MnoWrtTTY will process the following ANSI escape
  2635.                 sequences, using these symbols:
  2636.           
  2637.                    ESC... the escape character (decimal 27)
  2638.                           It can be written as "\033" in strings.
  2639.                    col... column 1 thru 80
  2640.                           (Note that Vio/Mno use 0 thru 79.)
  2641.                    row... row 1 thru 25
  2642.                           (Note that Vio/Mno use 0 thru 24.)
  2643.                    n..... count 0 thru 79
  2644.                    g..... graphic code
  2645.           
  2646.                    The suffix characters H,f,A,B,C,D,s,u,J,K and m
  2647.                    indicate the escape sequence (command) type and also
  2648.                    terminate it.
  2649.           
  2650.           
  2651.                 ESC[H           Move cursor to upper left of the screen.
  2652.           
  2653.                 ESC[f           Move cursor to upper left of the screen.
  2654.           
  2655.                 ESC[row;colH    Move the cursor to the specified row and
  2656.                                 column.
  2657.           
  2658.                 ESC[row;colf    Move the cursor to the specified row and
  2659.                                 column.
  2660.           
  2661.                 ESC[nA          Move the cursor up n rows staying in the
  2662.                                 same column.  The cursor will not be
  2663.                                 moved beyond the top of the screen.
  2664.           
  2665.                 ESC[nB          Move the cursor down n rows staying in
  2666.                                 the same column.  The cursor will not be
  2667.                                 moved beyond the bottom of the screen.
  2668.           
  2669.                 ESC[nC          Move the cursor right n columns staying
  2670.                                 in the same row.  The cursor will not be
  2671.                                 moved beyond the right boundary of the
  2672.                                 screen.
  2673.  
  2674.           
  2675.                 ESC[nD          Move the cursor left n columns staying in
  2676.                                 the same row.  The cursor will not be
  2677.                                 moved beyond the left boundary of the
  2678.                                 screen.
  2679.           
  2680.                 ESC[s           Save the current cursor position which
  2681.                                 can be restored with ESC[u. Repeated use
  2682.                                 of the ESC[s sequence saves only the most
  2683.                                 recent cursor position.
  2684.  
  2685.  
  2686.                                    - 49 -
  2687.  
  2688.                 ANSI escape sequences (continued).
  2689.           
  2690.                 ESC[u           Restore the cursor position to the
  2691.                                 location saved by the previous use of
  2692.                                 ESC[s, otherwise move the cursor to the
  2693.                                 upper left of the screen if ESC[s has not
  2694.                                 been used previously.  ESC[u may be used 
  2695.                                 repeatedly without losing the saved
  2696.                                 position.
  2697.           
  2698.                 ESC[2J          Erase the screen and move the cursor to
  2699.                                 the upper left position.
  2700.           
  2701.           
  2702.                 ESC[g;g;..gm    The graphic codes are applied in the
  2703.                                 order in which they appear and will set
  2704.                                 the default attribute used by MnoWrtTTY.
  2705.                                 The other Mno functions do not use this 
  2706.                                 attribute.  ANSI graphic codes support
  2707.                                 color, but the monochrome display has its
  2708.                                 own interpretation.
  2709.           
  2710.                                 graphic  monochrome
  2711.                                 code     attribute effect
  2712.                                 -------  --------------------------------
  2713.  
  2714.                                  0       All attributes off. White
  2715.                                          foreground on black background.
  2716.           
  2717.                                  1       Bold (high intensity) attribute
  2718.                                          on.                      
  2719.           
  2720.                                  2       Faint (normal intensity) 
  2721.                                          attribute on. Ignored if already
  2722.                                          reverse video bold.   
  2723.           
  2724.                                  3       Italic attribute (ignored).                      
  2725.           
  2726.                                  5       Blink attribute on.                     
  2727.           
  2728.                                  6       Rapid Blink (ignored).
  2729.           
  2730.                                  7       Reverse Video attribute on.
  2731.                                          Black foreground on white
  2732.                                          background.
  2733.                        
  2734.                                  8       Concealed attribute on. Black
  2735.                                          foreground on black background.
  2736.           
  2737.                                 30       Black foreground attribute on.         
  2738.  
  2739.  
  2740.  
  2741.  
  2742.                                    - 50 -
  2743.  
  2744.                 ANSI graphic escape sequences (continued).
  2745.           
  2746.                                 graphic  monochrome
  2747.                                 code     attribute effect
  2748.                                 -------  --------------------------------
  2749.  
  2750.                                 31       Red foreground.                        
  2751.                                          White on monochrome display.
  2752.                                          Also turn off underlining.                  
  2753.           
  2754.                                 32       Green foreground.                      
  2755.                                          White on monochrome display.
  2756.                                          Also turn off underlining.                  
  2757.           
  2758.                                 33       Yellow foreground.                     
  2759.                                          White on monochrome display.
  2760.                                          Also turn off underlining.                  
  2761.           
  2762.                                 34       Blue foreground.          
  2763.                                          Underline monochrome display.
  2764.           
  2765.                                 35       Magenta foreground.                    
  2766.                                          White on monochrome display.         
  2767.                                          Also turn off underlining.                  
  2768.           
  2769.                                 36       Cyan foreground.                       
  2770.                                          White on monochrome display.         
  2771.                                          Also turn off underlining.
  2772.                             
  2773.                                 37       White foreground.                      
  2774.                                          Also turn off underlining.                  
  2775.           
  2776.                                 40       Black background.
  2777.                                 
  2778.                                 41       Red background. 
  2779.                                          White on monochrome display.
  2780.                                  
  2781.                                 42       Green background.                      
  2782.                                          White on monochrome display.
  2783.           
  2784.                                 43       Yellow background.                     
  2785.                                          White on monochrome display.
  2786.           
  2787.                                 44       Blue background.                       
  2788.                                          White on monochrome display.
  2789.           
  2790.                                 45       Magenta background.                    
  2791.                                          White on monochrome display.
  2792.           
  2793.                                 46       Cyan background.                       
  2794.                                          White on monochrome display.
  2795.  
  2796.  
  2797.  
  2798.                                    - 51 -
  2799.  
  2800.                 ANSI graphic escape sequences (continued).
  2801.           
  2802.                                 graphic  monochrome
  2803.                                 code     attribute effect
  2804.                                 -------  --------------------------------
  2805.  
  2806.                                 47       White background.                      
  2807.           
  2808.                                 48       Subscript (ignored).                             
  2809.           
  2810.                                 49       Superscript (ignored).                           
  2811.  
  2812.  
  2813.  
  2814.              Examples:
  2815.  
  2816.              USHORT         fStatus = 0 ;
  2817.              UCHAR          szText [ 200 ] ;
  2818.              VIOCURSORINFO  vioCursorInfo ;
  2819.  
  2820.                  // Display "HELLO WORLD" followed by 
  2821.                  // Carriage return - line feed.  
  2822.  
  2823.              strcpy ( szText, "HELLO WORLD\r\n" ) ;
  2824.              fStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  2825.  
  2826.                  // Erase the screen, move the cursor to the upper
  2827.                  // left position.  Reset all attributes and use
  2828.                  // normal intensity white text on a dark background.
  2829.                  // Then display "HELLO WORLD".  The cursor will be
  2830.                  // placed to the right of the text.
  2831.  
  2832.             strcpy ( szText, "\033[2J\033[0mHELLO WORLD" ) ;
  2833.             fStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  2834.  
  2835.  
  2836.                  // Display cursor attributes.
  2837.  
  2838.             fStatus = MnoGetCurType ( &vioCursorInfo, 0 ) ;
  2839.  
  2840.             sprintf ( szText,
  2841.                       "\r\nCursor Start=%d End=%d Width=%d attr=%x\r\n",
  2842.                       vioCursorInfo.yStart,
  2843.                       vioCursorInfo.cEnd,
  2844.                       vioCursorInfo.cx,
  2845.                       vioCursorInfo.attr ) ;
  2846.  
  2847.             fStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.                                    - 52 -
  2855.  
  2856.           USING MNOCONSL
  2857.           --------------
  2858.  
  2859.           MNOCONSL can be executed from an OS/2 command line as a 
  2860.           foreground process:
  2861.              
  2862.              > MNOCONSL   
  2863.  
  2864.           If you Ctrl-Esc, then it gets switched to the background
  2865.           and continues to update the monochrome display.
  2866.  
  2867.           It can also be started as background process:
  2868.  
  2869.              > START "Console" MNOCONSL.EXE
  2870.  
  2871.           In this case, it will not get switched to the foreground
  2872.           unless you select the ICON and open it.  The ICON can also
  2873.           be closed if you have another need for the monochrome
  2874.           display.  This command can be placed in your STARTUP.CMD file.
  2875.  
  2876.           It can be executed as a detached process:
  2877.  
  2878.              > DETACH MNOCONSL
  2879.  
  2880.           The screen updates are more time consuming and the CPU
  2881.           utilization increases since the entire video buffer must
  2882.           be refreshed on each access, for a detached process.
  2883.  
  2884.  
  2885.           When it begins, MNOCONSL first draws lines on the display
  2886.           and some titles.  Then it displays the message:
  2887.  
  2888.              Calibrating the CPU...
  2889.  
  2890.           It is executing a highest-priority counting thread for 
  2891.           ten seconds to calibrate its idle loop.  Later, the
  2892.           CPU cycles that the lowest-priority counting thread
  2893.           accumulates gives the CPU time not used by any useful
  2894.           process.  The inverse of that measurement is the CPU
  2895.           utilization.
  2896.  
  2897.           The system function DosQProcStatus is used to obtain the
  2898.           list of processes and threads.  This is not a documented
  2899.           function but was determined by examining PSTAT.  The MNOCONSL
  2900.           source code contains a structure which defines the 
  2901.           system information returned by DosQProcStatus.
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.                                    - 53 -
  2911.  
  2912.           MNOCONSL does not prevent other processes from accessing the
  2913.           monochrome display, either directly (such as MODE MONO), or
  2914.           by using MNOCALLS.  The responsibility for coordinating
  2915.           access to the monochrome display is up to the user.
  2916.  
  2917.           For example, MNOCONSL should be closed (shut down) when running
  2918.           dual monitor CODEVIEW.  It can easily be restarted after the
  2919.           debugging session.
  2920.  
  2921.           Do not run more than one copy of MNOCONSL at a time.  MNOCALLS
  2922.           can handle multiple client processes, but MNOCONSL was not
  2923.           designed to share the monochrome display.  
  2924.  
  2925.           Source code to MNOCONSL is available for those wishing to
  2926.           customize or enhance it.  See the registration section.
  2927.  
  2928.  
  2929.  
  2930.           USING MF
  2931.           --------
  2932.  
  2933.           When MNOCONSL is running, try the following on an OS/2
  2934.           command line:
  2935.  
  2936.              > DIR | MF
  2937.  
  2938.           The result of the Directory listing will be shown on both
  2939.           monitors.  You are then free to use the primary display
  2940.           for some other purpose.  MF is a simple stdin/stdout filter
  2941.           so it can be incorporated wherever stdout is available.
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.                                    - 54 -
  2967.  
  2968.           Detached Compilation
  2969.           --------------------
  2970.  
  2971.           
  2972.           Program compilations can be executed as detached processes and
  2973.           messages can be piped to the monochrome display while the 
  2974.           primary display is used for some other purpose.
  2975.  
  2976.           Install a PM desktop program entry in a group of your choice 
  2977.           with the following parameters:
  2978.  
  2979.           
  2980.              Properties...
  2981.           
  2982.                 
  2983.                 Program title:         Compile MnoExamp
  2984.           
  2985.                 Path and file name:    C:\MNOCALLS\DETCMD.CMD
  2986.           
  2987.                 Parameters:            MNOEXAMX
  2988.           
  2989.                 Working directory:     C:\MNOCALLS
  2990.           
  2991.  
  2992.           When you activate this program, either by mouse or keyboard, it
  2993.           will detach the command file MNOEXAMX.CMD.  The detached 
  2994.           command file then uses MF to pipe a separator line to the MDA,
  2995.           and then executes NMAKE to build MNOEXAMP.EXE.  Finally, the
  2996.           return code (errorlevel) is checked to display a completion
  2997.           message.
  2998.           
  2999.  
  3000.           You can use MNOEXAMX.CMD and MNOEXAMP.MAK as models for your
  3001.           own detached compilations.
  3002.           
  3003.           
  3004.           The supplied MNOTEST.C source code is also accompanied by 
  3005.           the compilation files MNOTESTX.CMD and MNOTEST.MAK which are 
  3006.           intended for detached compilation.
  3007.           
  3008.           Detached compilations will execute almost as fast as foreground
  3009.           compilations, in the absence of other significantly active 
  3010.           tasks.
  3011.           
  3012.           
  3013.           
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.                                    - 55 -
  3023.  
  3024.           MNOEXAMP, an example with CodeView
  3025.           ----------------------------------
  3026.  
  3027.           
  3028.           MNOEXAMP.C contains an example for each Mno function.  Use the
  3029.           supplied make file to compile the program:
  3030.  
  3031.           
  3032.              > NMAKE /F MNOEXAMP.MAK
  3033.  
  3034.           The compilation messages will appear on the MNOCONSL message
  3035.           area.  Examine the make file for examples of how to use MF in
  3036.           your make and CMD files.
  3037.           
  3038.           Close MNOCONSL from the PM desktop if it is active.
  3039.           
  3040.           Then you can animate the examples by using CodeView:
  3041.           
  3042.           
  3043.              > CVP MNOEXAMP.EXE
  3044.           
  3045.           
  3046.           Use the single step command (F10) to trace each example.  The
  3047.           local variables are unique for each one, and are automatically
  3048.           visible in the CodeView window.
  3049.           
  3050.           
  3051.           
  3052.           
  3053.           The compile can also be done as a detached process:
  3054.  
  3055.              > DETACH NMAKE /F MNOEXAMP.MAK 
  3056.           
  3057.           Similar commands can be assigned to PM desktop group menu
  3058.           items, so that background compiles can be initiated with the
  3059.           mouse and the progress observed on the monochrome monitor.
  3060.           
  3061.           See the preceding section for a more complete description of
  3062.           detached compilations.
  3063.           
  3064.  
  3065.           
  3066.           
  3067.           
  3068.  
  3069.           
  3070.  
  3071.           
  3072.  
  3073.           
  3074.           
  3075.  
  3076.  
  3077.  
  3078.                                    - 56 -
  3079.  
  3080.           HOW TO SET UP DUAL MONITORS 
  3081.           ---------------------------
  3082.  
  3083.           The cost of adding a monochrome monitor and adaptor to an
  3084.           IBM AT compatible (ISA) or EISA system is low.  These are
  3085.           component prices taken from an issue of COMPUTER SHOPPER:
  3086.  
  3087.              Monographic card    $US 15.00   also known as MGP
  3088.              Monochrome monitor  $US 69.00
  3089.  
  3090.           The original IBM PC allowed for combinations of video monitors.
  3091.           The video memory address for the Monochrome Display Adaptor
  3092.           does not overlap any of the following adaptor types:
  3093.           
  3094.              EGA, VGA, CGA, MCGA, 8514
  3095.           
  3096.           For example, to use an EGA and MDA together, put the following
  3097.           into your config.sys file:
  3098.  
  3099.              rem  EGA is primary, MPA is secondary adaptor
  3100.              SET VIDEO_DEVICES=VIO_IBMEGA,VIO_MONO
  3101.              SET VIO_MONO=DEVICE(BVHMPA)
  3102.              SET VIO_IBMEGA=DEVICE(BVHEGA)
  3103.              DEVINFO=SCR,EGA,C:\OS2\VIOTBL.DCP
  3104.           
  3105.           Or for example, to use an VGA and MDA together, put the 
  3106.           following into your config.sys file:
  3107.  
  3108.              rem  VGA is primary, MPA is secondary adaptor
  3109.              SET VIDEO_DEVICES=VIO_IBMVGA,VIO_MONO
  3110.              SET VIO_IBMVGA=DEVICE(BVHVGA)
  3111.              SET VIO_MONO=DEVICE(BVHMPA)
  3112.              DEVINFO=SCR,VGA,C:\OS2\VIOTBL.DCP
  3113.  
  3114.           The monochrome adaptor cards typically also have a printer
  3115.           (parallel) port attached and are also Hercules graphics
  3116.           compatible.  MNOCALLS does not support the graphics mode.
  3117.           Configure the card for character mode if a choice is required.
  3118.  
  3119.           You know if the monochrome monitor/card is installed correctly
  3120.           if OS/2 boots on the EGA/VGA.  Then you go to a full screen
  3121.           OS/2 command line and enter 
  3122.  
  3123.              > MODE MONO       ... the monochrome monitor will activate.
  3124.  
  3125.           To get back to the EGA/VGA enter
  3126.  
  3127.              > MODE CO80       ... the full screen EGA/VGA session will
  3128.                                    activate. 
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.                                    - 57 -
  3135.  
  3136.           TROUBLESHOOTING
  3137.           ---------------
  3138.  
  3139.           Below are error messages from MNOCALLS or its device driver,
  3140.           and your response.
  3141.            
  3142.    
  3143.           
  3144.           The Monochrome Display Driver is NOT loaded
  3145.           because the monochrome adaptor card was not found.
  3146.           
  3147.              During its initialization sequence, MNODRVR.SYS stores a
  3148.              cursor value in the monochrome display adaptor control
  3149.              register and then attempts to read that value.  If these
  3150.              values do not agree, then the adaptor card is either not
  3151.              installed or not functioning properly.  Most likely the
  3152.              OS/2 MODE MONO command will also fail.  If problems persist,
  3153.              have your computer and display adaptors serviced.
  3154.           
  3155.  
  3156.           SYS1804: The system cannot find the file MNOCALLS.
  3157.           
  3158.              Check to be sure the supplied MNOCALLS.DLL file is present
  3159.              in one of the subdirectories specified on LIBPATH in 
  3160.              CONFIG.SYS.  Have you rebooted OS/2 since modifying
  3161.              LIBPATH or MNOCALLS.DLL?
  3162.           
  3163.           
  3164.           SYS0197: The operating system is not presently
  3165.           configured to run this application.
  3166.  
  3167.              You need to specify IOPL=YES in your config.sys file.
  3168.              For this to become effective, you need to reboot OS/2.
  3169.  
  3170.  
  3171.           MNOTEST has failed because the MNODRVR.SYS device
  3172.           driver did not open properly.  Status: 110.
  3173.           
  3174.              When MNOCALLS.DLL attempted to establish contact with the
  3175.              supplied device driver, the DosOpen failed.  Check the
  3176.              OS/2 boot messages to ensure that the following message is
  3177.              displayed: 
  3178.           
  3179.                  Monochrome Display Driver Version 1.00.
  3180.                  Copyright (c) 1991, by Stephen L. Reed, All rights
  3181.                  reserved.
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.                                    - 58 -
  3191.  
  3192.           INDEX
  3193.           -----
  3194.           
  3195.           ANSI Escape Sequences  48
  3196.           Attribute Byte  40
  3197.           Author, comments and questions  1
  3198.  
  3199.           BBS, OS/2 Shareware 1
  3200.  
  3201.           CODEVIEW  54,56    
  3202.           CONFIG.SYS  6,8,57-58
  3203.  
  3204.           DosQProcStatus  53
  3205.           DLL's, how to use  10
  3206.  
  3207.           IOPL  6,8
  3208.  
  3209.           LIBPATH  6,8,58
  3210.           Licensing arrangement  1
  3211.  
  3212.           MF,
  3213.              How to use  54,55
  3214.              MF.EXE  5
  3215.              MNOFILT.C  8
  3216.           MNOCALLS,
  3217.              Description  2
  3218.              Features  4
  3219.              Functions,
  3220.                 MnoGetAnsi  20
  3221.                 MnoGetCurPos  11
  3222.                 MnoGetCurType  14
  3223.                 MnoGetPhysBuf  18
  3224.                 MnoReadCellStr  24
  3225.                 MnoReadCharStr  22
  3226.                 MnoScrollDn  26
  3227.                 MnoScrollLf  30
  3228.                 MnoScrollRt  32
  3229.                 MnoScrollUp  28
  3230.                 MnoSetAnsi  21
  3231.                 MnoSetCurPos  12
  3232.                 MnoSetCurType  16
  3233.                 MnoWrtCellStr  36
  3234.                 MnoWrtCharStr  34
  3235.                 MnoWrtCharStrAtt  45
  3236.                 MnoWrtNAttr  38
  3237.                 MnoWrtNCell  43
  3238.                 MnoWrtNChar  41
  3239.                 MnoWrtTTY  47
  3240.              MNOCALLS.DLL  2,8,10,58
  3241.              MNOCALLS.H  7-10
  3242.              MNOCALLS.LIB  7-10
  3243.              Requirements  4
  3244.  
  3245.  
  3246.                                    - 59 -
  3247.  
  3248.           INDEX
  3249.           -----
  3250.           
  3251.           MNOCONSL,
  3252.              Using  53
  3253.              Description  5
  3254.              MNOCONSL.EXE  8
  3255.           MNODRVR.SYS  2,6,10,58
  3256.           MNOEXAMP,
  3257.              MNOEXAMP.C  56
  3258.              MNOEXAMP.EXE  56
  3259.              MNOEXAMP.MAK  55-56
  3260.              MNOEXAMX.CMD  55   
  3261.           MNOTEST,
  3262.              MNOTEST.C  8
  3263.              MNOTEST.EXE  4,6,7,9
  3264.              MNOTEST.MAK  55     
  3265.              MNOTESTX.CMD  55    
  3266.           
  3267.           NMAKE  55
  3268.  
  3269.           PATH  6,8
  3270.  
  3271.           Registration  1
  3272.           Royalty-free  10
  3273.  
  3274.           Setup, 
  3275.              Dual Monitors  57
  3276.              Organized  8
  3277.              Simple  6
  3278.           Source Code  1,4,54
  3279.           STARTUP.CMD  53
  3280.           SYMTYPES.H  7-10
  3281.  
  3282.           Test Suite  4
  3283.           Troubleshooting  58
  3284.  
  3285.           VIO Documentation Sources  5
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.                                    - 60 -
  3306.  
  3307.