>From: "Rob van der Heij" <[email protected]>
>Sent: Tuesday, June 03, 2014 1:00 AM
>
>Must have muissed something here.
>A 3-instruction loop to sum bytes.
>
> LA 6,X+offset (last byte of area to be summed)
> SR 2,2
> SR 4,4
>Loop IC 4,0(0,6)
> AR 2,4
> BCT 6,Loop
>
>And you can use BCTR to save a few µS.
Sorry to be picky but unless the string starts at location zero I think
you need:
LA 6,X (address of area to be summed)
LA 7,offset (offset to last byte of area to be summed)
SR 2,2
SR 4,4
Loop IC 4,0(7,6)
AR 2,4
BCT 7,Loop
Best regards, Steve Hobson
CICS Strategy, HLASM Development, Master Inventor
Hursley Laboratories, MP 189, Room A4126, UK
Tie: 246894 International: +44 1962 81 6894
Je me presse de rire de tout, de peur d'être obligé d'en pleurer
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU