System - description of the MONOBLOCK CREATOR program for creating monoblock TR-DOS files.

Spectrum Land #02

 Program  MONOBLOCK CREATOR
provided for publication in
our magazine of the Kemerovo company
niyaPLAYGEAR. Author of the program -
Daniil Bayanov - sent along with
her and the small HELPthat you
You can read it below.  We
slightly changed the HELP text (in
sense of spelling and style),
but the essence of the matter is from this, naturally
Surely she was not injured.  We hope
that dear DANIIL  will not be in
claims.                      
                                
  Because, as is clear from the
title of the program, we will talk about
monoblocks, after HELP we yes-
let's find it useful (we hope)
information for beginners - what
you need to do so that you can
write a simple bootloader for mo-
noblock (monoloader).           
Bayanov Daniil Kemerovo
Copyright PLAYGEAR COMPANY ©1996
------------------------------------------
  Trying to find among the big
number of system programs,
intended to work with
disks, a program similar
MBC by functionality
yam, were not successful. Poe-
So I sat down and wrote this program -
pammky...                       
  Basically, as such, HELP
not needed, but still I solved it
write so that in the future
avoid all sorts of problems.       
                                
  The MBC v1.00 utility is intended
for combining regular files
fishing in one or more (if
total length combined
files exceeds 255 sectors)
monoblock files.             
 Previously, to perform this
tasks had to be done manually
calculate and fix everything
file options using disk
doctors  MBC only works with
catalogue, so if you som-
hebaetecb in his actions, then
pre-save null
track (for example, using JC
v4.0t), because restore the previous
This type of catalog will be practically
It's literally impossible.  The program
works with the catalog absolutely
correct (i.e. quantity bytesfiles on the disk, the number of deleted
file files, etc. calculating
are correct).                
  Control in the program element
taphoe:                         
                                
  <GRAPH> - check or uncheck
label from file(s).              
 You can mark only by finding
files located “next to” each other
ly (otherwise the mark is simply not applied)
comes out). In a similar way
Removal of the mark is also possible. this way
So, in one go you can create
only 1 monoblock.              
                                
  <ENtER> - create a monoblock.
If more than one was noted
file, a preliminary
nal request: "ARE YOU SURE Y/N ?"
("Are you sure?"). Keystroke
 results in the creation of a monobloc
ka.                             
                                
  <SPACE> - re-read the catalog
disk (for example, when changing it).
All marks are lost.<D> - exit to tR-DOS, attempt
run "boot".               
 Example of using the program
MBC v1.00.  Let them be marked
the following files:                
                                
  FILE: TYPE: LENGTH:  
  ───── ───── ───────  
 CRUSHER B 1    
 loader C 4    
 INTRO C 46    
 GAMEDATAC 112    
 LEVEL1 C З7    
 LEVEL2 C З9    
 EPILOGUE C 48    
  The upper right window displays
the resulting files are compressed
as a result of the creation of a monoblock.
It should look like this:    
                                
  FILE: TYPE: LENGTH:  
  ───── ───── ───────  
 CRUSHER B 255    
 CRUSHER 1 Z2    
 Names of all monoblock files
are the same, the first file type is not
is changing. subsequent file type
- from "1" to "9" (by age-
niyu), their length (in bytes) is equal to
zero.                           
  If you don’t know what it is
monoblock or monoloader, then ne-
before how to use the program
MBC v1.00 framework, please study first
relevant literature.     
  Finally I would like to say,
that it would be good to implement this
function in some "command"
dere", for example, JEMMINY or
MONSTER COMMANDER (KSA, review)
hang!...)...                    
────────────── ────────────────────────────
                                          
  Small note: JC v4.0t
- this is JEMMINY COMMANDER version
4.0t.                           
 Definition of what it is
"monoblock", you just read
tali in HELP.  But why are they needed?
monoblocks?                      
  Monoblocks are more convenient to copy;
they load faster;  less
magnetic heads wear out
drives and work surface
floppy disks  We believe these arguments
enough for you.             
                                
  The MBC program releases the created
giving a candy bar from routine work
bots related to need
fix a number of file data
manually, delete files, etc. But
you can't just use it
take it and turn it into a monoblock
regular disk version of the program
we. We need to do a little work
bot and write at least a simple one
machine code loader.       
 We will show you how to do this
Here's a conditional example.        
  The program (game) is called
GAME and consists of 3 files:   
                                
          1st f.2nd f.3rd f. 
──────────────────────────────────────────
Название  │ GAME │game$ │game1  
──────────────────────────────────────────
Тип файла │BASIC │ CODE │ CODE  
──────────────────────────────────────────
Длина в                      
байтах    │  200 │ 6912 │ З5000 
──────────────────────────────────────────
Длина в                      
секторах      1 │   27 │   1З7 
──────────────────────────────────────────
                                          
  Файл "game$" загружается с ад-
реса  16384  (заставка  к игре),
послеthe file "game1" is loaded from
addresses 25000.                   
 Then the game starts: RANDOMIZE
USR 25000.                      
  Using some assem-
Blader type the program:      
   ORG 30000                    
   DI                           
   LD BC,#1B05 ;splash screen (#1B=
 ;27 sectors)  
   LD DE,(23796) ;track, sector  
   LD HL,16384 ;where          
   CALL 15635 ;call TR-DOS  
   LD BC,#8905 ;main block (#89=
 ;137 sectors) 
   LD DE,(23796)LD HL,25000                  
   CALL 15635                   
   EI                           
   JP 25000 ;game start    
                                
  Loading all blocks of the game pro-
is derived using the 5th function
tR-DOS (read sector group).
 The function number is specified in the re-
gistre C.  In register In you need to
carry the number of sectors. In re-
hyster pair HL we send
address in memory from which it will be
loading block.  To the register
pair DE initial numbers are entered
data of the track and sector of the desired block
ka on disk. Since the files are
Our games are located on the disk
in a row, convenient to use
tR-DOS system variables
(23796 and 23797). In these changes-
data about the sector and
track immediately following
for the ones just downloaded.     
                                
  Having compiled the program, written
Send the resulting object code to
disk (31 bytes).  now we need to talk about
to resort to the services of the old good-
rogo BASIC 48K.               
 In line 10, enter the data
color settings, CLEAR operator
etc., as in the previous GAME file.
At the end of the line write: RANDO-
MIZE USR 23872.                 
  In line 1, type REM, after
put the same number of spaces,
how many bytes did you get in
loader Download download codes
chik to line 1 with a direct command
RANDOMIZE USR 15619: REM: LOAD
 CODE (23872+257).   
  Write the resulting BASIC file
to another disk (under the same name)
in German - GAME), copy there
files "game$" and "game1".  Here
Now you can launch MBC and
enjoy the result of your
"hard labor" labor.             
                                
  Let's say a few words about some
other "little things".                
 Screen files (splash screens) for
are often compressed
and run from BASIC stan-
dart command RANDOMIZE USR
. In a monoloader (immediately after the commands downloads such file) you need to write CALL . And if the game starts was carried out by two teams, for example measures, DRAW USR ,, then at the end of the bootloader it is written CALL , JP . Writing simple loaders for monoblocks in general, not much it is more difficult to adapt cassette programs for working in tR-DOS, and There’s nothing particularly “scary” about this no. Although it would be nice to see create a program that, in addition to presence of functions performed by MBC v1.00, would have the ability to create provide simple monoloaders. It is quite possible that in our journal will bepublished and other, no less interesting ra- bots of the creative team from KEMEROVO. If you want to write to the author of the MBC program (Yes- Niil Bayanov) or other co- employee of the company PLAYGEAR, then You will find the address in the section "REC- LAMA". ─════════════─

Share your thoughts about the article