View previous topic :: View next topic |
Author |
Message |
danm Intermediate
Joined: 29 Jun 2004 Posts: 170 Topics: 73
|
Posted: Fri Jan 26, 2007 2:55 pm Post subject: MVC |
|
|
Code: |
MVC STR1,STR2
DS STR1 CL10
..
..
DS STR2 CL4
DS STR3 CL8
..
|
Suppose Str1 = '0123456789', Str2 = 'abcd', Str3 = 'efghijkl'. After the move, Str1 = 'abcdefghij'. How can I make Str1 = 'abcd______' (str2 padded with 6 blanks)? |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Jan 26, 2007 4:43 pm Post subject: |
|
|
fill STR1 with blanks before the move
Code: |
MVI STR1,C' '
MVC STR1+1(L'STR1-1),STR1
|
(That syntax may be off, but that is the idea... I haven't done much assembler lately) |
|
Back to top |
|
 |
Mervyn Moderator

Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Fri Jan 26, 2007 5:56 pm Post subject: |
|
|
... and then MVC STR1(4),STR2
In other words, you need to specify the length if it's not 10.
By the way, you've got DS and STR1, STR2, STR3 the wrong way round. _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
 |
|
|