home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
PROGRAM
/
DIVERSEN
/
TIPI2A
/
HELPDOS.TPI
< prev
next >
Wrap
Text File
|
1994-09-13
|
4KB
|
195 lines
define menu
# ( -- choice)
# ( valid$ -- )
# Returns the chosen key or 0 if the user escapes from this menu
0 cursor
ucase$
27 chr$ swap$ +$
begin
inkey$ ucase$ # valid$ key$
len instr *
dup
if dup drop$ endif drop$
until
1 -
1 cursor
enddef
define wait
begin key until cls
enddef
begin cls
|
| ╔══════════════════════════════════╗
| ║ D O S I N S T R U C T I O N S ║
| ╠════════════════╦═════════════════╣
| ║ ║ ║
| ║ [A] CALL ║ [G] KILL ║
| ║ ║ ║
| ║ [B] CHDIR ║ [H] MAKEDIR ║
| ║ ║ ║
| ║ [C] COMMAND$ ║ [I] NEXTFILE ║
| ║ ║ ║
| ║ [D] ENV$ ║ [J] REMDIR ║
| ║ ║ ║
| ║ [E] FIRSTFILE ║ [K] RENAME ║
| ║ ║ ║
| ║ [F] GETDIR ║ ║
| ╚════════════════╩═════════════════╝
"abcdefghijk" menu dup cls
case 0 of endof
1 of
|
| CALL
|
| Data Stack: --
| String Stack: program$ param$ --
|
| Calls a DOS program (programs) with the
| parameter given in param$. Sets ERROR to 255 if
| the call is unsuccessful. Otherwise ERROR is set
| to zero unless the called DOS program returns
| its own error code. Call COMMAND.COM to run
| batch files.
|
wait
endof
2 of
|
| CHDIR
|
| Data Stack: --
| String Stack: dir$ --
|
| Changes the current DOS directory to the one
| specified by the top string on the string stack.
|
wait
endof
3 of
|
| COMMAND$
|
| Data Stack: --
| String Stack: -- Command$
|
| Places a string on the string stack consisting
| of what followed the word TIPI on the DOS
| command line when TIPI was invoked.
|
wait
endof
4 of
|
| ENV$
|
| Data Stack: N --
| String Stack: -- E$
|
| ENV$ retrieves DOS environment strings. N
| identifies which string to retrieve. If the
| string is not found, a null string ("") is
| returned. If the environment string is longer
| than 80 characters, TIPI will only return the
| first 80 characters in the string.
|
wait
endof
5 of
|
| FIRSTFILE
|
| Data Stack: --
| String Stack: filespec$ -- fname$
|
| Finds the first file that matches filespec$.
| Filespec$ follows the standard DOS wildcard
| rules (ie the filespec can contain "*" or "?"
| characters).
|
wait
endof
6 of
|
| GETDIR
|
| Data Stack: num --
| String Stack: -- dir$
|
| GETDIR is used to get the current directory. If
| num = 0 then GETDIR returns the directory of the
| current drive. If num is 1 GETDIR uses the A
| drive, 2 uses the B drive etc. The directory
| returned does NOT contain the drive letter or the
| first "\". Thus, if the current directory is the
| root directory, 0 GETDIR will return a null
| string ("").
|
wait
endof
7 of
|
| KILL
|
| Data Stack: --
| String Stack: filespec$ --
|
| Kills the specified file.
|
wait
endof
8 of
|
| MAKEDIR
|
| Data Stack: --
| String Stack: dirspec$ --
|
| Makes the directory specified in dirspec$. If
| there is an error, the system variable ERROR
| will be set.
|
wait
endof
9 of
|
| NEXTFILE
|
| Data Stack: --
| String Stack: -- file$
|
| Returns the next file that matches the filespec
| set by a previous FIRSTFILE command. If there
| are no more files matching the filespec, the
| null string ("") is returned.
|
wait
endof
10 of
|
| REMDIR
|
| Data Stack: --
| String Stack: dir$ --
|
| Removes the directory dir$. The directory should
| be empty before you delete it. If REMDIR fails,
| the system variable ERROR will be set.
|
wait
endof
11 of
|
| RENAME
|
| Data Stack: --
| String Stack: oldname$ newname$ --
|
| Renames a file.
|
wait
endof
endcase
not until