Article View: comp.lang.asm370
Article #751MVCL (was Re: why code in 370 Assembler)
From: "John A. Pershing Jr. 784-7167",...
Date: Fri, 26 Apr 1991 16:05
Date: Fri, 26 Apr 1991 16:05
22 lines
1682 bytes
1682 bytes
Invariably, registers 0, 1, 14, and 15 are available for use in an MVCL
instruction -- with no saving/restoring of previous contents. In fact,
I rarely see Real Programmers using any other registers with an MVCL!
Practical rule-of-thumb:
If the string being moved is known to *always* be 256 bytes or
less, then go with an EXECUTE of a MOVE CHARACTERS instruction (but
watch for a length of zero bytes!). If the string being moved is
of a constant length (i.e., known at assembly time) which is 4K or
less, then a series of MOVE CHARACTERS instructions is usually
"best" (*not* a loop: a series of MVC instructions). In all other
cases (more than 4K, or an unknown length that may exceed 256), go
with the MOVE LONG instruction.
Note that MOVE LONG cannot handle strings that are longer than 16 Megs
(the length fields are only the bottom 24 bits of the odd registers).
However, if you are dealing with objects whose sizes are measured in
megabytes, you probably shouldn't be moving them around, anyway...
John Pershing
IBM Research, Yorktown Heights
Technical Details
Message-ID:
<9104261626.AA19688@ucbvax.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!pacbell.com!ucsd!ucbvax!YKTVMH3.BITNET!PERSHNGShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!pacbell.com!ucsd!ucbvax!YKTVMH3.BITNET!PERSHNG
From: PERSHNG@YKTVMH3.BITNET ("John A. Pershing Jr. 784-7167", 914)
Newsgroups: comp.lang.asm370
Subject: MVCL (was Re: why code in 370 Assembler)
Message-ID: <9104261626.AA19688@ucbvax.Berkeley.EDU>
Date: 26 Apr 91 16:05:18 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: IBM 370 Assembly Programming Discussion List
<ASM370@OHSTVMA.BITNET>
Distribution: inet
Organization: The Internet
Lines: 22