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-6.LBR / ZA.LBR / Z33-TM2.HZP / Z33-TM2.HLP
Text File  |  2000-06-30  |  3KB  |  48 lines

  1. ;
  2.                                Z33-TM2.LBR                                    
  3.  
  4.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  5.               n/a  n/a   n/a   n/a        Steve Cohen 6/87         n/a   
  6.  
  7.   1- Instructions  2- Notes                                                   
  8.  
  9.    Z33-TM2 contains several tools  for interfacing  Turbo-Modula2  to  ZCPR33.
  10. Besides the familiar program structure by which Z3 utilities communicate  with
  11. their environment,  ZCPR33 also finds the ENV address and puts it in HL as the
  12. new program is loaded.   This provides  an alternate method  by which programs
  13. can get the ENV address,  which then makes possible all the advanced  features
  14. of Z3.  Z33-TM2 includes the following to accomplish this for TM2:
  15.  
  16. Z33M2.Z80  - assembler code to grab the ENV addr at the start of the program.
  17. Z33M2.DEF  - the interface for the above procedure to M2.
  18. TZ33M2.MOD - test module which calls on Module InOut to print the ENV in HEX.
  19. :1
  20.  
  21. Instructions:
  22.  
  23.    1. Assemble Z33M2.Z80 with M80, ZAS, or Z80ASM to a .REL file.
  24.    2. Invoke M2. and (C)ompile Z33M2.DEF
  25.    3. (R)un REL Z33M2 Z33M2  (This creates the file Z33M2.MCD)
  26.    4. (C)ompile TZ33M2.MOD.
  27.    5. (L)ink TZ33M2 TZ33M2.COM  (when asked to include all modules, say yes)
  28.    6. (Q)uit M2.
  29.    7. Using  ZPATCH on TZ33M2.COM make  a note of the address in the two bytes
  30.       at  101h  and  102h.   Write these down.   Then search  for  the  string
  31.       "Z33ENV".   This has been inserted  in the assembler code for just  this
  32.       purpose.   ZPATCH will  report  an  address  where the  string is found.
  33.       Exactly 10-11  bytes further  on there  is  an address which  should  be
  34.       patched with the  address  you found  at  101-102h (e.g., if the address
  35.       which  the  search found  is  2000h, at 200Ah patch  the  same  byte you
  36.       found at 101h and at 200Bh patch the  byte you found at 102h).   Now  go
  37.       back  to  101-102h  and  patch  here  the  address  at  which the search
  38.       reported its  find plus six  (in this example it would be 2006h,  so  at
  39.       101h we would patch the value 06 and at 102h, the value 20). 
  40. :2 
  41.  
  42.  
  43. Z33-TM2 Notes:
  44.  
  45.    a. This procedure simply redirects program execution from the code it would
  46.       normally execute first  to a different routine which stores HL in memory
  47.       before  it is destroyed.   It then jumps to where TM2 would have started
  48.       execution.