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 / ZSYS / SIMTEL20 / ZSIG / AUTOZINS.CCP < prev    next >
Text File  |  2000-06-30  |  1KB  |  41 lines

  1.  
  2.               -[ From Seattle's 'downspout' - 206-325-1325 ]-
  3.  
  4. This code documents a method of modifing ZCPR3 to recognise that it has
  5. loaded a ZCPR3 installable utility and "auto-install" it by loading the
  6. environment address at the correct place in the TPA.
  7.  
  8. Search the ZCPR3 source file for the label "EXECADR:" and insert the code
  9. shewn below.  Note that all additional code is commented thus ";+ "...
  10.  
  11.         ; RUN LOADED TRANSIENT PROGRAM
  12.         CALL    DEFDMA        ; SET DMA TO 0080
  13.  
  14.         ; 
  15.         ; attempt to install z3env utilities...
  16.         ld    hl,0100h    ;+ point to position of z3env id.
  17.         ld    de,idstring    ;+ point to z3env descriptor string.
  18.         ld    b,idlength    ;+ reg b will count bytes
  19. z3test:        ld    a,(de)        ;+ get a byte for compare...
  20.         cp    (hl)        ;+ ...match against code...
  21.         jr    nz,noz3env    ;+ ...branch if not installable.
  22.         inc    hl        ;+ bump pointers...
  23.         inc    de        ;+ ...
  24.         djnz    z3test        ;+ branch until all bytes match.
  25.         ; tpa contains an installable utility...
  26.         ld    (hl),low z3env    ;+ load environment address...
  27.         inc    hl        ;+ ...
  28.         ld    (hl),high z3env    ;+ ...        
  29.         ; 
  30.         ; EXECUTION (CALL) OF PROGRAM (SUBROUTINE) OCCOURS HERE
  31. EXECADR:    EQU    $+1        ; CHANGE ADDRESS FOR IN-LINE CODE MODIFICATION
  32. noz3env:    CALL    0100H        ; CALL TRANSIENT
  33.         ; zcpr3 code continues....
  34.  
  35.  
  36.         ; Insert z3 environment id string in any convenient place.
  37. idstring:    defb    "Z3ENV",01    ;+ z3 environment id.
  38. idlength    equ    $-idstring    ;+ 
  39.  
  40. <eof>
  41.