System - adaptation of programs to TR-DOS.

Eldorado #01
 Today we will consider the question  
How to adapt the program to   
disc.  So go ahead!             
                                
 ADAPTATION of programs to TR-Dos.  
                                
 How to civilly adapt pro- 
rpammy?  Of course in machine  
codes - there is no other option
maybe!  The proposed option for
the loader is simple and reliable as    
XOR A.                          
 The program uses the standard 
new entry point #3D13 (15635).  
Let's assume that you need 
load 2 blocks:              
  1.Screen (16384,6912)          
  2.Main block (24500,41000) 
    co start address 25000  
 The most natural place for  
bootloader location is
 1 gEM This will be located  
        Your loader.          
        
 2 CLEAR24499: INK NOT PI:    
     PAPER NOT PI: BORDER NOT   
     PI: rANDOMIZE USR 23872    
                                
 Previously in 1 line after
REMfill 30-40 spaces, for 
placement of the charger in machine rooms
codes                          
 And now in Tasme type the text
bootloader:                     
                                
 DI   ; Prohibition  
                  interrupts  
   LD B,27  ; Number of sectors
  screen   
   LD HL,16384 ; Download address
                  screen        
   CALL ZG  ; Call subroutine
 loading frames
 LD B,161  ; Number of sectors
 main block   
 LD HL,24500 ; Download address
 main block   
  CALL ZG ; Download call
 EI ; Resolution    
                  interrupts    
   JP 25000; Starter     
                  address         
ZG LD С,#05 ; TR-Dos Team
                  **LOAD**    
   LD DE,(23796); Current sector
                  and the path on  
                  disk         
   rET ; Exit from p/p  
                                
Having formed a full loader for
write ero to disk, and then files
programs in the order in which
rom is loading.  Any 
Disc-doctor correct the length  
bootloader in sectors at a size
well, equal to the total lengthALL 
files (including the bootloader itself)
, we rewrite the resulting BASIC
-file to another disk and enjoy-
We are happy with the result.               
Section prepared by:              
Lebedev AleKsey               

Share your thoughts about the article