In article <[EMAIL PROTECTED]>,
   Jerry Ragland <[EMAIL PROTECTED]> wrote:
> Thanks John and Andy,

> Your solution worked perfectly  and now I am not getting SOC2. I am
> new to assembler and I find really hard to understand the explanation
> u have given. I understand that the macro expands inline with the
> code and I am trying to restore the registers back when I do a WTO.
> So as the macro ends I have the register contents back

Yup, but the program counter, ie address of the next instruction to
execute, in the PSW, is not in a register.  So although you're restored
the registers, the "next instruction" is the data in the start of your
save area.

> One more thing How I can display or print a value of a register in
> the spool ?

Convert the arbitrary hex value that's in it to something printable,
and WTO that.  Incidentally you might be better to use WTL (write to
log) since, depending on the routing/descriptor codes the WTO picks up,
you might be putting crappy WTO text on the consoles.

If you have the following defined somewhere

   HEXBYTES    DC    CL4
   HEXPRINT    DC    CL8
   HEXTRTAB    DC    X'F0F1F2F3F4F5F6F7F8F9C1C2C3C4C5C6'

then store the register concerned's value in HEXBYTES and do the
following, HEXPRINT will then hold the 8 printable characters you need
to display.  Comments show the changing values in HEXPRINT, supposing
that HEXBYTES starts of as X'ABCD289A', you end up with C'ABCD289A',
that is X'C1C2C3C4F2F8F9C1':

         MVI   HEXPRINT+0,X'00'            clear 8 byte answer area
         MVC   HEXPRINT+1(7),HEXPRINT      to X'0000000000000000'
*
         MVC   HEXPRINT+1(1),HEXBYTES+0    => X'00AB000000000000'
         MVC   HEXPRINT+3(1),HEXBYTES+1    => X'00AB00CD00000000'
         MVC   HEXPRINT+5(1),HEXBYTES+2    => X'00AB00CD00280000'
         MVC   HEXPRINT+7(1),HEXBYTES+3    => X'00AB00CD0028009A'
*
         MVO   HEXPRINT+0(2),HEXPRINT+0(2) => X'0ABB00CD0028009A'
         MVO   HEXPRINT+2(2),HEXPRINT+2(2) => X'0ABB0CDD0028009A'
         MVO   HEXPRINT+4(2),HEXPRINT+4(2) => X'0ABB0CDD0288009A'
         MVO   HEXPRINT+6(2),HEXPRINT+6(2) => X'0ABB0CDD028809AA'
*
         NI    HEXPRINT+1,X'0F'            => X'0A0B0CDD028809AA'
         NI    HEXPRINT+3,X'0F'            => X'0A0B0C0D028809AA'
         NI    HEXPRINT+5,X'0F'            => X'0A0B0C0D020809AA'
         NI    HEXPRINT+7,X'0F'            => X'0A0B0C0D0208090A'
*
         TR    HEXPRINT,HEXTRTAB           -> X'C1C2C3C4F2F8F9C1'

-- 
Jeremy C B Nicoll - my opinions are my own.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to