This is some of the original code, which now works.  Also experimenting with 
the 
other suggestions, for learning purposes.  
R8 is holding the variable number of bytes (length of 1-8).  The move below is 
working.  
Ran test data from 1-8 characters long, and it worked fine.  The other move 
works now 
also, after adding the registers.   
  
BUILDCRD DS    0H
  MVC   19(R8,R6),0(R7)  
 
         CLC   3(7,R7),=C'USERID='       
         BE    EDITCOLS                
         B     EDITEXIT                
EDITCOLS LA    R7,8(R7)                
         SR    R8,R8                   
EDITLOOP DS    0H                      
         CLC   SCANREC(L'CBLANK),CBLANK
         BNE   EDITACCM                
         BAL   R14,BUILDCRD            
         B     EDITEXIT                
EDITACCM LA    R8,1(R8)                
         LA    R7,1(R7)                
         CH    R8,CH8                                
         BH    EDITEXIT                              
         B     EDITLOOP 


From: Tony Harminc <[email protected]>
To: Rich Long <[email protected]> 
Sent: Thursday, November 21, 2013 6:33 PM
Subject: Re: Moves and others


On 21 November 2013 19:20, Rich Long <[email protected]> wrote: 

> What I did find curious is a register specified as the length in an MVC 
> instruction works.  That is,
> it looks at the value in the register, not the equated value.

It may seem to be doing that, but it isn't. There is just no place in
an MVC instruction to hold a register number to contain the length.

You seem to be thinking of the assembler language as somehow
independent of the underlying machine language, and that will lead to
grief before it leads to learning. No amount of tricky specifying of
things in the assembler syntax will force a machine instruction to do
something that it isn't made to do.

MVCL and some other move-type instructions use length(s) in registers,
but under no circumstances will MVC do so. But (as suggested earlier)
you can use EXecute of an MVC to modify the length field on the fly.

Show us your code...

Tony H.

Reply via email to