@echo off rem $Id: ssport.bat,v 1.6 1997/03/17 15:55:58 sharris Exp $ rem Description : set %comport% and condition port. rem Syntax : ssport [port_id|PC|FILE] rem port_id - use the port id "a" or "b" rem Workstation type : NT rem Last modification: 26 MAR 96 1.0 Initial version -PEH rem 26 SEP 96 4.00 - Initial version set logcal=nul if "%1" == "" goto Portdefault set comport=n if "%1" == "a" set comport=%FDMportA% if "%1" == "A" set comport=%FDMportA% if "%1" == "b" set comport=%FDMportB% if "%1" == "B" set comport=%FDMportB% if "%1" == "c" set comport=%FDMportC% if "%1" == "C" set comport=%FDMportC% if "%1" == "d" set comport=%FDMportD% if "%1" == "D" set comport=%FDMportD% if "%1" == "FILE" set comport=file if "%1" == "file" set comport=file if "%1" == "PC" set comport=file if "%1" == "pc" set comport=file if "%comport%" == "n" goto Portprompt if "%comport%" == "file" goto Portfile goto Port :Portdefault if "%FDMportm%" == "y" goto Portprompt set comport=%FDMport% if "%comport%" == "FILE" goto Portfile if "%comport%" == "file" goto Portfile if "%comport%" == "PC" goto Portfile if "%comport%" == "pc" goto Portfile goto Port :Portprompt echo. echo. echo. echo A - %FDMportA% echo B - %FDMportB% rem echo C - %FDMportC% rem echo D - %FDMportD% rem echo F - File rem echo P - PC echo. choice /C:ABCDFP /N "Which COM port are you going to download thru?" if errorlevel == 6 goto Portfile if errorlevel == 5 goto Portfile if errorlevel == 4 goto PortcomD if errorlevel == 3 goto PortcomC if errorlevel == 2 goto PortcomB if errorlevel == 1 goto PortcomA rem Cannot get here anyway, but in case choice fails echo Unknown port. goto Portprompt :PortcomA set comport=%FDMportA% goto Port :PortcomB set comport=%FDMportB% goto Port :PortcomC set comport=%FDMportC% goto Port :PortcomD set comport=%FDMportD% goto Port :Portfile set comport=file.pc echo FDM MODELER download to file %comport%. goto End :Port set logcal=CAL%comport% echo Condition serial port %comport% for FDM MODELER download. if "%FDMflowc%" == "x" goto XonXoff MODE %comport% to=off BAUD=9600 PARITY=e DATA=7 STOP=1 XON=off ODSR=off OCTS=on DTR=off RTS=hs IDSR=off %QS_BIN%\smlprep -a -q %QS_DEFAULTS%\comm_dtr.sml > %comport% %QS_BIN%\ssleep 2 goto End :XonXoff MODE %comport% to=off BAUD=9600 PARITY=e DATA=7 STOP=1 XON=on ODSR=off OCTS=off DTR=off RTS=off IDSR=off %QS_BIN%\smlprep -a -q %QS_DEFAULTS%\comm_xon.sml > %comport% %QS_BIN%\ssleep 2 goto End :End