home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / MBUG / MBUG078.ARC / LINKAGE.DOC < prev    next >
Text File  |  1979-12-31  |  2KB  |  45 lines

  1.                     Assembly / Linkage Notes
  2.  
  3. CRUNCH.Z80 can be assembled by SLR's Z80ASM ["Z80ASM  CRUNCH/RM"]
  4. or  with M80, if it is first renamed CRUNCH.MAC ["M80  =CRUNCH"].
  5. The  same  is  true for UNCR.Z80.  To  assemble  either  program,
  6. COMMON.LIB  must  be on the same drive / user area.  This  is  an
  7. "include" file which contains much of the code  common to the two
  8. programs.
  9.  
  10. Linking should be possible with any Microsoft compatible  linker,
  11. provided  that  that one makes sure that the CSEG of  CRUNCH  (or
  12. UNCR) end up at lowest memory.  For example CRUNCH can be  linked
  13. with DRI's LINK using command line "LINK  crunch[p100],parsefcb".
  14. (PARSEFCB.REL and its DOC are included).
  15.  
  16. UNCR can be similarly linked ("LINK  uncr[p100],uncr1,parsefcb").
  17. UNCR1.REL, included, is the "old" half of UNCREL.REL, and is only
  18. called  when  uncrunching old (v1.x) style.  It's source  is  not
  19. included  here.  v1.2 source is already available generally,  and
  20. the  exact  source for that .REL file will be included  with  the
  21. other .REL files (UNCREL and USQREL) in the TYPELZ library, which
  22. will be available shortly.
  23.  
  24. Since  CRUNCH  actively initializes all data, the  resulting  COM
  25. file  can made one record shorter if you linker supports  uninit-
  26. ialized data segments and the DSEG's are located at the top.
  27.  
  28. The  only important note is this:  Both CRUNCH.Z80  and  UNCR.Z80
  29. contain  an  EQU in the beginning which defines  "MEMPAG".   This
  30. must be set to a page aligned value above all code and data (whe-
  31. ther initialized or not), preferably the next page boundary.   If
  32. you make any substantial changes to CRUNCH or UNCR, you may  have
  33. to increase its value from the current one.  If you set it higher
  34. than  necessary, there will be no negative effect  other than  an
  35. increase  in the TPA required to run the program- but if you  set
  36. it  too low you will be in trouble.  The value must be  set  man-
  37. ually because  most  linkers  cannot  resolve an "and",  "shift",
  38. or   "hi"   byte extraction at link time to  determine  the  page
  39. boundary.   See  the end of the source files  for  more  detailed
  40. information.
  41.  
  42. A subsequent release of these programs may be restructured to  do
  43. all  memory allocation at run time, as UNCREL already does.  This
  44. would eliminate this problem.
  45.