Z80 source code for CRLZH v1.1 and UNCRLZH v1.1 Do I need the source? Probably not. These files will assemble to the identical .COM files sup- plied. However, there seems to be no reason why not to release the source for the drivers. Note that a separate overlay/patch file has been provided so that you need not re-assemble and re-link to change most things. Most of the 'interesting' stuff is in the LZH encoding and decoding algorithms, anyway, which are released in .REL (and .SLR) format ONLY at this time. Please note that the same conditions apply to this program as previous CRUNCH and UNCR releases - you can "distribute" it AS IS or modify it for your OWN use, but public release of modified versions (source or object files) without permission is prohibited. [and you can't sell it!]. Portions (most of it, really) is Copyrighted by Steven Greenberg, who has kindly given his permission for this new use of his code. Assembly and Linkage: SLR Z80ASM crlzh11/rm <== assembles CRLZH Z80ASM ucrlzh11/rm <== assembles UNCRLZH SLRNK+ /a:100 /j crlzh/n crlzh11 parsefcb crlzh /e <== links CRLZH SLRNK+ /a:100 /j uncrlzh/n ucrlzh11 parsefcb usqrel unlzh uncr1 /e <= links UNCRLZH The /j switch guarantees that that all of the code segments will be "packed" end to end first, and all of the data segments will follow. Since all data is uninitialized (ie initialized at run time) the SLR linker is "smart" enough to leave these extra sectors out of the COM file. This is how the distribution COM files were created. If SLR Systems tools are not available: Rename CRLZH11.Z80 to CRLZH11.MAC and UCRLZH11.Z80 to UCRLZH11.MAC. Do not rename the INCLUDE.LIB file. M80 =crlzh11/n <== assembles CRLZH11 M80 =ucrlzh11/n <== assembles UCRLZH11 ----- If you have DRI's LINK program, LINK crlzh11,parsefcb,crlzh <== links CRLZH11 (rename to CRLZH) LINK ucrlzh11,parsefcb,usqrel,unzlh,uncr1 <== links UCRLZH11 (rename to UNCRLZH) LINK will also ORG the program properly at 100H and consolidate the data segments at the end. It will, however, append the data segment to the COM file, making it longer. The programs were, however, coded so the very large data tables were "EQU"'d rather than defined as data, so there should only be a limited number of superfluous records. ----- If you must use L80, L80 /p:100,/d:1EB9,crlzh/n,crlzh11,parsefcb,crlzh,/e <== links CRLZH L80 /p:100,/d:21EA,uncrlzh/n,ucrlzh11,parsefcb,usqrel,unlzh,uncr1,/e <== links UNCRLZH will give similar results to LINK above. Unfortunately, you must deter- mine the start of the data segment (ie the "1EB9" & "21EA" above) by making a preliminary link using a high number, eg "d:4000", and then reading the second number on the "Program" line of the resulting L80 display. Put that number after the "d:" and link a second time for a final result. The numbers shown above ARE the actual values for CRLZH & UNCRLZH v1.1 as distributed, but the numbers will be different if even a single line of code is changed. Please note that if substantial additions are made to either program, an address value in an EQU near the beginning of the program (well marked and explained in source) must be manually changed. This process is neces- sary because, to the best of my knowledge, NONE of the linkers can re- solve the "first page boundary after the end of the DSEG" automatically (an easy problem if the code is absolute [non-relocatable]). The value is needed in subsequent EQU's to define the large page aligned tables men- tioned above. ---- What they do: Virtually all the code of any interest is contained in the UNLZH.REL and CRLZH.REL files supplied. UNCR1.REL is a module which is called up in the very unlikely event an old "type 1" crunched file is encountered. USQREL.REL is an unsqueezer since UNCRLZH also unsqueezes as a bonus. And finally PARSEFCB.REL reduces some of the tedious work of getting all the file names, user numbers, drives, comments and switches extracted from the command line. Anything else is in the source code contained in this LBR. COMMON.LIB is an "include" file necessary when assembling either CRLZH11.Z80 or UCRLZH11.Z80. It contains file I/O and many other routines which are common to both programs. It must reside on the same drive/user as the program being assembled. R. Warren 04 Sept 89 The Elephant's Graveyard Data: (201) 447-6543 ( 24 hrs, 7 days)