wow ... you and Chuckie ... putting assembler code in the list ... brave ...
do you take apars? write some ptfs?
David


-----Original Message-----
From: The IBM z/VM Operating System on behalf of Dale R. Smith
Sent: Thu 9/6/2007 2:36 PM
To: [email protected]
Subject: Re: [IBMVM] sample STSI CMS assmembler program
 
Derek, here is some Assembler code that I was working on at one time to =

issue STSI for the basic machine configuration, (1.1.1).  I had plans to =

add code to set REXX variables for the extracted fields, but I didn't hav=
e 
time to complete it before I was "let go".  So I will leave that part to =

you!  :-)>  If you need help with setting REXX variables from Assembler, =
I 
can send you some sample code for that as well.

GETSTSI  TITLE '***  Entry Linkage  ***'
GETSTSI  AMODE ANY                 Set Addressing Mode
GETSTSI  RMODE ANY                 Set Residency  Mode
         SPACE 1
GETSTSI  CSECT ,                   In the Beginning...
         USING GETSTSI,R15         Get Temporary Addressability
         STM   R14,R12,12(R13)     Save Caller's Registers
         B     PASTID              Branch Around ID Area
         SPACE 1
         DC    CL9'GETSTSI'        Module Name
         DC    CL9'&SYSDATC'       Date Assembled
         DC    CL6'&SYSTIME'       Time Assembled
         DC    C'&SYSTEM_ID'       System ID
         SPACE 1
PASTID   DS    0H
         DROP  R15                 Drop Temporary Addressability
         LR    R12,R15             Load Our Base Register and
         USING GETSTSI,R12         Get Permanent Addressability
         ST    R13,SAVEAREA+4      Point Our S/A to Caller's  (HSA)
         LR    R15,R13             Save Address of Caller's S/A
         LA    R13,SAVEAREA        Point to Our Save/Area
         ST    R13,8(,R15)         Point Caller's S/A to Ours (LSA)
         TITLE '***  Code to Issue STSI ***'
         CMSSTOR OBTAIN,           Get a Work Area to Hold STSI Data   +
               BYTES=4096,                                             =
+
               BNDRY=PAGE,                                             =
+
               LOC=ANY
         LTR   R15,R15             Did We Get Storage OK ?
         BNZ   EXIT                No, Exit
         LR    R10,R1              Save Address of Storage
         ST    R10,SSIBKA          Save it in the Program Also
         LM    R0,R1,STSI111       Load Parms to Get STSI 1.1.1 Info
         STSI  0(R10)              Get Basic Machine Configuration
         USING SSIBK,R10           Access STSI DSECT
         ...                   *Insert your code here*
         DROP  R10                 Release STSI DSECT
         CMSSTOR RELEASE,          Release Work Area for STSI Data     +
               BYTES=4096,                                             =
+
               ADDR=(R10)
         TITLE '***  Exit Linkage  ***'
EXIT     DS    0H
         L     R13,4(,R13)         Point to Caller's S/A (HSA)
         L     R14,12(,R13)        Restore Caller's Register 14
         LM    R0,R12,20(R13)      Restore Caller's Registers
         BR    R14                 Return to Caller
         TITLE '***  Working Storage  ***'
SAVEAREA DC    18A(0)              Our Register Save Area
STSI111  DC    X'10000001',X'00000001' Get STSI111 Settings
SSIBKA   DS    A                   Address of STSI Storage Area
CC0      EQU   8                   CC=0 means Mask=8
CC1      EQU   4                   CC=1 means Mask=4
CC2      EQU   2                   CC=2 means Mask=2
CC3      EQU   1                   CC=3 means Mask=1
         EJECT
         COPY  HCPSSIBK            STSI Block
         EJECT
*---------------------------------------------------------------------*
*        REGEQU MACRO - CMS Register Equates                          *
*---------------------------------------------------------------------*
         REGEQU ,                  CMS Register Equate Macro
         SPACE 1
         END   GETSTSI             That's All Folks...

-- 
Dale R. Smith

"Answers are easy.  It's asking the right questions which is hard."
- Doctor Who

On Thu, 6 Sep 2007 07:18:30 -0700, Derek Ackerman 
<[EMAIL PROTECTED]> wrote:

>Does anyone have an example of obtaining basic systrm info  from CMS 
assembler? I have several back level VM systems so I can't use the new =

REXX API. I need output from FC=1 and SEL1 & 2 = 1. My concerns a=
re: does 
the instruction require 64 bit mode? Does the 4K data area have to be a =

REAL level 1 storage address? I didn't see that in the POPs manual.  =
 
> 
>Derek  Ackerman
>Capacity Planning etc.
>(201) 759-0833


Reply via email to