home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR8
/
VMAC.ZIP
/
VMAC111.DOC
< prev
Wrap
Text File
|
1993-08-05
|
22KB
|
512 lines
VMAC.COM
(Version 1.11 August 5, 1993)
Macro Compiler for Eric Meyer's VDE (Versions 1.53-1.65 and 1.70+)
Reference
VMAC converts VDE macro files with the extensions .VDF and .VDK into
text files with the extensions .VTF and .VTK, and vice versa.
Contents:
FEATURES
USAGE
OPTIONS
FORMAT OF TEXT FILE (.VT[FK])
1. BASIC FORM OF MACRO
2. MACRO KEYS
3. LABEL
4. MODE
5. EQUAL SIGN
6. DEFINITION
A. Key Names in Definitions
B. The Special Character (`)
C. Wrapping Definitions
7. WHITESPACE
8. COMMENTS
A. Line Comments
B. Comments Following a Definition
MESSAGES
UPGRADING TO VERSION 1.70+
A NOTE ON WILDCARDS
=======================================================================
*=*=*=*=*=*=*=*=*=*=*=*=*=*=* FEATURES =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
=======================================================================
* Handles macros for VDE Versions 1.53-1.65 and 1.70+.
* Allows comments in text files
* Allows definitions in text files to be broken down and written on
several lines so that the logical structure is more apparent and so
that long definitions can be viewed in their entirety on one screen
* Uses understandable function key names like [^F7] and [@F10] instead
of perplexing numbers like [27] and [40]
* Handles multiple filenames on the command line and accepts DOS
wildcards
* Displays the line of a text file in which an error was found and
indicates the type of error
* Shows how much free space remains in a macro file
* Lists all key names when creating a text file so that you can easily
see which keys are free for the addition of new macros, or
optionally lists only those keys to which macros have been assigned
=======================================================================
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* USAGE *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
=======================================================================
VMAC {/U7} Pathname { Pathname ....}
where Pathname = {Drive:\Dir\}Filename.V[DT][FK]
Options for converting macro files to text files (.VD[FK]-->.VT[FK]):
(none) = list ALL key names
/U = list only names of keys USED for macros
Option for VDE V1.70+:
/7 = convert .VTF text files to V1.70+ .VDF macro files
DOS wildcards are OK, but read "A NOTE ON WILDCARDS" near the end of
this document before using them.
=======================================================================
*=*=*=*=*=*=*=*=*=**=*=*=*=*=* OPTIONS *=*=*=*=*=*=*=*=*=**=*=*=*=*=*
=======================================================================
/U -- LISTING MACRO KEYS
When VMAC converts a macro file to a text file and no options are
specified, it lists all the key names so that you can easily see which
ones are free. If you don't like this feature or don't want to use it
in a particular case, specify the /U option and only key names that are
actually being used for macros will appear in the text file.
Regarding the function keys F11, F12 and their shifted brethren of
the extended keyboard, if macros exist for any of them, they will be
listed. Otherwise, they will not appear in the text file.
------------------------------------
/7 -- VERSION 1.70+
This option is used to convert .VTF function key text files to .VDF
macro files that can be loaded by VDE V1.70+. It increases the number
of bytes allowed in a macro from 127 to 255, and places the file
identifier for V1.70 at the start of the .VDF file.
If you forget to set the /7 option, there may be no problem. When
VMAC encounters either a label or an Autoexec macro, it automatically
sets the file identifier to that for V1.70 and increases the bytes
allowed. However, if you have any long macros before the first label or
an Autoexec macro occurs, you will get an error message.
=======================================================================
*=*=*=*=*=*=*=*=*=* FORMAT OF TEXT FILE (.VT[FK]) *=*=*=*=*=*=*=*=*=*
=======================================================================
NOTE: In the following, V1.53+ means VDE Versions 1.53 - 1.65,
and V1.70+ means VDE Versions 1.70 - (the latest)
------------------------------------
1. BASIC FORM OF MACRO
In a text file, the basic form of a V1.53+ macro or a V1.70+ macro
without a label is:
[Key] Mode = Definition { ;; Comment}
{= Continuation of Definition} { ;; Comment}
For a V1.70+ macro with a label, it is:
[Key] < Label > Mode = Definition { ;; Comment}
{= Continuation of Definition} { ;; Comment}
------------------------------------
2. MACRO KEYS
Key names are always enclosed in brackets, [ ]. VMAC uses the function
key names displayed by VINST.COM V1.70+ even for V1.53+ macro files
because they are much easier to understand.
The key names in a text file must be in the order given here.
Character Keys in a .VTK file:
Numbers [0]...[9]
Letters [A]...[Z]
Function Keys in a .VTF file:
Unmodified [F1]...[F10]
<Shift> [!F1]...[!F10]
<Ctrl> [^F1]...[^F10]
<Alt> [@F1]...[@F10]
Extended [F11] [F12]
[!F11] [!F12]
[^F11] [^F12]
[@F11] [@F12]
------------------------------------
3. LABEL (<xxxxxxx>)
After the key name a label is optional for V1.70+. Labels are enclosed
in angled brackets, < >, and can be at most 7 characters long.
e.g. [F1] < Help > N = ^J
If you don't use the full 7 characters, as in <Help>, the remainder
will be padded with spaces. If there is nothing or only spaces between
the brackets, it's the same as no label at all.
------------------------------------
4. MODE
After the key name or label comes the mode:
(none) N (No repeat) Q (Quiet) B (Both) A (Autoexec)
These can be combined as long as no conflict occurs,
e.g. NQ AQ BA ANQ,
but QB and NB are not allowed because B contains Q and N.
The Autoexec mode is available only in VDE V1.70+, and only one
function key can be assigned this mode.
------------------------------------
5. EQUAL SIGN (=)
After the mode comes an equal sign. This is used as a signal that a
definition follows. If an equal sign is the first non-whitespace
character on a line, it means that the definition that follows is a
continuation. For example, the following two forms of the definition
yield identical results when converted.
[!F3] B = ^Qd^D[Esc]=^M]^S^S[Esc]= 1^D [Esc]1^D^D[Esc]![
[!F3] B = ^Qd^D[Esc]=^M]
= ^S^S[Esc]= 1^D`
= [Esc]1^D^D[Esc]![
------------------------------------
6. DEFINITION
A definition has the same general appearance as it does when viewed in
VINST.COM:
^ indicates <Ctrl>, e.g. ^K ^Q
@ indicates <Alt>, e.g. @P @L
[xxx] indicates a key name e.g. [Up] [^BkSp]
other characters represent themselves, e.g. t Z :
A. Key Names in Definitions
Just as for macro keys, key names are enclosed in brackets, [ ].
And they are case insensitive, so [Home] is the same as [home] or
[HOME] or whatever.
The key names recognized are:
Unmodified <Ctrl> <Shift>
~~~~~~~~~~ ~~~~~~ ~~~~~~~
[Down] [^Down] [!Down]
[End] [^End] [!End]
[Home] [^Home] [!Home]
[Left] [^Left] [!Left]
[PgDn] [^PgDn] [!PgDn]
[PgUp] [^PgUp] [!PgUp]
[Right] [^Right] [!Right]
[Up] [^Up] [!Up]
[Del] [^BkSp] [!Tab]
[Esc] [^Esc]
[Ins] [^Ins]
[+] (Keypad)
[-] (Keypad)
[5] (Keypad)
VMAC will recognize ^[ for [Esc], but it always writes [Esc] when
creating a text file. [Enter] is indicated by ^M, and [^Enter] by
^J.
Except for [!Tab], the shifted keys indicate block marking commands
executed by pressing the key while holding [Shift] down.
And notice that, for arrow keys, VMAC uses words as in [Up], [^Up],
etc. instead of the symbols [^], [^^], etc. that appear in
VINST.COM.
B. The Special Character (`).
Since the characters ^, @, and sometimes [ have special meanings,
there has to be a way to cancel out that special meaning so that
these characters can be entered in a definition as themselves. That
is the basic function of the special character (`). You place it in
front of a character that should be interpreted literally, with no
special meaning attached. So, if you want to enter any of the three
characters ^, @, or ` as itself in a definition, use the forms:
`^ `@ ``
If you want to enter the string '[Esc]' so that it won't be
interpreted as a key name, put a special character in front of the
left bracket:
`[Esc]
Example: Entering the Epson Printer Initialization Code (Esc @) in
a printer setup string.
[@F5] N = ^Kp'^P[Esc]`@^P[Esc]l^B^P[Esc]Q5'
~~~~~~~~~
This use of (`) is a convention borrowed from E. Slawson's VMC.COM
(as is the use of the file extensions .VTF and .VTK). But this
character has additional importance in VMAC, as explained in the
section on whitespace.
C. Wrapping Definitions
When VMAC creates a text file, it wraps long definitions around to
the next line so that you can see the whole thing on one screen.
But when it converts a text file to a macro file, it pays no
attention to line length, so you can write long definitions on a
single line if you want.
------------------------------------
7. WHITESPACE
Whitespace (spaces and tabs) before the start of a definition is
ignored, so the following two forms are equivalent.
[L] B = ^Y^X^U
[L]B=^Y^X^U
This means that, if a definition or its continuation begins with a
space, you have to indicate that fact with the special character (`).
This definition begins with 3 spaces.
[S] B = ` XYZ
This definition begins with the letter X.
[S] B = XYZ
As a visual aid, when VMAC converts a macro file to a text file, it
places a special character in front of a space that occurs at the end of
a line. The following definitions both end with two spaces, and it is
clear which one is easier to understand.
[D] B = ^Og@G2
[D] B = ^Og@G2 `
For the same reason that you have to put a special character at the
start of a line when it begins with a space, you MUST put one in front
of a space at the end of a line if you add a comment to the line. And
that brings us to the next section.
------------------------------------
8. COMMENTS
There are two kinds of comments: line comments and comments written
after a definition.
A. Line Comments
When converting a text file to a macro file, VMAC pays attention
only to lines beginning with either the left bracket ([) of a key
name or the equal sign (=) of a continuation. Blank lines and lines
beginning with any other character are ignored. So, you can insert
blank lines freely to make the text more readable and write
comments anywhere as long as they don't begin with either of these
two characters.
Example: The line beginning with "-----" is a comment line.
----- Transpose Lines Down -----
[L] B = ^Y^X^U
B. Comments Following a Definition
Comments after a definition begin with the pattern:
space + semicolon + semicolon ( ;;)
Spaces between the end of a definition and this pattern are
ignored. This is why you have to put a special character in front
of a space at the end of a definiton when you use this type of
comment. If you actually have to use this pattern in a definition,
then put a special character in front of either of the semicolons
to break it up, e.g. space + semicolon + ` + semicolon ( ;`;).
Example: The special character (`) at the end of the definition is
necessary because of the comment that follows.
[B] B = ^Og@G2` ;; paraGraph tab, bullet, space
If you put a comment close to a special character, as in
[B] B = ^Og@G2` ;; paraGraph tab, bullet, space,
then the space will do double duty as the last character of the
macro and as part of the pattern signaling a comment.
=======================================================================
*=*=*=*=*=*=*=*=*=**=*=*=*=*=* MESSAGES *=*=*=*=*=*=*=*=*=**=*=*=*=*=*
=======================================================================
VMAC writes only data that you need to the screen -- no advertising, no
addresses or telephone numbers, no implied threats of prosecution for
copying the code or documentation -- just essential information. It
issues the usual error messages if it can't find a file or can't read it
or something like that. In addition, if it finds a problem in a text
file, it issues messages like the following that enable you to pinpoint
the problem and quickly correct it:
<IMET.VTK>
[Z] B = ^Or70^M^Op60^M
The maximum size of a macro file was exceeded in this line by 6 bytes.
<SPQR.VTF>
[^FA] B = ^Kb^Qc^Kk^K#1^M^Qb^Kh
The macro key name is invalid, nonexistent, or not in the proper order.
If the conversion is successful, it writes:
VRGN.VDF created. 506 bytes of free space.
=======================================================================
*=*=*=*=*=*=*=*=*=*=* UPGRADING TO VERSION 1.70+ *=*=*=*=*=*=*=*=*=*=*
=======================================================================
For .VDF files, just convert them to .VTF text files with VMAC, add
labels or do other editing if desired, and then use the /7 option to
convert the text files back into .VDF files.
For .VDK files, rename them to .VDF files and proceed as above.
=======================================================================
*=*=*=*=*=*=*=*=*=*=*=*=* A NOTE ON WILDCARDS *=*=*=*=*=*=*=*=*=*=*=*=*
=======================================================================
The DOS wildcards (? *) can be used in the filename or extension.
e.g. WXYZ.VD? X*.VTK *.VDK.
But be aware of one hazard in using a wildcard for the 'D' or 'T' in the
extension. Suppose you want to convert the text files WXYZ.VTF and
WXYZ.VTK to macro files and you use WXYZ.* on the command line. The
situation progresses like this:
1) Initial situation:
Directory entries
WXYZ.VTF
WXYZ.VTK
2) Processing begins and occurs as expected.
Directory entries
WXYZ.VTF <-- processed by VMAC
WXYZ.VTK
WXYZ.VDF <-- created
3) This step is also what you would expect.
Directory entries
WXYZ.VTF
WXYZ.VTK <-- processed by VMAC
WXYZ.VDF
WXYZ.VDK <-- created
4) Unexpectedly, DOS feeds the names of the newly created files to the
program because it simply walks down the list of directory entries
looking for matches. And so the macro files that were just made are
converted back into text files, wiping out any comments you may have
written.
Directory entries
WXYZ.VTF <-- OVERWRITTEN!!!
WXYZ.VTK
WXYZ.VDF <-- processed by VMAC
WXYZ.VDK
5) Processing stops after this step because there are no more files
matching the pattern.
Directory entries
WXYZ.VTF
WXYZ.VTK <-- OVERWRITTEN!!!
WXYZ.VDF
WXYZ.VDK <-- processed by VMAC
So, you should use WXYZ.VT? to convert both text files at the same
time.
=======================================================================
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* THANKS! *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
=======================================================================
It is impossible for me to express the gratitude I feel toward Eric
Meyer for writing VDE, for making it available for all to use, and for
being so generous with his time in responding to (sometimes not well
thought out) questions, (often silly) suggestions, and (usually
unnecessary) complaints.
I would also like to thank Eric Tauck for the wonderful (and free)
little program The Wolfware Assembler for which the source code for
VMAC was written.
========================================================================
The program VMAC.COM is absolutely free.
========================================================================
DISCLAIMER
I disclaim responsibility for any bad things that happen as a result of
using this program.
========================================================================
Richard Cowell
S.K. Heights #6
Suwa 239, Takatsu-ku
Kawasaki, Kanagawa 213
JAPAN
========================================================================
End of VMAC.COM Reference
========================================================================
----------------end-of-author's-documentation---------------
Software Library Information:
This disk copy provided as a service of
Public (software) Library
We are not the authors of this program, nor are we associated
with the author in any way other than as a distributor of the
program in accordance with the author's terms of distribution.
Please direct shareware payments and specific questions about
this program to the author of the program, whose name appears
elsewhere in this documentation. If you have trouble getting
in touch with the author, we will do whatever we can to help
you with your questions. All programs have been tested and do
run. To report problems, please use the form that is in the
file PROBLEM.DOC on many of our disks or in other written for-
mat with screen printouts, if possible. PsL cannot debug pro-
programs over the telephone, though we can answer questions.
Disks in the PsL are updated monthly, so if you did not get
this disk directly from the PsL, you should be aware that the
files in this set may no longer be the current versions. Also,
if you got this disk from another vendor and are having prob-
lems, be aware that some files may have become corrupted or
lost by that vendor. Get a current, working disk from PsL.
For a copy of the latest monthly software library newsletter
and a list of the 4,000+ disks in the library, call or write
Public (software) Library
P.O.Box 35705 - F
Houston, TX 77235-5705
1-800-2424-PSL
MC/Visa/AmEx/Discover
Outside of U.S. or in Texas
or for general information,
Call 1-713-524-6394