home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
modem
/
modem.bat
next >
Wrap
DOS Batch File
|
1995-04-16
|
973b
|
39 lines
@echo off
cls
if "%1" == "1" goto setmode
if not "%1" == "2" goto usage
:setmode
set port=%1
shift
mode com%port%:2400,n,8,1,p
if not exist %1.exe goto calling
echo Preparing to answer...
echo ATS0=1 > com%port%
goto play
:calling
echo Dialing %1 ...
echo ATDT%1 > com%port%
shift
:play
echo Running %1 -net -com %port% %2 %3 %4 %5
echo Wait for connection, then
pause
%1 -net -com %port% %2 %3 %4 %5
type pluses > com%port%
echo Hanging up now ...
pause
echo ATH0S0=0 > com%port%
echo ATZ > com%port%
goto end
:usage
echo Usage:
echo modem [comport] [phone #] [game] [parameters]
echo Where:
echo [comport] = 1 or 2
echo [phone #] = number to dial (omit for answer mode)
echo [game] = name of game executable
echo [parameters] = command line options for game program
:end
set port=