home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
dirutl
/
synonym3.lbr
/
SYNONYM2.DQC
/
SYNONYM2.DOC
Wrap
Text File
|
1985-06-16
|
4KB
|
134 lines
SYNONYM Version 2.0 by: Bill Allen Sep 1981 Page 1
SYNONYM is a program that generates a program. This
generated program when executed, will invoke another CP/M
command. It's really not as complex as it sounds. Here is an
example: You would like to invoke Microsoft basic by typing
only the letter "B" instead of typing "MBASIC". You could
just rename MBASIC.COM to B.COM but you could no longer use
"MBASIC" to invoke basic.
SYNONYM can create a "B.COM" file that when
invoked will modify the CCP input buffer to "MBASIC" and
then jump to the CCP. The new .COM file is very small (1
block) and is saved with the $SYS indicator set (in CP/M
2.x ) so it won't clutter up your DIRectory. Then to invoke
basic you would only have to type: "B". You could also pass
basic a program name to execute just as with MBASIC by
typing: "B BASPGM" (where BASPGM is the name of the basic
program).
You can also create a SYNONYM with a fixed parameter
string. For example you might like to run a basic program
called STARTREK.BAS by typing "ST". SYNONYM can create a
file ("ST.COM") that will invoke MBASIC and pass it a fixed
string "STARTREK". If you do create a SYNONYM with a fixed
paramater string any paramaters entered on the command line
invoking the SYNONYM will be appended to the fixed
paramaters. This could be used to invoke the SUBMIT program,
pass it the name of the .SUB file as a fixed paramater, and
then any other variable paramaters.
SYNONYM COMMAND SYNTAX
______________________
SYNONYM newname oldname [parameter string]
where:
newname
is the name to be used as a synonym. It
can be anything acceptable to CP/M as a
file name.
oldname
is the actual name of the command to be
executed and may include a disk letter.
parameter string
is a fixed string to be passed to the
command. It is optional and any
paramaters entered when the synonym is
invoked will be appended.
SYNONYM Version 2.0 by: Bill Allen Sep 1981 Page 2
SYNONYM EXAMPLES:
_________________
Create a synonym "B" to invoke "MBASIC" (microsoft
basic). The paramater string entered on the command line
will be passed to MBASIC.
A>SYNONYM B MBASIC<cr>
example of use: Invoke MBASIC and run "MYPROG"
A>B MYPROG<cr>
Create a synonym "ST" to invoke "MBASIC" from the A:
disk and pass it the fixed string "STARTREK".
A>SYNONYM ST A:MBASIC STARTREK<cr>
example of use: Invoke MBASIC and run "STARTREK"
A>ST<cr>
Create a synonym "T" to invoke the built-in CP/M
command "TYPE".
A>SYNONYM T TYPE<cr>
example of use: Type this file.
A>T SYNONYM.DOC<cr>
Create a synonym "M" to invoke a SUB file (MAC.SUB)
and pass it the paramater string entered with the new "M"
command.
A>SYNONYM M A:SUBMIT A:MAC<cr>
example of use: Submit MAC and pass "ASMPROG $SZ"
A>M ASMPROG $SZ<cr>
Obtain HELP with the SYNONYM command similar to the
SYNONYM command syntax shown above.
A>SYNONYM ?<cr> or A>SYNONYM<cr>
SYNONYM Version 2.0 by: Bill Allen Sep 1981 Page 3
NOTES ON SYNONYM.ASM
____________________
1. The program can be assembled with MAC or ASM.
2. The program has been tested on both CP/M version 1.4 and
version 2.x (The $SYS attribute is set only on 2.x).
3. The subroutine "XCTL" could easily be used in other
programs that you would like to have transfer control to
another CP/M command. It is self-contained except for the
call to VARMOV.
If you have any problems, questions, suggestions or
modifications; please leave a message on the TCBBS Dearborn
(313) 846-6127 or call me during business hours at: (313)
357-4800.
Enjoy,
Bill Allen - 09/01/81