Putting the power of an 8-cylinder engine under the hood of DOS batch files.
Assembly Batchfile Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
DEMOS
EXAMPLES
SOURCE
LICENSE
README.md
README.txt
ROADMAP.txt
V8HELP.bat
mkClean.bat
mkV8.bat
release.sh

README.md

V8Power Tools

Putting the power of an 8-cylinder engine under the hood of DOS batch files.

Copyright 2016 Jerome Shidel.
Released under the GPL v2.0 License.


The V8Power Tools project is being designed in cooperation with Jim Hall for the FreeDOS™ operating system. It is intended to expand the functionality of scripts written using batch files and to provide them with a better looking user interface with increased functionality.


Compiling V8Power Tools

   Prerequisites

      8086 or better cpu.
      EGA or better video adapter.
      FreeDOS™ 1.1 or higher
      NASM™ for DOS version 2.11.08

   Compiling

      Insure the NASM directory is in your path spec.
      Download the latest sources from GitHub.
      Run the mkV8.bat script.
      All executibles will be placed in newly created BIN directory.

   For lazy people, like me

      Precompiled versions are available at http://up.lod.bz/V8Power.


V8Power Tools Tested Compatibility

  • FreeDOS 1.1+

Limited compatiblilty of advanced features (no "set /p" batch support):

  • MS-DOS 6.2 and 6.22
  • PC-DOS 7.0, 7.01 and 2000
  • DR-DOS 7.03
  • DosBOX (i/o redirection or querying using stdout will NOT work)
  • Windows 3.11 Shell
  • Windows 98 Shell and Command Line
  • Windows XP SP3 Shell (except vcursor)

V8Power Tools Usage

Here is some basic information reguarding all utilities and how they operate.

  • Options, values and hexidecimal numbers are not case specific /f white is the same as /F wHIte.
  • Hexidecimal numbers may be prefixed with 0x to prevent them from being treated as base ten. (Example: 10 and 0x10)
  • Spaces are mostly optional. /B7/f0 is the same as /B 7 /F 0. But, not / B7 / F0.
  • To use a / or spaces in a value, put it in qoutes. Like "Jack and/or Jill".
  • Use multiple qoutes to use quotes. Like "Jack's house" or 'Say "What?"'.
  • Unless overriden, most utilities use the text attribute at the current cursor location.

Here is color table used for all /A, /F and /B switches:

DecimalHexLabel (Not case specific)
00x00Black
10x01Blue
20x02Green
30x03Cyan
40x04Red
50x05Magenta
60x06Brown
70x07Gray
80x08DarkGray
90x09LightBlue
100x0aLightGreen
110x0bLightCyan
120x0cLightRed
130x0dLightMagenta
140x0eYellow
150x0fWhite

v8help [options]

Displays help text from V8Power Tools README.TXT document.

Lists all V8Power Tools commands.
commmandDisplays help for that V8Power Tool.

vcls [options]

Clear screen, area or row (line).

Clear the screen with the current text attribute.
nSet text attribute to n.
/A nSet text attribute to n.
/B colorSet the background text attribute to color (or a value).
/F colorSet the forground text attribute to color (or a value).
/GGlobal Screen Clear. (Default)
/LLocal Screen Clear. Detects its surroundings and only clears that. Probably, a box or line or something. You don't really need this option. Because, you can just redraw the box, maybe.
TEXTClear the text only. Leave all colors intact and ignore their color attributes.
EOLClear from cursor to End of Line only.
/C codeClear by filling with an ASCII character code.
/X columnAbsolute screen column to start clear.
/Y rowAbsolute screen row to start clear.
/W widthTotal width of area to clear.
/H heightTotal height of area to clear.

vcursor [options]

Change or query the cursor size and shape.

.
Outputs the current cursor shape to STDOUT.
nSet the current cursor shape as n.
HIDEHides the cursor.
SMALLSets a small cursor
HALFSets the cursor to 1/2 of the text height.
FULLSets the cursro to the full height of text.
Note: Although this utility is fully compatible with DOSBox, there is no way to store the current cursor shape. See the examples, on how to work around this issue. Also, this utility will not have any effect in a Windows terminal.

vdelay [ms]

Simple delay in milliseconds.

Default is 1000ms (1 second) delay.
msDelay for ms milliseconds. (0-65535, 0x0000-0xffff)
/DDetect method used for timing. (Not compatible with VirtualBox)
/SUse safe general purpose timer. (Default)
/IUse high precision interrupt timer. (Not compatible with VirtualBox)

vecho [options] [text]

Output text to display.

Preforms a Carriage Return and Line Feed to the display.
textWrites text to the display.
/A nSet text attribute to n.
/B colorSet the background text attribute to color (or value).
/F colorSet the forground text attribute to color (or value).
/NDo not write a CRLF when done.
/PPerform a CRLF now.
/S +Insert a space character between parameters. (default)
/S -Do not add space character between multiple parameters.
/C codeWrite an ASCII character code.
/R timesRepeat the next write times number of times. (1-65535)
/IWrite text that may waiting from the STDIN device.
/GWrite text ignoring all framing.
/LWrite text locally with regards to framing. (DEFAULT)
/X codeErase rest of line using ASCII code, but don't move the cursor.
/ESame as using /X 0x20
/T file IDLook up ID in file and process it like command line options.
Any additional options that follow this switch are used to
populate %1-%9 variables in the text string.
tba(Still under development, more to be announced)

vgotoxy [options]

Move or query cursor position.

Preforms no action.
/Q x or yQueries the current X or Y position of the cursor and outputs it to STDOUT.
/X columnMove cursor to column.
/Y rowMove cursor to row.
/GMove cursor based on entire screen. (default)
/LMove cursor based on its surroundings.
directionMove cursor up, down, left or right one space.
shiftMove cursor to the previous or next position and change rows if needed.
positionMove cursor to the SOP (Start of Page), EOP (End of Page), SOR (Start of Row), EOR (End of Row), SOL (Start of Text on Line), EOL (End of Text on Line), SOT (Start of All Text) or EOT (End of All Text) position.

vframe [options]

Draw a box windowing thingy and move cursor to its inside top left position.

Draw a box that encloses the entire screen.
/A nSet text attribute to n.
/B colorSet the background text attribute to color (or value).
/F colorSet the forground text attribute to color (or value).
/X columnScreen column to start the box.
/Y rowScreen row to start the box.
/W widthTotal width of the box.
/H heightTotal height of the box.
/CCenters the box horizontally and vertically.
/T file IDLook up ID in file and process it like command line options.
Any additional options that follow this switch are used to
populate %1-%9 variables in the text string.
styleBox styles are Single, Double, SingleSides, DoubleSides and Hidden.
shadowAdd a 3D style shadow.
textboxDraw a textbox style frame with a little padding and margins.
optionboxDraw a hidden style optionbox for choices inside a frame.

vpcspkr [hz:][ms]

Generate a tone using the built in speaker.

No output.
hz:msUse the PC Speaker to generate a hz frequency tone. Then, delay for ms milliseconds. (Note: 0 frequency turns off speaker. If no frequency is provided then 0 is assumed)
/DDetect method used for timing. (Not compatible with VirtualBox)
/SUse safe general purpose timer. (Default)
/IUse high precision interrupt timer. (Not compatible with VirtualBox)
tba(Still under development, more to be announced)

vver [options]

V8Power information program.

Outputs all info to STDOUT.
allOutputs all info to STDOUT.
titleOutputs full title to STDOUT.
copyrightOutputs the copyright message to STDOUT.
versionOutputs the version information to STDOUT.
licenseOutputs license information to STDOUT.
urlOutputs the website url information to STDOUT.

vprogres [options]

Draw a progress bar at current location without moving cursor.

Draw a progress bar at 0%.
/A nSet text attribute to n.
/B colorSet the background text attribute to color (or value).
/F colorSet the forground text attribute to color (or value).
/W widthOverride default width of the bar (default is from cursor to end of line).
valueSets the value in a percent of progress.
offDo not display percentage number.
alignPercentage number on left, center (Default) or right side of the progress bar.
OF maxCalculate percentage of max. Example 5 of 7.

vchoice [options]

Choose an option.
It returns an errorlevel of choice selected based on its entry number. Not the letter/number of the choice. For example, if the second item is chosen, it will return an errorlevel of 2. Regardless of any prefix (Like C, 1, R, etc). Also, I personally recommend using auto for any set of choices that you prefix with a letter or number.

Perform using all automatic defaults settings.
/A nSet text attribute to n for selected item.
/B colorSet the background text attribute to color for selected item.
/F colorSet the forground text attribute to color for selected item.
/D nPreselect item number n as the default choice.
typeDirect keypress selection type.
off Select with only arrow keys.
auto Detect direct jump characters. (Default)
alpha Jump to selections using A-Z.
digit Jump to selections using 1-9 (+0).
/QQuery for result. When the choice is made, it's text will be sent to STDOUT.
/T secondsDelay in seconds before the default item is automatically selected (0-3600). Note that even if the user navigates to a different item, the original default item will be selected when the timeout is achieved.
/P nUse polling mode and preselect item number n as the current choice. Note, any change of selection will exit vchoice and return 100+ the current choice number.
CTRL-CWhen specified and CTRL-C is pressed, will exit with errorlevel of 200.
tba(Still under development, more to be announced)

vpause [options]

Simple wait for keypress or time-out.

Wait forever for keypress.
/D secondsDelay in seconds to wait before the pause times-out. (returns errorlevel 1) (/T has been depreciated)
CTRL-CWhen specified and CTRL-C is pressed, will exit with errorlevel of 200.
tba(Still under development, more to be announced)

vline [options]

Draws a line.

Draws as local single dumb line on the current row. Wait forever for keypress.
singleDraws a single line.
doubleDraws a double line.
hiddenDraws a hidden dumb line.
dumbDraws a dumb without regard to what already exists.
tba(Still under development, more to be announced)

vinfo [options]

General system information utility.

Does nothing.
/V Verbose Mode.
/D aTest a drives status.
Returns these error codes:

15 - Not Present
5 - Not Formatted (for DOS)
4 - Network Drive (untested)
3 - CD/DVD-ROM (MSCDEX Only, most report error 15)
2 - Removable Media (like Floppy)
1 - (Reserved)
0 - No Special Conditions
/MReturn Machine Type (This may break on future platforms).
Returns these exit codes:

0 - Unknown, Normal or Native 8086 Hardware.
1 - 80186
2 - 80286
3 - 80386
4 - 80486
5 - 80586
6 - 80686 or better
101 - DOSBox.
102 - QEMU.
103 - VirtualBox
104 - VMware
200 - General, other emulator detected.
tba(Still under development, more to be announced)

verrlvl [options]

Sets current errorlevel. Mostly for testing batch file logic.

Sets errorlevel to 0
nSets errorlevel to n (0-255)

vmath [options]

Super simple math utility. It is NOT as a calculator and is limited to working on numbers from 0-32767. Good for looping, determining screen offsets and etc.

+,ADDAdd next number to sum.
-,SUBSubtract next number from sum.
*,MULMultiply sum by next number.
/,DIVDivide sum by next number.
\,MODDivide sum by next number and set sum to the remainder.
ANDLogical AND.
ORLogical OR.
XORLogical XOR.
SHRBit shift right.
SHLBit shift left.
/HSet output to hexadecimal.
/DSet output to decimal.
tba(Still under development, more to be announced)

vstr [options]

Simple String processing utility. Outputs results to STDOUT.

Preforms a Carriage Return and Line Feed to STDOUT.
/NDo not write a CRLF when done.
/UInput Filter: Convert to upper case.
/DInput Filter: Convert to lower case.
/BInput Filter: Ignore blank lines.
/IInput Filter: Ignore indentation.
/C codeWrite an ASCII character code.
/R timesRepeat the next write times number of times. (1-65535)
/L lineReturn only this line from standard input. (0-65535)
(Note: vline /L TOTAL will return the total number of lines.) Also, adding :n will output n number of lines.
/S s1 s2Search and replace all occurrences of s1 with s2.
/F s1 s2Set delimiter to s1 and only return field position or range s2.
/T s2Return tab field position or range s2.
/P s1Print text s1.
tba(Still under development, more to be announced)

vmode [options]

Set and query current video text modes.

Outputs current video mode and font to STDOUT.
VESAOutputs a list of VESA modes to STDOUT.
modeSet current video mode. (0-0xffff) or a mode label with optional font setting.
Modes:
	BW40	Black and White 40 Column (also B40).
	BW80	Black and White 80 Column (also B80, BW).
	CO40	Color 40 Column (also C40).
	CO80	Color 80 Column (also C80, COLOR).
	MONO	Mono 80 Column.

Fonts: Font8 Select 8x8 ROM font. (also F8) Font14 Select 8x14 EGA ROM font. (also F14) Font16 Select 8x16 VGA ROM font. (also F16)


vfdutil [options]

File and directory utility.

Does nothing.
/D fileCalculate and output drive letter of file to STDOUT.
/P fileCalculate and output path of file to STDOUT.
/CUse before /D or /P to change drive or path without text output.
/XUse before /D or /P to return errorlevel 1-26 of drive letter.
/F fileCalculate and output complete filename to STDOUT.
/N fileCalculate and output file's basename to STDOUT.
/E fileCalculate and output file's extension to STDOUT.
/U templateCalculate and output unique file/dir name based on template to STDOUT. The drive and path must exist.
Example: "vfdutil /u C:\TEMP\TEST????.$$$"
/S filespecSearch the PATH for a given filespec and output all matching files to STDOUT. The current directory is not searched. If any filespec is not found, exits with an errorlevel 1.
/T filespecJust like /S except only errorlevel 0 or 1 is returned.

vask

Prompt for text input.

Use detected settings for input.
textPreset edited text.
/A nSet text attribute to n.
/B colorSet the background text attribute to color (or value).
/F colorSet the forground text attribute to color (or value).
/GInput text ignoring all framing.
/LInput text locally with regards to framing. (DEFAULT)
/CWhen specified and Control-C is pressed, will exit with errorlevel of 200 and return the default value.
/T file IDLook up ID in file and process it like command line options.
Any additional options that follow this switch are used to
populate %1-%9 variables in the text string.
/D secondsDelay in seconds to wait before the prompt times-out and returns the initial default value. (returns errorlevel 1)
tba(Still under development, more to be announced)

vinsert [options]

Insert a blank row (line) at the current location.

Insert a blank line.
nInsert n blank lines.
/A nSet text attribute to n.
/B colorSet the background text attribute to color (or a value).
/F colorSet the forground text attribute to color (or a value).
/GGlobal Insert.
/LLocal Insert. (Default)

vdelete [options]

Delete row (line) at the current location.

Delete line.
nDelete n lines.
/A nSet text attribute to n.
/B colorSet the background text attribute to color (or a value).
/F colorSet the forground text attribute to color (or a value).
/GGlobal Delete.
/LLocal Delete. (Default)

veach [options]

Do something for each item in a list.

/S Turn on list sorting.
/L Display list contents.
/F file Add items to list from file.
/I Add items to list from the Standard Input device.
/D spec Modifies /d spec to the list.
/A +/- Modifies /D switch to enable all files and directories.
/C When the /X switch is used, allows continuing despite a subprocess error.
/X cmdln Execute item with command line and all subsequent switches are passed to the subprocess. * is expanded to item, # is number of items and @ is index of item. If no command line data follows the /X switch, * is assumed.
tba(Still under development, more to be announced)