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