From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: d180ab3bd8,5e74e0b23842db90 X-Google-Attributes: gidd180ab3bd8,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.91.114 with SMTP id cd18mr1063271wib.2.1359518827757; Tue, 29 Jan 2013 20:07:07 -0800 (PST) Path: bp2ni5459wib.1!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!xlned.com!feeder3.xlned.com!multikabel.net!newsfeed10.multikabel.net!feed.xsnews.nl!border-1.ams.xsnews.nl!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: paramucho@hotmail.com (paramucho) Newsgroups: alt.sys.pdp11,vmsnet.pdp-11,comp.sys.dec Subject: Re: Access to RSTS/E IOPAGE Registers Date: Wed, 23 Jan 2013 14:11:56 GMT Organization: Aioe.org NNTP Server Message-ID: <5103ed41.658822127@nntp.aioe.org> References: <50e0dd7c$0$281$14726298@news.sunsite.dk> <50e1b4b8.51590248@nntp.aioe.org> <50e357ee.3109505@nntp.aioe.org> <50f2699f.912543@nntp.aioe.org> <50f3a15f.22274290@nntp.aioe.org> <50f5628f.137262066@nntp.aioe.org> Reply-To: paramucho@hotmail.com NNTP-Posting-Host: yPe0Vz9rK3epnEf2vEo6yg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 1.5/32.451 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On Tue, 22 Jan 2013 14:52:41 +0100, Johnny Billquist wrote: >> So, in your RSX RT-emulator you set up everything, read the RT-11 program >> into the right spot in memory (you must link the RSX program in a way that >> the addresses usually occupied by RT programs are free) and just execute >> it. As the RT program is calling its system by executing EMTs the emulator >> will get them, translate them and do the right things (hopefully). This >> works, of course, only with RT programs that don't try to reach into the >> operating system directly... > >What you describe is perfectly valid, Harti. >However, you need to dig deeper. Once you have your RT-11 environment, >then what? You will be able to run RT-11 programs. So you have MACRO-11 >for RT-11, the LINKER, and all other tools just as any standard RT-11 >environment have. You can then write additional RT-11 programs, even >though this is actually an emulated RT-11 environment running under RSX. >But let's now assume that you write a program under RT-11, which in fact >would like to access files outside of the RT-11 environment, and >actually read a file from the host RSX environment. >This is the problem talked about. > >You could do this in atleast two ways. >1) Use the RSX EMT to do I/O. However, since most parts of file >operations in RSX is done by a library and not by system calls, this >means you need to get the whole RSX file I/O library ported over to >RT-11, in order to use this properly. (And with "ported" I mean >compiled, linked and put in a library, as well as getting all the macro >definitions from RSX over.) >2) Create some new system calls, that your RT-11 program can use to read >files from the RSX environment. Your emulator would then catch those >calls as well, and do the appropriate work for you, and perform the I/O, >though the RSX libraries, inside the emulator. >From what he says, I think Harti did access local native RSX files. The first option you outline is how I implemented RT-11 emulator I did for VAX/VMS because I had all the room in the world. Directory operations were translated into RMS calls and I used QIO for a lot of the read/write. The translation code I now use with Windows uses essentially the same work flow. As I noted, it's the translation of file system semantics that takes up a lot more development time and a lot more space. It can get quite tricky. I guess that RTEM.TSK uses this approach. RTEM.TSK would be a standard RSX image linked to FCP. It could use PLAS calls to map the emulated RT-11 image and monitor. It could translate RT-11 I/O by packaging up the system call data in some high memory buffer and then remapping the RSX code to handle the operation using FCP. The second option, adding new calls, would defeat the original purpose of emulation if apps had to use the new calls. There is a third option. A simple RT-11 emulator really only needs to open a very small number of record formats. RT-11 programs don't use any of the RSX record formats except block I/O for disk-like devices and character I/O to terminals. FCP is not required to manage this simple kind of I/O. It can all be done with QIO. Directory searchs require that host directories need to be translated into RT-11 directory structures. I do that with Windows directories, and it's pretty straight-forward. It would take longer with RSX because you'd have to read the index files to get the creation date info etc. It's not hard to work out what FCP does if you use a system trace. Here's an excerpt from RSX PIP.TSK running under the RUST/XM RSX emulator running under V11 on Windows (in this case RSX system calls are translated into RT-11/RUST calls). ! ! PIP finds RUST.COM ! 26456 alun lun=3 dev=SY: 26620 glun lun=3 buf=15370 20426 qiow (fna) fun=11 mod=0 lun=3 efn=40 pri=0 isb=15420 ast=0 p1=0 p2=0 p3=0 p4=0 p5=0 p6=1654 fid=. nam=001004.dir;1 sta=0 nxt=0 did=dd.ft dev=SY: 26456 alun lun=3 dev=SY: 26620 glun lun=3 buf=15370 20426 qiow (fna) fun=11 mod=0 lun=3 efn=40 pri=0 isb=15420 ast=0 p1=0 p2=0 p3=0 p4=0 p5=0 p6=1654 fid=. nam=rust.com;0 sta=100006 nxt=0 did=001004.dir dev=SY: 30556k .purge chan=1 30620k .lookup chan=1 dblk=54052=sy:rust.com (eve) seq=0 22776k .readw chan=1 buf=70106 wcnt=1000 crtn=0 blk=12 22776k .readw chan=1 buf=66054 wcnt=1000 crtn=0 blk=14 22776k .readw chan=1 buf=64022 wcnt=1000 crtn=0 blk=16 34740 qio (rat) fun=26 mod=0 lun=3 efn=2 pri=0 isb=1724 ast=0 p1=1654 p2=3600 p3=0 p4=0 p5=0 p6=0 fid=rust.com 34754 wtse efn=2 ! ! PIP opens RUST.COM using ACR ! 26456 alun lun=3 dev=SY: 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 fid=rust.com 20426 qiow (rvb) fun=21 mod=0 lun=3 efn=40 pri=0 isb=36620 ast=0 p1=36640 p2=1000 p3=0 p4=0 p5=1 p6=0 25770k .io chan=1 func=(102,0) buf=36640 wcnt=400 blk=0 crtn=0 status dsw=1 (suc) ios=1 trm=0 (suc) val=1000 The full trace, including the translation to RT-11 system calls, is available at http://code.google.com/p/rust/downloads/list as PIP.TXT. Ian