(defun has-flag (value flag &optional (flag-system *current-flag-system*)) (let ((flag-value (flag-value flag flag-system))) (= flag-value (logand value flag-value))))