Thank you!

Peter

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Ed Jaffe
Sent: Thursday, June 14, 2018 6:06 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Count Words?

On 6/14/2018 1:50 PM, Farley, Peter x23353 wrote:
> Any way you could share a code example?  Or at least pseudo code for the 
> technique?

Use VL to load 16 one-byte search arguments into (for example) V0
Use VLL to load 16 bytes (or how ever many remain if <16) of the string 
into (for example) V1
Use VFAEB to find the first matching byte e.g., VFAEB V1,V1,V0,1
If CC=not found, adjust string pointer up by 16 and remaining length 
down by 16 and loop back to the VLL (or exit if none left)
Otherwise, use VLGVG to get the matching ELE index from V1 into (for 
example) R15
Point to matching byte in the string by adding index value to the 
current string pointer e.g., LA R1,0(R15,1R1)

-- 


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

Reply via email to