(C) 2000 d40/d80.mdos info by Pol / PHT
<jurica@sknet.sk>
(C) 2000 mb02.bs-dos info by LaesQ / RA
<laesq@ethree.demon.co.uk>
(C) 2000 imported by Faster / TNL + PHT
<faster@hotbox.ru>
(C) translated by Alff / CPU
(C) corrected by Elf / CPU
Here's the file u wanted:)
Have fun
LaesQ / Raww Arse
jo! Some time ago I reviewed / read se # 3 and came across
an article MacBuster'a, where he lamented the fact that the
west Hayot "russian" tr-dos and do not give documents to the
its disk system ... To me it all seemed davolno still zabyvnym
because demand does not it? For example, when I needed
documentation d40/d80 and mb02, I sent it immediately,
for which many thanks Pol / PHT.sk and
LaesQ / RA.uk accordingly! As for obhaivaniya tr-dos'a in terms
of programming at a low level, then I am absolutely in
solidarity with MacBuster'om because here tr-dos taxis without
the bazaar! But generally, if we take a comparison of these
three disk system, then, of course, 1 st place keeps mb02 -
rulez foreva!!! If you know something in disk systems, you'll
understand why ... I say that I since the last time dragged
only when read the documentation on z380!
For over a year ago I did
step back and sent Pol'u in Slovakia
book-baby ;-) on the tr-dos:
----------------------------------------
From: "Pol" <jurica@sknet.sk>
Organization: Phantasy
To: Alexander Yudin <fas7er@yahoo.com>
Date: Wed, 13 Sep 2000 21:58:21 0200
Subject: trdos manual
hello faster!
big thanks for manual for trdos!
it's great piece of spectrum literature
and it's curiosity for us! i'll scan
cover and send to my friends in UK where
trdos originated. once again - THANK YOU!
pol / pht.sk
----------------------------------------
Apparently, in the west should
were fuck english version of trdos manual. Therefore, your turn
has come to get acquainted with ihnimi disk systems. If have
any questions, you can refer to the contact address!
Finally I would like to note that
mb02 - (???) most common disk system, which is used by UK
to Portugal and Slovakia ... A d40/d80 used mainly in the Czech
Republic / Slovakia - (type as we have tr-dos:). For example in
Poland it FDD3000, well, and so on.
Have a good luck!
p.s. dos'em all! dos'em up! dos'em fuck!
09.10.01
From: "Pol" <jurica@sknet.sk>
To: fas7er@yahoo.com
Date: Tue, 1 Aug 2000 19:03:10 0200
Subject: bios for mdos
BIOS for MDOS
description of the subroutines
BIOS is a program for MDOS 1024
bytes, which can be used in
programs for easy operation with a disk.
All the code is relotsiruemym.
Calling operations:
A - number of functions, and other registers for
description.
Operation 0 - Record
Record of the memory to disk.
Errors are handled:
Drive not ready (drive not ready)
Disk full (no hard drive space)
Directory full (complete catalog)
Corrupted FAT structure (disturbances in the structure FAT'a)
Bad device type (wrong type of device)
Disk write protect ... (Including the protection of records)
Unhandled error:
CRC error (Error CRC)
Sector not found ... (Sector not found)
Input:
HL - file identification (file descriptor)
DE - start of memory block to save
(Begin recording unit)
BC - length (length)
Output:
A = 0 and Z = 1 - no error (no error occurred)
A <> 0 and Z = 0 - error (Error)
HL - address of error message (in BIOS file)
address error message (in the BIOS file)
Step 1 - Download
Download the file into memory.
Errors are handled:
Drive not ready (drive not ready)
Bad device type (wrong type of device)
File too long ... (The file is too long)
Not handled error:
Corrupted FAT structure (Disrupted structure FAT'a)
CRC error (Error CRC)
Sector not found ... (Sector not found)
In the BC case, you can specify the maximum possible length of
a file. I do not know how it works, but if there Record -1,
then all files will be loaded for sure.
Input:
HL - file identification (file descriptor)
DE - where to load (where load)
BC - length (length)
Output:
A = 0 and Z = 1 - no error (no error)
A <> 0 and Z = 0 - error (Error)
HL - address of error message (in BIOS file)
address error message (in the BIOS file)
Stage 2 - Removal
Deleting a file (s). You can use characters from any code in
name.
Errors are handled:
Drive not ready (drive not ready)
Bad device type (wrong type of device)
Disk write protect ... (The disc is write-protected)
File not found ... (File not found)
Not handled error:
CRC error (Error CRC)
Sector not found ... (Sector not found)
Corrupted FAT structure (Disrupted structure FAT'a)
Input:
HL - file identification (file descriptor)
Output:
A = 0 and Z = 1 - no error (no error)
A <> 0 and Z = 0 - error (Error)
HL - address of error message (in BIOS file)
address error message (in the BIOS file)
Stage 3 - Catalogue
File not found (A = 27).
This is a selective directory. This means that
if you call this operation, you will receive
file name. You can determine the types of files in a directory
(*. B, file ??.*). If not found no files, it will return an
error - file not found (A = 27).
Input:
HL - file identification (file descriptor).
Output:
A = 0 and Z = 1 - file found (the file is found)
A <> 0 and Z = 0 - error - no other files in directory
(Error, no files in the directory)
HL - address of error message (in BIOS file)
address error message (in the BIOS file)
Stage 4 - LOAD1ST
Download the first sector of file. Can
used to identify the file.
Input:
HL - file identification (file descriptor)
DE - where to load (where load)
Output:
A = 0 and Z = 1 - no error (no error)
A <> 0 and Z = 0 - error (Error)
HL - address of error message (in BIOS file)
address error message (in the BIOS file)
Step 22 - VERS
Output:
HL - address of version name (address is the version number)
I believe that these operations fairly
to record / download or view the catalog. If you think that it
is not too good for you, then just send a description of the
boot options and write in alasm, and I'll sub for MDOS. I
believe this is the best solution.
File identification: (file descriptor)
This is a string containing a number of drive
file name and extension.
FILE defb "A: filename.B"
Well, I think that's all. Yes, here's another one, I
would prefer if you sent me the input to the procedures reading
/ writing, and I would try to do the procedure I / O, and then
we could discuss this theme. And try to make the system read /
write, orientation to the files and not read / write sectors.
How to work with drive
a disk system MDOS.
MDOS was obtained from SinDos, so if you can find here
something familiar, something this is natural.
Each sector has a length of 512 bytes.
MDOS uses two standard formats:
40x9 for 5.25 "disks
80x9 for 3.5 "disks
The download speed of about 24 kb / s
write speed a little bit less.
There are 2 versions: 1.0 and 2.0. Because
we use the standard entry point, compatibility problems should
not be. System ROM is connected with Team RST 0 (or JP 0 or LD
HL, 0: PUSH HL (0): RET, etc.). Before doing so, has to enter
the number 79 in cell Memory 16,119 (# 247 in basic with MDOS).
This disk shadow RAM. Look for BIOS
MDOS, there is a procedure in assembler
which alternates the ROM. MDOS may use 2 drives (in any
combination).
How to switch the ROM:
TAB defw 0
defw # 3EF7
START ld a, # 4F
ld de, TAB-26
call # 25AB
ld hl, 0
ld (TAB), hl
ld hl, # 3EF7
ld (TAB +2), hl
rst 0
...
Includes disk ROM. Jp after 5888 in Rom BASIC'a
return.
Sector 0 - BOOT
offset length description of the content
! 128 4 disc information info on the format of the disc
(Tracks / sects / sides)
177 4 disc information info on the format of the disc
(Tracks / sects / sides)
! 181 4 disc information info on the format of the disc
(Tracks / sects / sides)
192 10 name of the drive (10 sim.) Name of the disc creation
with
by FORMAT
202 2 random number identification number,
(1-65536) created by the FORMAT
204 4 string "SDOS" is used for MDOS
Identification
Information marked with a "!" Is not applicable in their daily
work, as it only copies of disk imaging, and it can be
broken (the system).
177 - a 4-bit, if the disk dvuhs
thoron
- Set to 3 bits, if the disk shape
nal on the D40
178 - tracks on one side
179 - sectors per track
180 - Zero
Other bytes in the BOOT can be used for programs that checks up
or something in that spirit (not recommended:)
Sector 1-5 - FAT
This is an ordinary 12-bit FAT (FAT12 yes to
pC). This is the place we are very interested,
MDOS idea how to work with him.
Sector 6-13 - DIR
Each file is a directory 32bayta.
(MDOS has no subdirectories.)
For example:
byte description
---- ------- 0 extension (ASCII code: P, C, N, B, S, Q)
1.10 name of the file names shorter than 10 characters are
complemented by up to 10
zeros.
11.12 length Deil
13.14 start address, the starting line for the basic prog. (. P)
15.16 is not used (except for the length of the basic free
variables) 17.18 number of the first sector (the entry point in
the FAT) 19 nil
20 flags (each bit of one of these: HSPARWED)
21 one byte length (for files of type seQuence)
22-31 are filled with numbers 229
As you can see, may write
system, which will use more
10 characters for the filename, and everything will be
compatible with the old MDOS (heh, heh, m $ sux:)
Enabled Extensions:
P - programm (basic)
C - character array
N - numeric array
B - bytes
S - snapshot
Q - sequence
Flags:
bit 7 - Hidden (not visible in the catalog)
bit 6 - System
bit 5 - protected (not implemented) (not used)
bit 4 - Archive (not implemented) (--//--)
bit 3 - Read-only (the file can be read:)
bit 2 - Recordable (the file can be recorded)
bit 1 - Executable
bit 0 - Erases (Can it Stretham, if necessary)
Sector 14 -??
Sector data, see information about the format above.
From: "LaesQ" <laesq@ethree.demon.co.uk>
To: fas7er@yahoo.com
Date: Sat, 9 Sep 2000 12:00:03 0100
Subject: mb02 manual
MB-02 Datasheet
Contents:
1. ROM bios
2. FDC bios
3. BS-DOS operators
4. Features on-disk format
(C) Busy soft, Index 20000531171000
ROM-BIOS
ROM-BIOS switch banks of RAM, and prohibits the entry in the
memory banks MB-02. This program allows you to call between
banks RAM, without the use of memory above # 4000.
Review.
CALL # 3C98 ... Switching to Bank of ROM, you can not record
(Works in both banks)
CALL # 3C9A ... Switching to Bank of DOS, you can not record
(Works in both banks)
CALL # 3C9C ... The inclusion of the bank's ROM, write enable
(Works in both banks)
CALL # 3C9E ... Includes DOS bank account possible
(Works in both banks)
CALL # 3CA0 ... Calling from one bank to another procedure
(Works in both banks)
CALL # 3CA2 ... set the recorder as the current device
(Only works in a bank ROM)
CALL # 3CA4 ... install the drive as the current device
(Only works in a bank ROM)
A detailed description of the procedures.
Procedures for switching banks: # 3C98,
# 3C9A, # 3C9C, # 3C9E. These procedures work in both banks of
memory - ROM, and DOS. It is strongly recommended not to use
the command OUT to switch banks memory because the address and
data switching ports depends on the version of the MB-02.
Mezhbankovy call: CALL # 3CA0 Use
it this way: the program is running in
Bank of DOS and it must call kakuyulibo procedure (eg # 22AA to
calculate the coordinates) of the bank's ROM. This is done as
follows:
program:
...
CALL # 3CA0
DW # 22AA
...
In the same way you can act, if
enabled the bank ROM, and the program must call the procedure
from the bank DOS.
After the called procedure has completed its work program will
continue to work with your bank. The procedure at # 3CA0 not
alter any registers or flags and uses only 8 bytes on the
stack. SP should be higher than # 4008.
The bank DOS to go to address # 3CA0
You can use the RST # 28, so
program worked with the bank DOS and calling procedures in the
bank ROM, can do it this way:
...
RST # 28
DW # 22AA
...
Overriding a ROM load-save procedures
between tape and disk:
CALL # 3CA2, CALL # 3CA4.
ROM load-save procedure (entry # 4C6
and # 562) can work with the classic tape recorder through the
Classical, or may work with the drive. What a memory device
will be used is determined by these two procedures. This is the
exact equivalent of the command '@': the zero option means that
the load / save commands directed to work with tape, and zero
means working with the disc.
FDC-BIOS
All work with the FDC controller is
with FDC-BIOS. The processor is not loaded
work, time consuming, it can be cooled or execute programs
IM2 to interrupt until the job is
disk operations.
If you vypolnenyaete any procedures
in IM2, then they should not do the following
things:
- To use or modify any
Installation FDC and DMA controller;
- Contain cycles, time-consuming
time (because the DMA retarding
processor);
- To work longer than 5-10 ms (but it is not
important);
- Switch the MB-02 memory banks;
- And, of course, all registers must be
saved and then restored.
All operators of FDC-bios are available from the
RST # 18 in DOS bank. A register must contain the transaction
number. Other registers contain the information necessary for
the operation.
Overview
# 00: RESET ..... reset FDC Controller
# 01: STATUS .... Reading state information
# 02: RESTORE ... move the head on track 0
# 03: SEEK ...... move the head to the track N
# 04: RDSEC ..... read sector
# 05: WRSEC ..... write sector
# 06: RDTRK ..... read track (direct reading)
# 07: WRTRK ..... format triangle
# 08: RDADD ..... read the ID sector
# 09: REZIM ..... set density
# 0C: AKTIVE .... including disk N
# 0D: PASIVE .... disable all the drives
# 0E: INFO ...... obtain information about the drive
# 0F: SETMAX .... set the maximum length for the exchange of
data.
# 10: SETMLT .... establish a procedure for multi-tasking
# 11: SETOFF .... set the mode to disable the motor
A detailed description of the operations
number of transactions: mnemonic name of the operation
i: register = value [at the entrance]
o: register = value [setting out]
... Description of the operations ...
# 00: RESET
about: A = status
Reset FDC controller.
It would be nice to use before work with
FDC bios at the beginning of the application.
# 01: STATUS
about: A = status
Returns the current status, the format described
below.
# 02: RESTORE
about: A = status
Moves the head on track 0.
# 03: SEEK
i: D = track
o: A = status
Moves the head on the track, as shown in the register D.
# 04: RDSEC
i: DE = physical number of sectors, HL = address
o: A = status
Reading the sector (number of DE) in memory
disk address in HL.
# 05: WRSEC
i: DE = number of physical sectors, HL = address
o: A = status
Record of the memory to disk, DE sector to record and HL
address of the memory. Before performing the operations or
RDSEC WRSEC not have to call the operator SEEK,
as if necessary WRSEC or RDSEC will do everything automatically.
# 06: RDTRK
i: D = track, 7-bit register E = party, HL = address
o: a = status
Reading the whole track into memory at a
HL. This operator reads and intersectoral
information, too, crc code sectors not
pass. This operator is not suitable for
reading information from the sectors.
# 07: WRTRK
i: D = track, 7-bit register E = party, HL = address
o: A = status
Formatting track. In HL beginning of the sequence used for the
controller (usually wd2797)
# 08: RDADD
i: D = track, 7-bit register E = party, HL = address
o: A = status
Reading the ID sector. Reads in
4 bytes of memory: track number, the party sector number and
length of the sector. For more details, see the description of
wd2797.
No need to call the operator SEEK
before operations # 04 - # 08. If necessary, the SEEK (Search)
will be made automatically.
# 09: REZIM
i: E = 0 for DD, 1 HD, 2 for ED
o: Z = okay, NZ = error
Installing the density of the current drive.
If the drive does not support this density, it is NZ.
# 0C: AKTIVE
i: E = number of drive
about: A = result
Insert a floppy drive E and disable all other drives (if
necessary).
Results can be:
0 ... Unknown Album ... drive missing
1 ... Disk not ready .... the drive is inserted diskette
2 ... Drive enabled ... successfully, the disk has not
changed
3 ... Drive enabled ... well, perhaps a floppy disk
changed.
If A = 0 or 1, none of the drive will not be active.
# 0D: PASIVE
i: E = number of drive
Turn off the drive.
# 0E: INFO
i: E = number of drive
o: DE = information about the drive
This operator returns the following information:
D = number of tracks
E = supported by density
Bit 0 = 1 ... DD
bit 1 = 1 ... HD
bit 2 = 1 ... ED
If the drive is missing, DE will contain 0.
# 0F: SETMAX
i: BC = maximum length of transferred data
This statement sets the maximum
The number of bytes for DMA operations. Not
is very important to user programs.
# 10: SETMLT
i: HL = address of the procedure, multi-tasking (or 0 if this
procedure is not needed)
While DMA handles the data between memory
and FDC controllers, a different procedure might work. HL
contains the address of a procedure, called before the start of
the DMA data. DMA is used in the operation
RDSEC and WRSEC. If you want to do
any procedures while reading or
recording sector, then the procedure does not
must do the following (same as in
IM2):
- To use or modify any
Installation FDC or DMA controllers;
- Contain cycles, time-consuming
time (because the DMA retarding
processor);
- To work longer than 5-10 ms (but it is not
important);
- Switch the MB-02 memory banks as a criminal
bottom, ie in any way.
The procedure can modify any of the registers and
should end with RET.
# 11: SETOFF
i: E = enable disable motor
If E = 0, then PASIVE disable the entire drive (the
availability and motor). If E = 255, PASIVE then disable only
the availability of drive. In this case, the motor will continue
rotate. This is useful if you want
refer to two drives in a short
period of time, then you do not have
wait for the inclusion of the motor drive.
Description of the physical number of sectors:
Bits 0-7 Register D ... track
Bit 7 Register E ... side (head)
Bit 0-6 Register E ... number of sectors per track D
Description of the status byte:
If the situation occurred, the bit will be set.
Bit name of the event is possible that the operator
0.vremya left .... The operator worked for too long. # 04 - # 05
1.disk not ready .......... There is no disk in the drive. # 04
- # 08 2.poteryana information .. .... Error in the DMA. # 04 -
# 08 2.trek 0 .................... 0 tracks head on. # 00 - # 03
3.oshibka crc ................. Error reading. # 04
4.zapisi no ............ Disk is not formatted. # 04, # 05, # 08
4.oshibka search .. Drive has no 0-th track (?!).# 02
5.preryvanie ........ during pressed q + w. # 02
6.zaschita write ....... Disk write-protected. # 0 - # 03, #
05, # 07 7.ne ready ........ can not enable the drive. # 04 - #
08
MB-02 Datasheet
Contents:
1. ROM bios
2. FDC bios
3. BS-DOS operators
4. Features on-disk format
(C) Busy soft, Index 20000531171000
ROM-BIOS
ROM-BIOS switch banks of RAM, and prohibits the entry in the
memory banks MB-02. This program allows you to call between
banks RAM, without the use of memory above # 4000.
Review.
CALL # 3C98 ... Switching to Bank of ROM, you can not record
(Works in both banks)
CALL # 3C9A ... Switching to Bank of DOS, you can not record
(Works in both banks)
CALL # 3C9C ... The inclusion of the bank's ROM, write enable
(Works in both banks)
CALL # 3C9E ... Includes DOS bank account possible
(Works in both banks)
CALL # 3CA0 ... Calling from one bank to another procedure
(Works in both banks)
CALL # 3CA2 ... set the recorder as the current device
(Only works in a bank ROM)
CALL # 3CA4 ... install the drive as the current device
(Only works in a bank ROM)
A detailed description of the procedures.
Procedures for switching banks: # 3C98,
# 3C9A, # 3C9C, # 3C9E. These procedures work in both banks of
memory - ROM, and DOS. It is strongly recommended not to use
the command OUT to switch banks memory because the address and
data switching ports depends on the version of the MB-02.
Mezhbankovy call: CALL # 3CA0 Use
it this way: the program is running in
Bank of DOS and it must call kakuyulibo procedure (eg # 22AA to
calculate the coordinates) of the bank's ROM. This is done as
follows:
program:
...
CALL # 3CA0
DW # 22AA
...
In the same way you can act, if
enabled the bank ROM, and the program must call the procedure
from the bank DOS.
After the called procedure has completed its work program will
continue to work with your bank. The procedure at # 3CA0 not
alter any registers or flags and uses only 8 bytes on the
stack. SP should be higher than # 4008.
The bank DOS to go to address # 3CA0
You can use the RST # 28, so
program worked with the bank DOS and calling procedures in the
bank ROM, can do it this way:
...
RST # 28
DW # 22AA
...
Overriding a ROM load-save procedures
between tape and disk:
CALL # 3CA2, CALL # 3CA4.
ROM load-save procedure (entry # 4C6
and # 562) can work with the classic tape recorder through the
Classical, or may work with the drive. What a memory device
will be used is determined by these two procedures. This is the
exact equivalent of the command '@': the zero option means that
the load / save commands directed to work with tape, and zero
means working with the disc.
FDC-BIOS
All work with the FDC controller is
with FDC-BIOS. The processor is not loaded
work, time consuming, it can be cooled or execute programs
IM2 to interrupt until the job is
disk operations.
If you vypolnenyaete any procedures
in IM2, then they should not do the following
things:
- To use or modify any
Installation FDC and DMA controller;
- Contain cycles, time-consuming
time (because the DMA retarding
processor);
- To work longer than 5-10 ms (but it is not
important);
- Switch the MB-02 memory banks;
- And, of course, all registers must be
saved and then restored.
All operators of FDC-bios are available from the
RST # 18 in DOS bank. A register must contain the transaction
number. Other registers contain the information necessary for
the operation.
Overview
# 00: RESET ..... reset FDC Controller
# 01: STATUS .... Reading state information
# 02: RESTORE ... move the head on track 0
# 03: SEEK ...... move the head to the track N
# 04: RDSEC ..... read sector
# 05: WRSEC ..... write sector
# 06: RDTRK ..... read track (direct reading)
# 07: WRTRK ..... Format track
# 08: RDADD ..... read the ID sector
# 09: REZIM ..... set density
# 0C: AKTIVE .... including disk N
# 0D: PASIVE .... disable all the drives
# 0E: INFO ...... obtain information about the drive
# 0F: SETMAX .... set the maximum length for the exchange of
data.
# 10: SETMLT .... establish a procedure for multi-tasking
# 11: SETOFF .... set the mode to disable the motor
A detailed description of the operations
number of transactions: mnemonic name of the operation
i: register = value [at the entrance]
o: register = value [setting out]
... Description of the operations ...
# 00: RESET
about: A = status
Reset FDC controller.
It would be nice to use before work with
FDC bios at the beginning of the application.
# 01: STATUS
about: A = status
Returns the current status, the format described
below.
# 02: RESTORE
about: A = status
Moves the head on track 0.
# 03: SEEK
i: D = track
o: A = status
Moves the head on the track, as shown in the register D.
# 04: RDSEC
i: DE = physical number of sectors, HL = address
o: A = status
Reading the sector (number of DE) in memory
disk address in HL.
# 05: WRSEC
i: DE = number of physical sectors, HL = address
o: A = status
Record of the memory to disk, DE sector to record and HL
address of the memory. Before performing the operations or
RDSEC WRSEC not have to call the operator SEEK,
as if necessary WRSEC or RDSEC will do everything automatically.
# 06: RDTRK
i: D = track, 7-bit register E = party, HL = address
o: a = status
Reading the whole track into memory at a
HL. This operator reads and intersectoral
information, too, crc code sectors not
pass. This operator is not suitable for
reading information from the sectors.
# 07: WRTRK
i: D = track, 7-bit register E = party, HL = address
o: A = status
Formatting track. In HL beginning of the sequence used for the
controller (usually wd2797)
# 08: RDADD
i: D = track, 7-bit register E = party, HL = address
o: A = status
Reading the ID sector. Reads in
4 bytes of memory: track number, the party sector number and
length of the sector. For more details, see the description of
wd2797.
No need to call the operator SEEK
before operations # 04 - # 08. If necessary, the SEEK (Search)
will be made automatically.
# 09: REZIM
i: E = 0 for DD, 1 HD, 2 for ED
o: Z = okay, NZ = error
Installing the density of the current drive.
If the drive does not support this density, it is NZ.
# 0C: AKTIVE
i: E = number of drive
about: A = result
Insert a floppy drive E and disable all other drives (if
necessary).
Results can be:
0 ... Unknown Album ... drive missing
1 ... Disk not ready .... the drive is inserted diskette
2 ... Drive enabled ... successfully, the disk has not
changed
3 ... Drive enabled ... well, perhaps a floppy disk
changed.
If A = 0 or 1, none of the drive will not be active.
# 0D: PASIVE
i: E = number of drive
Turn off the drive.
# 0E: INFO
i: E = number of drive
o: DE = information about the drive
This operator returns the following information:
D = number of tracks
E = supported by density
Bit 0 = 1 ... DD
bit 1 = 1 ... HD
bit 2 = 1 ... ED
If the drive is missing, DE will contain 0.
# 0F: SETMAX
i: BC = maximum length of transferred data
This statement sets the maximum
The number of bytes for DMA operations. Not
is very important to user programs.
# 10: SETMLT
i: HL = address of the procedure, multi-tasking (or 0 if this
procedure is not needed)
While DMA handles the data between memory
and FDC controllers, a different procedure might work. HL
contains the address of a procedure, called before the start of
the DMA data. DMA is used in the operation
RDSEC and WRSEC. If you want to do
any procedures while reading or
recording sector, then the procedure does not
must do the following (same as in
IM2):
- To use or modify any
Installation FDC or DMA controllers;
- Contain cycles, time-consuming
time (because the DMA retarding
processor);
- To work longer than 5-10 ms (but it is not
important);
- Switch the MB-02 memory banks as a criminal
bottom, ie in any way.
The procedure can modify any of the registers and
should end with RET.
# 11: SETOFF
i: E = enable disable motor
If E = 0, then PASIVE disable the entire drive (the
availability and motor). If E = 255, PASIVE then disable only
the availability of drive. In this case, the motor will continue
rotate. This is useful if you want
refer to two drives in a short
period of time, then you do not have
wait for the inclusion of the motor drive.
Description of the physical number of sectors:
Bits 0-7 Register D ... track
Bit 7 Register E ... side (head)
Bit 0-6 Register E ... number of sectors per track D
Description of the status byte:
If the situation occurred, the bit will be set.
Bit name of the event is possible that the operator
0.vremya left .... The operator worked for too long. # 04 - # 05
1.disk not ready .......... There is no disk in the drive. # 04
- # 08 2.poteryana information .. .... Error in the DMA. # 04 -
# 0 2.trek 0 .................... 0 tracks head on. # 00 - # 03
3.oshibka crc ................. Error reading. # 04
4.zapisi no ............ Disk is not formatted. # 04, # 05, # 08
4.oshibka search .. Drive has no 0-th track (?!).# 02
5.preryvanie ........ during pressed q + w. # 02
6.zaschita write ....... Disk write-protected. # 0 - # 03, #
05, # 07 7.ne ready ........ can not enable the drive. # 04 - #
08
Disc format
BOOT sector
Physics Room: track 0, side 0, sector 1.
LUN: 0.
This sector includes:
# 00 - # 01 ... Go to the bootloader (# 18, # 7E)
# 02 ....... not used, usually # 80
# 03 ....... Byte # 02 (MB-02 labeling)
# 04 - # 05 ... number of tracks on the disk (usually 80)
# 06 - # 07 ... number of sectors per track
# 08 - # 09 ... parties on the drive (usually 2)
# 0A-# 0B ... number of sectors per cluster (usually 1)
# 0C-# 0D ... LUN DIRS sector
# 0E-# 0F ... number of sectors of FAT FAT (obychno 1 to 4)
# 10 - # 11 ... length of the FAT (# 400 * the count s FAT
sectors)
# 12 - # 13 ... logical number of the first sector of first
FAT
# 14 - # 16 ... logical number of the first sector of the
second FAT
# 20 ....... Byte # 00 (MB-02 labeling)
# 21 - # 24 ... date and time formatting the disk
# 25 ....... byte # 2000 (MB-02 labeling)
# 26 - # 2F ... drive name
# 30 - # 3F ... extension of the drive
MB-02 labeling determine whether it is MB-02 disk.
DIRS sector
This sector contains 256 elements, each element consists of the
following 4 bytes of data:
# 00 ....... ID
# 80 = existing element
for extended catalog
other = parent directory is (usually # 00)
# 01 ....... XOR directory name (for quick searching)
# 02, # 03 ... logical number of the first sector of the
directory
(Only bits 0-13)
SUBS sector (directories)
It contains elements of 32 bytes:
# 00 ....... ID
# 90 = file contains only the header
# A0 = file only contains data
(No title)
# B0 = file contains both header and data
# 80 = file does not contain any data or header
(Does not occur very often)
Other values mean the wrong element
directory.
# 01 - # 04 ... date and name of the file
# 05 - # 15 ... Classic 17baytny title Tape
# 16 - # 17 ... additional address data block
# 18 - # 1B ... data block length
(# 18 = Jr, # 1B = high byte)
# 1C ....... flags for the data block
# 1D ....... file attributes
# 1E-# 1F ... number of the first sector of file
Zero entry in the catalog does not contain the file, but has a
special meaning:
# 00 ....... ID (usually # 80)
# 01 - # 04 ... Date and time of file
# 05 ....... number of the top directory in the tree structure
(And not just in it!)
# 06 - # 0f ... directory name (the command $ "name" searches
for it)
# 10 - # 1f ... expansion of the directory name
File alocation table (FAT)
FAT contains a 16bit elements, each of
which describes one sector on the disk.
Bit 15: 0 ... free
1 ... not free (Zanathy or "punched")
14: 0 ... the last sector of file
1 ... not the last sector of file
0-13: [bit 14 = 0] ... the number of bytes before the end of
the file
This last sector
[Bit14 = 1] ... logical number of the next
Sector File
If sarshy byte (bits 8-15) are installed
in # FF, this means that the value of early
byte (bits 0-7) are different:
# 00 ... special sector (boot, system, back-up)
# F? ... Unused Sector:
# FC - error [formatter detected CRC error]
# FD - bug [formatter found record is not found]
# FE - the sector does not exist
(The second side of unilateral disc)
# FF - the sector does not exist
(End of the physical area of the disc)