home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / virus / dirtyd9c.arc / GET.DOC < prev    next >
Encoding:
Text File  |  1989-05-21  |  4.9 KB  |  81 lines

  1.  
  2.   GET -- Bob Stephan's Batch file enhancer -- a public domain utility
  3.          Syntax:  GET command argument
  4. Purpose             Command       Argument   Environment Errorlevel  Extended
  5. ---------           -------       --------   --(GET=)--- --(Exit)--  --[E]---
  6. Get character       C[E] ["prompt"] [chars]  Character   ASCII dec.  No Echo
  7. Get yes/no aNswer   N[E] ["prompt"]  None    Character   ASCII dec.  No Echo
  8. Get string          S[E] ["prompt"]  None    String      Length      No Echo
  9. Moving Text(GetaKey)T[E] "Filespec" [chars]  Character   ASCII dec.  No Echo
  10. Get DOS version     D[E]             None    Major Vers. MajorMinor  MinorEnv
  11. Get environment left    E[E]         None    Bytes left  Bytes left  Bytes/10
  12. Get file size (255=DIR) F[E]  Filespec       Hex bytes   Kilobytes   Kb/10
  13. Get disk space          K[E] [driveletter]   Kilobytes   Kilobytes   Kb/10
  14. Get memory free         M[E]         None    Kilobytes   Kilobytes   Kb/10
  15. Clear (Blank) Screen    B   [New attribute]  Current or last attr.   None
  16. Check for printer       P            None    1=yes,0=no  1=yes,0=no  None
  17. Get/set video mode      V   [New mode]       Current or last mode    None
  18. Check coprocessor       7            None    1=yes,0=no  1=yes,0=no  None
  19. Check for ANSI.SYS      A            None    1=yes,0=no  1=yes,0=no  None
  20. Get current directory   Y            None    Directory   Level/Drive Drive
  21. Surrogate character args: } is Carriage Return, ~ is Escape, ` is Extended.
  22.  
  23. Explanations:
  24. To display the above screen, enter GET with no arguments.
  25. Commands are single characters or [optionally] a character and E with
  26.    no spaces between.  The E indicates the Extended function above.
  27. N, the yes/No answer will accept y, n, carriage return, or Esc.
  28. B, the screen Blanker, does not change your color settings unless
  29.    you give it an attribute to use, and it will work with any number
  30.    of lines on the screen (e.g. EGA 43 or VGA 50).
  31. [] brackets indicate optional portions of commands and/or arguments.
  32.    The command will work regardless whether these portions are
  33.    included or not.
  34. Where double quotes ("'s) are shown, they must be included as shown
  35.    if the corresponding command/argument is used.
  36. A filespec may include drive and path but no wild cards.
  37. [chars] are optional characters that limit the user input to just
  38.    the characters given.  This should be a contiguous character
  39.    string separated from the prompt, if given, by a space.
  40.    Single characters are taken without pressing Enter.
  41.    (Strings, of course, will require the user to press Enter.)
  42.    The comparison of characters is not case sensitive.  To
  43.    indicate that a carriage return, Esc, or Extended key is
  44.    acceptable, include the surrogate character listed above.  If
  45.    no chars are given, any key stroke will be accepted.  If extended
  46.    keyboard characters are specified, the scan code will be in the
  47.    errorlevel and the corresponding ASCII value in the environment
  48.    preceeded by "0".  A table of keyboard scan codes will be useful.
  49. Environment: this column indicates what will be found in the
  50.    environment string GET=.  This string can be accessed from a
  51.    BATch file with the %GET% notation.
  52. Errorlevel: this column indicates what value will be placed in the
  53.    DOS errorlevel that can be accessed in BATch files with the
  54.    "if errorlevel" subcommand.
  55. Extended: this column indicates the action taken if the optional
  56.    "E"xtended commmand is included.  The values/10 refer to
  57.    errorlevel return codes.  The drive for the Y command will be
  58.    in both places.  The minor DOS version (e.g., the 1 in 3.1) will
  59.    be in the environment, but the errorlevel will have
  60.    (major*10)+minor in either case (e.g. 31).
  61. T, the Moving Text feature, requires a file with the prompt string that
  62.    will be displayed moving across the bottom line of the screen.
  63.    Currently only standard 25 line screens are supported.  The text
  64.    file should be plain ASCII without any control characters (No CR,
  65.    LF, or any other characters below ASCII 32).  To be effective
  66.    the prompt should be over 80 characters long, and to ensure
  67.    smooth wrap-around the first 79 characters should be repeated
  68.    at the end.  The maximum length for the text for the moving
  69.    prompt is 4095 characters.  Over that it will be truncated.
  70. V: don't fool around with Video mode unless you know what you are
  71.    doing!
  72.  
  73. GET is programmmed in assembly language for MS-DOS computers.
  74. Portions of the code for GET were adapted from the sample program named
  75. WHAT.ASM included with Microsoft Macro Assembler (MASM).  The MASM
  76. documentation declares that the sample programs are in the public domain.
  77. For examples of GET, look at the BATch files on the MASDIR disk for
  78. the use of a similar program called SDL_GET.  You can do a lot in
  79. BATch programming with this utility.  I place it in the public domain
  80. for all to enjoy.                     /s/Bob Stephan    May 20, 1989
  81.