MVC for Binary

HLASM for MVS. PL/I for MVS & Enterprise PL/I for z/OS.
Post Reply
User avatar
kingo
Registered Member
Posts: 27
Joined: Mon Jun 04, 2018 10:55 pm

MVC for Binary

Post by kingo »

Hi all,

I am just trying to do some R & D on MVC and Binary

Definitions:

Code: Select all

  Loc    Object Code      Addr1    Addr2    Stmt  Source Statement
000001C3                                     169 E        DS    0CL16
000001C3 FF                                  170          DC    B'11111111'
000001C4                                     171 F        DS    0CL16
000001C4 AB                                  172          DC    B'10101011'
000001C5                                     173 G        DS    0CL6
000001C5 FF                                  174          DC    B'11111111'
000001C6                                     175 H        DS    0CL1
000001C6 FF                                  176          DC    B'11111111'
000001C7                                     177 I        DS    0CL2
000001C7 FF                                  178          DC    B'11111111'
000001C8                                     179 OUTR     DS    CL6
000001CE                                     180 OUT1     DS    CL1
000001CF                                     181 OUT2     DS    CL2
MVC Statements:

Code: Select all

         MVC   OUTR,E
         PUT   SYSOUT,OUTR
         MVC   OUTR,F
         PUT   SYSOUT,OUTR
         MVC   OUTR,G
         PUT   SYSOUT,OUTR
         MVC   OUT1,H
         PUT   SYSOUT,OUT1
         MVC   OUT2,I
         PUT   SYSOUT,OUT2
OUTPUT I got:

Code: Select all

=COLS> ----+----1----+--
****** *****************
000001  ¿
       FAFFFF00000000000
       FBFFFF00000000000
------------------------
000002 ¿   ¿
       AFFFAF00000000000
       BFFFBF00000000000
------------------------
000003
       FFFFFF00000000000
       FFFFFF00000000000
------------------------
000004
       F0000000000000000
       F0000000000000000
------------------------
000005
       FF000000000000000
       FF000000000000000
My doubt is how am I getting values X'FF' on col6 line 1 and X'AB' & x'FF' in col5 & col6 line number 2 ?

P.S - > I am clear about first 5 bytes on line 1 and first 4 bytes on line 2

Could anyone please clarify?

Thanks.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: MVC for Binary

Post by Robert Sample »

My doubt is how am I getting values X'FF' on col6 line 1 and X'AB' & x'FF' in col5 & col6 line number 2 ?
Because you're doing some really weird things. E, for example, is defined as the next 16 bytes of memory (which includes the 5 bytes of bit strings, OUTR, OUT1, OUT2 and the next bytes as well -- when you say 0CL16, you get the next 16 bytes whether or not you declare them to be anything). You then define a single byte of X'FF' using a bit string. Then you define F as the NEXT 16 bytes of memory (overlapping E by 15 bytes) and define an X'AB' using a bit string, and so forth. So doing the MVC OUTR,E means the first byte gets moved from E to OUTR. The second byte gets moved from F to OUTR+1, G to OUTR+2, H to OUTR+3, I to OUTR+4. Since OUTR is a 6-byte field, the first byte of OUTR is then moved to OUTR+5. The same overlap occurs when you move F to OUTR, except now TWO bytes are copied from the front of OUTR to the back. As I said, you're doing some really weird things.
User avatar
kingo
Registered Member
Posts: 27
Joined: Mon Jun 04, 2018 10:55 pm

Re: MVC for Binary

Post by kingo »

As I said, you're doing some really weird things.
Hi Robert,

Yes, I was trying to identify and try out different combinations so really make more mistakes now and learn :)

Thanks for your explanation it cleared my doubt.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Assembler & PL/I.”