REM SQTP2.BAT  Standard Header File, Version 1.00    Microchip Technology, Inc.
echo off
REM 
REM  Demo program sqtp1.bat for command line PRO MATE
REM    This program downloads a device file then repeatedly
REM    programs the device based on an sqtp file.  This file
REM    accepts command line arguments as inputs.
REM 
REM
REM        1. Command line switch:
REM               SQTP2 %1 %2 %3 %4
REM               %1 - Filname of device program
REM               %2 - Communications port
REM               %3 - Part type 
REM               %4 - SQTP filename
REM
REM
REM        2.  Requirements
REM               DOS 5.0 or higher
REM
REM
REM               Note : "out of environment space" requires user to
REM               allocate a larger environment. An example follows :
REM                   command.com  /e:4096 (or more)
REM==========================================================================
REM
REM       Revision History
REM
REM==========================================================================
REM
REM     Rev:   Date:    Reason:
REM
REM     1.00   05/01/97 Initial Release


REM %1 - Filname of device program
REM %2 - Communications port
REM %3 - Part type 
REM %4 - SQTP filename
cls

procmd /%2 /p%3 /f%1

:run

if NOT ERRORLEVEL 1 goto program
goto error1

:program
cls
echo PLEASE STRIKE ANY KEY WHEN NEW DEVICE IS READY FOR PROGRAMMING
pause
cls
echo PROGRAMMING DEVICE
echo off
procmd /%2 /p%3 /S%4 /M
if NOT ERRORLEVEL 1 goto run
goto end
:error1


echo SQTP2 - program arguments
echo sqtp2 #1 #2 #3 #4
echo argument 1 - Filname of device program
echo argument 2 - Communications port
echo argument 3 - Part type 
echo argument 4 - SQTP filename
echo                     1997 Microchip Technology, Inc.


:end
