home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
- PatchStarCompiler V1.00
-
-
-
-
- Copyright 1990 Roger Fischlin
- Steigerwaldweg 6
- D-6450 Hanau 7
- Germany
-
-
-
-
- This program is FREEWARE. It's still copyrighted by the author.
-
-
- This program can be freely distributed if :
- 1. the name of the author and the copyright remark remain
- unchanged.
- 2. you don't gain any profit by distributing it !
-
-
-
-
-
-
-
-
-
-
-
- To Patch, that means manipulating some bytes of a file, has become very
- popular today. Usually you need a file editor like "NewZap" or "File-
- master" to patch. That is why the idea of a simple, PASCAL-like language
- rose. These programs may then be compiled by PatchStarCompiler to from
- CLI executable programs .
-
-
-
-
- PatchStar-language
-
-
- This language has just some commands:
-
- TEXT, PATCH, CHECK, IF TRUE, IF FALSE, BEGIN, END, EXIT
-
- Usually the Compiler does not distinguish capital and small letters.
- You can also use as much tabs and spaces as you want. If you type "*"
- or ";" the following line will be a comment line. If you add ";" at
- the end of a line you can write a comment for the source code behind.
-
-
-
- TEXT : TEXT is similar to the PASCAL-command "WriteLn". The
- following text in quotation marks will be written to CLI.
-
- Examples : TEXT "Program patched."
- TEXT 'Wrong version !'
-
-
- PATCH : PATCH ist the command for patching. After that word you
- have to type the adress (using decimal, hexadecimal [$],
- binary [%] or octal [@] values) . Then you have to leave
- at least one space before writing the bytes that shall be
- patched. You can type ":" after the adress, too.
- If you want to patch a string, you have to use quotation
- marks ! You cannnot mix strings and bytes !
- As PATCH is the most important command you can leave it
- out and immediately start with the adress.
-
-
- Examples : PATCH $0000 : "256"
- PATCH 50 ff ff ff ea
- PATCH %110 '200'
- 123456 $4a $99 $5a
- @00 $349afb
-
-
- CHECK : CHECKs the bytes of the file that will be patched. It may
- of a big advantage if the patch works with some versions of
- the same program. It can also protect you of a wrong patched
- file if you get the version number first.
- It has the same syntax as PATCH but you must not leave it
- out. The results of CHECK can then be worked out with the
- IF commands.
-
- Examples : CHECK $0000 : "256"
- CHECK 50 ff ff ff ea
- CHECK %110 '200'
-
-
- BEGIN : Use BEGIN and END to mark some lines belonging together.
- END It is necassary in use with the IF commands, so that the
- compiler knows which commands it shall execute and which
- it shall not.
-
-
-
- IF FALSE : Both IF commands work out the results of the CHECK command.
- IF TRUE The following commands after "IF FALSE" will be executed, if
- the result of CHECK is negative (false).
- The commands after "IF TRUE" will be executed, if the result
- of CHECK is positive (true). These commands, even when it is
- just one, have to be enclosed by BEGIN and END.
- The IF command just refers to the last executed CHECK command.
- There may be other IF commands in the following block.
-
- Examples : CHECK $132 : "256"
- IF TRUE
- BEGIN
- TEXT "PAL version !"
- END
- IF FALSE
- BEGIN
- PATCH $132 : "256"
- TEXT "patched NTS- to PAL version !"
- END
-
-
-
-
- EXIT : EXIT ends the patch process immediately.
-
- Examples : CHECK $4656 : "1.3"
- IF FALSE
- BEGIN
- TEXT "Sorry - wrong version !"
- EXIT
- END
-
-
-
-
- Example
-
-
- ; ED Patch taken from FileMaster
-
-
- check $1aad : "199" ; check if it's the right version !
-
-
- if true ; yes, now patch window size
- begin
- Patch $1aad : "255"
- Text "ED 1.4 will now open PAL window."
- end
-
-
-
- if false ; no, it's a different version of ED !
- begin
- Text "Sorry, wrong version of ED !"
- end
-
-
-
-
-
-
-
-
-
- how to make a patch
-
-
- Write the source code by using any ASCII editor (e.g. ED) and the
- described language. Save it to disk and create another file containing
- in the info text. Compile both files :
-
- 1> PatchStarCompiler <info file> <source code> <name of the patch>
-
-
- The compiler then creates step by step the patch and saves it to
- the third parameter.
-
-
-
- 27. October 1990 Roger Fischlin
-