Operating system PQ-DOS
by Vadim from Star Software
1) PQ-DOS - what is it anyway?
2) Why was it done?
3) What are the innovations compared to what was before?
4) How to use it? And what does all this give?
5) Compatibility? Which software works and which doesn't?
1) PQ-DOS - what is it anyway?
So what is PQ-DOS? To put it briefly, then
this is an OS for the Pro computer, which is compatible, although not on
100%, with old systems for this PC (MicroDOS options),
with the canonical CP/M system, as well as with systems
MSXDOS-1/MSXDOS-2 * and can execute programs for them. OS
combines features of both CP/M systems and more advanced
OS type MS-DOS. From a programmer's point of view, the OS represents
is a kind of layer of code and data that represents
environment of the program, allowing it to interact with files,
external devices such as display, keyboard,
serial interface, real time clock, etc.
The system can boot from either a floppy disk or a hard drive
and consists of the following main parts:
1) BIOS - located in ROM; **
2) boot programs in the MBR/boot sector;
3) main system loader and interpreter config.sys;
4) BDOS module;
5) Concurrent BIOS module;
6) device drivers;
7) command processor.
* some MSXDOS-2 functions are not implemented, in addition there are noprocedures
mapper, so MSXDOS-2 software that uses these features
won't work.
** Strictly speaking, BIOS is an independent system,
which is contained in the computer ROM in the part where it was previously
tests were posted. BIOS calls can be used for any
systems or programs. Moreover, if the user does not want
flash your BIOS, then the PQ-DOS system can work without
it, using its emulator, loaded from a floppy disk during
system boot. Such a system cannot boot from a hard drive.
will be, but after booting from a floppy disk it will “see” logical drives
on HDD.
2) Why was it done?
Now I’ll tell you about the reasons that prompted me to start writing a new one.
OS for Profik. When I first read in the advertisement,
what is a Pro computer (it was around
1993), then I became interested in its capabilities specifically in
extended mode with bootable OS. And having seen the system at home
at home, on a self-soldered Profik version 3, was simply
amazed:
1) Files have names and extensions and can be fragmented;
2) File size is not limited to 64K;
3) We can redirect the program output to a file;
4) file commander CopyK can read and write floppy disks
MS-DOS;
5) the system boots from disk, and is not tightly flashed into ROM as
TR-DOS and you can improve it;
6) The running program does not overwrite everything availableRAM, and when
When the work is completed, the system is returned;
7) The system has text editors and programming languages
etc. etc. etc.
Using a slightly modified Spectrum circuit we get the following
possibilities, almost like a PC at home in the early 90s! It was
fantasy, breakthrough. The advantages of this approach were obvious, but also
The disadvantages were striking. The main disadvantage of "Profinskaya CP/M" is
there was speed, everything worked very, very slowly, many people
They scolded the computer and the system for this, spat and left the platform. A
in vain. Neither the computer nor the system is to blame here. Blame the brakes
there were those who made the first adaptations of the system, but they did
considerable work worthy of respect, forcing him to work, in fact, for
ZX platform, real OS - MicroDOS. Unfortunately, progress in
porting of the OS ended quickly, as far as I know,
the main work was done in less than a year and then the system
has not changed radically. For those who ported MicroDOS to
Profik didn't have the BDOS sources and they didn't even try them
recreate to correct errors in the BDOS module and somehow
speed up disk operations. ***
In addition, in 1995, Condor made a version of the system with
hard drive driver, this is the so-called. CBIOSS. Due to the above
reasons (lack of source codes), the author of this version (Written
D.G.) combined floppy and hard disk drivers into one driver,
made a disk error handler inas a resident who
called when a read/write error occurs and cancel it
it was completely impossible. The system could only work with
two logical HDD partitions and if you had more of them, then
it was necessary to mount and unmount logical
disks, which was very inconvenient. No subdirectories of course
there wasn't. Dividing the HDD into partitions was incompatible with the PC. B
in general, the system has become even worse than it was, although for the average person it
looked prettier (for example, the configuration boot menu, with
cheerful voice acting), but the system had a depressing effect on me
impression.
Around 1997, I received documentation files and fragments
MSXDOS-1 source codes (non-working, someone's decompilation). Reading everything
this, I came to the conclusion that it is possible to make a system similar to
MSXDOS, but compatible with software for Profi MicroDOS. Except
Moreover, it was obvious that an OS with the FAT file system was needed,
with support for subdirectories for storing files on your hard drive
disk. ****
*** the topic of brakes in the system is worthy of a separate discussion, and
I won’t describe this in detail yet.
**** We will also omit the stages of writing the system for now, if there is one
interesting, I’ll write about it later.
3) What are the innovations compared to what was before?
If PQ-DOS is compared with MicroDOS + CBIOS, then there are a lot of innovations
a lot:
3.1) The BDOS module now takes 2 pages of code, in the original
MicroDOS this blocklocated from address D400 to F800. Containing
code, data and buffers. In PQ-DOS the main code is contained in the first
page (about 12K), part of the code due to lack of space
placed on the second page, which also contains tables for
handle allocations and environment variables. Mostly RAM now
there is a resident part of the BDOS module, which occupies
less than 4K, the amount of RAM for loading programs is 58K.
3.2) The PQ-DOS driver subsystem is made similar to the implementation in
MS-DOS, drivers are loaded into RAM pages forming a coherent
list. The first driver that contains the NUL device. Code
drivers are relocatable, the driver loader is before
by placing the driver in RAM, it reconfigures addresses,
requiring displacement. The driver no longer has a procedure
installations, as it was in CBIOS. In order for the driver to be
relocatable, do not do anything particularly special or complex
necessary. (fantastic :-) )
3.3) The BDOS system has, as it were, 2 sets of functions.
FCB-oriented functions, for running CP/M or old software
Pro software for MicroDOS and a new set of functions -
handle-oriented, working with ASCIIZ strings. Module
completely rewritten in 2014
3.4) The format of the file system with which PQ-DOS works -
FAT12/16. Supports 40 and 80 track floppy disks, single and
bilateral. IDE screws in CHS and LBA mode. Subdirectories.
Nesting restriction - path length is notmust exceed 64
symbol. The CP/M file system is not supported, but in my
plans to write a driver that will do
encoding/decoding CP/M FS for the PQ-DOS kernel so that
the system will see the disk as if it had a FAT12 file system, but naturally
without support for subdirectories on it.
3.5) The cmd.com command processor is completely written from scratch and
has a larger number of commands than in earlier versions of Q-DOS, where
it was carried over from MSXDOS-1.
3.6) Drivers are divided into two levels: logical level
(high-level drivers) and physical layer (low-level
drivers). Low-level, coupled with the POST procedure and initial
The boot loader is the computer's BIOS. High-level ones are
downloadable device drivers. In addition, some of the downloadable
drivers are always loaded. These are the drivers without which
system operation is impossible. But the user can replace any
from these drivers to your own, through the config.sys file.
3.7) The system has a bootloader that processes
commands in the config.sys file, loads standard
drivers and boot menu processing.
3.8) There is an extended memory management subsystem, though
it appeared one of the first, in the very first modification then
still MicroDOS, but since then the functionality has changed. Programs can
request RAM pages from the system and return them back,
In addition, you can reserve pieces of RAM from the BDOS top.
3.9)In PQ-DOS to run programs and monitor busy
memory programs introduced the concept of "process". The program can
run another program as a subroutine within the current one
process or initiate a child process. Appeared in the system
and the concept of "resident".
3.10) Concurrent BIOS (CBIOS) system is currently needed
only for compatibility with old software, planned in the future
get rid of it, replacing it with a more universal solution,
which will allow you to port PQ-DOS to other clones. Basic
I described the ideas in a document back in 2011, but further thinking
ideas, things haven’t taken off yet due to lack of time and laziness)
3.11) The system has a number of new utilities, formatter,
the only one among all our ZX clones that correctly
formats floppy disks under the FAT file system, marked
bad blocks in the FAT table, allows you to flexibly set parameters
operations. For hard drives there is a full format mode,
with constant recording in all sectors, quick formatting, with
clearing the table of contents and quick formatting submode when
surface inspection is performed more quickly. Again, when
presence of bad sectors, the corresponding clusters are marked in
FAT as faulty.
3.12) Disk drivers read/write physical sectors of the disk and
as many sectors as the calling program requests.
DOS read/write file functions have an optimizer that
choosesmaximum possible block of sectors to read or
recordings, speeding up data exchange. MicroDOS systems when accessed
a logical record of 128 bytes was requested to the disk driver
for one request.
3.13) The system has a built-in disk error handler,
which is called by the BDOS module when an error occurs.
The user program can set its own
processor, which is important.
3.14) It is possible to replace the command processor,
using the appropriate commands in config.sys.
3.15) The system boots very quickly: from a floppy disk without starting
file shell in about 5-7 s. From the hard drive in 1 s,
with a file shell in 2 s.
3.16) The concept of “environment variables” appeared in the system - this
text variables that store text values (or
numbers, but in text format). There are several system
variables, for example, the comspec variable contains the path to
cmd.com, the path variable contains a list of paths on the disks where
you should look for the executable program if it was not found in
current subdirectory.
4) How to use it? And what does all this give?
The system is provided with detailed documentation, which is often
supplemented and corrected. Writing programs for a system is very
simple. Working with files has become many times easier than it was in
previous systems and MicroDOS. You can write utilities
playing music files of different formats, downloading toZX mode of memory snapshots .z80, .sna and others, to run the old one
Spectrum software. Mounting trdos floppy disk images for a new one
TR-DOS version for Profi. You can (and should) also create utilities
removing an image from a floppy disk and writing the image back to the floppy disk.
At the same time using a screw with FAT16, using subdirectories. You can
delete, create, rename files and subdirectories do not
using PC for this. Or vice versa, remove the floppy disk image,
write the file to the memory card and read it to the PC. Driver for SD
maps will be written soon)
5) Compatibility? Which software works and which doesn't?
No data yet.
Share your thoughts about the article