;
                                  T4LDR.Z80                                   

             Size (recs) CRC   Version    Author/Latest Issue      Disk
              13k (102)  7B92  1.0        J. Wright 6/88           Z3COM9

  1- Usage  2- Notes                                                          


   T4LDR.Z80 contains the  overlay loader code that  is placed into the page-0
header of  a PRL  or SPR program file  to make  a type-4 Z-System program that
will  be loaded automatically by the ZCPR34 or Z3PLUS command processor to the
highest possible address in the TPA.   SPR  and  PRL files  are much  the same 
except that  the code segment in  PRL files  is relative to 0100h while in SPR 
files it is relative to 0000h.  
:1

   Usage:

   Assuming that  the program has  been assembled  and then linked  to  PRL by 
either DRI's LINK or  SLR's SLRNK+,  the type-4 program would be created using 
Ron Fowler's MLOAD (version 2.1 or later) with the command:

   MLOAD <file>[.COM]=<file>.PRL,T4LDR[.HEX]

where <file> is  the name of the  program and the items in square brackets are 
optional.
:2


T4LDR Notes:

   a.  The  header in  a PRL  or SPR file occupies one  page  or  two records.  
       T4LDR comprises two pieces of code, one in the first record of the file 
       and one in the second record.  These two pieces of code are executed by 
       the command processor from the default buffer at 80h.

   b.  The command processor first calls the routine  in record 0.   This code
       calculates where the actual program code beginning with record 2 should 
       be loaded and reports  the result back  to the command processor.   The 
       command  processor  then loads  the second routine in record 1 into the 
       default buffer at 80h and the actual program code beginning with record 
       2 (including the bitmap) to  the calculated load address.   The command
       processor then returns to the second T4LDR routine,  which performs the
       relocation of the program code and then returns to the CCP.
