╓────────────────────────╖
║ ─── SECRETS of tR-DOS ─── ║
╙────────────────────────╜
This section will help you to
boehuutR-DOSa. We will share with
With your little tricks
using system procedures
DOS.
First, let's repeat the material from
day. i.e. already printed in
ZX-REVIEW:
entry point to tR-DOSfrom as-
sampler is #3D13. Opera code-
tion must be in register C
processor; let's look at some
of which:
C=0 - software reset micro
controller. this function should
apply at the very beginning of work
with interface
C=5 - reading a block of sectors in
memory. input parameters:
DE - track/sector
B - length in sectors
HL - read address
C=6 - recording a block of sectors from
memory. input parameters analog
compatible with the read command
C=#0C - writing the file to disk.
name and type of file being created
must be placed in the description
file torus. area start address
transmitted via register pas-
ru HL.length - through DE
C=#0E - reading/checking the file.
Because the actions of these commands
are similar then it is allocated for them
one function. Name and typefile
must be placed in the description
torus The type of operation is determined
according to the contents of the system re-
variable 23801: 00 - reading. 255 -
check. As for the function
writing file. address and length of transfer
is given respectively through HL and
DE.
So. these are the most necessary
system functions uhtepnputato-
ra which to us. and to you. and in general
everyone. who writes under tR-DOS
suitable.
And now let's look at their sub-
more details.
1.READING SECTORS
Let's give a small example:
LD HL.#4000
LD DE.#0100
LD VS.#1В05
JP #3D13
What does this program mean?
Count 27(#1B) sectors from the track
01 sector 00 at address
#4000(16384). in other words, count
take a picture from track 1 0cektopa
2.RECORDING SECTOR BLOCK
Everything here is the same as in the previous one
program. but you need to send it to the Armed Forces
#1В06. actually not in
VS. a in C. because we need room
Get the operation code. they can even be
split into two commands:
LD B.#1B
LD C.6
3. READING THE FILE
To read the file we need
I can put the file name and type in
handle. why does it even have-
Xia special function uhtepnpu-
tatopa - #13 - this is copying
16 bytes from memory to descriptor.
also this operator is also in
depends largely on the content of the ac-
cumulator:
A=0 - address - HL. length - DE
A=3 - address - HL. the rest is
pem from handle
4. FILE RECORD
As for reading name and type
we need to place the file in
handle. but the battery is for us
not needed here.
When combining games into a monobloc
ki we use a subroutine
reading a block of sectors (C=5). but
There is a small glitch here. and
very (sometimes) sensitive
body Try typing the following
blowing program hanpumet in
tASMe:
LD HL.#6000
LD DE.#0100
LD BC.#9305
JP #3D13
and run it with the tASMa command
Run("R"). So what is the effect?
The drive head will bounce like that.
what is possible out of surprise
flinch. What's the matter? How
and that's allopening the answer came by-
tea. I won't tell you how.
it's all about the length of the block
Dov. it's too big. need ta-
which big block should be split into two
smaller.
Let's take it. for example. our pre-
previous program. and expand:
LD SP.#SFFF
LD HL.#6000
LD DE.#6000
LD BC.#5005
CALL #3D13
LD HL.#6000+20480
LD DE.(23796)
LD BC.#4305
JP #3D13
we divided the block into 160 sectors
for 2 blocks of 80 sectors. those-
now everything will be without noise and dust.
In the next issue of our
magazine we will tell you how to find
Enable IM2 mode to work when turning on
moving towards tR-DOS.
Share your thoughts about the article