From: "John McKown" <[email protected]>
Sent: Tuesday, June 03, 2014 11:12 PM

Both of the examples assume that the data value is _unsigned_, or is less
than or equal to 127 (0x7F). If this is not true, then I will insert a
slightly different solution:

Interesting thought, but for a sum check of bytes, the existing code using IC 
is adequate.

        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   Not needed because LB does sign extension.
Loop LB 4,0(7,6) Not sure when this came in.
        AR 2,4
        BCT 7,Loop

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com

Reply via email to