home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug078.arc
/
LINKAGE.DOC
< prev
next >
Wrap
Text File
|
1979-12-31
|
2KB
|
45 lines
Assembly / Linkage Notes
CRUNCH.Z80 can be assembled by SLR's Z80ASM ["Z80ASM CRUNCH/RM"]
or with M80, if it is first renamed CRUNCH.MAC ["M80 =CRUNCH"].
The same is true for UNCR.Z80. To assemble either program,
COMMON.LIB must be on the same drive / user area. This is an
"include" file which contains much of the code common to the two
programs.
Linking should be possible with any Microsoft compatible linker,
provided that that one makes sure that the CSEG of CRUNCH (or
UNCR) end up at lowest memory. For example CRUNCH can be linked
with DRI's LINK using command line "LINK crunch[p100],parsefcb".
(PARSEFCB.REL and its DOC are included).
UNCR can be similarly linked ("LINK uncr[p100],uncr1,parsefcb").
UNCR1.REL, included, is the "old" half of UNCREL.REL, and is only
called when uncrunching old (v1.x) style. It's source is not
included here. v1.2 source is already available generally, and
the exact source for that .REL file will be included with the
other .REL files (UNCREL and USQREL) in the TYPELZ library, which
will be available shortly.
Since CRUNCH actively initializes all data, the resulting COM
file can made one record shorter if you linker supports uninit-
ialized data segments and the DSEG's are located at the top.
The only important note is this: Both CRUNCH.Z80 and UNCR.Z80
contain an EQU in the beginning which defines "MEMPAG". This
must be set to a page aligned value above all code and data (whe-
ther initialized or not), preferably the next page boundary. If
you make any substantial changes to CRUNCH or UNCR, you may have
to increase its value from the current one. If you set it higher
than necessary, there will be no negative effect other than an
increase in the TPA required to run the program- but if you set
it too low you will be in trouble. The value must be set man-
ually because most linkers cannot resolve an "and", "shift",
or "hi" byte extraction at link time to determine the page
boundary. See the end of the source files for more detailed
information.
A subsequent release of these programs may be restructured to do
all memory allocation at run time, as UNCREL already does. This
would eliminate this problem.