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 / BEEHIVE / ZSUS / Z3HELP-3.LBR / M.LBR / M2Z3INS.HZP / M2Z3INS.HLP
Text File  |  2000-06-30  |  3KB  |  66 lines

  1. ;
  2.                                 M2Z3INS.COM                                   
  3.  
  4.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  5.               19k (150)  5AF6  1.0        Ed Jackson 10/87         Z3COM6
  6.  
  7.   1- Usage  2- Notes                                                          
  8.  
  9.    M2Z3INS  "installs" Turbo Modula2 programs which have been linked into .COM
  10. files in a ZCPR3 environment, ZCPR3.3 environment,  or CP/M environment.  This
  11. is accomplished by patching the GetEnv procedure which MUST be included in the
  12. root  segment of the TM2 .COM file.   A subsequent call to this procedure will 
  13. return the address of the resident environment descriptor or, for CP/M,  a NIL 
  14. address and  a string of  up  to 16 characters.   The string is intended to be 
  15. used as a file name for TCAP information but can be used for any other purpose
  16. desired.
  17.  
  18.    M2Z3INS  is written in Turbo Modula2.   The basic approach was suggested by 
  19. Steven Cohen.
  20. :1
  21.  
  22.  
  23.    Usage:
  24.  
  25.    To use  the installation  program  you MUST include the GetEnv procedure in 
  26. your TM2 code.  Compile  the code and link it  into  a  .COM file.   After the 
  27. installation  process, a  call  to  GetEnv  will  return  the  address  of the 
  28. environment descriptor and the 16 char string.
  29. :2
  30.  
  31. M2Z3INS Notes:
  32.  
  33.    a. In ZCPR3.3 systems  the  TM2  program becomes self adapting...  that is,
  34.       after  installing it  with the M2Z3INS  program  it can  be moved to any 
  35.       ZCPR3.3 system and it will correctly find the environment descriptor.
  36.       In a ZCPR3.3 environment the address of the environment descriptor is 
  37.       placed in register HL by the loader after loading the .COM file.  The 
  38.       .COM file is patched by this installation program so that register HL is
  39.       saved in the GetEnv procedure.
  40.  
  41.    b. In  ZCPR3.0  systems the TM2 program  must  be  reinstalled if  moved to
  42.       another  computer  to   guarantee  that   it  will  correctly  find  the
  43.       environment descriptor.  In  a  ZCPR3.0 environment  the address  of the 
  44.       environment descriptor is obtained from the  *.ENV file that is peculiar
  45.       to the target system.
  46.  
  47.  
  48. M2Z3INS Notes (continued):
  49.  
  50.    c. In CP/M systems there is,  of course,  no environment descriptor but the 
  51.       installation  program  permits installing  a 16 char string  in the  TM2  
  52.       program.   M2Z3INS patches the environment descriptor address to NIL and 
  53.       the  16 char string to the value specified  at installation  time.   The 
  54.       intended use  of the  string is to install the name of a file containing
  55.       system environment info (TCAP?),  but its use is not restricted.   Where 
  56.       an environment descriptor is available, the 16 char string is empty.
  57.  
  58.    d. The system works  by searching the  TM2 .COM file 1 char at a time for a 
  59.       unique marker (don't  be surprised if  it  takes rather  a long time  on 
  60.       floppy  disks!).   Just  after the marker,  the .COM file  is patched to 
  61.       insert the address of  the resident environment descriptor and a 16 char
  62.       array.
  63.  
  64.    e. Since many ZCPR systems place the environmen descriptor at  0FE00h, this 
  65.       is used as the default value in GetEnv.
  66.