I am a an Assembler internals Guy and am trying to expand my
horizons
I am trying to display MVS info e.g. some of the things in HSCCMD.C
In a GUI front I did a Windows API CreateProcess to Create a Window
32 WinMain app to display info displayed in DOS box from hsccmd.c
you have given me some idea of what I need to do
let me see if this can help
thnakx
--- In
hercules-390@..., "Roger Bowler"
<rogerbowler@...> wrote:
>
> --- In
hercules-390@..., michealbutz2002 wrote:
> > In cpu.c
> > psa = (void*)(regs->mainstor + regs->PX);
> > myasid = ((U16) *psa->psaaold->ascbasid
> > I am running this code under the Visual Studio debugger
> > when I reference myasid I blow up
>
> You need to keep a clear distinction in your mind between pointers
> that point into Intel storage and pointers that point into S/390
> storage. You cannot mix the two. Another thing you need to take
into
> account is that mainstor is real storage and psaaold is a virtual
> address pointing into common storage (E)SQA.
>
> psa->psaaold->ascbasid is mixing up three different addressing
> concepts and will almost certainly segfault.
>
> Just to complicate matters further, Intel pointers are
> "back-to-front", so for example 12345678 is stored in Intel
storage as
> 78563412 (I gave up wondering why about 10 years ago :-))
>
> The correct way to do it would be something like this:
> - calculate the address of the PSA in mainstor
> - use FETCH_FW to load the fullword at psaaold
> - perform virt_to_abs translation to get address of ASCB in
mainstor
> - use FETCH_HW to load the halfword from ASCBASID
>
> You must also deal with things like translation exceptions,
addressing
> exceptions, and crossing page boundaries (i.e. you cannot just add
the
> offset of the ASCBASID field to the starting address of the ASCB
> unless you are sure that the ASCB does not cross a page boundary).
>
> Give us a hint what you are trying to achieve. We might be able to
> suggest another method.
>
> Regards,
> Roger Bowler
> Hercules "the people's mainframe"
>