Advertisement
AnthonyCagliano

Untitled

Dec 9th, 2022
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. pop af ; return original a
  2. and a, 7 ; and a with 7 to get a % 8
  3. ret z
  4. ld c, a ; this should only loop up to 7 times. if 8, should have been a byte
  5. ld b, 32
  6. xor a
  7. .shift_bits:
  8. ld e, (hl)
  9. ld d, c
  10. mlt de
  11. add a, e
  12. ld (hl), a
  13. ld a, d
  14. inc hl
  15. djnz .shift_bits
  16. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement