Clarify documentation of maskbits

This commit is contained in:
Rangi 2021-10-29 17:33:52 -04:00
parent 753ed7186c
commit 860585b0af

View File

@ -24,8 +24,8 @@ jumptable: MACRO
ENDM ENDM
maskbits: MACRO maskbits: MACRO
; masks just enough bits to cover the first argument ; masks just enough bits to cover values 0 to \1 - 1
; the second argument is an optional shift amount ; \2 is an optional shift amount
; e.g. "maskbits 26" becomes "and %00011111" (since 26 - 1 = %00011001) ; e.g. "maskbits 26" becomes "and %00011111" (since 26 - 1 = %00011001)
; and "maskbits 3, 2" becomes "and %00001100" (since "maskbits 3" becomes %00000011) ; and "maskbits 3, 2" becomes "and %00001100" (since "maskbits 3" becomes %00000011)
; example usage in rejection sampling: ; example usage in rejection sampling: