SCRNCH
SCRNCH is a data compression utility and toolkit for DOS. It was developed by Graeme W. McRae, and distributed as shareware.
It has two main modes of operations, which it calls Run Mode and Write Mode. Run Mode does executable compression. Write Mode creates various types of self-decompressing files.
Contents |
Discussion
Run Mode compresses a COM file to a COM or (for v1.02) EXE file.
SCRNCH also provides a way to compress EXE files (to COM or EXE), with help from the included SCRE2B utility. This is not part of the main SCRNCH utility, though there is an included COMPRESS.BAT script to automate the process.
Write Mode compresses a file that is generally not executable, to a COM or EXE file. In the simplest case, it converts a text file to an executable file that prints the text to the screen. With effort, it can do other things, such as ask the user for a filename, then write the decompressed data to that file.
Identification
SCRNCH v1.00-compressed COM files (both modes) start with bytes bb ff ff b4 4a cd 21 81 eb
. The modes can be distinguished. For example, the byte at offset 37 seems to be 0x8c
for Run Mode, or 0xfc
for Write Mode.
SCRNCH v1.00-compressed EXE files (which must be Write Mode) have bb ff ff b4 4a cd 21 81 eb
at offset 512.
Based on analysis of the (decompressed) SCRNCH.COM file, a v1.02 SCRNCHed file contains one of six possible "signature" byte sequences:
eb 13 73 43 65 66 0c 03 ("sCef"): Run Mode, default for COM output eb 13 73 43 67 66 90 03 ("sCgf"): Run Mode eb 13 73 43 68 66 89 02 ("sChf"): Run Mode, default for EXE output eb 13 73 43 77 66 ba 03 ("sCwf"): Write Mode, default for COM output eb 13 73 43 79 66 b4 02 ("sCyf"): Write Mode, default for EXE output eb 20 73 43 7a 66 33 04 ("sCzf"): Write Mode
For COM format, the signature is at the start of the file. For EXE, it's at the start of the code image segment (refer to MS-DOS EXE#Special file positions), which is normally at offset 512.
Considering that SCRNCH plays fast and loose with converting between COM and EXE formats, it may be possible that all six signatures could appear in both COM and EXE files.
Related formats
- SCRE2B
- ZIP - Reportedly[1], ZIP's Reduce compression method is based on SCRNCH's compression method.
Software
- SCRNCH v1.00 (1988-01-31)
- SCRNCH v1.02 (1988-03-28 / 1988-04-04)
- DeSCRE2B - DOS utility to help decompress SCRNCHed files that were originally in EXE format
See Executable compression#Decompression software for some multi-format utilities that might be able to decompress Run Mode files. (See also the SCRE2B article.)
Write Mode files can decompress themselves. In a DOS environment, run the file with the special "stdout
" parameter, with output redirected to a file. For example, using the SCRNCH documentation file:
SCRDOC.COM stdout > SCRDOC.DOC
Sample files
v1.00 Run Mode:
- sayclear.zip → SAY-DOC.COM
v1.02 Run Mode:
- em87.zip → EM87.COM
- PCF501C.ZIP → D0C.COM
- STARWARS.ZIP → HARDCOPY.EXE
- PCF501B.ZIP → DBRPT.EXE, FCONVERT.EXE, PCPACK.EXE
v1.02 Write Mode:
- DISK1769.ZIP → README.COM
- grab57.zip → README.COM
- prodev1.zip → PRICEDOC.EXE
- prodev3.zip → QUOTEDOC.EXE
Various:
- SCRNCH.COM and SCRDOC.COM from the SCRNCH distribution