Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pop af ; return original a
- and a, 7 ; and a with 7 to get a % 8
- ret z
- ld c, a ; this should only loop up to 7 times. if 8, should have been a byte
- ld b, 32
- xor a
- .shift_bits:
- ld e, (hl)
- ld d, c
- mlt de
- add a, e
- ld (hl), a
- ld a, d
- inc hl
- djnz .shift_bits
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement