Re: GCIC Full screen applications - Update

"kerravon86" <kerravon86-/[email protected]> Wed, 06 Oct 2010 13:51:22 -0000
Newsgroups gmane.comp.emulators.hercules390.vm
Message-ID <[email protected]>
--- In [email protected], "Rocky" <rocsystems@...> wrote:
>
> I don't really understand PDOS well enough to 
> tell you whats missing.

It's more you need to understand your editor,
which is why I am able to ask.  :-)

> Except for the screen handling which is IO and 
> which for MVS I intended to
> do with the standard TSO terminal macros.
> 
> Tput Tget STFSMODE STTMPMD

Ok, thanks, that's what I wanted to know.

> The Disk IO part
> 
> Which is open close – and 
> PUT/ GET/READ/open/close/bldl/read/write/check and
> a few others that are needed for handling PDS files properly.

Ok, can you edit a RECFM=U sequential file?

One that has newline separators (x'15') in
it to delineate lines.

> It's not simpe file handling and there is a 
> lot of syste stuff involved.

It should be simple if it's a sequential file,
shouldn't it?

If not, can a simple option be created?

> So in 30 sentences explain what PDOS is or 
> send me to the site to read up on it

30 sentences?

PDOS is a work in progress to emulate MVS to
some extent. (Operationally it also emulates 
MSDOS to some extent - but not programattically).

Because it's a subset of MVS, only a subset of
MVS programs will run.

It is a growing subset, because it is under
active development.

The direction it is growing is not fixed in
stone. It is dependent on what applications
I am trying to support, or what features I
would like to see.

You have an interesting application, and I am
wondering what the barrier is between your
app, and PDOS. It's sort of mid-air refuelling
of an SR71. The SR71 needs to slow down to its
slowest possible speed. The refuelling tank
needs to travel at its maximum speed.

So PDOS has a minimal set of support services,
and so it depends on exactly what you are
doing as to whether you can slow down to the
point where I can grab you.

If you don't do BLDL (because you know it's a
sequential file), then I don't need to support
BLDL.  etc etc

I don't think you need to see it personally, but
if you want to, the file is in the hercules-os380
area (there's a PDOS/370, 380 and 390 depending
on which architecture you wish to run under).

The source code is mostly here:

http://pdos.cvs.sourceforge.net/viewvc/pdos/pdos/s370/pdos.c?view=markup

The kludged-up "open" SVC is here:

else if (svc == 22) /* open */
{
    gendcb->u1.dcboflgs |= DCBOFOPN;
    pdos->context->regs[15] = 0; /* is this required? */
}

Actually most of the kludge is in RDJFCB, and
I'm not sure if I have split these things
appropriately, because it's all transitional
anyway:

else if (svc == 64) /* rdjfcb */
{
    int oneexit;

    gendcb = (DCB *)pdos->context->regs[10];
        /* need to protect against this */
        /* and it's totally wrong anyway */
    fcnt++;
    if (fcnt > 2)
    {
        gendcb->u1.dcbput = (int)dread;
        gendcb->u2.dcbrecfm |= DCBRECU;
        gendcb->dcblrecl = 0;
        gendcb->dcbblksi = 18452;
    }
    else
    {
        gendcb->u1.dcbput = (int)dwrite;
        gendcb->u2.dcbrecfm |= DCBRECV;
        gendcb->dcblrecl = 254;
        gendcb->dcbblksi = 258;
    }
    gendcb->dcbcheck = (int)dcheck;
    oneexit = gendcb->u2.dcbexlsa & 0xffffff;
    if (oneexit != 0)
    {
        oneexit = *(int *)oneexit & 0xffffff;
        if (oneexit != 0)
        {
            dexit(oneexit, gendcb);
        }
    }
    pdos->context->regs[15] = 0;
}


However, regardless of any complaints, at the
end of the day, I am getting the desired effect:

02:36:15 welcome to pcomm
02:36:15 pcomm is calling dir
02:36:15 SVC code is 120
02:36:15 SVC code is 42
02:36:15 got request to run DIR
02:36:15 parameter string is 0 bytes
02:36:15 PLOAD.SYS
02:36:15 PDOS.SYS
02:36:15 CONFIG.SYS
02:36:15 COMMAND.EXE
02:36:15 AUTOEXEC.BAT
02:36:15 WORLD.EXE
02:36:15 SVC code is 1
02:36:15 SVC code is 62

So I envision seeing verbiage like:

got request to start editor
switching to address space 1
locked in device 00c0 (first 3270)
hopefully this app knows how to communicate with 3270s,
because PDOS doesn't!!!
got open request for fred.txt
read 3 bytes
got tput request
about to do ccw
got tget request
about to do ccw
got write request
wrote 12 bytes to fred.txt
editor has terminated
address space 1 terminated
displaying file fred.txt
aaa
bbb
ccc


(and I would have typed in that aaa, bbb, ccc on
another screen via your editor).

Assuming you make reasonable requests from the
OS. :-)

BFN.  Paul.