home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Supreme Volume 6 #1
/
swsii.zip
/
swsii
/
172
/
CRUNCH24.ZIP
/
CRUNCH24.ARK
/
-SOURCE.NOT
next >
Wrap
Text File
|
1990-05-26
|
4KB
|
102 lines
Z80 source code for CRUNCH v2.4 and UNCRunch v2.4
Do I need this CRNCH24S.LBR?
Probably not. These files will assemble to the identical .COM files sup-
plied in CRUNCH24.LBR. That LBR contains an overlay, which already al-
lows one to customize CRUNCH/UNCR to suit requirements and preferences.
It also contains usage documentation and other files NOT included here.
This is a source code release only. It may be of use to those who have
special requirements or a special interest.
Please note that the same conditions apply to this program as previous
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!].
Assembly and Linkage: SLR
Z80ASM crunch/rm <== assembles CRUNCH
Z80ASM uncr/rm <== assembles UNCRunch
SLRNK+ /A:100 /J CRUNCH/N CRUNCH PARSEFCB /E <== links CRUNCH
SLRNK+ /A:100 /J UNCR/N UNCR PARSEFCB USQREL UNCRL /E <== links UNCR
The /J switch guarantees 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 i.e., 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 CRUNCH.Z80 to CRUNCH.MAC and UNCR.Z80 to UNCR.MAC.
Do not rename the INCLUDE.LIB file.
M80 =CRUNCH/N <== assembles CRUNCH
M80 =CRUNCH/N <== assembles UNCRunch
-----
If you have DRI's LINK program,
LINK CRUNCH,PARSEFCB <== links CRUNCH
LINK UNCR,PARSEFCB,USQREL,UNCR1 <== links UNCR
LINK will also ORG the program properly at 100H and consolidate the data
segments at the end. It will append the data segment to the .COM file,
making it longer. The programs were coded so the very large data tables
were "EQU"'d rather than defined as data, so there should only be a lim-
ited number of superfluous records.
-----
If you must use L80,
L80 /P:100,/D:17D3,CRUNCH/N,CRUNCH,PARSERCB/E <== links CRUNCH
L80 /P:100,/D:19E6,UNCR/N,UNCR,PARSERCB,USQREL,UNCR1/E<== links UNCR
will give similar results to LINK above. Unfortunately, you must deter-
mine the start of the data segment i.i., the "17D3" and "19E6" above) by
making a preliminary link using a high number, eg. "D:2000" 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 CRUNCH
and UNCRunch v2.4 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 nec-
essary because, to the best of my knowledge, NONE of the linkers can
resolve the "first page boundary after the end of the DSEG" automatic-
ally (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 mentioned above.
----
P.S. I am not a linker expert; all above information is subject to er-
ror. With any luck version 2.5 will be consolidated into a single
large absolute file...
What they do: Virtually all the code of any interest is contained in the
source 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 UNCR now 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 three
files in this LBR. COMMON.LIB is an "include" file necessary when assem-
bling either CRUNCH.Z80 or UNCR.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.
- Steven Greenberg
15 February 1988
Data: (201) 447-6543 ( 24 hrs, 7 days)