I have a tricky problem. I've written a device driver that pretends to
look like a file system without using any ACP. It implements most
functions an ACP normally implement. It also have some "odd" attributes
set on the device to represent both what it actually is, and also to
make FCS do "the right thing".
So, yes, using FCS, I can access this device just like any other,
including opening files and so on... However, RMS-11 is not so
cooperative, and I guess it means that I'm either not implementing some
ACP function in enough detail to make RMS-11 happy, or else some device
attribute it not set right, causing RMS-11 to treat the whole thing in a
way that is too restricted, compared to FCS, in which case I want to
figure out exactly how to set attributes to make RMS-11 do the right
thing as well.
And just to explain what I'm doing in a little more detail:
I've actually done this for two devices. The first is the DOS device
presented by E11 and other emulators. It's a device that gives access to
the host file system.
The second device is actually TCP/IP. I can use normal tools and FCS
functions to access the internet, just as easy as any other file. But
not so, using RMS... :-(
As an example:
.pip ti:=tc:"130.238.19.25";21
220- ===============================================================
220- = Welcome to the Update Computer Club FTP archives! =
220- ===============================================================
220-
220- This server is maintained by the computer club Update at
220- Uppsala University in Uppsala, Sweden.
220-
220- You can find all the good stuff in the /pub directory.
220-
220- Please be advised that the club provides this service without
220- any guarantees, and we take no responsibility for any harm that
220- may come to you or your system from the use of this server, or
220- files obtained from this server.
220-
220- We do, however, try to ensure that everything here is correct.
220- If you have problems with the server, please contact the
220- FTP administrator ftp...@Update.UU.SE.
220-
220
PIP -- I/O error on input file
TC0:[IPLIB]130238019.025;21 -- Timeout on request
.
Now, it would be awesome if I could make this play using RMS as well,
since then I could easily write servers using BASIC+2 or other
languages. FORTRAN 77 as well as C do also have FCS interfaces, so I can
already use those, assuming I'm happy with limiting myself to FCS. But I
want it all (of course). So - anyone who might be able to help?
(And no, the TCP/IP is not available for distribution yet, but might be
in the future, depending on interest and so on...)
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
We all have our quirks. :-)
>> So, yes, using FCS, I can access this device just like any other,
>> including opening files and so on... However, RMS-11 is not so
>> cooperative, and I guess it means that I'm either not implementing some
>> ACP function in enough detail to make RMS-11 happy
>
> Well, RMS-11 uses 18 bytes more than FCS in the USER FILE ATTRIBUTES
> from the file header.
Well, yes and no. RMS uses all 16 words (32 bytes) of the file header
for some of the more complex types of files (index files to be precise),
but for plain text files, they just use the same 7 words that FCS use,
and nothing more.
> Are those mimicked?
Yes. Of course. :-)
However, it don't help, as RMS never even calls my device driver. That
is my problem. It decides that it don't need to, and just do an ALUN$
and then it's done and happy.
> VMS - RMS, when wildcards are present reads the directory itself
> versus letting the ACP find the file. Would that have been the same
> for RMS-11?
Yes. Since ODS don't really know what a directory is. All ODS knows
about are file IDs. In RSX this means that even finding a file without
wildcards means that RMS (or FCS) needs to read the directory itself.
Not sure how VMS do... I would think it worked the same way...
But that is for disks. For tapes for instance, it's another deal. There
is a special I/O function for finding filenames matching the FNB for
tapes. Even with wildcarding, although the ACP wildcarding is primitive,
and the library have to implement the more sophisticated details itself.
And then you have record type devices. And this is part of what my
questions aims at: what to make the device look like to make RMS call my
device driver, and with which arguments it then actually do get called.
> Is there are error code returned at all ?
In RMS? With the current implementation, FCS calls the device driver to
get a file id, based on a FNB. RMS claims to open the file without
calling the device driver at all. So it does not give any error.
However, trying to do I/O after that, means that my TCP/IP gives an
error, since there is no connection open on that LUN.
> Can you single step the RMS code... for a while?
I've done it some, and it's tedious and complex. RMS is not a small
library...
> Anything of use in appendix F of the IO Operations manual where the
> expected disk structure is explained?
I am not trying to emulate a disk. That would imply a lot more things
that I'd have to implement, not forgetting that disks do not allow
foreign file specifications, which means I cannot give nice IP
addresses, if I were to implement this as a disk.
> http://www.bitsavers.org/pdf/dec/pdp11/rsx11/RSX11M_V3.2_Jun79/5A_FileMgmt_IO/AA-2515D-TC_RSX-11M_V3.2_IO_Operations_Ref_Man_Jun79.pdf
>
> also...
>
> http://www.bitsavers.org/pdf/dec/pdp11/rsx11/RSX11M_V3.2_Jun79/5A_FileMgmt_IO/AA-H269A-TC_RSX-11M_IO_Drivers_Ref_Man_May79.pdf
You know, the newest RSX-11M-PLUS V4.6 manuals are also online at the
same site. ;-)
> Good luck!
> Hein
Thanks.
Johnny
Yes, I have an extremely short program that demonstrates the problem.
However, it isn't of any use to anyone else, since you also need my
TCP/IP to test this.
It is a question of RMS reacts/behaves with my device/or with devices
with different attributes. What it does for a normal disk device is
known, but I do not want to look like a disk, for reasons explained.
:-)
However, if you want to try and understand anything, you are welcome to
log into my development system and step through RMS in there. :-)
(It's Mim.Update.UU.SE, guest/guest)
Johnny
>On 2011-09-08 08.16, paramucho wrote:
>> On Wed, 07 Sep 2011 22:06:38 +0200, Johnny Billquist<b...@softjar.se>
>> wrote:
>>
>>
>>> In RMS? With the current implementation, FCS calls the device driver to
>>> get a file id, based on a FNB. RMS claims to open the file without
>>> calling the device driver at all. So it does not give any error.
>>> However, trying to do I/O after that, means that my TCP/IP gives an
>>> error, since there is no connection open on that LUN.
>>>
>>>> Can you single step the RMS code... for a while?
>>>
>>> I've done it some, and it's tedious and complex. RMS is not a small
>>> library...
>>
>> I think I'm starting to understand the problem.
>>
>> Do you have a simple stand-alone RMS test app that demonstrates the
>> problem? I have RSX-11M 4.4 and I also do testing in RUST/XM using an
>> RSX AME (which doesn't support PLAS and only has really basic support
>> for loadable libraries).
>
>Yes, I have an extremely short program that demonstrates the problem.
>However, it isn't of any use to anyone else, since you also need my
>TCP/IP to test this.
>It is a question of RMS reacts/behaves with my device/or with devices
>with different attributes.
All I need to know about your device should be it's unit
characteristics (record oriented FD.REC etc). That's what RMS will
know about your device (from GLUN). I should be able to fudge the rest
of the details to run a simple test program.
I have some tools which let me look at the behavior of apps and play
around with the environment. The first is the RUST RSX AME directive
trace. Here's an example trace using RSX PIP:
. mcr pip
PIP> sy:a.a=tt:aaaaaaa.aaa
...
26456 alun lun=3 dev=TT:
26620 glun lun=3 buf=15370
20426 qiow (acr) fun=15 mod=0 lun=3 efn=40 pri=0 isb=15420 ast=0
p1=1654 p2=334 p3=0 p4=0 p5=100400 p6=0
20426 qiow (att) fun=3 mod=0 lun=3 efn=40 pri=0 isb=36620 ast=0
p1=0 p2=0 p3=0 p4=0 p5=0 p6=0
26456 alun lun=4 dev=SY:
26620 glun lun=4 buf=15370
26456 alun lun=4 dev=SY:
26620 glun lun=4 buf=15370
20426 qiow (cre) fun=24 mod=0 lun=4 efn=40 pri=0 isb=15420 ast=0
p1=1514 p2=342 p3=0 p4=0 p5=0 p6=0
fid=a.a
20426 qiow (ena) fun=14 mod=0 lun=4 efn=40 pri=0 isb=15420 ast=0
p1=0 p2=0 p3=0 p4=0 p5=0 p6=1514
fid=a.a nam=a.a;0 sta=100206 nxt=0
did=001004.dir dev=SY:
20426 qiow (ace) fun=17 mod=0 lun=4 efn=40 pri=0 isb=15420 ast=0
p1=1514 p2=334 p3=0 p4=0 p5=101400 p6=0
...
Using trace I can look at the behavior if different device
characteristics settings, and I can locate the point at which RMS
looks at the settings (GLUN).
The RUST emulator debugger stores the last few hundred instructions so
it's simple to walk back through code and I can use WATCH to track
access to specific pieces of data (such as the unit characteristics).
If I need anything else I just modify the emulator.
My guess is that RMS is going to need a patch since you want your
device to look like two different sorts of device to it.
> What it does for a normal disk device is
>known, but I do not want to look like a disk, for reasons explained.
>
>:-)
I'm not thinking about disks!
>However, if you want to try and understand anything, you are welcome to
>log into my development system and step through RMS in there. :-)
>(It's Mim.Update.UU.SE, guest/guest)
I successfully logged in (after I remembered how HELLO works) and I
managed to look around, but I couldn't see any test programs.
Ian
Same. RMS knows about what is inside files, the XQP (or theACP) knows
what is going on outside. RMS is responsible for directory reading when
you have a name but not yet a FID.
>On 2011-09-08 11.54, paramucho wrote:
>> On Thu, 08 Sep 2011 08:27:28 +0200, Johnny Billquist<b...@softjar.se>
>> wrote:
>>
>>> On 2011-09-08 08.16, paramucho wrote:
<snip>
>What is RUST though? I know I've seen the name, but I can't remember
>right now.
See: http://rust.wikispaces.com/About+Rust
<snip>
>> I successfully logged in (after I remembered how HELLO works) and I
>> managed to look around, but I couldn't see any test programs.
>
>DU:[IPLIB]TEST4.MAC
I got TEST4.MAC. Now I'm tweaking my RSX emulator code--it's been
inactive for a couple of decades and MAC is running out of space.
Ian
I've been tracing through a lot of this myself as well...
We'll see what I end up with. I'd be happy to continue this in private
mail, since I suspect this is getting a bit too internal to be of much
general interest. :-)
Johnny