@echo off
echo off
cls
batchln 4
echo                       Welcome to the PATCHIT quick tutor!
echo                         -another SEMPRINIWARE advantage-
batchln 4
messpaus PRESS ANY KEY TO BEGIN TUTORIAL
cls
echo      First, a quick look at using patchit...
echo We will be using a simple file called TEST.FIL for these examples.
batchln
echo      Here is test.fil:
batchln
type test.fil
batchln
messpaus HIT ANY KEY WHEN READY TO BEGIN.
cls
echo      The first command line will look like this
batchln
echo PATCHIT test.fil /0 -First-=032=-Patch-
batchln
echo      This will replace bytes in TEST.FIL starting with byte 0.  Notice
echo that the address is specified in hexidecimal.  The first string of bytes
echo to replace with is an ascii string, 'First'.  The second is a decimal
echo byte specification =032 (ascii value of a space ' ').  The third is 
echo another ascii string, 'Patch'.  This will put into the beginning of our
echo test file the string 'First Patch'.
batchln
echo      Since there is no fourth parameter on the command line you will be 
echo put into interactive mode, so press Y to make the patch when in PATCHIT.
echo You will see a message at the bottom of the screen telling you what to do.
batchln
messpaus PRESS ANY KEY TO MAKE THE PATCH
batchln
PATCHIT test.fil /0 -First-=032=-Patch-
cls
echo      Here is what our file looks like now:
batchln
type test.fil
batchln 1
echo      Now let's replace those words in the test file.  Starting at byte
echo zero, we'll just put the dots in with an ascii string '...........'.
echo Notice that the address is still zero, but specified in decimal.  Also
echo notice the & at the end of the command line.  This is to make PATCHIT
echo run non-interactively.
batchln
echo PATCHIT test.fil =0 -...........- &
batchln
echo     We will do this in the non-interactive mode, so this will be quick.
batchln
messpaus PRESS ANY KEY TO MAKE THE PATCH
batchln
PATCHIT test.fil =0 -...........- &
batchln
messpaus Done!  Now press any key for the next example...
cls
echo     Now let's replace some bytes to tell us what line is line four.  We'll
echo specify the address in hexidecimal and the bytes to replace in ascii.
echo Notice that the space in the ascii string is specified by a hexidecimal
echo number this time (20 hex = 32 decimal).  The slash at the end of the 
echo command line is simply to tell PATCHIT to run non-interactively.  The 
echo slash could be any character.
batchln
echo The command line will look like this:
batchln
echo PATCHIT test.fil /58 -Line-/20-Four- /
batchln
echo      We'll be in non-interactive mode again, so hang on.
batchln
messpaus PRESS ANY KEY TO MAKE THE PATCH
PATCHIT test.fil /58 -Line-/20-Four- /
messpaus Done!  Now hit any key for the next example...
cls
echo      Now our file looks like this:
batchln
type test.fil
batchln
echo      Hey!  That's not line four!  Well, good thing I have patchit here.
echo I will just throw the correct text out there.  I will specify the address
echo in decimal and the bytes to replace with in hexidecimal.  So the command
echo line will look like this:
batchln
echo      PATCHIT test.fil =88 /4C696E652046697665
batchln
echo      Kind of ugly huh?  Well, let's see what happens....
batchln
messpaus PRESS ANY KEY TO MAKE THE PATCH
PATCHIT test.fil =88 /4C696E652046697665 /
cls
echo      Here is our file now:
batchln
type test.fil
batchln 2
echo      Okay, now it is correct.  Well, that wraps up this quick tutor.
echo I will set TEST.FIL back to its original state so you can fool around
echo with it.
messpaus PRESS ANY KEY WHEN READY
patchit test.fil =88 -...........- /
cls
echo      That concludes this little tutorial.  Enjoy using SEMPRINIWARE's
echo PATCHIT and let me know what you think:
batchln
echo              Brad Taliaferro
echo              c/o Dr. Sandra Linck
echo              P.O. Box 135
echo              Wellsboro, PA 16901
batchln
messpaus PRESS ANY KEY TO END THE TUTORIAL
batchln 2
echo                      S E M P R I N I W A R E