home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / asm / SMODE.ZIP / SCRN.DOC < prev    next >
Encoding:
Text File  |  1988-05-22  |  8.6 KB  |  229 lines

  1.  
  2.      SMode
  3.  
  4. Rights and Restrictions:
  5.  
  6.    The files in this archive are made available for the use of the PC
  7.    community.  The only restriction is that they may not be used, except
  8.    by the authors or those with the authors' written permission, for
  9.    profit.  They may be distributed freely.  Groups distributing public
  10.    domain, freeware, shareware, etc at cost, may charge a reasonable
  11.    cost of duplication and distribution fee for a disk including this
  12.    archive.  The rights to SM and R are reserved by the author.
  13.  
  14.  
  15.  
  16. General:
  17.  
  18.    The files in this archive for a set of files which aid in utilizing
  19.    43 lines (EGA) or 50 lines (VGA) per screen.  They consist of three
  20.    units: NANSI, SM.COM, and R.COM.  MASM source files are included for
  21.    SM.COM and R.COM.  For NANSI, a difference file indicating the changes
  22.    to the source file found on IBMSW, DL 1 as NANSRC.ARC.  The revised
  23.    sources were not included both to save space and on the advise of 
  24.    a sysop who responded to my request to the author for permission to
  25.    upload.  To the best of my knowledge NANSI is in the public domain, but
  26.    I have not been able to contact the author.
  27.  
  28.  
  29.    General content:
  30.  
  31.      NANSI.SYS      a revised version of NANSI which is, in turn, a revision
  32.                     of ANSI.SYS.  8088, etc, version.
  33.  
  34.      NANSI286.SYS   Same as NANSI.SYS except utilitizes some of the 80286
  35.                     enhanced real mode instructions for speed.
  36.  
  37.      SM.COM         A command line utility for changing the lines/screen.
  38.                     Useful in a batch file to enquire the current status.
  39.  
  40.      R.COM          A utility to run a program that must run with 25 lines
  41.                     per screen.  It saves and restores the number of lines
  42.                     currently in use before running the program.
  43.  
  44.  
  45. ANSI.SYS
  46.  
  47.    The two programs described below require a new version of ANSI.SYS
  48.    to run properly.  It is possible that no ANSI.SYS in the system would
  49.    also work.  However, ANSI.SYS and many of its varients control the
  50.    scroll of stdout at the expected 25 lines per screen.  Some permit
  51.    43 line modes IFF you use a special request to the driver.  I have
  52.    supplied two versions of NANSI.SYS which supports all of the standard
  53.    ANSI.SYS functions and works at higher speed.  They also check the
  54.    BIOS area for the number of lines/screen rather than make any assumptions.
  55.  
  56.    NANSI.SYS is for any 80x86/8 processor.  NANSI286.SYS requires a 80286
  57.    or 80386 (possibly works with 80186).  It uses some extended instructions
  58.    to improve speed.
  59.  
  60.  
  61. COMPATIBILITY WARNING:
  62.  
  63.    NANSI.SYS and both programs below assume that the BIOS data area is
  64.    setup according to the EGA and VGA specifications.  There are rumors
  65.    I've heard that some TSR's and drivers, including FANSI-CONSOLE it is
  66.    reported, may cause the BIOS data area to be different and these programs
  67.    will probably fail.  If there are any drivers other than NANSI supplied
  68.    with the programs or TSR programs that in some fashion augment the
  69.    screen operation, it is possible that there will be a failure.  The
  70.    only way to know is to test them.  So far they have run with SideKick
  71.    Plus, Periscope II debugger, Turbo and MS compilers, and Brief and
  72.    MS Editors.
  73.  
  74.  
  75. Program: SM.Com  (Screen Mode)
  76.  
  77. Purpose: To adjust EGA or VGA card to 43/50 rows or back to 25 rows or
  78.          to check which mode it is in.  Does this without clearing the
  79.          screen.  Preserves as many lines currently displayed as possible.
  80.  
  81. Invocation:
  82.  
  83.      SM n       <- set screen
  84.  or  SM         <- query screen
  85.  
  86.  
  87.   1.  If n is present and is a number from 0-25, the screen will be set
  88.       to 25 lines if not already there.  The return code (ERROR_LEVEL)
  89.       will be 0 if no change was needed, else 1.
  90.  
  91.   2.  If n is present and is a number greater than 25, the screen will be
  92.       set into whatever mode uses 8 scanlines per character.  For EGA, this
  93.       is 43 lines.  For VGA, 50 lines.  No change is made if this is already
  94.       the case.  The return code (ERROR_LEVEL) will be 0 if no change was
  95.       needed, else 1.
  96.  
  97.   3.  If no argument is given, this is a test for the current number of rows.
  98.       If it is 25 rows, the return code (ERROR_LEVEL) is 0 else it is the
  99.       current number of rows per screen.  An ERROR_LEVEL of 1 may be checked
  100.       after running the program and will be true for all but 25 line mode.
  101.       
  102.   4.  A return code of 255 is returned if there is a bad argument or if
  103.       the interface is not an EGA or VGA.
  104.  
  105.  
  106. Program: R.Com
  107.  
  108. Purpose: To run a program when the screen is in 43/50 line mode and the
  109.          program must run in 25 lines mode.  R will switch the screen, run
  110.          the program, and restore the screen.  It also works fine if the
  111.          screen is already in 25 line mode.
  112.  
  113.  
  114. Invocation:
  115.  
  116.          R <program-name> <arguments>
  117.  
  118.      R will put the screen into 25 line mode if not there already.  It
  119.      will then run the named program with the arguments supplied.  If
  120.      the program name includes a disc designator or path or partial path
  121.      designation, then only the specified location will be checked.  If
  122.      the program name includes a suffix or trailing period, then only the
  123.      specified suffix (or none) will be used.
  124.  
  125.      NOTE: batch files may not be run this way.
  126.  
  127.      The designated program is located according to the following rules.
  128.  
  129.      1.  If the program name does not contain a drive designation or
  130.          a \ character (forward slashes will not work here), skip to
  131.          the general search rules below.
  132.  
  133.      2.  A full path name is constructed from the portion given.  If
  134.          no drive designator is specified, the current drive is inserted
  135.          at the start.  If the path does not begin with a \, then the
  136.          current directory path for the drive is inserted at the start.
  137.  
  138.      3.  If the full path name so constructed, contains a period in the
  139.          last field, this is considered the only permitted name to use
  140.          and an attempt is made to open this file.  Otherwise, the suffix
  141.          .EXE is appended and if that file does not exist, the suffix
  142.          .COM is tried.
  143.  
  144.      4.  If a file is found in step 3, that file is run as a program
  145.          with the arguments supplied.
  146.  
  147.  
  148.      General Search Rules.
  149.  
  150.      1.  First the file name is looked for in the current directory of
  151.          the current drive.  The rules used in step 3 above for suffix
  152.          determination are used here.
  153.  
  154.      2.  If not found in step 1, then each directory in the PATH
  155.          environmental variable is tried in turn with the same suffix
  156.          rules as above applying.
  157.  
  158.      3.  If the file is found in steps 1 or 2, that file is run as a
  159.          program with the arguments supplied.
  160.  
  161.  
  162. Standards:
  163.  
  164.      It is believed that the rules used (as documented above) correspond
  165.      to the way COMMAND.COM of MSDOS 3.xx locates a program.
  166.  
  167. Errors:
  168.  
  169.      If the screen interface is not an EGA or VGA, an error is reported
  170.      without trying to run the program.
  171.  
  172.      If the program cannot be found by the algorithm given above, the
  173.      error:
  174.  
  175.        Program not found.
  176.  
  177.      is reported.
  178.  
  179.      Other errors may be reported from MSDOS's error report to the
  180.      program R:
  181.  
  182.      Invalid function
  183.           internal error, should not happen.
  184.  
  185.      File not found
  186.           probably will be reported as Program not found.
  187.  
  188.      Not enough memory
  189.           Program requires more memory to run than is available.
  190.  
  191.      Bad environment
  192.           just what it says.
  193.  
  194.      Bad format
  195.           unsure what this means
  196.  
  197.      Unknown Error
  198.           an error number not documented for MSDOS at this time
  199.           has been returned
  200.  
  201.  
  202. Return Code (ERROR_LEVEL):
  203.  
  204.      If R is not able to function (not VGA/EGA) or it cannot find
  205.      or fails to execute the program, the return code will be 1.
  206.      Otherwise, the return code from R will that which the program
  207.      it ran returns to it.
  208.  
  209. Source files:
  210.  
  211.      SM.ASM    the MASM source for SM, requires VGA.INC
  212.      R.ASM     the MASM source for R, requires VGA.INC
  213.      VGA.INC   some general VGA definitions used by some .ASM files
  214.  
  215. Difference files:
  216.  
  217.      NANSI.DIF
  218.      NANSI_D.DIF
  219.      NANSI_F.DIF
  220.  
  221.      These file represent the difference between the source used for
  222.      the *.SYS files in the archives and the NANSRC.ARC found in DL1
  223.      of IBMSW.  The original files are the basis for comparison with
  224.      the revised files show as the new version.  A + indicates something
  225.      added in the revised version and a - indicates something deleted
  226.      from the original.
  227.  
  228.     
  229.