@echo off
rem Freeware Dialer Package for use with   NOS  
cls

setscrn
echo.
echo             ���������������������������������ͻ
echo             �           NOS Dialup            �
echo             ���������������������������������ͼ
echo.

echo.
echo          Automated Session starting
echo.
echo          Dialing ....
echo.


:DIAL

rem dial up the ISP
NETDIAL BASE 0xMYBASE IRQ MYIRQ MYSPEED
rem        :    :
rem        :  speed - must be the same for this line and the packet driver.
rem        :
rem      comport - must be the same for both
rem                netdial lines and the packet driver lines ( hangup too) 
rem  if com card has non standard interrupts see .\dialdoc\netdial.doc 
rem for setup information. Also readme.doc. 
IF ERRORLEVEL 1 GOTO BUSY
goto PKTDRVR

:BUSY
setscrn
echo.
echo             ���������������������������������ͻ
echo             �            NOS Redial           �
echo             ���������������������������������ͼ
echo.
	echo No Response.. will redial automatically ...Esc to quit
	echo.
	Holdit  20 > nul
	if errorlevel 200 goto END
	if errorlevel 0 goto DIAL
	setscrn
	goto DIAL

:PKTDRVR
rem logged in, so start the Packet driver 

epppd base 0xMYBASE irq MYIRQ pktvec 0xMYVEC MYSPEED asyncmap 0 crtscts
call IP-UP.bat
rem set GATEWAY=%REMIP%
echo my_ip=%MYIP% > path.cfg
echo gateway=%remip% >> path.cfg
echo netmask=%netmask% >> path.cfg
echo nameserver=MYDNS1 >> path.cfg
:MYREM  echo nameserver=MYDNS2 >> path.cfg
echo Ip address set to %MYIP%



:NOS
rem packet driver loaded, so ready to start NOS

rem change to the   NOS directory
cd .\NOS
net.exe -d. autoexec.net
rem change back to the  Dialer directory
cd ..

:END


rem  remove the packet driver and hang up the phone
termin 0xMYVEC
rem      :
rem    vector should be same as used when loading Packet driver 

rem netdial BASE 0xMYBASE IRQ MYIRQ hangup
rem        :
rem     comport should be the same as 2 other places in batch file


