----- Original Message -----
From: "Willy Jensen" <willy.h.jen...@outlook.com>
Sent: Wednesday, October 21, 2020 12:04 AM
Extract from a larger macro. And no, I was not overly concerned with
performance.
.* r15 : length
.* r14 -> source
.* r0 -> target
.* r1 used when short copy
.* select method
clfi r15,255 if source length
jh &l.ml gt 255 then use movelong
You need to test R15 being zero. Subtracting 1 and then doing an EX
is potentially dangerous.
bctr r15,0
lr r1,r0 copy target address
ex r15,&l.ms
j &l.x
&l.ms mvc 0(*-*,r1),0(r14) short copy
&l.ml lr r1,r15 copy length
mvcl r0,r14 long copy
&l.x ds 0h
Willy
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus