DUP Problem with RT-11

From: Megan <mbg_at_TheWorld.com>
Date: Thu Mar 13 22:20:00 2003

>I have been attempting for some to to write ALL 65536 blocks
>from one RT-11 partition to a second RT-11 partition. Does
>anyone know of what is wrong with what I am doing? I am
>using V5.03 of RT-11 under the Supnik emulator and I do the
>command:

As you know, some devices supported by RT are variable-sized,
like DL, DM and DU. In order for RT to know the size of
a volume on these devices, the handlers have to support the
special function 373, which gets the volume size.

In most cases, this is not a problem since the volume sizes
don't approach the 16-bit limit of 65535. But for DU volumes,
this size can be exceeded. And since you cannot return a
volume size of 65536 as it would require 17 bits, the maximum
size returned is pegged at 65535, with one block specifically
designated as unused (but reachable using other special function
calls in the DU handler). The reason for the one unused block
is so that the calculations for start of a partition are simple
(since it is a truncation by discarding the low-order 16 bits of
block number).

Now, since the DU handler reports 65535 as the largest size,
the directory structure is established such that the blocks
which are accessible are 0 through 65534 (a total of 65535
blocks).

It would be a kludge and a hack (a bad one) to play games in the
driver to make it report 0 and have it mean 65536 even if
a reported size of zero makes no sense (actually, a reported
size of less than 9 makes no sense since that is the MINIMUM
number of blocks required on an RT volume to be able to store
a minimum of one block of data). It would also mean changing
DUP and any other program which uses VARSZ$.

Personally, I would suggest that time is better spent with
other things in RT... just live with one block not directly
accessible per 65536, or write your own programs (without
mucking with the OS itself) to get at the final block... I
would say it is a case of truly diminished returns.

                                        Megan Gentry
                                        Former RT-11 Developer

+--------------------------------+-------------------------------------+
| Megan Gentry, EMT/B, PP-ASEL | email: mbg at world.std.com |
| | |
| "this space | (s/ at /_at_/) |
| unavoidably left blank" | URL: http://world.std.com/~mbg/ |
| | "pdp-11 programmer - some assembler |
| (DEC '77-'98) | required." - mbg KB1FCA |
+--------------------------------+-------------------------------------+
Received on Thu Mar 13 2003 - 22:20:00 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:12 BST