> I am on a z/os 2.2 system, trying to rseurrect some old code.
> .
> can some one confirm the instructions for Searching the 
> Address Space Vector Table (ASVT) on z/OS 2.2
> .
> This program  loads R10 with CVTASVT  
> L     R10,CVTASVT        GET ASVT ADDRESS
> USING ASVT,R10          ESTABLISH ADDRESSABILITY
> .
> It then issues a Load Address For the first entry ?
> This doesn't  look correct to me ? 
> LA    R11,ASVTENTY       GET # OF FIRST ENTRY
> .
> Next its test for an ASCB that is assigned.
> TM    0(R11),ASVTAVAL    VALID ASCB Available ?    
> BO    RUNLOP1            NO, CHECK NEXT ASVT ENTRY
> .
> * Examine ASCB
> .
> The current code issues the following instruction, which
> looks incorrect according to IHAASVT 
> LA    R11,4(,R11)          Advance NEXT ASVT ENTRY 

ASVT mapping:

https://www.ibm.com/docs/en/zos/2.2.0?topic=information-asvt-mapping

That looks correct to me.  Here's some code from MVS3.8 IEAVEAC0:

         L     R1,CVTASVT-CVT(R1)  GET THE ASVT                         63660002
         BCTR  R13,ZERO       ASID-1                                    63710002
         SLL   R13,TWO        (ASID-1) X 4                              63730002
         L     R13,ASVTENTY-ASVT(R13,R1)  GET ASCB ADDRESS     @YM01596 63750002

So each slot in the ASVT is a 4 byte pointer with the high bit off if
points to an ASCB.  ASID 0 doesn't exist, so ASVTENTY is the pointer
for ASID 1.

It does need some check to not run off the end of the ASVT...

https://www.ibm.com/docs/en/zos/2.2.0?topic=information-asvt-heading

  Size:
  Offset of ASVTEND minus offset of ASVTBEGN plus four times the value
  of ASVTMAXU.

I'd guess that there are ASVTMAXU 4 byte entries starting and counting
ASVTENTY.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to