(xor-mem-region n sum mem) → mem
Function:
(defun xor-mem-region (n sum mem) (declare (xargs :stobjs (mem))) (declare (type (unsigned-byte 50) n) (type (unsigned-byte 8) sum)) (declare (xargs :guard (memp mem))) (let ((__function__ 'xor-mem-region)) (declare (ignorable __function__)) (if (mbe :logic (zp n) :exec (= n 0)) mem (b* ((val (the (unsigned-byte 8) (read-mem n mem))) (xor-sum (logxor (the (unsigned-byte 8) val) (the (unsigned-byte 8) sum)))) (xor-mem-region (the (unsigned-byte 50) (1- n)) (the (unsigned-byte 8) xor-sum) mem)))))