Command WEIGHT( S, I ).

Calculates number of set to 1 bits ("weight") in register S and assigns to I.

S - register X, Y or M.

I - variable of type Index.